Difference between revisions of "Microduino Digital tube thermometer(LM35, DS18b20)"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{{Language | Microduino 数码管温度计(LM35, DS18b20)}} {| style="width: 800px;" |- | ==Objective== This tutorial will teach you using two temperature sensor, that are LM3...")
 
(First Experiment(LM35 temperature sensor))
Line 21: Line 21:
  
 
'''LM35 temperature sensor'''
 
'''LM35 temperature sensor'''
[[File:LM35 temperature sensor.jpg|600px|center|thumb]]
+
[[File:LM35温度传感器.jpg|600px|center|thumb]]
  
 
LM35 temperature sensor output voltage linear relationship between the Celsius temperature scale,0 ℃, output is 0V, for every 1℃increases in output voltage of 10mV.
 
LM35 temperature sensor output voltage linear relationship between the Celsius temperature scale,0 ℃, output is 0V, for every 1℃increases in output voltage of 10mV.
Line 47: Line 47:
 
  
 
  
 
Identify the pin easily, put the sensor as upper picture, the left pin is power, the middle pin is data, the right pin is GND.
 
Identify the pin easily, put the sensor as upper picture, the left pin is power, the middle pin is data, the right pin is GND.
 
  
 
==Schematic==
 
==Schematic==

Revision as of 13:52, 1 April 2014

Language: English  • 中文

Objective

This tutorial will teach you using two temperature sensor, that are LM35 and DS18B20, and use the digital tube to display the temperature.

Equipment


First Experiment(LM35 temperature sensor)

LM35 temperature sensor

LM35温度传感器.jpg

LM35 temperature sensor output voltage linear relationship between the Celsius temperature scale,0 ℃, output is 0V, for every 1℃increases in output voltage of 10mV.

  • Sensor parameters:
    • Input voltage 35V to -0.2V
    • Output voltage 6V to -1.0V
    • Output current 10mA
    • Specified operating temperature range
    • LM35A -55℃ to +150℃
    • LM35C, LM35CA -40℃ to +110℃
    • LM35D 0℃ to +100℃

   

  • specification:(detailed information, please refer to LM35 datasheft)
    • 1. Working voltage:DC4~30V;
    • 2. Working current:less than 133μA;
    • 3. Output voltage:+6V~-1.0V;
    • 4. Output impedance: 1mA 0.1Ω load
    • 5. Precision:0.5℃ (at +25℃);
    • 6. Leakage current:less than 60μA;
    • 7. Proportion factor: linear +10.0mV/℃;
    • 8. Nonlinear values:±1/4℃;
    • 9. Calibration method: directly use Celsius temperature calibration;
    • 10. Rated temperature range:-55~+150℃。

   Identify the pin easily, put the sensor as upper picture, the left pin is power, the middle pin is data, the right pin is GND.

Schematic

Microduino数码管温度计(LM35, DS18B20)原理图.jpg

Pin table:

Microduino pin Digital tube pin
D2 10(A)
D3 9(B)
D4 1(C)
D5 4(D)
D6 3(E)
D7 6(F)
D8 5(G)
9 2(DP)
D10 8(LED1)
D11 7(LED2)

Program

LM35 and DS18B20 use the same program.

Refers to MicroduinoDigitalThermometerLM35-DS18B20.ino


Debug

Step 1:Copy the code to IDE and compile it

Step 2:Set up the circuit, as follows:

Microduino数码管温度计(LM35, DS18B20)连接图1.jpg

Step 3:Download the program and then run it.

Step 4:Observe the digital tube. Find a hot object to close the temperature sensor, the digital tube will display the value.

Result

After LM35 sensor near the heat source, the digital tube displayed value will rise, leave the heat source temperature will gradually reduce.


Second Experiment (DS18B20 temperature sensor)

DS18B20 temperature sensor

DS18B20温度传感器.jpg

DS18B20 is a single bus digital sensors produced by United States DALLAS company, convert temperature variation to digital signal, and each device has an unique serial number, so can realize multipoint measurement. Its measuring range is -55°C to +125 °C, in which -10°C to +85°C range measuring accuracy can reach ±0.5°C. It is only has three pins, GND, DQ and VDD, power supply can be directly by the cable itself, also can use external power supply, it is convenient to use, but must pay a price for this kind of convenient. Its timing is critical, various operation on DS18B20 must be conducted in accordance with the protocol of DS18B20. Operation protocol contains: initialize DS18B20, send ROM function command, send the memory operation command and process data. If there are more interrupt in program, or the hardware connection wire is too long, which can cause temporal waveform distortion, then result in chaotic measurement results. Based on this situation which makes use of this chip by certain restrictions.

Identify the pin easily, put the sensor as upper picture, the left pin is power, the middle pin is data, the right pin is GND.

Schematic

Microduino数码管温度计(LM35, DS18B20)原理图.jpg

Pin table:

Microduino pin Digital tube pin
D2 10(A)
D3 9(B)
D4 1(C)
D5 4(D)
D6 3(E)
D7 6(F)
D8 5(G)
9 2(DP)
D10 8(LED1)
D11 7(LED2)

Program

LM35 and DS18B20 use the same program.

Refer to MicroduinoDigitalThermometerLM35-DS18B20.ino


Debug

Step 1:Copy the code to IDE and compile it

Step 2:Set up the circuit, as follows:

Microduino数码管温度计(LM35, DS18B20)连接图2.jpg

Step 3:Download the program and then run it.

Step 4:Observe the digital tube. Find a hot object to close the temperature sensor, the digital tube will display the value.


Result

After DS18B20 sensor near the heat source, the digital tube displayed value will rise, leave the heat source temperature will gradually reduce.

Video

LM35: http://v.youku.com/v_show/id_XNjkwMTI3ODA4.html

DS18B20: http://v.youku.com/v_show/id_XNjgyMzE4ODg4.html