Post by Admin on May 25, 2016 17:05:25 GMT
Hey Everyone,
Your new lesson is on the use of thermistors,an easy lesson BTW.
"Thermistor he says,what is That??"
Yepp,u guessed it right.The Word is made by joining the two obvious words "Thermal" and "Resistor".It’s just a simple device that changes it’s resistance based on TEMPERATURE.
Although thermistors won't help u finding the exact temperature or anything because they are hardly precise,they do help u keep a track of it,as in "finding the rough change in temperature or simply detecting the change".
The Plus Point with Thermistors is they are super cheap and incredibly easy to use.
So again,Basically,
A thermistor Simply changes its resistance with temperature so we can measure/detect that change using Arduino’s analogRead feature.
-->>What do we need and why??
Firstly,we need a fixed resistor(fixed resistance to be clear) that we can use for comparison (Let's say a 10K resistor).
Hence,we're creating a Voltage divider that divides the DC 5V supply between the thermistor and the resistor.
The Analog read on your arduino is a a sort of voltage meter, at 5V (max reading) it would read "1024", and at 0V it read "0". So we can measure how much voltage is on the thermistor using the analogRead and we have our reading.
The amount of that 5V that each part gets is proportional to its resistance(see circuit and apply Ohm's LAW).Therefore, if the the thermistor and the resistor have the same resistance, the 5V is split evenly (2.5V) to each part.(Analog reading of "512").
But if the thermistor is really hot and is reading only 1K of resistance, the 10K resistor is going to soak up 10 times as much of that 5V. So the thermistor would only get around some 0.45V. (analog reading of "92")
-->>Basically what happens in your refrigerator(Real Life Example), the thermistor is around 40K of resistance,& so the thermistor will soak up till 4 times as much of that 5V as the 10K resistor. So the thermistor gets around 4V. (analog reading of 819)
(U can test it if you want,by the method we taught u in Lesson 2 -Heavy Power Devices,using relay switches and stuff,but we wouldn't recommend u opening your refrigerator.Try it at your own Risk and take necessary precautions).
-->>The circuit is provided Below for reference:
-->>Since this is a very easy topic,no practice questions on it.This is what your ideal test code would look like:
int thermPin = A0; //analog pin 0
void setup()
{
Serial.begin(9600);
}
void loop()
{
int thermistorReading = analogRead(thermPin);
Serial.println(thermistorReading);
delay(300); //User reading time
}
-->>As obvious,u can check the readings in the serial monitor of your Arduino Software once u've uploaded the code.
-->>Keep experimenting and integrating it with other sytems,if u set things right and program correctly,maybe at some point of time in your future, u can code ur AC to turn on the moment the temperature crosses 35 degrees,well not exactly 35 but maybe u can set a range to detect the spikes.Say Whaaat,Things are getting interesting now aren't they.
Try it out,a thermistor is really cheap in the market and the process is easy and fun.
Peace Out,
till the next lesson.
Your new lesson is on the use of thermistors,an easy lesson BTW.
"Thermistor he says,what is That??"
Yepp,u guessed it right.The Word is made by joining the two obvious words "Thermal" and "Resistor".It’s just a simple device that changes it’s resistance based on TEMPERATURE.
Although thermistors won't help u finding the exact temperature or anything because they are hardly precise,they do help u keep a track of it,as in "finding the rough change in temperature or simply detecting the change".
The Plus Point with Thermistors is they are super cheap and incredibly easy to use.
So again,Basically,
A thermistor Simply changes its resistance with temperature so we can measure/detect that change using Arduino’s analogRead feature.
-->>What do we need and why??
Firstly,we need a fixed resistor(fixed resistance to be clear) that we can use for comparison (Let's say a 10K resistor).
Hence,we're creating a Voltage divider that divides the DC 5V supply between the thermistor and the resistor.
The Analog read on your arduino is a a sort of voltage meter, at 5V (max reading) it would read "1024", and at 0V it read "0". So we can measure how much voltage is on the thermistor using the analogRead and we have our reading.
The amount of that 5V that each part gets is proportional to its resistance(see circuit and apply Ohm's LAW).Therefore, if the the thermistor and the resistor have the same resistance, the 5V is split evenly (2.5V) to each part.(Analog reading of "512").
But if the thermistor is really hot and is reading only 1K of resistance, the 10K resistor is going to soak up 10 times as much of that 5V. So the thermistor would only get around some 0.45V. (analog reading of "92")
-->>Basically what happens in your refrigerator(Real Life Example), the thermistor is around 40K of resistance,& so the thermistor will soak up till 4 times as much of that 5V as the 10K resistor. So the thermistor gets around 4V. (analog reading of 819)
(U can test it if you want,by the method we taught u in Lesson 2 -Heavy Power Devices,using relay switches and stuff,but we wouldn't recommend u opening your refrigerator.Try it at your own Risk and take necessary precautions).
-->>The circuit is provided Below for reference:
-->>Since this is a very easy topic,no practice questions on it.This is what your ideal test code would look like:
int thermPin = A0; //analog pin 0
void setup()
{
Serial.begin(9600);
}
void loop()
{
int thermistorReading = analogRead(thermPin);
Serial.println(thermistorReading);
delay(300); //User reading time
}
-->>As obvious,u can check the readings in the serial monitor of your Arduino Software once u've uploaded the code.
-->>Keep experimenting and integrating it with other sytems,if u set things right and program correctly,maybe at some point of time in your future, u can code ur AC to turn on the moment the temperature crosses 35 degrees,well not exactly 35 but maybe u can set a range to detect the spikes.Say Whaaat,Things are getting interesting now aren't they.
Try it out,a thermistor is really cheap in the market and the process is easy and fun.
Peace Out,
till the next lesson.