Close

TEMPERATURE SENSOR

adnanansari9580adnan.ansari9580 wrote 02/29/2020 at 18:21 • 6 min read • Like

TEMPREATURE SENSOR:-

INTRODUCTION:-

Thermistor Temperature sensor is a type of resistor is variable and dependent on temperature of the surroundings. You can see these types of sensors in power banks various electronic devices which is meant for certain temp range and to detect and work according to it. These are easy to use and can be hooked up to any microcontroller to get the desired output.

As these are small and easy to fit at any place so it is very common and used among the people .I am also using this one as it is easy to connect and the output is also simple.it is very basic one and easily available in market.

DESCRIPTION:-

Thermistor temperature sensor is a sensor which is built out of LM393 ic a Thermo-Resistor a variable resistor to trim the values of range of the value given by the sensor to the microcontroller.

Sensor also has an onboard Power led and an onboard Status led which will glow up whenever the sensor senses the temperature more than the threshold value.

Thermo-Resistor is a type of Resistor which is dependent on the temperature of the surrounding to give the values. It senses the environment temperature and then sends the signal to the microcontroller.

*NOTE:- AS THIS SENSOR IS A TYPE OF RESISTOR THEN THERE IS A CHANCE OF CERTAIN VARITIONS IN THE VALUES.

 

This sensor gives the output of DIGITAL and ANALOG type. Difference b/w analog and digital signal is that in the digital signal only high state or low state is given but in the analog signal values b/w 0-1023 is given which is more suitable for condition in the code.

SCHEMATIC DIAGRAM:-

FEATURES AND APPLICATIONS:-

NOTE:- AS SENSOR IS AMLL SO USE IT CAREFULLY

COMPONENTS NEEDED:-

CIRCUIT DIAGRAM:-

 

First take the power lines onto the bread board from microcontroller

VCC/5v-->+ line and GND--> - line.

Then connect the sensor on to the bread board and connect power to the sensor from powerlines using jumper wires.

Now connect D0 PIN OF SENSOR TO DIGITAL(PIN 2) OF THE MICROCONTROLLER and AND A0 PIN TO THE A0 PIN OF THE MICROCONTROLLER.

Connect an led to the digital pin 3 of the microcontroller

CODE:-

//put this code in the ide of arduino from this line 

//this for digital value

 int tempsensor=2; // initializing the digital pin

 int led=3;

 int value;

void setup(){

 Serial.begin(9600);

pinMode(tempsensor, INPUT);

pinMode(led, OUTPUT);

}

void loop(){

value=digitalRead(tempsensor); // reading the digital dat from the sensor

digitalWrite(led, value); // switching buzzer on or off

}

//put this code in the ide of arduino from this line

//note:- this code is for analog value

int tempsensor=A0; //initializing the analog pin

 int led=3; // initializing buzzer pin

 int value;

void setup(){

 Serial.begin(9600);

pinMode(tempsensor, INPUT); // assing the pin mode type of the pin as input or output

pinMode(led, OUTPUT);

}

void loop(){

value=analogRead(tempsensor); //reading the valus from the sensor

value=map(value,0,1023,0,255); // mapping the value from 0 to 1023 b/w 0 to 255

digitalWrite(led, value); //

}

WORKING:-

As the code starts it initializes the pin to which the temperature sensor is connected. As soon as the termo-resistor changes its resistance from one value to another it send its data then the microcontroller. Then according to the condition in the code the microcontroller turn led on or off.

PCB DESIGNING:-

Now we have got the PCB design and it’s time to order the PCB’s. For that, you just have to go to JLCPCB.com, and click on “QUOTE NOW” button.

JLCPCB are also sponsor of this project. JLCPCB (ShenzhenJLC Electronics Co., Ltd.), is the largest PCB prototype enterprise in Chinaand a high-tech manufacturer specializing in quick PCB prototype and small-batch PCB production. You can order a minimum of 5 PCBs for just $2.

To get the PCB manufactured, upload the gerber file you downloaded in the last step. Upload the.zip file or you can also drag and drop the gerber files.

After uploading the zip file, you’ll see a success message at the bottom if the file is successfully uploaded.You can review the PCB in the Gerber viewer to make sure everything is good. You can view both top and bottom of the PCB.

After making sure our PCB looks good, we can now place the order at a reasonable price. You can order 5 PCBs for just $2 but if it’s your first order then you can get 10 PCBs for $2.

To place the order, click on “SAVE TO CART” button.

My PCBs took 2 days to get manufactured and arrived within a week using DHL delivery option. PCBs were well packed and the quality was really good.

*NOTE:- If you need pcb gor this project than contact me or write me in the comment.

Like

Discussions