LM35 temperature sensor


5 ₪

الناشر: متجر القطع الالكترونية

القسم: مستشعرات - سينسور

تاريخ النشر: 2021-02-03



Definition

A temperature is an objective comparative measure of hot or cold. It is measured by a thermometer, Several scales and units exist for measuring temperature, the most common being Celsius (denoted °C; formerly called centigrade), Fahrenheit (denoted °F), and, especially in science, Kelvin (denoted K).






Sensor Output:

Sensor gives linear + 10.0 mV/°C scale factor, as per that we have set the calibration in program Vref=5V ADC Count for 1°C = 10m/(5/1024) = 2.048 Temperature=ADC Count/2.048






Arduino Circuit for Temperature measurement






Arduino Code for Temperature measurement

code
نسخ
اقتباس
عرض
تنزيل
	
								
/* Temperature Measurement: Reads an analog input on pin A0, converts it to Temperature, and prints the result to the serial monitor. Graphical representation is available using serial plotter (Tools > Serial Plotter menu) Attach the LM35 Temperature Sensor as shown in Circuit. */ // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() { // read the input on analog pin 0, we have connected LM35 Output int sensorValue = analogRead(A0); // Convert the analog reading (which goes from 0 - 1023) to a Temperature: float Temperature = sensorValue / 2.048; // print out the value you read: Serial.print("Temperature:"); Serial.println(Temperature); delay(1000); }





OR you can use LIBRARY : download



code for lib:

code
نسخ
اقتباس
عرض
تنزيل
	
								
#include <LM35.h> LM35 sensor(0); void setup() { Serial.begin(9600); } void loop() { Serial.println(sensor.getTemp()); // Temp in celcius delay(1000); }





سلة المشتريات افراغ السلة