Firmware for the Solder Ninja Pen, a USB-powered soldering iron compatible with Weller RT Micro tips. The firmware provides temperature control, power management, user interface, and safety features for the device.
The Solder Ninja Pen is a portable soldering iron that operates from USB power sources, supporting USB Power Delivery (PD), Quick Charge (QC), and legacy 5V modes. The firmware manages temperature control, power negotiation, user interface, and safety mechanisms.
The firmware is written using the Arduino framework with an emphasis on readability and accessibility rather than optimization. This approach makes the code easier to understand, modify, and contribute to for developers with varying levels of embedded systems experience.
- Temperature control from 0 to 350 degrees Celsius (400 degrees Celsius boost mode)
- USB power negotiation supporting USB: CDP (BC 1.2), DCP, HVDCP (Quick Charge), and PD (Power Delivery)
- User interface with an OLED display and buttons
- Safety features including sleep on idle, sleep on magnet detection, and lock on free fall
- Accelerometer-based motion detection for automatic sleep mode
- Serial communication API for remote control and monitoring
Pre-built firmware binaries are available in the releases section. UF2 files are provided for easy USB bootloader installation. A web-based firmware updater is also available at solder.ninja/app for convenient browser-based installation.
This project uses PlatformIO for building and development.
- Visual Studio Code with the PlatformIO IDE extension
- USB cable connected to the computer for flashing
-
Clone this repository with
git clone https://github.com/sitronlabs/Solder-Ninja-Pen-Firmware.gitor download the code as zip if you are unfamiliar with git. -
Open the
Solder-Ninja-Pen-Firmwarefolder in Visual Studio Code. PlatformIO will automatically detect the project and install dependencies. -
Use the PlatformIO toolbar to build, and upload to the device. The device should be automatically reset into bootloader mode by PlatformIO, if not unplug your device, and plug it again while holding the left button.
The firmware provides a JSON-based serial communication API for remote control and monitoring. Commands are sent as JSON objects and responses are returned in JSON format. For detailed API documentation, see src/com/com.md.
cfg/: Configuration overrideres/: Resources (icons)scripts/: Build scripts for version generation and icon conversionsrc/: Source codemain.cpp: Main entry point and task schedulercontroller/: Temperature control and state managementpower/: USB power negotiation and managementinterface/: User interface (display, buttons, accelerometer, magnet sensor)com/: Serial communication APIsettings/: Persistent settings managementlog/: Logging systemwatchdog/: Watchdog timer
Contributions are welcome through pull requests. Please ensure code follows the existing style and includes appropriate documentation. Note that review time may be limited, so responses to pull requests may take some time.
You are also welcome to request a feature by opening an issue. However, due to limited time, there are no guarantees that feature requests will be implemented.
