Temperature sensor schematic needed
-
- Posts: 1
- Joined: Tue Apr 03, 2012 9:34 am
Temperature sensor schematic needed
The Arduino analog temperature sensor doesn't have a thermistor on it, it has an LM35. Can you add a link to the schematic so I know how to read it? Or a link to a c routine to read it?
Re: Temperature sensor schematic needed
Hi,there
Sorry friend, I don't have the schematic. The one standing on the board is thermistor,another IC on the board is LM358,Low Power Dual Operational Amplifiers,not LM35.
relating code:
Regards,
Jack
Sorry friend, I don't have the schematic. The one standing on the board is thermistor,another IC on the board is LM358,Low Power Dual Operational Amplifiers,not LM35.
relating code:
Code: Select all
#include <math.h>
double Thermister(int RawADC) {
double Temp;
Temp = log(((10240000/RawADC) - 10000));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
Temp = Temp - 273.15; // Convert Kelvin to Celcius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(int(Thermister(analogRead(0)))); // display Fahrenheit
delay(100);
}
Jack
Re: Temperature sensor schematic needed
I guess thats easy.
The LM35 has three lines: Ucc, gnd and analog out.
Hold the TO92 facing you - pins down:
Ucc-> 5V (left pin)
gnd-> GND (right pin)
Uout ->analog X (middle pin) (X=0..5)
The voltage you get is 10mV / deg C (cannot measuser below freezing with this method)
int val= analogRead(X); // read LM35
float voltage=val*5.0/1023.0; //convert to actual voltage
float tempC=val*100; // scale to show deg C
This vil give you approx 1/5 deg resolution (want better..--> need an OP-amp!)
Its possible to read temp down to -6 degC if you add a diode and a resistor
This will take two analog inputs (using the difference to indicate temp)
Knut, Norway
The LM35 has three lines: Ucc, gnd and analog out.
Hold the TO92 facing you - pins down:
Ucc-> 5V (left pin)
gnd-> GND (right pin)
Uout ->analog X (middle pin) (X=0..5)
The voltage you get is 10mV / deg C (cannot measuser below freezing with this method)
int val= analogRead(X); // read LM35
float voltage=val*5.0/1023.0; //convert to actual voltage
float tempC=val*100; // scale to show deg C
This vil give you approx 1/5 deg resolution (want better..--> need an OP-amp!)
Its possible to read temp down to -6 degC if you add a diode and a resistor
This will take two analog inputs (using the difference to indicate temp)
Knut, Norway
- techsupport
- Site Admin
- Posts: 210
- Joined: Sat Mar 03, 2012 2:32 pm
Re: Temperature sensor schematic needed
yeap, you make it works now? 

Your real trustworthy partner in China!!
Email: forum@geeetech.com
Email: forum@geeetech.com