December 27, 2012

Temperature Sensors DS18B20

For my upcoming TFT Touch Shield project I've setup two DS18B20 temperature sensors. These sensors using the 1-wire interface which means that I just need one Arduino pin for those two sensors.

The first temperature sensor (sensor above in the image) is connected with VDD, DQ (Data In/Out) and GND. Between VDD and DQ there's a 4.7 kOhm resistor. The second one (sensor below in the image) is only connected by DQ and GND. This one is in parasite mode which takes the power from the DQ and therefore doesn't need an external power supply. The temperature sensor is a DS18B20+PAR which already connects internally Pin 1 (GND) and Pin 3 (VDD).


This is the Arduino Serial Monitor output using the OneWire example code:


    R=28 2A 4C 3C 4 0 0 6B Device is a DS18B20 family device.
    P=1 53 1 4B 46 7F FF D 10 E9  CRC=E9
    21.18
    R=28 C6 96 90 4 0 0 67 Device is a DS18B20 family device.
    P=1 51 1 4B 46 7F FF F 10 FE  CRC=FE
    21.06

Every DS18B20 temperature sensor has a unique ID. 28 C6 96 90 4 0 0 67 is use by the DS18B20+ and 28 2A 4C 3C 4 0 0 6B is the ID for the DS18B20+ PAR sensor.


I've been using the parasite temperature sensor as outdoor sensor. Therefore I only need two wires for GND and DQ. And this is the temperature curve when I made the temperature sensor with a glue gun water resistant:
Thanks to maxim integrated for the samples. I think I would never tested the DS18B20+PAR.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.