Skip to content

tempsensors

Jan edited this page Nov 10, 2023 · 6 revisions

Temperature Sensors

We are using DS18B20 digital temperature sensors. These are connect to the 1-wire-bus from the RaspberryPI (GPIO 4). (HAT fixed Pull-Up 10k, Relayboard Pull-Up potentiometer)

Schematic

see relayboard schematic

Node-RED Node

In Node-RED we installed a custom node 'node-red-contrib-ds18b20-sensor' to interact with the sensors. Check the temperature DS18B20 flow for details. The sensors are read every 30s and this node gives us an array of all detected sensors. Values are stored in the global variables 'Temp1' to 'Temp4'. If you are using other sensors or get data from other places/devices, simply write your data to these global variables and it will show up in the frontend.

Set Names

To differentiate the sensors the function "get temp sensors" can be used. If this function is active the sensor values are checked every second for 1 minute. Now change the temperature on a specific sensor to locate them. After finding the right sensor, its name can be set accordingly to show up in the frontend.

HeaterSensor

An inside temperature sensor (1-4) can be defined to set a specific sensor as a reference for the heater control. This sensor is stored in the global variable 'heattempsensor'.

Hardware

There is a 10k pullup resistor on the RPI HAT and a 0-10k potentiometer on the relayboard. Normally, with the 10k, four sensors can be read without any problem. In case there are more sensors connected or long wires are in place, change the resistance on the relayboard with the potentiometer. This can help to catch all sensors.

Buy in our Shop

Clone this wiki locally