Electronic – arduino – How to find out the voltage on Arduino ADC input

arduinosensortemperature

I am a complete beginner in the field of electrical engineering. I have this temperature sensor with 2k Ohm resistance on 25°C. I have wired it parallel to a 3.6k Ohm resistor to lower the overall resistance, powered by the 5V output on my Arduino Duemilanove with ATmega168 chip. I connected this to an analog input channel.

My problem is how to translate the numbers I read from my analog input into temperature in °C.

My approach is the following:

  • 1/R = 1/\$R_1\$ + 1/\$R_2\$, so 1/R = 1/3600 \$\Omega\$ + 1/2000 \$\Omega\$, so R = 1286 \$\Omega\$.
  • R = U / I <=> R \$\times\$ I = U, hence 1286 \$\Omega\$ \$\times\$ I = U
  • Arduino analog input maps from 0V to 5V to 0..1023. Using this I can translate a given number into a voltage, and use the formula above (and a resistance table for that sensor) to calculate the currently measured temperature.

As you can see, I have not figured out yet what I would be in these calculations. Is my approach correct, and what is I in this context?

I would appreciate a hint in the right direction. Thanks in advance.

Best Answer

I think you are approaching this the wrong way. You shouldn't be placing the resistor in parallel, rather you should be placing it in series. If you place them in parallel, you will only ever read a fixed 5v on one side or 0v on the other. You will then use the ADC on the Arduino to measure the voltage between the temperature sensors and the resistor.

What you are doing is creating a where the resistance of the temperature sensor is changing.

The equation become non-linear, so if you would like to make it simpler you can combine series and parallel as explained in this answer.