User Tools

Site Tools


tutorials:learn:sensors:fsr.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:learn:sensors:fsr.html [2010/10/07 19:29]
daigo
tutorials:learn:sensors:fsr.html [2016/01/28 18:05] (current)
Line 87: Line 87:
 [[http://​www.arijoseph.com/​blog/​2008/​10/​itppcomp-tapper-proposal/​|Tapper,​ a musical interface that works by having you tap your fingers to the music]] [[http://​www.arijoseph.com/​blog/​2008/​10/​itppcomp-tapper-proposal/​|Tapper,​ a musical interface that works by having you tap your fingers to the music]]
  
 +\\
  
  
Line 111: Line 111:
  
 ^Force (lb)^Force (N)^FSR Resistance^(FSR + R) Ω^Current thru FSR+R^Voltage across R^ ^Force (lb)^Force (N)^FSR Resistance^(FSR + R) Ω^Current thru FSR+R^Voltage across R^
-^None^None^|Infinite|Infinite!|0 mA|0V| +^None^None|Infinite|Infinite!|0 mA|0V| 
-^0.04 lb^0.2 N^|30KΩ|40 KΩ|0.13 mA|1.3 V| +^0.04 lb^0.2 N|30KΩ|40 KΩ|0.13 mA|1.3 V| 
-^0.22 lb^1 N^|6 KΩ| 16 KΩ|0.31 mA|3.1 V| +^0.22 lb^1 N|6 KΩ| 16 KΩ|0.31 mA|3.1 V| 
-^2.2 lb^10 N^|1 KΩ|11 KΩ|0.45 mA|4.5 V| +^2.2 lb^10 N|1 KΩ|11 KΩ|0.45 mA|4.5 V| 
-^22 lb^100 N^|250 Ω|10.25 KΩ|0.49 mA|4.9 V|+^22 lb^100 N|250 Ω|10.25 KΩ|0.49 mA|4.9 V|
 //This table indicates the approximate analog voltage based on the sensor force/​resistance w/a 5V supply and 10K pulldown resistor// //This table indicates the approximate analog voltage based on the sensor force/​resistance w/a 5V supply and 10K pulldown resistor//
  
 Note that our method takes the somewhat linear resistivity but does not provide linear voltage! That's because the voltage equasion is: Note that our method takes the somewhat linear resistivity but does not provide linear voltage! That's because the voltage equasion is:
  
-<p align="​center"​ class="​style2"​>Vo = Vcc ( R / (R + FSR) )+<code>Vo = Vcc ( R / (R + FSR) )</​code>​ 
 + 
  
 That is, the voltage is proportional to the **inverse** of the FSR resistance. That is, the voltage is proportional to the **inverse** of the FSR resistance.
Line 196: Line 198:
  
 void loop(void) { void loop(void) {
-  fsrReading = analogRead(0);  ​+  fsrReading = analogRead(fsrPin);  ​
   ​   ​
   Serial.print("​Analog reading = ");   Serial.print("​Analog reading = ");
Line 215: Line 217:
   delay(1000);​   delay(1000);​
 } </​code> ​ } </​code> ​
- 
 ==== In-depth code for analog FSR measurements ​ ==== ==== In-depth code for analog FSR measurements ​ ====
 {{  http://​www.ladyada.net/​images/​sensors/​fsrpulldowndia.png?​nolink&​427x338 ​ |}}{{ http://​www.ladyada.net/​images/​sensors/​fsrpulldownsch.gif?​nolink&​184x334 |}} {{  http://​www.ladyada.net/​images/​sensors/​fsrpulldowndia.png?​nolink&​427x338 ​ |}}{{ http://​www.ladyada.net/​images/​sensors/​fsrpulldownsch.gif?​nolink&​184x334 |}}
Line 303: Line 304:
 In this case, our '​bucket'​ is a 0.1uF ceramic capacitor. You can change the capacitor nearly any way you want but the timing values will also change. 0.1uF seems to be an OK place to start for these FSRs.  In this case, our '​bucket'​ is a 0.1uF ceramic capacitor. You can change the capacitor nearly any way you want but the timing values will also change. 0.1uF seems to be an OK place to start for these FSRs. 
  
-<code C><pre style="​border:​ 1px solid #CCCCCC; background-color:​ #f5f5f5; font-family:​ Fixed, monospace;​ +<code C>/* FSR simple testing sketch. ​
-       ​font-size:​ 95%;">/* FSR simple testing sketch. ​+
  
 Connect one end of FSR to power, the other end to pin 2. Connect one end of FSR to power, the other end to pin 2.
/home/ladyada/public_html/wiki/data/attic/tutorials/learn/sensors/fsr.html.1286479798.txt.gz · Last modified: 2016/01/28 18:05 (external edit)