top of page

Temperature Sensor

The Sensor module has a total of five sensor ports for DS18b20 sensors.

​

The come in many differnt forms and price ranges but essentially all do the same thing.

​

Here is how to set one up....

Temp Sensor

One-wire sensor

The DS18B20 is a digital temperature sensor that uses the 1-Wire protocol for communication. It provides accurate temperature readings from -55°C to +125°C with a resolution of 9 to 12 bits. The sensor has three pins: VCC (power), GND (ground), and DATA (signal). It works by converting temperature into a digital signal, which can be read by microcontrollers like Arduino, ESP32, or Raspberry Pi. Multiple DS18B20 sensors can be connected to a single data line, making it ideal for multi-point temperature monitoring in various applications.

Hardware conection

How its conected

Each temperature sensor conects to its own port, each port has Ground, 5v and Signal inputs. The sensors have three wires that are usually black (Ground), Red (5v) and Yellow (Signal).

​

When making your conections ensure the sensor module has no power!

​

These should be connected to the Sensor module respectivly.

Software setup

Checking the Code

Setting up the One wire Tempsensors requres inputing the unique Device id into the code, each device has it own ID and for each senor you will need to modify the code as described below. I recomend adding the sensors one by one and changing the code as you go, this way it is easier to know which sensor has which device ID.

​

Looking at the code below you will need to uncomment the sensors one by one and add the adresses as you go.

onewire1.png

Start by leaving all the senosrs commented out with the # at the begining. leaving just the first three lines seen here.

Each sensor port has the following code lines here is an explanation:

​

Address :  This is the unique address of the sensors that you will need to retrive from the logs and input here.

​

Name: This is the name you give the sensor, you can change it to whatever you like.

​

Update interval: This is how often a reading is taken, here set to 10 seconds.

onewire3_edited.jpg

Click on the ESP home add-on in the sidebar and you should see your sensor module device, Click on logs and you should see the log load up.... this can sometimes take a while to get the conection but once it loads you should see this.

Here you can see that it has found the sensors and the device IDs are listed here, copy them into the code.

In this example Two sensors are uncommented and active, at the bottom of the log you can see the readings they are giving.

onewire2_edited_edited.jpg

The new ESP home sensors my not apear in your dashboard and nee to be added. To do this go to settings then devices and services.

​

You should see somewhere on that page the sensor module ESP home. Click on add and then follow the few steps needed to add the integration.

​

You will only need to do this once, if you already did this when adding another sensor then go directly to your dashboard.

onewire4.png

In your dashboard you should now be able to add the cards for these new sensors.

​

Click on Edit then add card at the bottom right. You can then Select Gauge.

​

In the next window you can select the Entity if it isnt alread selected, you can give the card a name and change other options here too..

Photos...

IMG_20250206_205336.jpg

DS18B20 Sensors

IMG_20250206_205408.jpg

DS18B20 Sensors

IMG_20250206_205345.jpg

DS18B20 Sensors

IMG_20250206_205441.jpg

Connection to sensor module

IMG_20250206_205512.jpg

DS18B20 Sensor in Aquarium

Links

Here are a few links to where you can purchase your sensors, click the link depending on your location.

​

Worldwide link generally takes longer to be delivered but is a little cheaper. Better if you want to bulk order.

​

Me Personnaly I order most of my stuff from Aliexpress, it normally gets here fairly quickly and tends to be a little cheaper.

If I need something quick I order from amazon.

Full disclosure: some of these links are affiliate links, clicking them and purchasing though my links helps me support the project.

bottom of page