- Introduction
- Features
- Hardware Requirements
- Software Dependencies
- Installation
- Wiring Guide
- Usage
- Temperature Control System
- Display Options
- Safety Features
- Persistent Settings
- Troubleshooting
- Maintenance
- Simulation
- Adaptive PID Control
- Flowchart
- Contributing
The Soldering Iron Controller is an Arduino-based system designed to precisely manage soldering iron temperatures. It supports PID-based control, a user-friendly rotary encoder, and a vibrant LED status indicator, making it an ideal tool for hobbyists and professionals.
- Precise temperature control (100°C to 500°C range)
- PID-based temperature regulation with adaptive tuning
- Temperature ramping for rapid heating
- OLED or I2C LCD display for clear temperature readouts
- WS2812 RGB LED for status indication
- Rotary encoder with push button for intuitive control
- Automatic shut-off after 10 minutes of inactivity
- Watchdog timer for system reliability
- Temperature sensor for accurate readings
- PWM control for soldering iron heating element
- Persistent settings saved in EEPROM
- Arduino (e.g., Arduino Uno, Nano)
- OLED Display (SSD1306) or 16x2 I2C LCD Display
- WS2812 RGB LED
- Rotary Encoder with push button
- Analog temperature sensor
- MOSFET (for iron control)
- Soldering iron
- Power supply
- Buzzer
- Resistors, capacitors (refer to wiring guide)
Ensure the following libraries are installed:
- Wire.h (built-in)
- Adafruit_GFX.h (for OLED)
- Adafruit_SSD1306.h (for OLED)
- LiquidCrystal_I2C.h (for LCD)
- BigNumbers_I2C.h (for large font on LCD)
- Adafruit_NeoPixel.h (for WS2812 LED)
- EEPROM.h (built-in)
- PID_v1.h (for PID control)
- Clone or download this repository.
- Open the
.ino
file in the Arduino IDE. - Install required libraries via Library Manager.
- Adjust pin assignments in the code to match your wiring.
- Choose between OLED and LCD display by toggling the
USE_OLED
define in the code. - Upload the code to your Arduino board.
Follow the wiring instructions for correct setup:
-
Temperature Sensing:
- Connect the sensor to Arduino pin A0.
-
Iron Control:
- Connect the MOSFET gate to pin D10.
-
Display:
- OLED: Connect SDA to A4, SCL to A5.
- LCD: Same connections (SDA to A4, SCL to A5).
-
WS2812 LED:
- Data pin connects to D12.
-
Rotary Encoder:
- CLK to D3, DT to D4, switch to D5.
-
Buzzer:
- Connect to D2.
-
LED Off Indicator:
- Connect to D8.
Ensure all components share a common ground and proper power connections.
- Power on the controller; the last used temperature will be loaded.
- Adjust the temperature with the rotary encoder.
- Status LEDs indicate:
- Red: Heating
- Green: Ready
- Blue: Cooling
- Yellow: Warning (near max temperature)
- Purple: Ramping
- Off: Iron off or auto-shutoff
- Press the encoder button to toggle the iron on/off or start ramping mode.
The controller uses a PID algorithm to maintain stable temperatures:
- Kp: 2
- Ki: 5
- Kd: 1
Adjust these values in the code for custom tuning.
- Activated by pressing the encoder button.
- Ramps to the max temperature (500°C) over 20 seconds, displaying a countdown.
- Returns to the previous setpoint after ramping.
Choose between two display types:
- OLED Display (SSD1306)
- 16x2 I2C LCD
Switch displays by commenting/uncommenting the USE_OLED
define in the code.
- Automatic Shut-off: After 10 minutes of inactivity, the iron is turned off.
- Watchdog Timer: Resets the system if unresponsive.
- Overheat Protection: Stops heating if the temperature exceeds a safe threshold.
- Error Detection: Monitors sensor and system issues.
The system saves the last temperature setting in EEPROM, allowing it to persist across power cycles.
- Inaccurate Temperature Readings: Check sensor wiring.
- Iron Not Heating: Check MOSFET and power supply.
- LED Not Working: Ensure WS2812 wiring and library installation.
- System Freezing: Verify connections and PID stability.
- PID Tuning Issues: Adjust Kp, Ki, Kd as needed.
- Inspect connections regularly.
- Clean the temperature sensor periodically.
- Update firmware as new versions become available.
- Recalibrate the sensor if readings become inaccurate.
Test the setup in Wokwi.
The controller can adapt PID values based on system behavior:
- Loop Monitoring: The system adapts PID values every 225 loops.
- Error Handling: Sum of errors and counts are logged for adaptation.
- Overshoot Protection: Limits the temperature overshoot to 10°C.
Contributions are welcome! Fork this repository, make your changes, and submit a pull request.