How highvaper/heater-controller works
Project Type Analysis
This is an embedded systems project running on a Raspberry Pi Pico, implementing a PID-controlled heater system with various hardware interfaces.
Main Components
A. Hardware Layer:
• Raspberry Pi Pico (central controller)
• Input Devices (Rotary Encoder, Button)
• Output Devices (LED, Display, Heater Coils)
• Sensors (MAX6675 Thermocouple, DS18X20)
B. Software Layer:
• Core Control System (main.py)
• Hardware Interface Modules
• User Interface System
• PID Control System
Physical Layer (Bottom)
[Sensors] ←→ [Raspberry Pi Pico] ←→ [Output Devices]
• ↑ ↑ ↑ ↑ ↑
[MAX6675] [Button] | [Rotary] [SSD1306 Display]
• [Heater Coils]
• [DS18X20]
Software Layer (Middle)
[Hardware Drivers]
• ↓
[Core Control Logic]
• ↓
[User Interface]
Control Flow Layer (Top)
[Input Handler] → [Menu System] → [PID Controller] → [Heater Control]
Component Relationships
A. Hardware Interface Modules:
• rotary_irq_rp2.py ↔ Rotary Encoder
• max6675_utime.py ↔ Thermocouple
• ssd1306.py ↔ OLED Display
B. Control Modules:
• inputhandler.py → menusystem.py
• heaters.py ← simple_pid
• thermocouple.py → PID Controller
• displaymanager.py → SSD1306
C. Core Logic:
• main.py (central orchestrator)
• customtimer.py (timing control)
• errormessage.py (error handling)
Control Flow
[Sensor Input] → [PID Processing] → [Heater Control] → [Display Update]
State Management
[Input Handler] → [Menu System] → [System State] → [Display Manager]
Hardware Abstraction
[Physical Hardware] → [Driver Layer] → [Control Layer] → [User Interface]