The DS18B20 or DS18S20 is used as the outdoor temperature sensor. These temperature sensors measure the temperature quite accurately and can be placed inside the hive with a cable. The DS18B20 differs from the DS18S20 in that it is already equipped with a long waterproof cable. For simplicity’s sake we use the DS18B20 directly and invest the small extra charge. With some shrink tubing you can build a waterproof outdoor temperature sensor out of the DS18S20.
The sensors can be configured in maintenance mode. The temperature sensor must be assigned to the ThingSpeak field as shown in the figure below:
The cost of the sensors is 2.60 euros per sensor with a cable length of 3 meters. On Ebay they are available in packs of 5.
The connection of further temperature sensors can be implemented according to the following structure. Up to 30 temperature sensors can be connected to a 1-Wire GPIO.
- Red (VCC) at PIN 17 (3.3V)
- Green (Data) at PIN 7 (GPIO4) / From version v0.1.1 it is GPIO11
- Black (GND) at PIN 14 (Ground)
- Connect VCC and Data with 4,700 Ohm resistor
The following section explains further details for those who want to make changes to the system.
A 1Wire PIN is used on the Raspberry Pi. 1Wire must be enabled on the Raspberry Pi system. This configuration allows us to connect any number of temperature sensors. These are all listed with a device ID in the directory “/sys/bus/w1/devices/”.
The web interface reads in the PHP backend with a shell command which temperature sensors are connected to the 1Wire bus and displays them in this dropdown list.
Translated 28.07.2019 by JK