I have a 10kΩ @ 25°C NTC thermistor for temperature measurement. Problem is, I only have 3.3 V on the board and the ADC inside my micro-controller has a Vref of 1.6 V.
I tried to make a voltage divider circuit (with two 10 kΩ resistors), then have the 2nd divider circuit with the thermistor and another 10 kΩ resistor to ground:
3.3 -------R1--+--(Therm)--+---ADC pin
| |
R2 R3
| |
GND GND
R1 = R2 + R3 = 10 kΩ
This didn't work. Is there a way to do what I need with resistors alone? Seems like there should be.
edit
Thanks to Steven, I was able to get the solution. I'm editing my original question so others can see the complete solution.
So I actually wanted the limit to be 122°F/50°C, and that (via lookup table for my thermistor) = 3500 Ω. Solving for R3 in the traditional voltage divider equation shows 3300 Ω. Now the issue is how to measure the resistance of the thermistor so the
Steinhart Hart equation can be used to calculate the temperature. Here is my code (excuse the python)
Vcc = 3.3 Rdiv = 3300 To = 298.15 # K = 25C beta = 3950 r25 = 10000 adc = readADC() V = float(adc) / 1024 * 1.6 R = (Rdiv*Vcc)/V - Rdiv r_inf = r25 * math.exp(-beta / To) tempK= beta / math.log(R / r_inf)
Best Answer
Calculate or lookup the NTC's resistance for the highest expected temperature, for instance 40 °C. Let's say your NTC's \$\beta\$ is 4310, then the resistance at 40°C will be 5 kΩ. Now remove R1 and R2, so that you're left with a simple divider NTC/R3. The 5 kΩ is your lowest resistance, and will give you the highest output voltage. That's your 1.6 V. Then
\$ \dfrac{R3}{R3 + 5 k\Omega} \cdot 3.3V = 1.6 V \$
from which you can calculate R3 = 4.7 kΩ. At 40 °C the output will be 1.6 V, decreasing with lower temperatures, like 1.06 V at 25 °C. As you can see the curve is fairly linear: