Saturday, April 16, 2011

Flex Sensors

Our flex sensors came in on Wednesday, and we've spent the last couple of days trying them out.  We ordered 4 of the 4.5" sensors and 3 of the 2.2" ones, and Roop was so nice that he ordered us an extra sensor in each size.  Thanks Roop!!

Flex sensors are just variable resistors, and as you bend them, their resistance increases.  We first wanted to find out the actual resistance ranges so we hooked it up to a multimeter.  Doing it handheld (i.e. flex sensor in hand and multimeter leads hooked up) was rather difficult, so we did it using a protoboard.  We discovered that the flex sensors vary in range.  While they are close to each other, there is some variation.  For the voltage divider circuit, we chose a resistance that was in the middle of the range, so that we could get the most ADC variation.

After building a couple of test circuits, we connected the Firefly's ADC pins to the flex sensors via a breadboard.  The Firefly ADC header has 8 ADC ports (ADC0-ADC7) and two pins for power (3.3V) and ground.  Using these pins, we connected two flex sensors.  We used the same bmac_sensors program from the Firefly tutorial lab, but modified.  It now prints out the ADC values for seven sensors, named thumb, index, middle, ring, pinky, front, and side.  The first five are obvious (hopefully).  The front and side sensors are to detect if the hand is angled to the right or if it's bent forward, as some letters use these motions.

Unfortunately, the wireless transmission didn't work, so we'll have to try that later.  In the meantime though, we got the Firefly to print out the seven ADC values to the terminal, and we used that to figure out the ranges of the flex sensors.  Since each sensor had a different resistor range, we tested each one individually and numbered them.

Now that we have all that data, the next step is to make the glove, which we intend to do this weekend.

P.S. Hard data and pictures to come!

1 comment: