My ADSB Receiver Box – Temperature Sensors – Upgrade 2

The ADSB receiver OS image that I use provides several performance graphs including the CPU temperature. For receivers installed on a remote location that is maybe not enough to monitor what’s going on inside and outside the box. For that reason I decided to install additional temperature sensors in my ADSB receiver box. My choice was the the Dallas DS1820 1-wire temperature sensor. It’s easy to interface to an Raspberry Pi and the kernel comes already with drivers. Perfect for that purpose.

This upgrade is divided into two steps: 1. Connect the DS1820 to the Raspberry Pi and configure the kernel drivers – 2. Reconfiguring the collectd service and the shell script that is creating the performance graph so that the additional temperatures will be logged and plotted as well.

DS1820 sensors measuring inner and outer box temperature


DS1820 sensor connection to Raspberry Pi 2/3

DS1820 pin Raspberry Pi I/O header pin
VDD Pin 1 = 3.3V
DQ Pin 7 = GPIO 4
GND Pin 6 or 9 = GND


DS1820 sensor pinout

DS1820 connection to Rasperry Pi

One additional 4.7kOhm resistor is required between 3.3V and signal DQ as shown in schematic.

Enable 1-wire kernel driver

The 1-wire kernel driver will be enabled in /boot/config.txt by adding the following lines at the end:

#Enable One-Wire bus

Since we use an external pull-up resistor the GPIO will not use its internal.

After reboot the sensors can be checked like this:
$ cat /sys/bus/w1/devices/10-000800507da4/w1_slave

1e 00 4b 46 ff ff 0c 10 fc : crc=fc YES
1e 00 4b 46 ff ff 0c 10 fc t=15000

$ cat /sys/bus/w1/devices/10-0008008d2583/w1_slave

04 00 4b 46 ff ff 09 10 fb : crc=fb YES
04 00 4b 46 ff ff 09 10 fb t=2187

The folder names are different for any connected sensor as they depend on the sensor serial number. So use $ ls /sys/bus/w1/devices/ to list available folders.

Temperature is given at the end of second line in 1/1000th degree Celsius, here 15000 = 15.000 degree Celsius and 2187 = 2.187 degree Celsius.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments will be moderated! Spam deleted immediately!
Before you submit form:
Human test by Not Captcha