Industrial electronics

CH1 Temperature Controller.

From thermocouple to PID — with a calibrator, camera and thermal imager

STM32PIDModbus RTUPython

Explore the source on GitHub ↗

Artistic illustration of the CH1 temperature controller, circuit board, thermocouple and thermal observation
Artistic illustration · not a photograph of the device

Temperature under observation

TemperatureController-CH1 is a single-channel temperature controller based on the STM32F030C8T6 and a set of tools used to study it. It measures temperature with a thermocouple, calculates PID, drives a triac, monitors heater current and transfers parameters over Modbus RTU.

The open project brings together firmware, four PC applications, schematics, board files, an enclosure part and measurement logs. Alongside the finished plots, it preserves the work behind them: checking contacts, investigating USB connections, modifying the input circuit, calibration and gain tuning.

The controller is intended to be configured for different thermal systems. A water tank was one experiment. For a nozzle heater or another installation, PID gains, the control period and limits must be selected again and the result checked.

How we worked together

Sergey assembled the hardware, connected the calibrator and sensors, changed connections, modified the board and prepared the load. AI helped examine the source code and protocol, create bench applications, automate measurements and compare results with visible-light and thermal images.

The work followed a sequence: thermocouples → 4–20 mA input → external compensation → current measurement → PID and enclosure heating. Conditions, numerical logs and available images were saved at every stage. The unsuccessful first PID settings remain in the materials so the next contributor can see why they were changed.

Method and bench equipment.

The signal path

  1. Thermocouple → MAX31856. B, E, J, K, N, R, S and T types are supported. Cold-junction compensation uses either the internal sensor or an external Pt100 through a signal transmitter and a 4–20 mA loop.
  2. STM32 → triac. PID calculates the on-time fraction. The burst-control period is adjustable from 2 to 300 seconds. It controls on-time, rather than the triac firing angle within a mains half-cycle.
  3. ACS712 → current monitoring. The RMS value of the AC current component is measured; the gain, residual correction and noise are calibrated for the individual device.
  4. RS-485 → PC application. Modbus exposes temperature, current, power, faults, parameters and calibration. Two hexadecimal rotary switches set the address.
  5. EEPROM → autonomous operation. The device retains settings and its last operating mode. Heating resumes after power-up only after address, measurement and fault checks.

Temperature tolerances control signalling relay K1. They are not a PID deadband. Process fault limits are set separately. K1 has seven selectable functions, including being within tolerance after warm-up soak, general fault, overload and insufficient heater current.

Hardware mapping · Protocol 2.4 for firmware 2.5.

Four tools on one bench

Application Purpose
CH1 control Settings, thermocouples, compensation, AUTO/MANUAL/STOP, setpoint and temperature plot, faults, calibration and saving
LB02A calibrator Calibrator display and keys through an ESP32-S3 bridge; bridge source and connection photographs
Video and thermal imaging Camera and UTi260B, transparent overlay, temperature points, paired snapshots and a local API
STM32 programmer BIN/HEX, viewing, Flash backup reads, erase, write and verification through the ROM bootloader

Ports and cameras are selected on your own computer. A shared dependency installer supports first startup; personal port assignments and chat history are excluded from the repository.

Checking inputs: measurement before control

The thermocouple series checked 35 points across eight types with internal compensation. After adjusting the 4–20 mA input, five direct-current points were measured. The Pt100 simulator → NPT transmitter → controller chain was checked separately over −10…150 °C, including a return to zero.

The input trimmer did not provide enough adjustment range: R17 was replaced from 62 to 47 kΩ on the tested device. The original schematic and BOM retain their previous revision, with the modification documented separately. This device’s EEPROM coefficients cannot be transferred to a new board without measurements.

When working with the simulator, disconnecting some USB connections changed the result. Each series records its conditions; the exact stray-current mechanism still needs to be measured. This observation was not hidden with a correction.

Thermocouple input · Pt100, NPT and current loop.

What the 60 °C experiment showed

The setup used about 3 litres of water, an immersed tubular heater and a type K thermocouple. The setpoint was 60 °C, with a 2 s control period. The first gains, Kp=2.7, Ki=0.1, Kd=0, produced considerable overshoot: AUTO was stopped at 67.8 °C. The second experiment used Kp=10, Ki=0.03, Kd=0.

Interval in the repeat experiment Temperature
Last 5 minutes 60.0…61.1 °C, mean 60.51 °C
Last minute 60.0…60.4 °C, mean 60.22 °C
Observation after reaching the setpoint About 622 s

Temperature, output command and available enclosure estimates in the second experiment

These are controller readings on one thermal system, not a confirmation of absolute accuracy against an independent reference thermometer. The gains describe this experiment and are not universal settings.

The thermal imager observed the outer enclosure, estimated at approximately 31 °C from the palette. The concealed heatsink and triac die were not measured directly. Missing thermal data remains in the log; the visible-light camera sometimes overheated during the experiment.

Original thermogram of the CH1 outer enclosure

Full analysis of current, two PID settings and enclosure temperature.

Continue the project with AI

Start with the quick-start guide, then ask your assistant to read AI_START.en.md, AGENTS.md, the protocol and the project knowledge base. Sources are pinned to specific commits and checked by SHA-256.

The website’s NeuroEngineer knows the CH1 architecture, application purposes, settings and test limitations. It helps locate supporting documents; it cannot operate a physical bench through the public website chat.

Materials Link
STM32 source and build Firmware
Parameters and calibration Protocol · Calibration
Schematics, BOM, Gerber, STL Hardware materials
Raw logs, plots and photographs Measurements
Reproducible builds and tests Verification report

What remains to be checked

Further work includes long-term thermal tests, direct heatsink observation, comparison of internal and external compensation under the same conditions, and additional fault-mode testing. Software shutdown cannot disconnect a shorted triac; K1 is a signalling relay, while independent power protection remains a separate part of the installation.

The package includes PDFs, BOMs, Gerbers and one enclosure STL part. Editable EDA projects and a complete parametric enclosure model were not found. Open questions.

Original code, text and photographs use MIT; hardware materials use CERN-OHL-P-2.0. ST, ARM and UTi260B decoder licences are retained separately: NOTICE. The cover is an artistic illustration; actual hardware photographs appear below.

← All workshop projects
WORKSHOP / ASSISTANT

NeuroEngineer.

Check answers against their sources. A short conversation history stays only in this tab’s memory.

Project: CH1 temperature controller

Hello! I can help you explore the project materials. Which part are you interested in?

Up to 800 characters · Enter to send