Devices & Components
Arduino Uno Rev3
Breadboard (generic)
Jumper wires (generic)
Thermistor NTC 10K
Resistor 10k ohm
Software & Tools
Arduino IDE
Arduino Web Editor
Project description
Code
Thermistor
arduino
1//Thermometer with thermistor 2 3/*thermistor parameters: 4 * RT0: 10 000 Ω 5 * B: 3977 K +- 0.75% 6 * T0: 25 C 7 * +- 5% 8 */ 9 10//These values are in the datasheet 11#define RT0 10000 // Ω 12#define B 3977 // K 13//-------------------------------------- 14 15 16#define VCC 5 //Supply voltage 17#define R 10000 //R=10KΩ 18 19//Variables 20float RT, VR, ln, TX, T0, VRT; 21 22void setup() { 23 Serial.begin(9600); 24 T0 = 25 + 273.15; //Temperature T0 from datasheet, conversion from Celsius to kelvin 25} 26 27void loop() { 28 VRT = analogRead(A0); //Acquisition analog value of VRT 29 VRT = (5.00 / 1023.00) * VRT; //Conversion to voltage 30 VR = VCC - VRT; 31 RT = VRT / (VR / R); //Resistance of RT 32 33 ln = log(RT / RT0); 34 TX = (1 / ((ln / B) + (1 / T0))); //Temperature from thermistor 35 36 TX = TX - 273.15; //Conversion to Celsius 37 38 Serial.print("Temperature:"); 39 Serial.print("\ "); 40 Serial.print(TX); 41 Serial.print("C\ \ "); 42 Serial.print(TX + 273.15); //Conversion to Kelvin 43 Serial.print("K\ \ "); 44 Serial.print((TX * 1.8) + 32); //Conversion to Fahrenheit 45 Serial.println("F"); 46 delay(500); 47 48} 49 50 51 52 53
Downloadable files
termistore_bb.jpg
termistore_bb.jpg

termistore_schem.jpg
termistore_schem.jpg

termistore_schem.jpg
termistore_schem.jpg

termistore_bb.jpg
termistore_bb.jpg

Comments
Only logged in users can leave comments