You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A temperature controller based on STM8S105K4 — reads temperature via NTC thermistor, controls Heater/Cooler relays, displays on 4-digit 7-segment LED, and communicates with PLC via Modbus RTU/ASCII.
📦 Key Features
Feature
Description
Temperature measurement
NTC thermistor via 10-bit ADC, Steinhart-Hart equation
Temperature control
Heater / Cooler relays with hysteresis (delta)
Display
4-digit 7-segment LED (multiplexed)
PLC Communication
Modbus RTU / ASCII over UART2 (9600 baud)
Persistent config
Internal EEPROM (1 KB)
NTC calibration
Recalibrate coefficients A, B, C based on reference temperature
Pin Function Pin Function
──────────────────────── ────────────────────────
PA1 OSC IN PC1 LED digit 4
PA2 OSC OUT PC2 Seg G
PB0 Button 1 (Power) PC3 Seg C
PB1 Button 2 (Setting) PC4 Seg DP
PB2 Button 3 (Up ▲) PC5 Seg D
PB3 Button 4 (Down ▼) PC6 Seg E
PB4 ADC IN4 (NTC) PC7 Seg B
PB5 Relay Heat PD0 LED digit 3
PD1 SWIM (Debug) PD2 LED digit 2
PD5 UART2 TX PD3 Seg F
PD6 UART2 RX PD4 Seg A
PF4 Relay Cool PD7 LED digit 1
🎮 Button Guide
Button
Short Press
Long Press
BT1 (Power)
Exit setting / Reset show mode
Toggle display on/off (sleep)
BT2 (Setting)
Enter setting mode
Hold BT2 + ▲/▼ = select Fn → release = edit Fn
BT3 (▲)
Increase value / Switch mode
—
BT4 (▼)
Decrease value / Switch mode
—
Factory reset: Long press BT1 → reset all defaults (T=20°C, delta=3, addr=1, sample=3)
Display Mode (show_mode)
Mode
Display
Note
0
Current temperature (°C)
Default
1
Modbus slave address
Prefix A
2
Delta (hysteresis)
Prefix d
Setting Mode (setting_mode)
Mode
Setting
Prefix
1
Modbus slave address (1–99)
A
2
Delta / hysteresis (0–99)
d
3
Target temperature (setting_T)
—
4
Sample time in minutes (1–99)
S
5
Buffer_T — calibration offset
—
Auto-exits setting after 15 seconds of inactivity.