This is a second release of combined soldering iron controller for Hakko T12 tips and 858D rework station based on STM32 micro controller. The controller supports using both devices at the same time. The project was created because Maker B R requested it very much. Hope, it would be useful for many enthusiasts like me.
In the second release the PWM frequency has been increased from 20 HZ to 50 HZ because the light tips (D12, LJ02) can change the temperature very quickly.
Second release of the controller contains minor schematics changes:
- R24 resister changed from 470k to 100k
- Main hardware switch now connected in parallel with the reed switch
UPDATED Feb 16 2021
- I was pointed out to the issue in the handle schematics. The problem is a incorrect ground connection. Here is the issue. Please, correct your schematics.
Here V+ and V- is a soldering iron tip connectors, "+24v" and "-24v". The problem was the R9 resistor was connected to the ground by each side. Updated handle schematics shown in the article. The complete controller schematics has been updated also.
Here is a EasyEDA project created for the soldering controller. Please, double check the schematics and PCB. The PCB has not been tested!
UPDATED Nov 07 2023
- Release 4.08
- The project mirgated to STM32CubeIDE development environment.
- Implemented new PID algorithm. Now the soldering iron is heating faster, the controller is preventing high temperature overheat during heating up.
- New manage procedure for Hot Air Gun imported from my recent project of soldering station with JBC tips.
UPDATED Apr 01 2022
- Release 4.07
- Rotaruy encoder manager improved
- New PID parameters for the Hot Air Gun caliration procedure applied
- New TIP, T12-D32, added to the tip list
UPDATED Sep 21 2021
- The Hot Air Gun Fan connector GX16-8 pinout picture has been corrected.
UPDATED Jun 2 2021
- Release 4.06. No "about" menu item issue fixed.
UPDATED May 30 2021
- New release, 4.05. Automatic startup mode implemented. The main working mode would be activated after the controller power-up. It is convenient when you are using soldering iron in most case. You can activate this mode via main menu.
- Boost duration period step has been changed from 5s to 20s. Now the maxumum boot duration increased from 80 seconds to 320 seconds. , Please verify your boost time settings.
- Boost temperature now is more stable.
UPDATED May 25 2021
- New release, 4.04. Now it is possible to manage soldering iron while in hot air gun mode. If the "keep iron" option is enabled in main menu, long-press the encoder toggles the soldering iron.
UPDATED Apr 28 2021
- New release, 4.03 has new information on debug screen: Timer TIM1 counter value indicating AC zero events are detected by the hardware. See debug screen description for details.
UPDATED Jan 30 2021
- New release, 4.01 has new feature: Guarantee Hot Air Gun to be cooled. To activate this feature, the controller hardware should be updated. See 'Optional 220v safety relay and Cool Hot Air Gun Guarantee feature'. section for more details. New firmware supports old hardware also.
UPDATED June 03 2020
- Hot Air GUN start issue fixed. The power is supplied to the Hot Gun in 1 second after it activated allowing enabling AC relay.
- "about" menu item is available again.
- The standby and automatic power off procedure updated. Now you can use them independently.
- Screen saver timeout now is a single entity. It is no longer depended on mode switching. To return to the normal screen mode, touch the encoder.
UPDATED May 12 2020
- Standby mode issues fixed. The standby temperature limits now less than 200 degrees Celsius. Standby mode deactivation issue fixed.
- Temperature step feature added. The temperature can be adjusted by 1 or 5 degrees depending on setup menu settings.
UPDATED Apr 29 2020
- Optional 220v safety relay support added. See dedicated chapter below.
- Rotary encoder acceleration deactivated.
- R27 resistor value changed from 0.5 to 4.7 Ohm.
- Also, some followers claimed to replace R1 and R16 with 15k. Cannot say anything because i have version that works fine with 10k resistors.
UPDATED Apr 17 2020
- Two mode hardware switch supported: REED and TILT. Now low power mode timeout would be reset when tilt switch status changes.
- Fixed issue 'jammed on tip selection screen'. Now the main menu is reachable from tip selection mode by long press.
- Ambient temperature and tilt switch readings now are available on debug screen.
- Controller without soldering handle connected starts working in Hot Air Gun mode.
UPDATED Mar 23 2020
- The Hot Air Gun cooling procedure updated (see description bellow).
- The debug display mode added to simplify hardware checking and tuning.
UPDATED Jan 11 2020
- 100k pull-up resistor added
- 2x 100k resistors added to protect stm32 pins
- Buzzer is always on issue fixed
Let's get started
This project has several features:
- The controller allows using Hot Air Gun or soldering iron simultaneously. The reed switch of the Hakko 858D Hot Air Gun handle used to activate rework capability. The soldering iron can be automatically switched off or keep working depending on configuration parameters in the main menu.
- Optional hardware switch used to disable Hot Air Gun completely and disconnect it from the controller.
- Hot Air Gun is powered by a whole sine half-period voltage peaks and do not disturb the AC outlet.
- The controller supports single OLED display based on SD1306 chip using 7-pins SPI or I2C interface. No additional recompilation or code modification required. If OLED display found on I2C bus during startup procedure, it would be used, otherwise the controller would initialize the display on SPI bus.
- The controller checks the soldering tip is connected by testing a small amount of current through the tip. If tip is not connected to the iron handle, the error message would be displayed on the main screen. This feature allows quick tip change procedure in standby mode. When soldering iron is powered off and tip removed from handle, the 'change tip' procedure would be activated.
- The controller checks the Hot Air Gun is connected and its fan is working properly before applying power to the Hot Air Gun heater. This increase the safety of the controller.
- The controller would keep the Hot Air Gun fan working on low power until it become cold. The fan speed of the Hot Air gun is managed automatically as soon it is powered off.
- The controller uses ambient temperature (sensor inside the FX9501 handle or in the case of the controller) to correct the tip temperature measured by a thermo couple.
- The controller supports individual calibration of the tip by four reference points, 200, 260, 330 and 400 degrees Celsius.
- The controller supports calibration of Hot Air Gun by four reference points, 200, 300 400 and 500 degrees Celsius.
- The dedicated calibration procedure is implemented in the controller to simplify the tip or Hot Air Gun calibration process.
- The controller uses 50 HZ PWM signal to control the supplied power to the soldering tip. This makes the controller silent.
- PID algorithm used to manage the supplied power to soldering iron or Hot Air Gun. This allows to keep the preset temperature very accurate.
- Accelerated rotary encoder algorithm implemented in the controller, allowing make the changes quickly.
- The temperature can be displayed in two degrees: Celsius or Fahrenheit.
- The controller implements automatic power-off procedure in case of inactivity.
- The standby (low power) mode implemented using optional hardware tilt switch.
- U8g2 graphics library implemented in the controller.
- To prevent OLED display degradation the screen saver mode implemented.
As was stated on the feature list, the controller can work with I2C or 7pin SPI version of the OLED display based on sd1306 chip. During startup procedure the I2C bus scanned for OLED display. If the OLED display would be detected on the I2C bus the controller starts using this display. Otherwise, SPI version of the display would be initialized. There are two displays shown on the complete schematics below, but the only one display can be connected to the controller. You can use either OLED display version, but only one.
The controller requires big size PCB to fit all the components so I suppose it is better to split the controller in two separate boards: main board and display board. It is convenient to solder rotary encoder to the display board and use encoder neck to fix this board on the acrylic front panel. See the picture below.
To make display PCB more compact, it is convenient to turn the display upside down (the connector is on lower side of the PCB). So the display image is rotated by 180 degrees in the firmware. If you are going to connect the OLED in normal state, you should edit core.cpp file and change one line in HW::init() function. Replace dspl.init(U8G2_R2); to dspl.init(U8G2_R0); and recompile the firmware.
If your display is not built on sd1306 chip, you should change display.cpp file.
Hakko T12 Soldering TipsThe Hakko T12 soldering tips are very convenient tools: they are heating extremely fast and have a sensor inside that allows to keep the temperature very accurate. It is a big pleasure to use such a amazing tool. The tips require just three wires: plus, minus (ground) and earth ground. The heating element inside the tip is connected consequently with the thermo couple allowing to decrease the required wires. It makes the cable very flexible and light weight.
A dedicated handle is required to use the T12 tips. The handle I would like to recommend is FX9501. It has an attractive look and is convenient to use. Also it has enough space for tilt switch and thermistor (NTC type) inside. To connect the handle to the controller you have to replace the standard connector with some kind of aviation plug which can be ordered on eBay, for example. GX12-5 is a good choice. Also, if you plan to insert tilt switch and thermistor inside the handle, you should replace the cable to 5-wires one.
When connecting the handle to the GX12-5 plug you can use the following reference of the plug pin-out.
Also you can order Chinese soldering kit like shown on the picture below and use another handle in this project. This kit also contains tilt switch and thermistor.
This handle kit has one disadvantage: it is not convenient to change the soldering tip while it is hot.
Hot Air Gun 858D handleTo turn the controller into rework station, you can order hakko 858D hot air gun handle as shown on the picture bellow. This handle is non-expensive and contains all required components: heating element, fan, temperature sensor and reed switch.
When connecting the Hot Air Gun handle to the controller via GX16-8 plug you can use the following reference of the plug pin-out. Unfortunately, I do not know the color of the wires because my handle was assembled. I have been told that there is a different kind of hakko 858D handles in the market and your handle can have different pinout. To check your handle pinout you can keep in mind the following criteria:
- The plug should have two wires for the heating element, two wires for the temperature sensor and two wires for the fan. The reed switch shares gnd with a temperature sensor.
- Earth Ground is connected to the metal body of the handle.
- The heating element has resistance about 60 Ohm.
- The thermo-couple (temperature sensor) resistance is about 1-3 ohms.
- The reed switch should be shorten to the groun pin when the handle is near magnet
- The fan should start working when you apply 24 volts to its terminals.
In the second release of firmware the hardware switch become optional. It can be connected in parallel with Hot Air Gun reed switch to allow disconnect Hot Air Gun handle completely. As far as you know, the reed switch is shorten when the handle is on the hook and it is open when the Hot Air Gun handle is used. If you disconnect Hot Air Gun from the controller, it would assume the Hot Air Gun is in use and would try to power it. The optional hardware switch simulate closed reed switch allowing disconnect the handle.
The main working mode is soldering iron mode. In this mode you can use soldering iron, access main menu, activate and calibrate soldering iron tips and Hot Air Gun, configure all required parameters of the soldering station. When you pick up the Hot Air Gun from the base, the controller turns to rework station mode. The soldering iron can keep working if you change the configuration parameter in the main menu.
You can use soldering iron or Hot Air Gun sequently (i.e. only one device can be active at a time) OR both devices simultaneously depending on setup option menu ('keep iron') mode. When this option activated, the iron would be kept working while you are using Hot Air Gun. But when you put the Hot Air Gun on the base it would be turned-off and start cooling.
In the 2.02 release of Mar 23 2020, the cooling procedure has been updated. Now the controller checks for Hot Air Gun is connected by means of current through its fan. If the Hot Air Gun is connected, the controller automatically adjust fan speed depending on the Hot Air Gun temperature: first the speed would slow down and then increasing while the Hot Air Gun become cold.
In case the controller does not detect the current through the fan of Hot Air Gun, the fan speed would not changed for defined time-out.
Note: in Hot Air Gun mode you can use rework station Hot Air Gun only. The setup menu is not reachable in this mode.
Build/Start checklistTo clarify the sequence for starting the controller here is the list of operations should be performed consequently:
- Build the controller hardware, solder all the components as shown in the complete schematics below.
- Connect the soldering iron handle with tip installed to the controller
- Connect the Hot Air Gun
- Power on the controller
- Activate some tips you are going to use in near future
- Initialize the EEPROM (using main memu)
- Setup some common parameters through menu (temperature units at least)
- Tune the soldering iron potentiometer
- Tune the Hot Air Gun potentiometer
- Calibrate several soldering iron tips
There are two temperature sensors in this station: one is in soldering tip and another is in Hot Air Gun. Both sensors are thermo-couple typ sensors that generate very small voltage, about several millivolts, so to check this voltage operating amplifier is implemented in the schematics. You can see the sensor part of the schematics on the pictures below.
The main component of the schematics is a dual channel, rail-to-rail, low-noise operating amplifier, AD823. The temperature of the Hot Air Gun is checked by the first amplifier on pins 1, 2, 3 and the temperature of the soldering iron is checked by the second amplifier on pins 5, 6, 7. As soon as tip uses the same two wires to heat and to check the temperature, zener 3.3v diode is used to limit input voltage on the operating amplifier when the iron is powered by 24 volts.
You can replace AD823 op amp by its analog. It should be rail-to-rail op amp, powered by +3.3 volts single power source and has low noise. The following list describes the analogs: lm6118, lm6218, lt1122, lt1201, lt1213, lt1215, opa2132, opa2134, opa2227, opa2604, tle2072, tle2142, tle2227. In case if none of them is available in the local market, the MCP602 and its analog can be used. It is cheaper but more noisy.
The controller also checks the iron tip and Hot Air Gun are connected before the power would be applied to them. It increase the soldering station safety and allows to start the 'change tip' procedure if the tip is disconnected from the handle.
To check the connectivity, the controller implements another, non-expensive, op-amp that measures the current through the iron tip and hot air gun fan. This amplifier can be replaced by cheaper one as soon as the accuracy is not the point here.
Supply Power to the IronThe power is supplied to the iron by low-frequency (50 Hz) PWM signal to make the controller silent.The MOSFET is driven by a simple circuit consists only one transistor because PWM frequency is low. Zener diode (18V) is used to limit Gate voltage (Vgs) of the MOSFET while it is open because the power supply voltage is higher than maximum value of MOSFET vgs voltage. The diode FR104 removes the power from the iron when the MOSFET is closed. I believe you can replace this diode by shottky diode, but the fast recoverable diode is better.
Supply Power to the Hot Air Gun
The Hot Air Gun has two independent circuits that requires the power. First one is a fan circuit and the second is a heater. The fan is powered by the p-channel MOSFET to unify the component list. Surely the MOSFET irf9540 can be replaced by less powerful one or even by n-channel MOSFET but the schematics should be changed accordingly.
To power the heater, the high voltage triac BT41-600B is implemented in the schematics managed by moc3052 or moc3062 opto-coupler driver that ensures electric safety of the controller. You can attach the heat sink to this triac as I did, but it is not critical. I used 1W resistor R35, but it not heating at all. Perhaps, it could be replaced by 1/4W standard resistor. C11 capacitor should be film 600 volts capacitor.
Zero Crossing Detector
The main feature of the rework station is a smooth powering of the Hot Air Gun heater. As far as you may know, the tirac is open when the power applied to its gate and closes when the AC sine voltage crosses zero. Some schematics "cuts" part of sine AC voltage period to decrease the supplied power. This creates distortion in the AC power outlet because when the triac open in the middle of the AC sine curve, the current through the heater is growing very fast.
This controller switches on the triac when AC sine is crossing zero. The whole AC sine shapes are passed through the triac, so the current growing smoothly and there are no distortion to the AC outlet generated.
To synchronize the controller with AC power sine signal, zero crossing circuit is implemented on the schematics. The full bridge diode rectifier DB207 supplies the signal to the opto-coupler that generates zero crossing interrupt to the controller. You can replace the diode rectifier DB207 by 4 diodes N4001 or its analog.
Build the Controller
The complete controller schematics is show on the picture below. The main component is the BluePill board. You can use the pure STM32F103C8T6 micro controller if you wish to create compact variant of the soldering station.
As you can see on the picture, the DC-DC converter is used to get 5v for the low-voltage part of the schematics.
The WSTECH isolated DC-DC converter 30v->5v is highly recommended. This converter supplies very stable voltage.
On aliexpress you can order another isolated DC-Dc converter 63v->5v Like shown on the picture below:
If you cannot find these converters, it is possible to order another converter based on MP1584 chip like shown on the picture below.
It is advised to add yet another isolated 5v->5v converter, b0505s. Connect two DC-DC converters consequently in this case: 24v -> MP1584 DC-DC converter -> b0505 -> ams1117. And you get isolated power supply for your stm32 micro controller.
The controller can work using this converter, but the temperature readings become a little bit noisier.
Separate at24c32 EEPROM IC from Atmel is used to store the soldering tip calibration and configuration data of the controller. The 3.3k resistors allow to communicate to the EEPROM and I2C OLED display at high speed, 400kHz.
Flash firmware to the controller
To flash prebuilt firmware to the controller the st link v2 programmer and ST link utility are required.
Download the STM32 ST-LINK utility from st site. Install the utility in your system. Launch the ST-LINK utility, connect the programmer to the 4pins SWD interface of BluePill board, press "connect" button. The main window should display the memory content of the BluePill board. Press flash button to write the firmaware to the BluePill board.
Note: Do not connect power through non-isolated DC-DC converter to the controller while it is connected to the usb programmer. The micro controller can be damaged in this case.
Building instructions
To compile the project from the source code you have to:
- install "Workbench for STM32" and CubeMX software from openstm site.
- download your project ZIP file from the github repository
- create directory named F1_T12+858D in your project directory. You can determine your working directory using windows->preference menu, then select general->workspace parameter, then find "workspace path" field.
- extract ZIP archive from GitHub and rename created top folder to F1_T12+858D.
- start CubeMX (just click to F1_T12+858D.ioc file in F1_T12+858D folder)
- CubeMX ask you to migrate to newer firmware version, answer yes to migrate.
- In the CubeMX select "Project Manager" pane. Here you must check project name and project location filed. Then select Toolchain as "SW4STM32" and mark checkbox "Generate Under Root".
- Press button "GENERATE CODE" then "Open Project". The system workbench should be started with the project.
- Add include file path for u8g2 (Project -> Propertis ->Settings; Configuration: [All configurations], Includes => add directory for u8glib includes (I added: "${workspace_loc:/${ProjName}/Drivers/u8g2/inc}")
- Convert project to C++ (Right mouse click on the project folder in the left pane)
- Add "-ffunction-sections -fdata-sections" optimization flags to make the binary code shorter. (Properties->C/C++ Build->Optimization->Other optimization flags).
- Compile and run
Initialize EEPROM
The EEPROM of the controller should be initialized first time. During startup procedure the controller checks that the iron tip configuration and other configuration information exists in the EEPROM. If the EEPROM is empty or misconfigured, the controller turns to the initialization menu. Here you can reset the EEPROM and activate required iron tips.
Note: Tip configuration data (tip list)is available in the source file iron_tips.c and you can edit this list. You can add some tips to the list or you can delete unused tips from the existing list. In most case the edit of the list is not necessary because you can activate the favorite tips from the whole list using tip activation menu.The first entry is a virtual tip used to save Hot Air Gun calibration data. It can be renamed, but it must be on the top of the list.
Tune the ControllerThe external thermocouple required during this procedure.
In the controller schematics you can see two 500k potentiometers R5 and R26 that tunes the operation amplifiers to get the expected temperature readings at controller pins PA4 and PA5 of BluePill board. You can use different operating amplifier, so these potentiometers are increasing the controller flexibility.
Each potentiometer should be tuned at least once you created the controller. The main idea is that the controller reads the voltage from the thermo-couple through the ADC and gets some integer data in the interval 0-4095 depending on the voltage on its pin. The near the voltage to 3.3v the near the readings to the 4095. The potentiometer should be tuned so when the temperature become 450 Centegrees (iron) or 500 Centegrees (Hot Air Gun), the ADC reading should be about 4000.
To simplify controller tuning procedure, the tune modes are implemented in the controller. This modes can be activated from the system menu item 'tune iron' or 'tune gun'. When the tune mode is activated, the controller powers on the iron or Hot Air Gun and displays on the screen applied power (in percents) and the gauge of the current temperature readings. The gauge has a label '450' or '500' depending on what hardware you are tuning. When the gauge reaches this label, the temperature should be 450 or 500 degrees of Celsius.
Note:To perform tuning procedure more precisely, apply a solder drop to the contact between the thermo-couple and the soldering tip rod.
Connect external thermo-couple to the iron tip and enter the tune procedure. The iron should start heating. Rotate the encoder to change the supplied power to the iron. Pressing the encoder handle shortly you can toggle supplied power (on or off). Check you external thermo-couple and adjusting the power manually by encoder try to keep the iron temperature as near to 450 Celsius as possible. At the beginning you can supply a more power to the iron, but when the temperature will near to 450 degrees by external thermo-couple, you should decrease the supplied power. Any way, try to keep the iron temperature about 450 degrees.
As soon as you have stabilized the iron temperature near 450 degrees, rotate the 500k potentiometer trim to shift gauge bar on the display left or right. Adjust the potentiometer so the bar would be as near to the reference temperature as possible. Then long press the encoder handle (for about 2 seconds) to turn the iron off and finish the procedure. It is recommended to use the thick tip that produce the highest voltage when performing the tune procedure. For example, T12-K, T12-D52 or so.
User manualThe Working ModesThe controller supports several modes:
- Iron Standby mode: the iron is switched off.
- Main working mode: iron keeps the preset temperature
- Boost mode: the controller increases the preset temperature for some period of time
- Tip change mode
- Tip calibration mode
- Tune mode: the initial setup procedure (see previous chapter)
- Hot Air Gun calibration mode
- Setup menu
- Hot Air Gun working mode: Hot Gun is keeping the preset temperature
When the controller is just powered on, the standby mode is activated. In standby mode the soldering iron is completely powered off. The main display shows the following information:
- The preset temperature in the top left corner of the display (in units selected - Celsius or Fahrenheit)
- The 'OFF' message in the top right corner of the display, indicating that the iron is powered off
- The current temperature of the iron is shown in the center of the display
- Current tip name is shown in the left lower corner
- The temperature of the handle (ambient temperature) is shown in the right lower corner
The preset temperature can be adjusted by rotating the encoder handle. If the tip would be removed from the handle in the standby mode, the controller would turned to the tip selection mode. In this mode the list of the active tips will be displayed on the screen. Rotate the encoder handle to select appropriate tip name of the new tip you are going to insert into the handle. It is not necessary to push the encoder, just select new tip and insert the tip into the handle.
To power on the soldering iron, push the encoder handle lightly. The controller will be switched to the main working mode. Now the controller will try to reach the preset temperature and keep it.
In the main working mode the message 'ON' will be displayed in the top-right corner of the screen and the supplied power is displayed in the right part of the display as a triangle. When the iron reaches the preset temperature the 'Ready' message would be displayed for a while.
By rotating the encoder it is possible to change the preset temperature. The message 'ON' would be showed again till the iron would reached the new preset temperature. To return to the standby mode, press the encoder handle lightly.
If the Hot Air Gun previously used, its temperature can be displayed in the right-bottom corner instead of ambient temperature like shown on the picture below.
The Hot Air Gun working mode
The controller supports single running mode for Hot Air Gun. The main display shows the following information:
- The preset temperature in the top left corner of the display (in units selected - Celsius or Fahrenheit)
- The 'ON' message in the top right corner of the display, indicating that the Hot Air Gun is
- The current temperature of the Hot Air Gun is shown in the center of the display
- The fan speed in percent is shown in the left lower corner
- The ambient temperature is shown in the right lower corner
By rotating the encoder it is possible to change the preset temperature. The message 'ON' would be showed again till the Hot Air Gun would reached the new preset temperature. To change the Hot Air Gun fan speed, press the encoder lightly then rotate encoder handle. The fan speed change mode activated for a while (about 3 seconds) then the controller returns to the preset temperature mode. If you wish to return to the temperature mode manually, press the encoder handle again.
The Hot Air Gun can be activated on standby mode (when the soldering iron is powered off) or in the iron working mode by taking the Hot Air gun from the base. The reed switch would be open and the controller would be switched into rework mode. If 'keep iron' main menu item would be activated, the soldering iron would keep the preset temperature while Hot Air Gun working mode. In this case the soldering iron temperature would be displayed in the right-bottom corner of the screen instead of ambient temperature.
If the 'keep iron' option is OFF, the soldering iron would be powered off.
Starting from 4.04 version it is possible to manage the soldering iron while in Hot Air Gun mode. Long-press the encoder button to toggle soldering iron power. For instance, you can activate the soldering iron and supply extra power to the components you are working with. Ensure the soldering iron temperature is correct before use the soldering iron. It can be overheated for a while due to nature of PID algorithm. The soldering iron temperature shown in place of ambient temperature while you are using it.
When you leave the Hot Air gun mode, the soldering iron would keep current mode. You have to enable 'keep iron' option in the main menu first.
The Setup Menu
To get to the setup mode, long press the encoder in standby mode.
There are several menu items in the main menu. They are obvious and not all of them are described here in the details. You can select the temperature units: Celsius or Fahrenheit, setup the automatic power-off timeout or disable this feature completely, activate the tip in the main tip list, calibrate the current tip and customize the PID algorithm parameters. You can configure the screen saver timeout and enable keeping soldering iron working when the Hot Air Gun off-hooked. The most complicated menu items are described later.
The Tip ActivationThere are 91 tips in the default tip list of the controller. It would be inconvenient to scroll down through the complete list to select the one you are going to use next. So you can activate the tips you have in the main list. The main tip list has a checkbox left of the tip name showing the tip is active or not and has a sign "[!]" right of the tip name if the tip is not calibrated. To activate the tip, press the encoder handle lightly. Rotate the encoder to select another tip. Long press the encoder when you finished the tip activation procedure.
The Tip Calibration
Note:The external thermocouple required to calibrate the iron tip.To perform calibration procedure more precisely, apply a solder drop to the contact between the thermocouple and the soldering tip rod. To heat-up the tip and apply soldering rod, you can use tune procedure (see above).
The current tip can be calibrated using 'calibrate' menu item. If the tip is not calibrated yet, the "[!]" sign would be displayed near the tip name in the bottom line of the main screen. There are two calibration modes in the current version of the controller firmware: automatic and manual.
In the automatic calibration mode, controller keeps the temperature near calibration point and asks you to enter real tip temperature. First, turn the power on by pressing the encoder lightly. The iron start heating. When the reference temperature reached, the controller beeps and get ready to read the real temperature value. Check the iron temperature by the external thermo-couple and enter this temperature to the controller: rotate the encoder handle to select the real temperature from the list then press the encoder lightly. Then the controller continues with the next reference point. This procedure finishes when you enter temperature of all 8 reference points or when the real temperature will be greater than 430 Celsius. During this procedure controller updates tip calibration data and writes current tip temperature in the lower left corner of the screen.
After all reference points would be calibrated, the controller saves new tip calibration data to the EEPROM. The controller would short beep if the calibration saved successfully.
Automatic calibration procedure build the tip calibration by least squares method and the calibration approximation parameters can be not accurate. To improve the tip calibration data the manual calibration procedure can be used.
In manual tip calibration you must 'guess' the internal temperature readings that matches the reference temperature. This procedure is iterative: you start with the some preset temperature value in internal units (for example, calibrated by automatic procedure) the controller heats the tip to this preset temperature and gets ready. Then you measure the real temperature by the external thermo-couple. If the real temperature is not equal to the preset one, you should increase or decrease the internal tip temperature by rotating the encoder handle.
The progress bar in the lower part of the display shows the difference between preset and current temperature (in internal units) of the tip. The controller keeps the tip temperature near the preset value (vertical line on the progress bar) all the time. To increment the preset temperature, turn the encoder right, to decrease - turn it left. One encoder 'tick' corresponds to one Celsius degree.
As soon as you guess the preset temperature for the reference temperature point, press the encoder lightly. You return to the preset point selection mode. Here you can select next or previous reference point. When you finish calibration, long press the encoder.
Automatic power off feature
This feature increases the safety of soldering iron. There are two automatic power-off features are implemented inside the controller, software driven and hardware driven. The hardware driven one requires optional TILT or REED switch. In the software mode, the controller turns on the Idle mode if the supplied power to the iron is stable for a while. In this case, the controller will power off the iron in specified timeout. When the time to automatic shutdown near, it will be displayed as a seconds remaining. When you use the iron, the supplied power changes and the controller resets the automatic power off timeout.
The automatic power off feature enabled as soon as you setup the auto off timeout in the setup menu. You can setup the minutes before the soldering iron will be switched off in case of inactivity.
The hardware driven power-off feature requires TILT or REED switch installed into soldering iron handle.
The TILT switch is working as follows: when it turned downstairs, it is "open" (not conduct the electricity) when it turned upstairs, it is "closed" (start conduct electricity). The tilt switch is the part of the Chinese soldering kit. You can connect the TILT switch in any way, upside down or not, the controller is checking the TILT status change. When the TILT switch status would change, the controller would reset the low power mode timeout.
To use the hardware TILT switch, you must setup automatic power off timeout and standby temperature. If the standby temperature is "OFF" the hardware tilt switch will not be used and software solution described previously will be activated. Also, you can setup standby time (timeout to switch to low power mode). When the tilt switch enabled, the main working mode changes the following way. The iron is starting heating. When it reaches the preset temperature the "Ready" message will be displayed and the controller will keep the preset temperature. If the soldering IRON is not used (laying on the table, the tilt switch become "closed") the controller will switch low power mode. If the iron keep laying for automatic off timeout, the controller will switch off the power completely. As soon as you start using the iron, the controller restores the preset temperature.
Also, you can use REED switch in the soldering handle. The controller would activate the low power mode when the REED switch would "closed". For example, you can place the magnet into soldering station base to activate this switch when you put the soldering handle on the base. Perhaps, you should use mode shorter timeout values when using REED switch.
To connect the IRON handle you can use the schematics shown bellow. As you can see, the TILT switch and the thermistor connected between dedicated line and ground. The iron tip is connected by three lines: Earth, ground and V+.
Optional 220v safety relay and Cool Hot Air Gun Guarantee feature.
Jan 30 2021 firmware update includes the safety relay support and Cool Hot Ai Gun Guarantee feature. Some followers claimed this support to ensure the AC power high voltage never hurts someone when the Hot Air Gun plug would be disconnected from controller socket. PA15 ping of stm32 controller can manage the safety relay that connect 220v AC power when hot air gun activated only. And the relay would completely disconnect the power line if the hot air gun is not active, even when the hot air gun would being cooled down. The optional LED1 diode indicates the 220v power is applied to the Hot Air Gun socket. As you can see, this led is connected directly to the power line, so it checks the power correctly in any case.
Another follower claimed Cool Hot Ai Gun Guarantee feature several weeks ago. Imagine you are doing your rework job and using the Hot Air Gun. But accidentally, you have to leave your working place. If you place the Hot Air Gun on-hook (on its base) the Hot Air Gun will be cooled down by the controller. But then the controller keep working. If you switch-off the controller completely, the Hot Air Gun can be overheated, because its fan will be stopped at once. He said it would be nice to ensure the Hot Air Gun will be cooled down and then the controller shut-down itself in case you should leave your working place. Now both features are combined by a single hardware relay.
See the schematics on the picture below. There are some new sockets shown here i would like to introduce.
- JP7 socket to connect AC-DC 24v power supply input (220v)
- JP6 socket to connect main power switch
- JP3 socket to connect AC power line
- JP4 socket of the Hot Air Gun
As you can see, when the K1 relay powered off (as shown on the picture) both AC lines are disconnected from gun heater socket JP4 by the relay and triac. When the Hot Air Gun start working the relay K1 shorts both its lines and supply power to the Hot Air Gun socket. Also it shorts the main switch lines also to ensure the power would be supplied to the controller till the Hot Air Gun is hot. Now you can use your Hot Air Gun as usual. When you finished you work, place the Gun to the base. If you should to leave your workplace, switch off the main switch. As soon as Hot Air Gun become cool, the relay K1 powered off the controller,
You should use a power relay, that capable to manage 220 volts and 700 Watts of Hot Air Gun. The relay should have two separate channels. The voltage required to activate the relay should be 24 volts. For example, RTE24024 from TE connectivity.
You can develop a separate PCB for the High-voltage part of the controller. Here is my project on the EasyEDA.
The safety relay is optional part, the firmware would work fine without it.
Tune PID parameters
Note: Perhaps, it is not necessary to tune the PID parameters of soldering iron or Hot Air Gun.
These parameters are responsible for how fast the iron heats and how accurate its temperature is kept by the controller. You can restore the default values by completely erasing the EEPROM memory. In this case you will loose all your tip calibration data. Or you can write down old parameter values on some piece of paper and restore them manually.
There are two menu items in the main menu allowing tuning PID parameters of soldering iron and Hot Air Gun. When tune PID mode activated, you can see three values of PID parameters on the display, Kp - proportional, Ki - integral, Kd - differential. Choose the parameter you are going to change and press the encoder button. You turn into tuning test mode. There are two graphs: the temperature difference and power math dispersion. Both graphs are auto magnifying ones and its maximum value is shown on the left.
To power on/off the iron, long press the encoder button. To change the parameter, rotate the encoder. On the graph you will see how the temperature changes in time. To select another parameter to change, press encoder lightly. You will return to parameter selection screen. To finish procedure and save new values of PID parameters long press encoder in parameter selection screen. If you do not want to save new values, power off the controller completely.
The firmware
Prebuilt version of the controller software can be downloaded from the github repository. To upload this hex file into controller, you can use stm32 st-link utility.
The internals (advanced topic)Here is an optional chapter that could be skipped if you are not interesting how the controller works. On the other hand as soon as hacksters.io is an education resource, this topic can be useful for some of you.
Soldering Iron
The soldering iron manager is built on TIM2 timer. The timer period configured by prescaler and period parameters is 20 miliseconds (50 HZ). First timer channel supplying the power to the soldering iron and the second channel is supplying the power to Hot Air Gun fan. Putting some duty value to the channel register would change the power supplied to the corresponding device.
The third timer channel configured in output compare mode: when the timer counter reaches the channel value timer generates interrupt event. In the interrupt handler routine the current through the soldering iron and Hot Air Gun fan are checked.
The fourth timer channel also configured in output compare mode. The interrupt fires ant the end of the timer period, when soldering iron duty cycle already finished and no power is supplying to the soldering iron. In the interrupt handler the temperature of the soldering iron, Hot Air Gun and ambient one are checked.
To check the current through device or temperature values the internal ADC is used. Both ADCs are configured in Dual Fast Interleaved mode. This means the ADCs perform checking their channels consequently one after another. The measured results are collected by DMA controller and are saved into the memory buffer.
The two channels per ADC are configured. When the controller is checking current, each ADC asks for iron current channel and fan current channel. So when the one checking loop of ADC finishes, the controller has 4 values: iron current from ADC1 and ADC2, fan current from ADC1 and ADC2. When the controller is checking the temperatures, the ADC channels are configured the following way: ADC1 is checking the ambient temperature then iron temperature, ADC2 is checking the ambient temperature then Hot Air Gun temperature.
As soon as measurements are finished, DMA generates the interrupt. Here it is a time to calculate the average value of checked parameters and (if the iron temperature has been checked) calculate the required power to be applied to the soldering iron.
Hot Air Gun
As it has been mention before, the Hot Air Gun fan is managed by TIM2 channel 2. The Hot Air Gun heater is managed by the timer TIM1. This timer is clocked by the internal 'zero' interrupt generated by optocouple when AC outlet voltage is crossing zero axis. The timer period is 100 AC cycles (1 second when AC outlet frequency is 50 HZ). First timer channel is managing the Hot Air Gun heater power. Putting the duty value 0-99 to the channel register would change the supplied power to the heater. So the power to the Hot Air Gun heater is supplied by the complete AC half-periods and no AC distortion is generated.
In 2.02 release the debug mode was added to simplify detect the possible issues in hardware and software. To activate debug mode, you need to select 'about' menu and then long press the encoder button. The debug screen would be showed.
In the debug mode the raw controller data is displayed on the main screen: the iron temperature (in internal units 0-4095), the current through the iron that is used to detect the iron connected, the ambient temperature (0-4095) ant TILT switch readings. The NTC thermistor resistance should be 10k when temperature is 25 Celsius. As soon as we use another 10k pull-up resister, the temperature value should be near 2048. The more is ambient temperature the less is the ambient sensor readings.
The tilt sensor become less when it closed and more when tile is open. Try to rotate the iron handle and ensure that the tilt value changes.
On the left side you can see the power applied to the iron and statuses of iron and Hot Air Gun. 'i' - means the iron is connected, 'g' (not shown) means the Hot Air Gun is connected. The Hot Air Gun would detected in case the fan current would be greater than 1000.
Rotating the encoder you would change the power supplied to the iron.
If you activate the Hot Air Gun by off-hooking it from the base, the data on the display would changed accordingly.
The fan sign indicating the Hot Air Gun mode has been activated. As you can see, the current through the fan has increased and the controller detect the Hot Air Gun connected.
4.0.3 firmware displays the internal value of TIM1 timer counter. The timer is clocked by the AC_zero interrupts on PA12 pin from opto-coupler and is used to manage the power of the Hot Air Gun on PA11 pin. The last value in the right column showing the timer1 counter value. If the controller detected the AC signals, the displayed value will be greater than 100.
Rotating the encoder you would change the power supplied to fan. You cannot supply the power to the Hot Air Gun heater in this mode.
Comments