Arduino analog returns value of 14

Hello forum, I have been wrecking my brain a bit trying to figure this issue out. I have setup and LCD screen to display what port A0 is reading, at any given time Port A0 value returns 14. I have installed a loadcell using the same steps as http://cerulean.dk/words/?page_id=42 , It works but the value stills shows 14 and rises after that. So my question is, what is causing my port A0 to return 14 value instead of 0. Also if i change the port to A1 or A2 the value returns as 15 and 16. thanks in advance!

skater90255: Hello forum, I have been wrecking my brain a bit trying to figure this issue out. I have setup and LCD screen to display what port A0 is reading, at any given time Port A0 value returns 14. I have installed a loadcell using the same steps as http://cerulean.dk/words/?page_id=42 , It works but the value stills shows 14 and rises after that. So my question is, what is causing my port A0 to return 14 value instead of 0. Also if i change the port to A1 or A2 the value returns as 15 and 16. thanks in advance!

Most likely it's just the 'preload' value on the strain gage or the 'offset' voltage of the op-amp. You could either verify that by measuring the voltage being presented on pin A0 with a decent digital multimeter, or disconnect the wire and ground pin A0 and see if your sketch then 'sees' a zero count.

Lefty

Thanks for the reply! I have unplugged pin A0 completely and i still get the value of 14, an interesting thing just happened. Now it is fluctuating between 13-15 without being plugged in, could this just be a faulty board?

skater90255: Thanks for the reply! I have unplugged pin A0 completely and i still get the value of 14, an interesting thing just happened. Now it is fluctuating between 13-15 without being plugged in, could this just be a faulty board?

No, just reading a analog pin with nothing wired to it gives random values as you are reading a 'floating input pin condition', you must present a valid voltage to the pin before trusting the number returned, so ground it and see if you get 0 counts and then wire it to the 5V pin and see if you then get 1023 counts.

Lefty

Hi Everyone, I just figured out the issue i was having, turned out to be a coding issue. In the code I put lcd.print(A0); What i should of written was lcd.print(analogRead(A0); I know its late but this might help someone else having this issue.