Skip to content

Mecharonix/IronOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,457 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IronOS — Pinecil V2 custom build (digital hall + WS2812B RGB)

A personal fork of Ralim/IronOS for the Pinecil V2, with two hardware mods wired in and enabled by default:

Mod Sensor / part Pin Default
Digital hall sleep sensor A3144 (open-collector) — or any open-drain hall switch (SS341, DRV5032 open-drain, …) TP9 / GPIO14 ✅ on
RGB status LED WS2812B addressable LED TP10 / GPIO12 ✅ on

The two mods use different pins, so they do not conflict — you can fit either one or both.

📥 Prebuilt firmware: Download Pinecilv2_EN.bin (English) — flash it with blisp; see Flashing below.

⚠️ This build is for physically-modified hardware. The Pinecil V2 has no hall sensor fitted from the factory (see below) — this firmware expects you to add one. Modding voids your warranty and is done entirely at your own risk.


1. Digital hall-effect sensor (A3144)

Why this mod

The Pinecil V2 has a footprint (U14) for an I²C Si7210 magnetometer — used to detect the magnet in a soldering stand and put the iron to sleep — but it ships unpopulated. There is no hall sensor on a stock board, and the Si7210 is rare and expensive to source.

This build lets you fit a cheap, common digital on/off hall switch like the A3144 instead, read off a single GPIO. No I²C and no detection needed — the firmware assumes the sensor is fitted and maps its on/off state onto the field-strength scale the sleep logic already expects.

🔥 Critical safety rule: open-collector / open-drain output ONLY

The A3144 (and most cheap hall switches) need roughly 4.5 V or more, so they cannot run from the iron's 3.3 V logic rail — you power them from a higher rail such as VBUS / VIN, which on USB-PD can be up to 20 V.

Because of that, the sensor MUST have an open-collector / open-drain output (the A3144 does). An open-drain output only ever pulls the signal line to GND (when a magnet is present) or leaves it floating (when not); the MCU's internal pull-up then sets the idle level to a safe 3.3 V. The voltage on the GPIO never exceeds 3.3 V, no matter how high the sensor's supply is.

🚫 Never use a push-pull ("totem-pole" / VCC-driving) output sensor here. That type actively drives its output up to its own supply voltage. Powered from a 20 V VBUS rail, it would push ~20 V straight into the 3.3 V GPIO and destroy the MCU. Before buying, confirm the datasheet says "open-drain" or "open-collector" output.

The default firmware config (active-low + internal pull-up) is set up exactly for an open-collector part like the A3144.

Wiring

A3144 pin Connect to Notes
VCC A rail ≥ 4.5 V such as VBUS / VIN ⚠️ up to 20 V on USB-PD — keep within the sensor's max supply rating (A3144 ≈ 24 V). Only safe with an open-collector output (see above).
GND board GND
OUT TP9 (GPIO14) Open-collector output; the MCU's internal pull-up provides the 3.3 V high level.

