Skip to content

A better firmware for "Pen Solder V3" soldering irons with USB-C using Hakko T12 tips

License

Notifications You must be signed in to change notification settings

spezifisch/T12PenSolder

Repository files navigation

Pen Solder V3 (PSV3) replacement firmware

Cheap soldering iron reverse engineering and replacement firmware.

See also the write-up on my blog.

Note that while the product is advertised as a T12 soldering iron this is just the name of its ubiquitous soldering tip (Hakko T12). So I needed a more specific name for it and chose the label on its PCB: Pen Solder V3 or short: PSV3.

Replacement Firmware

Development WIP in ./firmware.

Current state (quite usable!):

  • soldering tip temperature PID controller code works (adapted from IronOS)
  • temperature measurement synced with off time of tip switching PWM
  • all buttons work
  • voltage measurement of soldering tip temperature and VBUS (from USB-PD) work
  • display output works (it's connected to non-hardware-I2C pins, so we're bitbanging with U8g2 with custom STM32 optimizations for around 170kHz I2C clock speed)
  • standby after 60s without activity (partly implemented, just turns tip off at the moment)
  • no cold junction compensation (not available on this board)
  • no settings storage
  • resource usage: around 30/32kB flash, 1.4/4kB RAM (we're splurging a bit by including an additional font and Arduino libs)
  • supported boards: V3, V7

"Pen Solder V3" Description

Its name is: Portable T12 Electric Soldering Iron PD 65W DC 72W.

Tracing the board layout:

Which leads to this Reverse Engineered Schematic (click for PDF):

"Pen Solder V7"

To compile for V7 boards open ./firmware/platformio.ini and change the following line:

-D PENSOLDER_V=3

to

-D PENSOLDER_V=7

Thanks to @Gobracket for finding the needed change in the display's setup!

Flashing

Some test pads are labeled on the board: VSS, CLK, DAT, VDD:

Connect them to GND, SWCLK, and SWDIO from your STLink adapter respectively. Do not connect VDD. It's cleaner to supply the board in a more stable manner using an USB-C supply instead.

You can then build and flash my firmware from within VSCode using PlatformIO (just press Build/Upload).

Dumping Stock Firmware

Before flashing a custom image you should backup the stock firmware!

I used the Debian 12 package of st-tools for this:

st-flash --hot-plug read t12-f0.bin 0x8000000 32768

Hardware Details

Label on case: T12

PCB:

PEN-SOLDER V3 2023-02-02

MCU: CHIPSEA F030F6P6

$ st-info --probe 
Found 1 stlink programmers
  version:    V2J34S7
  serial:     ...
  flash:      32768 (pagesize: 1024)
  sram:       8192
  chipid:     0x0440
  descr:      F0xx

Big P-MOSFET: NCE30P30K

Small N-MOSFET driver: 72K

OpAmp: 8331CGn04

Zener: W3

SMPS: XL1509-3.3E1

USB: CH224K

"STM"32F030 Pinout

  • 1: BOOT0 -> 10k to GND
  • 4: NRST -> filtered VDD
  • 6: PA0 -> not connected here, but optionally a non-populated part could connect it to some kind of SMD part (white square with 4 pads)
  • 7: PA1 -> ADC: VIN measurement of 1/11*VBUS
  • 8: PA2 -> ADC: Temperature measurement of soldering tip's thermocouple (through amplifier)
  • 9: PA3 -> Heating enable for soldering tip
  • 10: PA4 -> Button "Minus (-)", high active (10k pull-down to GND, button pulls to VDD)
  • 11: PA5 -> Button "Plus (+)", high active
  • 12: PA6 -> I2C SCL to display (4k7 to VDD)
  • 13: PA7 -> I2C SDA to display (4k7 to VDD)
  • 14: PB1 -> Button "Set", high active
  • 17: PA9 -> looks like it's not connected to anything, used in stock firmware for display reset
  • 19: PA13/SWDIO -> SWD header/pads
  • 20: PA14/SWCLK -> SWD header/pads

CH224K USB-PD Control

CFG1,2,3 pins are not connected to anything. Floating CFG1 means it will request VBUS=20V from USB power supply. That's a bit concerning given that this means the P-MOSFET gets U_GS=20V (or more) and that's already its U_GSmax.

Too bad those pins aren't connected to the uC or we could switch to a lower USB voltage.

OpAmp

  • Used as non-inverting amplifier, 221x gain
  • Input connected to T12 soldering tip pin A (the last ring), (tip pin B (the ring between A and Earth) is connected to GND)
  • Zener diode clamps input to 3.3V max.
  • Input range should be 14.9 mV max. assuming the output is 3.3V max.

About

A better firmware for "Pen Solder V3" soldering irons with USB-C using Hakko T12 tips

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published