circ-13_ pressure sensor- no reading

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jim_lucas
 
Posts: 11
Joined: Fri Jun 10, 2016 2:15 pm

circ-13_ pressure sensor- no reading

Post by jim_lucas »

I'm on circ-13 of the "Experimenter's Guide for Arduino" and looking forward to my certificate of completion/UNO degree when I nail this one (I'll make that myself).

The result I'm getting is an LED that's on 100% of the time, and the serial monitor is showing a value of

I've rewired this a couple of times. That doesn't seem to solve it. I've also taken a multimeter to the FSR. it seems to give values that you would expect (high resistance for no pressure and decreasing resistance as pressure is applied).

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: circ-13_ pressure sensor- no reading

Post by Franklin97355 »

Post some photos of your circuit and, if you modified the code at all, your code. We'll take a look.

User avatar
jim_lucas
 
Posts: 11
Joined: Fri Jun 10, 2016 2:15 pm

Re: circ-13_ pressure sensor- no reading

Post by jim_lucas »

I've attached a photo of the circuit.
Pic of circuit
Pic of circuit
circuit-squeeze.jpg (449.45 KiB) Viewed 1186 times
Here's the code (I changed the variable names slightly because I tried to do 2 sensors right out of the gate- when that didn't work I went back to sensor):
---
int sensePin1=2;
int ledPin1=9;

void setup() {
Serial.begin(9600);
pinMode(ledPin1,OUTPUT);
}

void loop() {
int value1 = analogRead(sensePin1)/4;
analogWrite(ledPin1,value1);
Serial.println(value1);
}
---
Note: I forgot to say the value I was getting from the serial port. It started at about 112, and then stabilized at about 86.
Also note: I tried changing the resistor value that goes from FSR. I tried 1K and 5K. That didn't do anything.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: circ-13_ pressure sensor- no reading

Post by adafruit_support_bill »

You are missing the connection from the FSR to analog pin 2. The analog value is 'floating', since there is no connection to the pin.

User avatar
jim_lucas
 
Posts: 11
Joined: Fri Jun 10, 2016 2:15 pm

Re: circ-13_ pressure sensor- no reading

Post by jim_lucas »

You're right... I adjusted and it worked. I really appreciate you reviewing and helping out.

. . . . <= tears of thankfulness, dissipated hopelessness and released frustration.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: circ-13_ pressure sensor- no reading

Post by adafruit_support_bill »

Awesome! Happy to help. :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”