Introduction: Smart Temperature/humidity Controller (cloud Connected + Wifi Relay)

About: “ARZAMAN smart engineering” is a small innovative startup company that develops smart hi-tech solutions, by working on specific ideas for a specific hobbyist market. Their working is very simple but profession…

The basic idea behind SmartPID m5 mini controller is to separate the control unit from the shelly 2.5 wifi power relay. This provides great flexibility, reduces wiring complexity.

SmartPID M5 mini can run all the control process (temperature and humidity control) autonomously on a M5stick C ESP32 microcontroller and drives wirelessly a smart relay (shelly 2.5) that is connected to load and can be locate in a different place.

At the same time SmarPID m5 mini is cloud connected via wifi and can be fully controlled from remote web app.

Despite the compact size, SmartPID m5 is feature rich with different control mode and algorithms, support of different sensor types, brilliant display with simple GUI and easy setup.


Step 1: Logical Architecture

SmartPID M5 mini connects to the home wifi router in client mode and via MQTT connection publish all relevant process data to a MQTT cloud server

Shelly 2.5 wifi relay connect o SmartPID m5 in STA mode (direct point to point connection) and trough Shelly REST API the controller mange the relay status and the configuration parameters

Remote control dashboard subscribe the notification topic and publish commands to mange the process (start/stop, set point change etc)

Step 2: Shelly 2.5 Wifi Relay Connection

Shelly 2.5 wifi relay provides

Dual channel 10A relay with power monitor to control two loads (heater/cooler humidifier/dehumidifier)
Possibility to add manual switch

via rest API SmartPID m5 mini implement control logic

  • heating/cooling/thermostatic
  • Humidify/Dehumidify/igrostatic

Step 3: SmartPID M5 Operation

The SmartPID m5 is based on M5sick C ESP 32 HW provides a simple GUI with OLED display and simple two buttons interaction

it si possible to connect following sensors

  • DS18B20 temperature
  • DHT11 temperature/humidity
  • SHT30 temperature/humidty

Step 4: Main Characteristics and Features

this are the main characteristics and functions

  • temperature and Humidity control
  • 3 Control mode
    • heating/cooling/thermostatic
    • humidify/dehumidify/igrostatic
  • 3 working mode
    • Monitor
    • ON/OFF control with hysteresis
    • Profile (10 ramp/soak points)
  • Selectable sensor type
    • DS18B20 (digital temperature probe)
    • DHT12 (combined temp./humidity)
    • SHT30 combined temp./humidity)
  • Configurable Hysteresis
  • Fridge delay protection
  • Probe calibration
  • Celsius/Fahrenheit
  • Brilliant OLED display and GUI
  • 3 buttons operations
  • Simple set up and menu config
  • USB-C power supply
  • Status led indication
  • 4 pin port for sensor
  • WiFi connection to Cloud server
    • remote control web app
  • WiFi connection to smart relay
    • Shelly 2.5 relay connection
    • Power monitor
    • Dual channel 10A relay
  • OTA FW upgrade
  • Real Time Clock
  • BackUp internal battery

Step 5: Control Mode

Several control mode are avaialble

  • heating/cooling/thermostatic
  • humidify/dehumidify/igrostatic

Step 6: WiFi Configration

in order to connec to to WIFI and to cloud MQTT server initial provisioning need to be performed

  • Scan available WiFi network with smartphone or laptop PC.
  • Connect to WiFi network smartpid_xxxxxxx with password smartpid!
  • Open in the browser any page and you will be redirected to the input form (in case of problem open directly the page
  • Fill the form with relevant data and press save.
  • SmartPID m5 mini will reboot and connect to your home WiFi and cloud server.
  • Check WiFi and server status in the info or WiFi menu.

Step 7: Shelly 2.5 Pairing

In order to connect SmartPID M5 mini to the wifi Shelly 2.5 relay

  • Navigate to the pairing menu
  • Select Start procedure The shelly relay must be powered on (connected to AC)
  • Select the Shelly2.5-xxxxx relay and pair
  • Check the pairing status

Step 8: LED Status

The SmartPID M5 mini led indicates various status and situations

Step 9: Complete KIT

Step 10: Project Reference

Step 11: