hey guys, I hope this is the right place to post this.
Basically I am going through Sparks Fun tutorial #7, reading temperature off a TMP36 sensor.
My problem is that I am reading very low values on A0 from the sensor. I hooked it up correctly and when I read the voltage off the sensor with a multimeter, I get 520mV-550mV, which corresponds to a temperature of about 12C-15C (my heating is broken so that could make sense).
Do you guys know what the problem is? If it’s not the setup and not the sensor, why would the board read in really low values from A0? I am using an Arduino Uno, the relevant part of the code is below, atm the raw values on the A0 pin are close to 0, they do go up when I hold and warm the sensor.
const int temperaturePin = 0;
Serial.println(analogRead(temperaturePin));
I had similar issues with my Arduino Mega 2560 before, it would read around 0 no matter the input. Eventually i found it that my ADC converter was broken (the thing that actually reads the voltage and converts it into a value).
@Gero, if you do a search in the forum for “TMP36” you will see how others solved the measurement issues. Most solutions involve adding a 0.01uF capacitor across the analog input pin and ground.
thanks I had a look, unfortunately I don’t have a capacitor at hand, I guess I should order one, however I am still puzzled as to why a capacitor would raise the voltage read out on A0. The thing is with a multimeter I am reading 520mV between GND and Vout on the sensor.
If it’s an ADC issue how would I even go about investigating it?
I have tried A1/A2 also, no difference.
Edit: I just restarted the Arduino software and now A0 is reading 1.93V…I am not really sure anymore, I guess I will try the capacitor method.