loading

This circuit will display you the temperature. You can make the circuit with a lm339n or like my circuit. My circuit is the easy way, and with a lm339n you will need a potentiometer and some extra components. as a add to this, there is a connection problem, the resistor on the thermistor must be connected at the voltage. I will change the scheme tomorrow.

Step 1: Make the Circuit

I have use a 10k thiristor, 10 k resistor, 560 ohm x2 resistor and 2 LED-s and 6 or 7 wires.

If you want to have a stronger light from the LED you need to put in your circuit a smaller resistor, 100 ohm is perfect. Unfortunately at the moment I don't have at home 2x100 ohm resistor just 560 ohms.

Step 2: Code

I have serched on internet a code to fit on my circuit, I have find one here on instructables, but the temperature was only in kalvin, so I take a look on the arduino website and find a patch of code witch converts my temperature from kelvin to celsius. so here is the code

/*
ADC C

250, 1.4

275, 4.0

300, 6.4

325, 8.8

350, 11.1

375, 13.4

400, 15.6

425, 17.8

450, 20.0

475, 22.2

500, 24.4

525, 26.7

550, 29.0

575, 31.3

600, 33.7

625, 36.1

650, 38.7

675, 41.3

700, 44.1

725, 47.1

750, 50.2

775, 53.7

784, 55.0

800, 61.5

850, 66.2

875, 71.5

900, 77.9

925, 85.7

937, 90.3

950, 96.0

975, 111.2

1000, 139.5

*/

#include <math.h>

double Thermister(int RawADC)

{

double temp;

temp = log(((10240000/RawADC) - 10000));

temp = 1 / (0.001129148 + (0.000234125 * temp) + (0.0000000876741 * temp * temp * temp)); temp = temp - 273.15; // convertire kelvin la celsius

Serial.print("Celsius=");

return temp; }

int tempPin = 1; // conectare termistor si rezistenta de 10k

int temp; // citire analog

int LEDCool = 10; // Led temperatura joasa

int LEDHot = 9; // LED temperatura peste temperatura mediului ambiant

int breakPoint = 450;

void setup(void) { Serial.begin(9600); }

void loop(void) { temp = analogRead(tempPin);

Serial.println(int(Thermister(analogRead(1))));

Serial.print("Kelvin = ");

Serial.println(temp); // citire valori

if (temp <= breakPoint)

{ //in functie de temperatura de referinta hotaraste daca e cald sau rece

digitalWrite (LEDCool, HIGH);

digitalWrite (LEDHot, LOW);

}

else

{

digitalWrite (LEDHot, HIGH);

digitalWrite (LEDCool, LOW); delay(1000); }

}

Step 3: Display

You can show the results on a display but also on the serial monitor from the arduino. My display is not working so I have display my results on the serial monitor fron Arduino program.

Step 4: Fahrenheit Instate of Celsius

If you want to display Fahrenheit instate of Celsius the code is:

#include <math.h>

doubleThermister(int RawADC)

{

double temp;

temp = log(((10240000/RawADC) - 10000));

temp = 1 / (0.001129148 + (0.000234125 * temp) + (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;

}

int tempPin = 1; // the thermistor and 10k resistor

int temp;// the analog reading from the sensor divider

int LEDCool = 10; // connect Blue LED to pin 10

int LEDHot = 9; // connect Red LED to pin 9

int breakPoint = 450;

void setup(void) { Serial.begin(9600);

}

void loop(void)

{

temp = analogRead(tempPin);

Serial.print("Fahrenheit=");

Serial.println(int(Thermister(analogRead(1))));

Serial.print("Kelvin = ");

Serial.println(temp); // reading the values

if (temp <= breakPoint)

{ //is cool or hot?

digitalWrite (LEDCool, HIGH);

digitalWrite (LEDHot, LOW);

}

else{ digitalWrite (LEDHot, HIGH);

digitalWrite (LEDCool, LOW);

delay(1000);

}

}

Step 5: Finish

This is all, I hope it was all ok for you. If you change the value of the thermistor you must also change the value of resistor from the thermistor, because you will receive some different values. for example, if you put in your circuit a 4.7 k thermistor the resistor in the circuit must be 4.7 k ohm or a value near 4.7 k okm.

<p>Nicely done. Thanks for sharing this!</p>
<p>you welcome. I hope you enjoy it.now I can see there is a little problem in my schematic circuit:)) the 10k resistor is connected at ground, but the resistor must be connected at V. I will change it tomorrow :)</p>
<p>is nice , i like, i have some of these dif. duinos around, but havent really done much with them, I did get a stepper motor (a really tiny gear motor) going wth an adjustable speed -- but I want to get some LCD display stuff going, a very versatile controller</p>
<p>If you want I can make this day an ex with a motor and gears. I can also make the example with a distance sensor, so the gears can avoid the obstacles.</p>

About This Instructable

1,086views

32favorites

License:

Bio: <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src ...</script> More »
More by cosminaalexandra.dulamita:Temperature on LCD 16x2 temperature reader 
Add instructable to: