deividAlfa / stm32_soldering_iron_controller

Custom firmware for Quicko and KSGER T12 soldering stations
GNU General Public License v3.0
443 stars 86 forks source link
custom-firmware firmware hakko jbc ksger quicko soldering soldering-controller soldering-station stm32 t12

STM32 Soldering Station Firmware

If you liked the firmware, you can send me a beer with PAYPAL 🙂


Video of operation here: (Project in active development, the features will change continuously)

STM32 T12 custom firmware

Project details

Compatibility

Check Boards readme for quick board identification.
Visit Dreamcat4 T12 controllers for more pictures and schematics.
BOARDS folder contains the build profiles.
KSGER Combo station is not supported!

The actual requirements are 10KB RAM and 64KB (*) flash.
(*) Currently the firmware has surpassed the 64KB limit, and uses the additional undocumented 64KB flash block.
(*) All 64KB devices have 128KB, with the second 64KB block untested from the factory, so not guaranteed to work.
(*) To date, I have found zero issues. Original KSGER firmware also does this.
(*) ST-Link checks the written data and the firmware uses CRC for settings, any error will be detected.

Clones / fakes:
Some controllers are using fake STM32 or compatibles, sometimes relabeled as genuine STM32, causing problems.
Check STM32 clone detection section to find out how to detect a genuine STM32.

Some issues caused by clones:

Clones bring all kind of issues and there're too many of them, lots are relabeled and they even copy a genuine STM32 device ID, so in some cases it's almost impossible to figure out the actual device.
Some fakes worked well until recently, when the flash storage layout was updated.
The older v1.10.8 release is more compatible with fake devices, try it out in case you suspect having one.
No effort will be done to support fake / clones!

If your board came with a fake/clone, you can replace it with a STM32F103, they're pin-compatible:

Currently supported controllers:

Don't follow the version reported in the original firmware to identify your board.
To this day, the easiest way to quickly identify your controller version is by checking the OLED screen connection:

For KSGER v2/v3: As long as use the correct firmware, any STM32 variant (101/102/103/C8/R8/CB/RB) will work.
There are several compatible/cloned boards in the market that will work fine with KSGER profiles.

T12-951, T12-952, T12-956, T12-959 use STC MCU, not supported by this firmware.

Bug reporting

If you encounter any error or bug:

Frequently asked questions

First, make sure to read the Operating Instructions!

Changelog

You can check the commit history to see what have been changed between builds.

Backing up the original firmware

The original firmwares are available [HERE]
Some KSGER firmwares require an activation code which can be generated with these keygens:
gen.htm stm32-ss-keygen-drz.py.

Be warned, usually the MCU will be read-protected, so you won't be able to read its contents, only erase it.
The simplest way to not loose the original firmware is actually to buy a new MCU, replace it, and store the original MCU in a safe place.
Any difference in the pinout will require firmware tuning, although one of the main proposits of this firmware is easing that.
There are some vulnerabilities that can be used to backup protected firmware:

Battery mod

Some commonly changed settings (Temperature setpoint, tip/profile selection) can be saved to the RTC SRAM, reducing flash wear.
The RTC needs a battery connected to STM32's VBAT pin, most boards have a battery connector for this.

Display issues

If the display has right/left line or is vertically shifted:

Temperature unstability

By default, never modify any PWM or Delay settings in the Iron menu. Doing so may cause such issues.
Also, new tips are often unstable, leading to temperature jumps.
Don't try to calibrate the tip in this state, neither set a high temperature, because it could go under control.
They usually settle after some burn-in time. It's recommended to set a medium temperature (250-300ºC) and leave it like that for 15-20 minutes until it stabilizes.
If the temperature is still unstable, try increasing the Iron > Delay value, allowing more time for the temperature signal to settle.
A damaged, loose or defective connection in the handle will also cause this issues. Ensure the contacts are clean.
There have been problems with some board/stations like:

If you're getting "NTC high/low" error even when disabling the NTC in settings, then your STM32 is fake.
Check Clones in Compatibility section and Clone fix option in System menu.

Temperature accuracy

Buying a cheap high temperature meter is highly recommended!
These boards can have pretty different readings and tolerances. Even between T12 tips.
So the factory calibration is intentionally set lower than real, to avoid possible overheating problems.
Once you set the firmware, go to calibration and set there the real temperature measured with the external probe.

Calibration issues

Ensure to read Calibration first!
To calibrate, go into Calibration > Start.
Attach the temperature probe before proceeding!
If the difference between measured and real is higher than 50ºC, the calibration will be aborted, telling you to go into Calibration > Settings and manually adjust the values.
The calibration settings menu has 3 calibration options: Zero set, Cal 250ºC and Cal 400ºC.
When you edit 250 or 400ºC value, the power will be enabled and the value applied in real time, so be careful!
The power will be removed when no settings are being edited.
Adjust each value until it's close to the target temperature. Repeat for each step and save.
Those values are only used by the calibration process, to prevent burning the tip if your board reads too low.
After adjusting, repeat calibration, this time it should work correctly.
The calibration results for the current tip can be seen in the tip settings menu.
Tip settings menu calibration values aren't meant to be another calibration menu, only for viewing (ex. reporting calibration results) and for backup/restore purposes.
In case you lose, wipe or reset the data, you can go back into that menu and adjust the values based on previous calibration results.
Zero calibration can't be manually restored, but it only takes few seconds to adjust.

Cold tip not showing ambient temperature

Some amplifiers can introduce a small voltage offset that will translate into the cold tip reading 30-50°C higher than ambient temperature.
To fix that, follow this order exactly!
Tip power is removed in Calibration menu, inserting the tip before will heat it up and make cold calibration impossible.
Enter the Calibration menu, insert a completely cold tip now, enter Settings, adjust Zero set calibration and save.
After that, the offset will be compensated and the cold temperature will be normal.
It's highly recommended to recalibrate after changing this value.

KSGER self-resetting

Some KSGER controllers use a linear regulator to convert 24V to 3.3V, which is a very bad design and generates a lot of heat.
With the OLED displays, each pixel turned on consumes more power, and this firmware uses a larger font for displaying the temperature.
Thus, this firmware uses some more power. The design is so bad that the regulator will overload and shut down, resetting the board.
There're some options to fix this:

Other issues

After fully reading the documentation, if you still have problems or doubts, there're several forums with threads about this firmare:

Translations

For adding new languages, you have to modify these files:

For adding new characters to the existing fonts symbols, there're some instructions here:

Non-working features

Additional Documentation

@Dreamcat4 has made a great research and documentation of T12 and STM32 related stuff: