{"id":51653347,"url":"https://github.com/lily-osp/solder-station","last_synced_at":"2026-07-14T06:02:37.544Z","repository":{"id":257159591,"uuid":"855966353","full_name":"lily-osp/solder-station","owner":"lily-osp","description":"Arduino-based Soldering Iron Controller with PID control, adaptive tuning, noise filtering, and hardware safety features","archived":false,"fork":false,"pushed_at":"2026-06-20T19:13:40.000Z","size":1443,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-20T19:21:10.105Z","etag":null,"topics":["arduino","controller","diy-electronics","embedded-systems","pid-controller","soldering-controller","soldering-station"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lily-osp.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-11T18:49:14.000Z","updated_at":"2026-06-20T19:13:44.000Z","dependencies_parsed_at":"2025-03-16T06:16:00.412Z","dependency_job_id":null,"html_url":"https://github.com/lily-osp/solder-station","commit_stats":null,"previous_names":["lily-osp/solder-sataion-1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lily-osp/solder-station","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2Fsolder-station","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2Fsolder-station/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2Fsolder-station/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2Fsolder-station/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lily-osp","download_url":"https://codeload.github.com/lily-osp/solder-station/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2Fsolder-station/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35448565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","controller","diy-electronics","embedded-systems","pid-controller","soldering-controller","soldering-station"],"created_at":"2026-07-14T06:02:36.833Z","updated_at":"2026-07-14T06:02:37.535Z","avatar_url":"https://github.com/lily-osp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Soldering Iron Controller\n\n## Table of Contents\n1. [Introduction](#introduction)\n2. [Features](#features)\n3. [Hardware Requirements](#hardware-requirements)\n4. [Software Dependencies](#software-dependencies)\n5. [Installation](#installation)\n6. [Wiring Guide](#wiring-guide)\n7. [Usage](#usage)\n8. [Temperature Control System](#temperature-control-system)\n9. [Display Options](#display-options)\n10. [Safety Features](#safety-features)\n11. [Persistent Settings](#persistent-settings)\n12. [Troubleshooting](#troubleshooting)\n13. [Maintenance](#maintenance)\n14. [Simulation](#simulation)\n15. [Adaptive PID Control](#adaptive-pid-control)\n16. [Flowchart](#flowchart)\n17. [Contributing](#contributing)\n\n## Introduction\n\nThe **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.\n\n## Features\n\n- Precise temperature control (100°C to 500°C range)\n- PID-based temperature regulation with adaptive tuning (steady-state only)\n- Exponential Moving Average (EMA) filtering for stable PID inputs\n- Temperature ramping (rapid heating with customizable duration and target temperature)\n- Two-stage standby: Sleep Mode (heats to 150°C or sleep setting) and Auto Shut-Off\n- Boost Mode (+50°C for 45 seconds via double-click)\n- Configuration Menu (Sleep Temp, Sleep Time, Off Time, Temp Unit, Ramp Time, Ramp Temp) with infinite scrolling loop\n- OLED (SSD1306) or 16x2 I2C LCD display support\n- WS2812 RGB LED for status indication (pulsing blue in sleep, warning colors)\n- Software-debounced input controls (50ms window)\n- EEPROM write preservation (asynchronous save after 2 seconds of inactivity)\n- Watchdog timer for system reliability\n- Sensor fault, thermal runaway, and overheat protections\n\n## Hardware Requirements\n\n- Arduino (e.g., Arduino Uno, Nano)\n- OLED Display (SSD1306) or 16x2 I2C LCD Display\n- WS2812 RGB LED\n- Rotary Encoder with push button\n- Analog temperature sensor\n- MOSFET (for iron control)\n- Soldering iron\n- Power supply\n- Buzzer\n- Resistors, capacitors (refer to wiring guide)\n\n## Software Dependencies\n\nEnsure the following libraries are installed:\n\n- **Wire.h** (built-in)\n- **Adafruit_GFX.h** (for OLED)\n- **Adafruit_SSD1306.h** (for OLED)\n- **LiquidCrystal_I2C.h** (for LCD)\n- **BigNumbers_I2C.h** (for large font on LCD)\n- **Adafruit_NeoPixel.h** (for WS2812 LED)\n- **EEPROM.h** (built-in)\n- **PID_v1.h** (for PID control)\n\n## Installation\n\n1. Clone or download this repository.\n2. Open the `.ino` file in the Arduino IDE.\n3. Install required libraries via Library Manager.\n4. Adjust pin assignments in the code to match your wiring.\n5. Choose between OLED and LCD display by toggling the `USE_OLED` define in the code.\n6. Upload the code to your Arduino board.\n\n## Wiring Guide\n\nFollow the wiring instructions for correct setup:\n\n1. **Temperature Sensing**:\n   - Connect the sensor to Arduino pin A0.\n\n2. **Iron Control**:\n   - Connect the MOSFET gate to pin D10.\n\n3. **Display**:\n   - OLED: Connect SDA to A4, SCL to A5.\n   - LCD: Same connections (SDA to A4, SCL to A5).\n\n4. **WS2812 LED**:\n   - Data pin connects to D12.\n\n5. **Rotary Encoder**:\n   - CLK to D3, DT to D4, switch to D5.\n\n6. **Buzzer**:\n   - Connect to D2.\n\n7. **LED Off Indicator**:\n   - Connect to D8.\n\n8. Ensure all components share a common ground and proper power connections.\n\n## Usage\n\n1. Power on the controller; the last used temperature will be loaded.\n2. Adjust the temperature with the rotary encoder when in active mode.\n3. Status LEDs indicate:\n   - **Red**: Heating\n   - **Green**: Ready\n   - **Blue**: Cooling (or pulsing blue in sleep)\n   - **Yellow**: Warning (near max temperature, or dangerously hot when OFF)\n   - **Purple**: Ramping\n   - **Flashing Red/Beeping**: Error State\n   - **Off**: Iron off or auto-shutoff (unless still dangerously hot)\n4. Button Controls:\n   - **Single Click (Active)**: Start Ramping Mode (heat to 500°C for 20s) or toggle OFF (if already ramping).\n   - **Single Click (OFF/Sleep/Error)**: Wake up / Toggle ON / Clear active errors.\n   - **Double Click (Active)**: Toggle Boost Mode (+50°C for 45s).\n   - **Long Press (1.5s)**: Enter/Exit Settings Menu (saves settings to EEPROM on exit).\n5. Settings Menu:\n   - Navigate settings by rotating the encoder (infinite loop wrapping).\n   - Click to enter Edit Mode (indicated by brackets e.g. `[value]`), rotate to adjust value, click again to save.\n   - Hold button for 1.5s to save and exit back to operation mode.\n\n## Temperature Control System\n\n### PID Control\nThe controller uses a PID algorithm to maintain stable temperatures:\n- **Kp**: 2\n- **Ki**: 5\n- **Kd**: 1\n\n### Temperature Ramping\n- Activated by pressing the encoder button when system is active.\n- Ramps to the max temperature (500°C) over 20 seconds, displaying a countdown.\n- Returns to the previous setpoint after ramping.\n\n## Display Options\n\nChoose between two display types:\n1. **OLED Display (SSD1306)**\n2. **16x2 I2C LCD**\n\nSwitch displays by commenting/uncommenting the `USE_OLED` define in the code.\n\n## Safety Features\n\n- **Sensor Disconnection \u0026 Short-Circuit Detection**: Continuous analog read checking. Raw values `\u003c= 2` or `\u003e= 1021` shut down the heater, activate the buzzer alarm, flash the status LED, and lock the system in an error state.\n- **Thermal Runaway Protection**: Activates if the heater applies significant power (`PWM \u003e 150`) but the temperature fails to rise by at least 3.0°C over a 15-second window. Prevents heater damage if the sensor detaches.\n- **Overheat Protection**: Shuts down the system if the temperature exceeds a safe threshold of `MAX_TEMP + 10` (510°C).\n- **Error Recovery**: Pressing the button once resolves and clears error states after checking hardware connections.\n- **Automatic Shut-off**: After 10 minutes of inactivity, the iron is turned off.\n- **Watchdog Timer**: Resets the system if responsive loop hangs.\n\n## Persistent Settings\n\nThe system saves the last temperature setting in EEPROM, allowing it to persist across power cycles. It saves asynchronously after 2 seconds of knob inactivity to protect EEPROM write lifespan.\n\n## Troubleshooting\n\n- **Inaccurate Temperature Readings**: Check sensor wiring.\n- **Iron Not Heating**: Check MOSFET and power supply.\n- **LED Not Working**: Ensure WS2812 wiring and library installation.\n- **System Freezing**: Verify connections and PID stability.\n- **PID Tuning Issues**: Adjust Kp, Ki, Kd as needed.\n- **Sensor/Thermal Error State**: Verify connection and press the button once to clear.\n\n## Maintenance\n\n- Inspect connections regularly.\n- Clean the temperature sensor periodically.\n- Update firmware as new versions become available.\n- Recalibrate the sensor if readings become inaccurate.\n\n## Simulation\n\nTest the setup in [Wokwi](https://wokwi.com/projects/408754608532252673).\n\n## Adaptive PID Control\n\nThe controller adapts PID values based on system behavior:\n- **Steady-State Monitoring**: The system adapts PID values every 225 loops, but only when within 15°C of the setpoint. This prevents gains from winding up during transient heating or ramping phases.\n- **Error Handling**: Sum of errors and counts are logged for adaptation.\n- **Overshoot Protection**: Limits the temperature overshoot to 10°C.\n\n## Flowchart\n\nThe workflow diagram is stored in [flowchart.md](etc/flowchart.md).\n\n## Contributing\n\nContributions are welcome! Fork this repository, make your changes, and submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-osp%2Fsolder-station","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flily-osp%2Fsolder-station","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-osp%2Fsolder-station/lists"}