knifter / DualPID

Multi Channel Configurable PID regulator on M5Stack Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DualPID

Dual channel PID regulator. Each channel is (compile time) configurable to read out a sensor and control an output (on/off or H-Bridge). It could for example be used for:

  • Temperature and/or Humidity control (Incubator or Grow box)
  • Reflow Oven (either use one channel or two 'zones')

Currently used for controlling both temperature and humidity but should be versatile enough to control any two things from different sensors. The general design goals are:

  • Least work hardware: Use existing, easily buyable parts like M5Stack.
  • Two channel PID with
    • Lock detection
    • Linear forward term with offset and slope
    • Derivative-on-measurement
    • Intergral windup prevention
    • On-Device editable PID settings
    • Input filter
    • D-term filter
    • Take-back-half
  • Fixed output setting to measure step response
  • Lock-detection
  • Alarms
  • Expert-Mode: Hide Setup and PID settings on normal usage (press A+B+C for 2 seconds to open configuration)
  • Two H-Bridge outputs able to control most things from heaters, peltiers, valves etc (temporarily removed)
  • Two single pin positive drive outputs capable of:
  • SlowPWM (<1Hz) and FastPWM (>1 Hz up to kHz) outputs
  • Easy to add sensors as inputs or other output methods (implemented in classes and run-time configurable)
  • Multiple sensors: Temperature, Humidity, CO2, more to come
  • Adjustable time intervals per channel (100ms - minutes)
  • run-time configurable: Input sensor and output drive configurable through GUI, no recomile for your combination
  • Error graphs
  • Remote logging (csv, mqtt or other)
    • SerialPlot filterable data
    • Yaapt is planned
    • MQtt

Incubator

Hardware

Start with M5Stack Cushion, mandatory lab equipment

Base

Backplane (optional)

Sensor

Output Drivers

Ideas which could be added/supported/implemented:

Dependencies

Credits

Originally this design was based upon https://github.com/sciunto-org/humidity_regulator, an arduino sketch for an Ardiuno Uno. But since I've replaced even the PID loop library, I don't think there is much left of that design. But the idea came from them so credit where credit is due ;)

They (sciunto) quoted this paper as well, I will too: F. Boulogne, "Cheap and versatile humidity regulator for environmentally controlled experiments", The European Physical Journal E, vol. 42, no. 4, 2019, pp. 51.

The user interface is build with the Light Weight Versatile Graphics library: LVGL The screen library is written by lovyan03, LovyanGFX

About

Multi Channel Configurable PID regulator on M5Stack Core

License:GNU General Public License v3.0


Languages

Language:C++ 65.2%Language:C 33.7%Language:Python 0.8%Language:Batchfile 0.4%