This instructable explains how to connect an analog sensor to the Arduino (in our case will use a Lilypad).

Material you will need:

- one Lilypad Arduino (www.sparkfun.com)
- one FTDI board (www.sparkfun.com)
- one USB A to mini B cable (www.sparkfun.com or Radio Shack)
- one analog textile press button or a stretch sensor (www.plugandwear.com)
- 4 crocodile cables (Radio Shack)
- a 10 kOhm resistor (Radio Shack)
- a 1 kOhm resistor (Radio Shack)
Brief introduction:
While DIGITAL sensors are able to detect only two levels (HIGH or LOW, ON or OFF, TRUE or FALSE, 0V or +5V), ANALOG sensors are used to detect physical quantities with different levels (i.e. a pressure sensor measuring weight from 0 Kg to 5 Kg).
At each variation of the pressure (sensor input), a proportional variation of its output will occour.

For our instructable we will use a textile resistive sensor that changes its resistance with applied mechanical pressure. The more weight we apply to the sensor, the lower its electrical resistance will be.

Lilypad is not able to read resistance, so we'll have to convert our variation of resistance into a variation of VOLTAGE, that is something the Lilypad can read. We'll do this using the circuit in the image.

This circuit is able to transform a RESISTANCE variation of VR1 (our sensor) into a VOLTAGE variation. You can verify by putting your multimeter on Ohm and read the voltage between 0V and the sensor output.

Step 1: Connect the Sensor 1

Using one crocodile cable (RED if you have one, as RED is the color for positive) connect the '+' pad of your Lilypad to your sensor. Sensors are not polarized, so it does not matter on which side you connect it. This procedure is shown for an analog textile press button, but the same one could be applied for a stretch sensor.

<p>Hello, i really love the ideea but since i am a noob when it comes to arduino, i would like to ask: How many pressure sensors can be conected to a single arduino?</p><p>Thank you.</p>
<p>Minimum 5 Analog and 12 digital</p>
<p>I would think maximum (not minimum) 5 analog.<br>12 digital true, but not many digital pressure sensors in the DIY world.<br>btw on a Nano and some mini's there are 7 analog ports</p>

About This Instructable




Bio: Electronic engineer with 25 years experience in textiles. Currently working on interactive fabrics.
More by rmarchesi:Connecting a textile analog sensor to Arduino How to connect solar cells to fabric How to make (and connect) a soft potentiometer 
Add instructable to: