Thermistor and the calculas?
grasshopper
Posts: 438
I am using a thermistor and my mind has lost its focus.
As of now I can read the sensor and it changes with a change in temperature. I am using a Steinhart Hart equation but my concern is this.
1. If my Voltage divider is as follows in picture 1 then my total current is 125.0uA. Vin is 5volts
2. if my voltage divider is as in picture 2 then my total current is 69.4uA. Vin is 5volts
My problem is that in order for me to correctly read the thermistor I must know the current. In order to know the current I must know the Resistance. But how can i know the resistance if i can get the current. My voltage is the same but my mind is lost. I was going to implement some sort of derivative but i am at a loss.
3. I wont know the resistance because i cant calculate the voltage in efforts to get the current.
My prop code
As of now I can read the sensor and it changes with a change in temperature. I am using a Steinhart Hart equation but my concern is this.
1. If my Voltage divider is as follows in picture 1 then my total current is 125.0uA. Vin is 5volts
2. if my voltage divider is as in picture 2 then my total current is 69.4uA. Vin is 5volts
My problem is that in order for me to correctly read the thermistor I must know the current. In order to know the current I must know the Resistance. But how can i know the resistance if i can get the current. My voltage is the same but my mind is lost. I was going to implement some sort of derivative but i am at a loss.
3. I wont know the resistance because i cant calculate the voltage in efforts to get the current.
My prop code
pub Calc_Volts | amps amps := 0.00026497 microVolts := 0.000076295 Volts := MAT.FMul(mat.ffloat(Board_temp), microvolts) Resistance := Mat.Fdiv(Volts,amps) Steinhart_Hart pub Steinhart_Hart | ScrapBit1 '1/K = [noparse][[/noparse]A + B log ( r ) ] + [noparse][[/noparse]C log ( R ) ^3] ScrapBit := G.Log10(resistance) Scrapbit1 := G.Fmul (scrapbit , StHeart_B) ScrapBit1 := G.Fadd (Scrapbit1, StHeart_A) ScrapBit2 := G.Fmul(ScrapBit, ScrapBit) ScrapBit2 := G.Fmul(ScrapBit2, ScrapBit)'cube ScrapBit3 := G.Fmul(ScrapBit2, StHeart_C)'mul to C ScrapBit3 := G.Fadd(scrapBit1,ScrapBit3) Kelvin := G.Fdiv ((G.FFloat(one)),scrapBit3) Celsius := G.Fsub(Kelvin, Con_Celsius) G.stop
Comments
Vt = 5000 * Rt/(Rt+10000) voltage divider equation, Vt is measured across Rt
keep it in ohms and millivolts for integer scaling,
solve for Rt
Rt = 10000 * Vt / (5000 - Vt)
For example, if you see Vt = 2501 milivolts, then R = 10008 ohms.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 6/21/2008 7:02:21 PM GMT
Sorry i see what you mean now. Took a cold beer and now i understand.
R = V / I = Vt / ((Vdd - Vt) / 10K)
Perfect way to put it.
I got to slow down at times. Thanks again fellas