Skip to content
Greg Kasprowicz edited this page Feb 16, 2025 · 39 revisions

The idea to build standardized approach of sensor-box hub emerged while building home automation system. I needed to connect many devices over MQTT to some control system. I used Cayenne platform and mix of devices - Arduino, ESP8266, RPI. After I managed to connect ventilation system, power meters, temperature logging, air quality monitors I quickly discovered that it is not the way to go. Each time I needed a breadboard, wires, modules and custom enclosure. So I decided to re-make the approach that I developed years ago. At that time I wanted to have everything in one box with ability to connect several sensors, with auto-detection, as well as various communication channels - WiFi, GPRS, Ethernet, 433MHz. Plus various power supplies including DC, PoE, 230V AC. Plus multiple user interfaces including LCD, keyboard, extension connector. In the meantime I moved to ESP Home project and all new boards are compatible with it.

The device became very costly and too complex for some simple tasks. So let's reinvent it. Features I'd like to have:\

  • support for Home Assistant/ESP Home without writing c code, just Yaml configuration
  • low cost, well below 20$ per module
  • modular approach to be able to serve both simple and complex approaches
  • 2 categories of modules: addressed SPI where no SW is needed for module, only Yaml configuration; Modbus with Arduino software for MCU and direct HA access
  • really tiny - want to pack it to constrained area like crowded fuse box in my house
  • ability to read many sensors like: humidity, temperature, power meter, air quality, distance, AC voltage, MODBUS
  • ability to control devices like: relays, PWM, voltage, MODBUS, CAN
  • Wifi and Ethernet interfaces. WiFi doesn't work reliablyin my place (too many networks). For many critical applications Ethernet cable is a must.
  • Optional GPRS connectivity
  • LoRa connectivity
  • low power consumption. RPI-grade device power consumption is far too much. Single device is OK, but if you install them in tens of places it becomes an overkill cause the system that was meant to save power consumes more than is able to save. Even tiny wifi devices consume at least 2W of power...
  • supply via POE,DC, USB or battery

Modular SensorBox

Below is a drawing of the modular system I designed. It is still in development process but critical parts were verified using Arduino-style modules or breadboards or reused from other working designs. For some of them ESP Home yaml configuration is available. Several aspects and design choices were described in the issues. Example configuration with Ethernet POE; 8 channel 12bit ADC, 16 channel PWM, 2 energy meters and voltage tranducers

Two example configurations are shown below:

Sensor_Station

Sensor_Station

Development status

Board name HW status SW status Next activity
1 ESP32 base module v1.1 EH/HA running --
2 Ethernet PHY for ESP32 base module v1.1 EH/HA running --
3 Arduno M0 compatible base module with Ethernet , 1-Wire and RS485 v1.0 MQTT running still needs tests
4 PoE for Ethernet PHY v1.0 works, no SW needed --
5 Single channel power meter that can be extended to any number of channels verified in HW, Cayenne running replaced by 3 channel version
6 GPRS connectivity v1.0 -- needs tests
7 AC power input module v1.0 works, no SW needed --
8 DC power input module v1.0 works, no SW needed --
9 Relay and analog IO module v1.0 HA support
10 Simple IO module with I2C, RS485 and 1-WIRE as extension for ESP32 module v1.0 --
11 Smart IO module with I2C, 1-Wire, analog inputs, analog outputs, digital inputs, digital outputs v1.0 --
12 Smart CAN module supporting wall light switch v1.0 hapcanuino running
13 Linux Hub module v1.0 --
14 Backup LiOn module v1.0 no SW v1.1 needed
15 LoRa base module v1.0 --
16 Air quality Sensor module v1.0 --
17 Sensor_Box_BMS, 24 cell battery management v1.0 works with EH/HA v1.1
18 Sensor_Box_RGB_CTRL, RGB power LED controller v1.0, debugging -- v1.1
19 Sensor_Box_Power_Meter_3PH, 3 phase precise energy/power meter v1.0, debugging RnD v1.1
20 Sensor_Box_RTD2DIG, PT1000/PT100 front end v1.0 -- v1.1
21 Sensor_Box_PWM_DRV, 16-channel PWM LED driver v1.0 works via lambda v1.1
22 Sensor_Box_Power_Meter_VT, voltage reference for 3 phase energy meter v1.0, debugging no SW needed
23 Temp_Sensor_PWM_DRV, wall-mount temperature sensor and actuator driver v1.0 PID SW development v1.1
24 Sensor_Box_ADC, 8 channel 12bit ADC v1.0 works with EH/HA v1.1
25 Sensor_Box_PWM_DRV_slow, 8 channel slow PWM suitable for optomos actuators PCB done RnD
26 Sensor_Box_Water_Meter_Valve, water flow meter and valve controller v1.0 --
  • LCD module
  • Humidity, temperature and pressure sensors module, at the moment they can be connected to general purpose IO modules.

Development history

Here is the device described at the beginning of the Wiki. Sensor_Station Sensor_Station

However very first version was meant to be portable and it was master thesis of my student - here is the project and the documentaiton

Then I needed multichannel temperature logger with Ethernet access. So I used 16 low cost KTY18 sensors with AFE based on general purpose opamps + 10 bit ADC + embedded Linux single-board computer. The sensors required time-consuming calibration and I was not happy with such approach. The sensors were cheap but needed lots of work prior using them. Some render... Sensor_Station

Yet another device was built as a Bachelor thesis of my student, Michal Krzeminski. It was portable temperature logger that cooperates with any type of resistive sensors. It supports up to 15 channels. Results are logged to the SD card. Initial application was temperature tests of enclosed PCB where miniature PT100 sensors were used. Sensor_Station

Altium sources of the devices described above are here

Clone this wiki locally