Skip to content

mail87523/ESP32-Async-WebServer-WebSocket-JSON-PID-Controller-Thermostat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

ESP32 Async WebServer WebSocket JSON PID Controller Thermostat

Code is a mix of collected and modified projects from github.

Spetial thanks to Stéphane Calderoni who inspired me with his two projects:

https://github.com/m1cr0lab-esp32/remote-control-with-websocket

https://github.com/m1cr0lab-esp32/asynchronous-web-controlled-thermostat

As a result we got example of one solution for PID Controller with visualization in a Web browser.

The Controller have 8 channel of digital input + 8 channel of digital output + 1 input for zerocross detection + 1 PWM output which is PID controlled output.

Digital inputs and outputs are independent of the PID calculator and work as independent.

Digital inputs wait HIGH PULSE on each channel to control each channel of outputs in parallel with the Web Interface as a physical and virtual button.

Physical Button connected to input I_01 toggle Q_01, also Web Interface button Q_01 also toggle output Q_01 on ESP32 through WebSocket protocol.

I_01 -> Q_01

I_02 -> Q_02

I_03 -> Q_03

I_04 -> Q_04

I_05 -> Q_05

I_06 -> Q_06

I_07 -> Q_07

I_08 -> Q_08

PID control PWM Output by setting Setpoint, Kp,Ki,Kd, Offset parameters in Web Interface.

Parameter Offset is offset for sensor reading to calibrate all sensors in system to same refernce point.

PID Controller by default is Automatic Heating Mode with Standard PID algorithm but this can be changed through code to different mode like

HEATING_AUTO_STD
HEATING_AUTO_PAR
HEATING_MANUAL
COOLING_AUTO_STD
COOLING_AUTO_PAR
COOLING_MANUAL

Simple and useful for Home Automation Projects.

ESP32_Async_PID_Thermostat

Version 1 in RUN (AUTOMATIC) HEATING MODE with Standard PID Algorithm.

About

ESP32 Async WebServer WebSocket JSON PID Controller Thermostat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published