Skip to the content
PCBKitNew board
2 layers83.8 × 52.1 mmThetaProbe, the printed circuit board in 3D

Measures temperatures with several DS1820 sensors and controlls a heater.

Size
83.8 × 52.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
15
Nets
38
Pads
72
Tracks, vias
102, 0
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
29 Dec 2023
Updated
6 Oct 2024

Overview

ThetaProbe is an open-source printed circuit board by Linoprit, from the Linoprit/ThetaMon3 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 83.8 × 52.1 mm with 15 parts on 38 nets, routed with 102 tracks and 0 vias.

It is built around the ESP32-DEVKITC-VE and BME280. Its parts include 7 connectors, 6 resistors, 1 capacitor and 1 IC. It belongs with the home automation and IoT and sensors and measurement boards and the ESP32 boards of this library.

Main components

2

README

README.md

ThetaMon3

ThetaMon3 is based on an ESP32 controller, which reads a bunch of sensors and sends the results to a MQTT-Broker, like Mosquitto. I use three probes, together with my Home Assistant installation to control the temperature in remote buildings.

drawing

Features Overview

  • Reads DS18B20 sensor array, connected to two channels. In the current configuration, it can read up to five sensors per channel. If you need more, simply increase DS18B20_MAX_DEVICES in Config.h.
  • It also reads BME280 values, temp, hummidity and pressure.
  • Currently, every channel needs at least one sensor. So a minimum configuration is two DS18B20 sensors and one BME280.
  • Based on a look-up table, placed as file image on the controller, two relays are switched, depending on the given thresholds. Every device works independently.
  • Measurements are taken every minute and the average of these measurements are sent to an Mqtt broker every five minutes.
  • There is a command-line-interface, you could connect to with a terminal programm, like GTK-Term. So you can have insight, what is going on in your setup and you can change several settings with it.
  • Also, there are Mqtt-channels for remote accessing the device, or read loggings.

Why two OneWire-channels?
I simply had the problem that in the workshop the location of the probe was in the middle of the sensor chain. Unfortunately, it was not possible to place it at one end or the other of the sensor chain.

What's it all about?

To understand what ThetaMon does and what it is meant for, we take a look at where the idea comes from.

My wife owns really a lot of pot-plants. These must be kept in a warmer place during the winter time, so we bring them into the garages. Unfortunately, on some days the outside temperatures could drop so low, that even in the garage the plants will die. Of course you use an electric heater, but the control of such devices is not particularly precise. So the idea came up to build a system, that measures at different places in the room, to bring more insight how the heat is distributed and which places are save. Above that, to provide a finer regulation of the heating.

I put together the first version of ThetaMon, based on STM32F103 controllers, it consisted of two satellites and a base-station. The communication was done with NRF24 radios, which are long range capable (more or less...). The base-station was connected to an orange-pi which ran an apache webserver installation and hosted a page to show the graphs of all sensors for the last 24 hours. One very crucial point was, that the satellites work independently. If the connection to the base broke, they must have benn capable to do the regulation. This means, that every node in the system has to keep a table with all relevant temperature-thresholds.

This system ran fine for some years, but I wanted more flexibility and insight, if things went wrong. Sometimes temperature sensors failed, due to connector problems, or the NRF24 modules failed. ThetaMon2 took a very long time to develop, and it became very complex. For example I needed an EEPROM with some kind of file-system to store the sensor tables. The html-generation was done by own code on the used Banana-Pi. Finaly it worked and it was used for one year.

In winter 2023 I took the time to try, if ESP32 with external antenna could keep a stable connection to the Wlan. And yes, it did! Also I looked for some different possibility to do the development and found, that PlatformIO is so much powerfull. Then, a colleague showed me what he does with home automation and I came up to use Home Assistant as dashboard solution. ThetaMon3 took only a half year of development, not only because large parts of code from TM2 have been overtaken, it turned out that PlatformIO absolutely speeds up things.

Getting started

Refer to: SettingUpThetaMonProbe.
You need a working Visual Studio Code, together with PlatformIO.

For a complete command-reference see CommandLineReference.

Integrating to Home Assistant

The probes data is transmitted via mqtt, so you could integrate it whereever you want. Because I use HA, I describe the integration for it.

The name of your location (spot), where the probe is placed is defined in „MqttConfig.txt“, that resides on your ESP. Every sensor has a shortname, defined in „ID_Table_U64.txt“. These two names result in a mqtt publishing, in the form <Location>/sens/<Sensor-Shortname>. Your Home Automation system has to subscribe every sensor. The sensor data is transmitted in Json-format, i.e. "{"HUMID":51.21}"

Your Mosquitto installation and setup should have been done in the last step. You could use Home Assistants Mosquitto plugin.
Go to the file /homeassistant/configuration.yaml, use the text-editor-plugin. Create a new section

text
mqtt:
    sensor:

Then for every sensor enter a block like this:

text
    - name: "<Location> <Sensor-Shortname>"
      unique_id: <Location><Sensor-Shortname>
      state_class: "measurement"
      state_topic: "<Location>/sens/<Sensor-Shortname>"
      unit_of_measurement: "°C"
      expire_after: 480
      value_template: "{{ value_json.TEMP }}"

Unit and value_template for other sensors:

Pressure:

text
      unit_of_measurement: "hPa"
      value_template: "{{ value_json.PRESS }}"

Hummidity:

text
      unit_of_measurement: "%"
      value_template: "{{ value_json.HUMID }}"

Relay:

text
      unit_of_measurement: "0/1"
      value_template: "{{ value_json.RELAY }}"

Example configuration:

text
# -- ESP32 Sensors --
mqtt:
    sensor:    
    - name: "Lager Temperatur"
      unique_id: LagerTmp
      state_class: "measurement"
      state_topic: "Lager/sens/LagerTmp"
      unit_of_measurement: "°C"
      expire_after: 480
      value_template: "{{ value_json.TEMP }}"
    - name: "Lager Luftdruck"
      unique_id: LagerPrs
      state_class: "measurement"
      state_topic: "Lager/sens/LagerPrs"
      unit_of_measurement: "hPa"
      expire_after: 480
      value_template: "{{ value_json.PRESS }}"
    - name: "Lager Luftfeuchte"
      unique_id: LagerHum
      state_topic: "Lager/sens/LagerHum"
      state_class: "measurement"
      unit_of_measurement: "%"
      expire_after: 480
      value_template: "{{ value_json.HUMID }}"

Listen to the probes logging

Every probe publishes it's logging. It can be monitored with

text
mosquitto_sub -u mosquitto -P public -h <server-ip> -t <Location>/log

Commands from remote

Via Mosquitto, commands can be sent to your probe with

text
mosquitto_pub -t '<Location>/cmd' -m '<Command>'

Best practise is to have a second terminal open with a running log-subscription.

ToDo

  • Explain how TM3 works. Measurement_Pivot, CommLine-Interface...?
  • Discussion, if digital input / output channels are needed.
  • Make Mqtt-credentials changeable, append them to MqttConfig.
  • Move all Mqtt related commands in a structure and apply the "hasChanged" mechanism, used in sensor-configuration.

Parts

15
QtyValueFootprintReferences
44.7kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R5, R6
2330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR3, R4
11-Wire CH1Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ5
11-Wire CH2Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ6
1470uCapacitor_THT:CP_Axial_L11.0mm_D8.0mm_P15.00mm_HorizontalC1
1BME280Connector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_VerticalJ1
1ESP32-DevKitCPCM_Espressif:ESP32-DevKitCU1
1LED_AliveConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ4
1LED_ConnectionConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ3
1PowerConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ7
1Relay_ModuleConnector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_VerticalJ2

Questions

How big is the ThetaProbe PCB?

It measures 83.8 × 52.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ThetaProbe use?

15 parts, built around the ESP32-DEVKITC-VE and BME280. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ThetaProbe KiCad files?

From the Linoprit/ThetaMon3 repository on GitHub, at the commit this page was made from: the board is Schematics/ThetaProbe/ThetaProbe.kicad_pcb and its schematic Schematics/ThetaProbe/ThetaProbe.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ThetaProbe design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers75.5 × 71 mmEsp mobo, the printed circuit board in 3D

    Esp mobo

    Okanagan-Marine-Robotics/Electrical

    Repo For Electrical pcbs and documentation

    83 parts2
  • 2 layers83.8 × 52.1 mmRemotePlugSocket, the printed circuit board in 3D

    RemotePlugSocket

    Linoprit/RemotePlugSocket

    Plug Socket, that can be controlled by Mqtt-Messages. Especially designed for HomeAssistant.

    14 partsGPL-3.0
  • 2 layers43 × 63 mmEnv sensor, the printed circuit board in 3D

    Env sensor

    motty-mio2/env_sensor_pcb

    29 parts
  • 4 layers100 × 120 mmDrone1, the printed circuit board in 3D

    Drone1

    Rohith-4567/drone1

    28 parts
  • 2 layersPepe, the printed circuit board in 3D

    Pepe

    eliasheila/eeeee-eee-e

    12 parts1
  • 2 layers103.8 × 50 mmGalagino pcb set, the printed circuit board in 3D

    Galagino pcb set

    harbaum/galagino

    A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32

    26 parts558
  • 2 layers115 × 75 mmSpinCoater, the printed circuit board in 3D

    SpinCoater

    RParkerE/OpenSilicon

    OpenSilicon enables DIY semiconductor fabrication with open-source guides for building IC equipment at home. The project includes BOMs, 3D files, firmware, and PDKs, supporting makers and researchers in chip fabrication.

    11 parts55GPL-3.0
  • 2 layers127.3 × 54.1 mmESP32 SolarBox, the printed circuit board in 3D

    ESP32 SolarBox

    cole8888/SRNE-Solar-Charge-Controller-Monitor

    Read data from SRNE solar charge controllers.

    34 parts42