Pages: [1]   Go Down
Author Topic: How to Stop Analog Pin to float  (Read 732 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 68
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,
             i am working on project in which i have to measure pressure. Pressure sensor is given analog signal which i have to read by analog pin. if i am not connect pressure sensor to analog pin then respective analog pin given me floating vales which is random.

so how could i know is sensor is connected or not. is any logic of method which tell us pin is floating.

Thanks in Advance
Any kind of comment would be appreciated
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
so how could i know is sensor is connected or not. is any logic of method which tell us pin is floating.
No, there isn't.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26489
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try turning on the internal pullup resistor. Then an unconnected input will read as a steady 1023.
Hopefully the 30K-50K resistor is high enough to not impact the sensor.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: