Help with flex sensor

Hello all,

Could someone point me in the right direction here. I'm very new to all this, just got my board today along with a few other components to try out. One of them is a flex sensor ,this one (http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=150551) but cannot figure out how to wire it to the board.

Can someone explain where the two leads are supposed to go? I guess two of these three: 5V+, GND, Analog Pin

Also, do I need a resistor somewhere in this? If I do, is a 10kohms the correct one to use? researching the net, i found that you're supposed to use a resistor equal to the lowest on the specs of the sensor, 10k i guess looking at the product page of the sensor.

I was playing with a potentiometer, with 3 leads, connected each to 5+, Gnd, and AnalongPin and that worked. I was seeing values from 0 to 1024, but I can't figure out a connection between the two items, one having 3 leads the other only 2.

This is probably cake to most of you, judging by most of the other threads, but your help will be greatly appreciated.

Thanks much
-Alex

hi

you have the general idea already.... you're on exactly the right track. To make a flex sensor work, you need another resistor. Together they form a voltage divider. Go to your electronics store and get some 1K, 10K and 100K resistors. Connect them with the sensor as shown in this diagram. For what you need, one resistor is the diagram is the sensor, and the other is a plain old resistor. +VS in the diagram would be +5, and Vo goes to the analog in.

Try different values to learn how the effect the voltage on the analog pin. The code for the potentiometer example will work fine.
You should also look up 'voltage divider' on the net and do some reading, as that explains the general priniciples behind using resistive sensors.

Hope this helps

D