0% found this document useful (0 votes)
27 views3 pages

D T S K: Igital Emperature Ensor IT

The document describes a digital temperature sensor kit that uses a DS18B20 digital temperature sensor. The sensor outputs precise temperature readings in Celsius between -55 to 125 degrees. It connects to a microcontroller via a single data line using a complex communications protocol. The kit includes the temperature sensor, a PICAXE-08M microcontroller, LED, piezo buzzer, and other components to build a circuit to read temperature values and trigger outputs based on temperature thresholds. The document provides assembly instructions and example PICAXE code to test the sensor and display temperature readings.

Uploaded by

Philip Bullas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

D T S K: Igital Emperature Ensor IT

The document describes a digital temperature sensor kit that uses a DS18B20 digital temperature sensor. The sensor outputs precise temperature readings in Celsius between -55 to 125 degrees. It connects to a microcontroller via a single data line using a complex communications protocol. The kit includes the temperature sensor, a PICAXE-08M microcontroller, LED, piezo buzzer, and other components to build a circuit to read temperature values and trigger outputs based on temperature thresholds. The document provides assembly instructions and example PICAXE code to test the sensor and display temperature readings.

Uploaded by

Philip Bullas
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DIGITAL TEMPERATURE SENSOR KIT

Introduction
The DS18B20 is a digital temperature sensor that will output temperatues between 55 to + 125 degrees Celsius. This makes it simple to solder to wires or printed circuit boards. The advantages of a digital temperature sensor are principally with its precision output. As the sensor outputs a calibrated digital reading, the output is an exact temperature in degrees Celsius. This means no other components, such as an analogue to digital converter, are required within the electronic circuit to calibrate or amplify the signal. This is much simpler to use than, for instance, a simple thermistor which provides a non-linear resistance change with temperature variation, which makes it very difficult for students to calibrate exact temperature thresholds within their projects. It will also fit within the thin stainless steel tubes commonly used for thermocouples, making an instantly waterproof case.

V+ DQ 0V, GND

Using a digital temperature sensor


The communications protocol used by the temperature sensor is fairly complex, because data is sent in both directions along a single-wire. For this reason it is common to use a microcontroller to communicate with the sensor. The basic circuit for the temperature sensor is shown below. Note that this circuit could be used as shown to, for instance, switch on a fan when the temperature rises above a certain threshold value, but is really provided as a building-block to be incorporated within more complex circuits.

4.5V
C1 4k7 10k V+ iButton DS18B20 sin in4 in3 1 2 3 4 8 0V out0 out1 out2

J1

D1

output

C2

08M

7 6 5

1k TR1

22k switch 10k serial

piezo

0V
The circuit is based around an 8 pin microcontroller, the low-cost PICAXE-08M. The circuit is fairly self-explanatory and includes the following features: temp sensor switch piezo sounder output pin output LED (input 4) for reading the signal from the DS18B20 sensor (input 3) optional digital input switch (active low) (output 2) for generating beep sounds for user feedback (output 1) for driving an output device such as solenoid or motor (output 0) indicator to show temperature value

revolution

Revolution Education Ltd. Email: [email protected] Web: www.rev-ed.co.uk Version 2.1 05/2010

AXE1 13.PMD

PICAXE-08M Digital Temperature Sensor Kit

Using the PICAXE Software


Important Note The kits are provided with a PICAXE-08M microcontroller that has not already been programmed, and so it is necessary to program the microcontroller before use. This PICAXE program lights the LED if the temperature is too high. When the temperature is to low the output is switched on (e.g. to switch on a heater) init: low 0 low 1 main: sound 2,(50,50) ' click piezo readtemp 4,b1 ' read temperature if b1 > 30 then too_hot if b1 < 20 then too_cold goto init ' ok so switch everything off too_hot: high 0 goto main too_cold: high 1 goto main ' outputs off

' LED on

' heater on

Sensor Test Program This PICAXE displays the temperature value constantly on-screen. main: readtemp 4,b1 debug b1 pause 250 goto main ' read temperature ' display on screen ' short pause

revolution

Revolution Education Ltd. Email: [email protected] Web: www.rev-ed.co.uk Version 2.1 05/2010

AXE1 13.PMD

PICAXE-08M Digital Temperature Sensor Kit

AXE113 Temperature Sensor Kit Assembly Instructions

red black
+ PWR

PZO BTN LED - +

- +

V+ DS18B20 data connections 0V LED connections

V+ DQ 0V, GND

Contents: R1 R2 R3 R4,R5 R6 D1 C1 LED1 Q1 PZ CT2,3 CT4 IC1 IC2 PCB

4k7 resistor (yellow violet red gold) 1k resistor (brown black red gold) 330 resistor (orange orange brown gold) 10k resistor (brown black orange gold) 22k resistor (red red orange gold) 1N4001 diode 100nF polyester capacitor 5mm LED BC548B transistor piezo sounder 2 pin terminal block (may be supplied as 4 way - snap into 2x2) stereo download socket PICAXE-08M microcontroller and 8 pin socket DS18B20 digital temperature sensor printed circuit board, battery snap and 4.5V battery box Note that part C2 is not required for this project.

Assembly: 1. Solder the resistors and the diode D1 in position, ensuring the white bar of the diode is to the right. 2. Solder a resistor leg as a link between the two outer + holes on jumper J1. 3. Solder the 8 pin IC socket in position and insert the microcontroller. 4. Solder the capacitor C1 into position. 5. Solder the transistor Q1 into position, ensuring correct orientation of curved edge. Solder the LED in the LED position at the left side of the board. 6. Solder the digital temperature sensor via wires to the board as shown in the digram above. Note the pads are unmarked on the board. 7. Solder the piezo in position, red wire to +, black wire to -. 8. Solder the stereo download socket into position, ensuring it clicks flat onto the PCB. 9. Solder the terminal blocks into position. connect the battery snap to the power connector CT2 (V+ red, 0V black)

revolution

Revolution Education Ltd. Email: [email protected] Web: www.rev-ed.co.uk Version 2.1 05/2010

AXE1 13.PMD

You might also like