Make Every Week: Distance Sensor Demo

I stumbled on a fun, visceral way to show how Arduinos can sense and respond.

In preparation for a presentation at the Online News Association Conference in Los Angeles, I grabbed a Ping distance sensor I had in a bin. The Ping works like a bat — it emits an inaudible, high-frequency sound, and listens for the sound to bounce off an object. The round-trip time between ping and reflection reveals the distance.

To show that distance, I used a strip of multicolored LEDs called Neopixels, which are cool because you can control a whole line of lights using just three wires: one for power, one for ground and one connected to an Arduino data pin.

I initially planned to make the LEDs light up vertically or change colors when someone put their hand in front of the sensor. But then I realized it’d be far cooler to have the lights follow someone’s hand.

The experience is pretty cool. It feels almost magic!

The tech stuff

The example program for the Ping turns readings into centimeters, so all it took was some tinkering to figure out how many LEDs are in each centimeter. For my strip, the answer is about 1.34, and the key line is here:

leds_long = cm * 1.36;

The entire program is here.

And here’s how everything is wired up:


Monitoring the Monongahela

Yesterday the Streamlab class put do-it-yourself water monitors into Gatorade bottles and anchored them in the Monongahela River near Morgantown, West Virginia. They’re now texting their data readings live.

The link to the live chart is here, and the raw data is here.

We’re sensing conductivity, which is a good indicator of dissolved solids in the water, and temperature. The locations are: upstream of an industrial site, downstream of the same site and further downstream below the Morgantown lock and dam. 

Read more »

Make Every Week: Message From a Bottle

A summer of tinkering has culminated with a conductivity and temperature sensor that texts its data from inside a Gatorade bottle.

The contraption consists of a Riffle, which is an Arduino-like board designed to fit through the mouth of a water bottle and a Fona cell-phone board. And a bottle.

The plan is to submerge several of these along a stretch of the Monongahela River as part of a sensor-journalism class at the University of West Virginia. It’s a work in progress, but you can [see how things are going]. My job was to build a working conductivity sensor that would report its findings live. Here are the components and how I made it go.

Update: We actually deployed some of these sensors in a river!

Read more »

Make Every Week: Sensing Human Touch

Capacitive sensing is how your phone’s touch screen works — basically detecting the natural charge in a person’s body on the screen.

I’ve seen Team Blinky friend Liza Stark play and build simple touch sensors using the same technique with Arduino, so this week I gave it a try.

My goal: Use a touch sensor instead of a button on the Monthly Mood Cube.

It turns out to be pretty easy.

Read more »

Make Every Week: Temp -> Text -> Table

Texting temperature data to Twitter is fun, but more useful is sending that information to a table.

That’s what I did this week, as my wanderings into wireless data collection continue: Post the temperature and humidity from my little experiment to a table at data.sparkfun.com.

Here are the steps as things stand now:

  1. The sensor reads the data (as in my original post).
  2. The Ardunio formats a message and texts it with a Fona (wiring details here, updated code here).
  3. Instead of texting to Twitter, it now texts to a phone number I bought at Twilio for $1/month.
  4. Twilio then relays that data to my project server in the Amazon cloud as an http “POST” (deets on setting up a cloud server here).
  5. My project server parses the text message, composes a URL with the data, and hits the Sparkfun open data system with that URL (code for that is here).

This all happens in just a few seconds, every 20 minutes.

Read more »