🚫 Do not use the U14 SDA/SCL signal pads for the output. Those are the shared I²C bus (GPIO10/GPIO11), also used by the BMA/SC7 accelerometer and the FUSB302 USB-PD controller. Tying OUT there breaks motion-wake and power negotiation. Route OUT to a free test point — TP9 (GPIO14) is the default. (TP10/GPIO12 is the other spare pad, but that's used by the WS2812B mod below.)

💡 If your hall switch is a 3.3 V part (e.g. some DRV5032 / SS341 variants), power it from the 3.3 V rail instead and the high-voltage hazard goes away entirely — but still use an open-drain output.

Defaults (set in configuration.h / Pins.h)

Setting Value Meaning
HALL_DIGITAL_Pin GPIO_PIN_14 TP9
HALL_DIGITAL_ACTIVE_LEVEL 0 Active-low — A3144 and most open-drain parts pull LOW when a magnet is present
HALL_DIGITAL_INPUT_MODE GPIO_INPUT_PU_MODE Internal pull-up (required for active-low / open-drain parts)
HALL_DIGITAL_ACTIVE_VALUE 2000 Synthetic "field strength" reported when active (>1000 so it trips at every sensitivity setting)

Using an active-high (push-pull) part instead? Set HALL_DIGITAL_ACTIVE_LEVEL to 1 and HALL_DIGITAL_INPUT_MODE to GPIO_INPUT_PD_MODE in Pins.h — but only do this if the sensor is powered from the 3.3 V rail, never from VBUS (re-read the safety rule above).


2. WS2812B RGB status LED

An addressable WS2812B LED wired to TP10 (GPIO12) for a colour status indicator. Enabled by default via WS2812B_ENABLE (equivalent to building upstream with -o ws2812b_enable=1, but baked into the config so a plain build includes it).

Setting Value
WS2812B_Pin GPIO_PIN_12 (TP10)
WS2812B_ENABLE defined by default

Wire LED DIN → TP10 (GPIO12), VDD → 3V3, GND → GND.


How the defaults are set

In source/Core/BSP/Pinecilv2/configuration.h:

#define HALL_SENSOR
// Hall sensor backend: pick ONE.
//   HALL_SI7210  - original I2C magnetometer at U14 (analog field strength)
//   HALL_DIGITAL - simple on/off (high/low) hall switch on a GPIO (see Pins.h)
// #define HALL_SI7210      // <-- not fitted on stock hardware; left disabled
#define HALL_DIGITAL        // <-- digital A3144 switch, enabled
#ifndef WS2812B_ENABLE
#define WS2812B_ENABLE      // <-- RGB LED, enabled
#endif

Because these are compiled-in defaults, a normal make for Pinecil_V2 produces firmware with both mods active — no extra build flags needed.

Disabling a feature

The two mods are independent — turn off whichever you don't want in source/Core/BSP/Pinecilv2/configuration.h, then rebuild.

  • Don't want the RGB LED? Comment out the enable line:
    // #define WS2812B_ENABLE
  • Don't want the digital hall sensor? Comment out:
    // #define HALL_DIGITAL
    The iron then simply has no sleep-on-stand sensor. To also remove the hall option from the settings menu, comment out #define HALL_SENSOR as well.

Flashing

The prebuilt Pinecilv2_EN.bin is on the Releases page. Pinecil V2 is flashed with the BLISP flasher — it uses the .bin (not .dfu/.hex):

Only English is prebuilt; build other languages from source (see below). You can't brick the iron — the BL706 bootloader lives in ROM, so a bad flash is always recoverable by simply re-flashing a good build.

If you only fitted the hall sensor (no RGB LED), the firmware still runs fine — the unused WS2812B output just drives nothing.

Building from source

Identical to upstream — see the Documentation/ folder and upstream IronOS:

cd source
make -j$(nproc) model=Pinecil_V2   # or use the Docker/dev-container flow from upstream

Output lands in source/Hexfile/.


Changes from upstream

This fork diverges from Ralim/IronOS dev in exactly three Pinecil V2 files:

File Change
source/Core/BSP/Pinecilv2/configuration.h Enable HALL_DIGITAL (digital hall backend) and WS2812B_ENABLE by default
source/Core/BSP/Pinecilv2/Pins.h Add HALL_DIGITAL_* pin/level/mode/value defines (TP9/GPIO14)
source/Core/BSP/Pinecilv2/postRTOS.cpp Initialise the digital hall GPIO and read it in getRawHallEffect(); guard the Si7210 path behind HALL_SI7210

Everything else is unmodified upstream. To pull in later upstream changes:

git fetch upstream
git merge upstream/dev      # or: git rebase upstream/dev

License & attribution

IronOS is licensed under the GNU General Public License v3.0 (LICENSE), and so is this fork. It is a derivative work of Ralim/IronOS and all original authors retain their copyright — full credit to Ralim and the IronOS contributors. The complete corresponding source is published in this repository, and the modifications made are documented in Changes from upstream above, per the terms of the GPL.

Original project: https://github.com/Ralim/IronOS.

About

Custom IronOS firmware for Pinecil V2 — digital (A3144) hall switch + WS2812B RGB LED mods, enabled by default. Fork of Ralim/IronOS (GPLv3).

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors