Author Topic: CFW for KSGER/Quicko STM32 Soldering Stations  (Read 146761 times)

ricktendo, StephenR0, dark_hawk, wickated and 4 Guests are viewing this topic.

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1100 on: June 15, 2021, 12:44:30 pm »
Then set the probe to 1x to better avoid the noise. There isn't high frequency there, so no worries!
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Offline RobHon

  • Contributor
  • Posts: 13
  • Country: br
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1101 on: June 16, 2021, 02:08:32 am »
Ok David,

Regarding the unexpected resets, after inspection of the board, measuring some voltage, etc I can’t find any hardware problem.

So far, the reset happens every time that I change the temp set. When the desired temp is achieved a reset happen.

I will continue to investigate, maybe measure the more relevant signals trying to capture the moment of the reset.

In parallel I’m trying also to flash the CK32.

I recorded a video: https://youtu.be/Ur_4IdlN1fE

Btw, The error message, that I mentioned in my first message, didn’t occurred again.
« Last Edit: June 16, 2021, 02:39:19 am by RobHon »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1102 on: June 16, 2021, 03:18:33 am »
To me, it seems to happen when writing the settings to the flash.
When you stop changing things, including the setpoint, there's a timeout (Save Delay, default 5 seconds) before updating the stored settings.
It might take more time in this mcu, or maybe the writing algorithm is different and gets stuck somewhere, so the watchdog timeouts and resets the system.
The flash is one of the biggest differences in these clones.
Try going to settings, system and set save delay to 0 to disable it, then check if it still resets when changing anything.

Lucky you, I also got some CH32F103 blue pill boards, so I'll try to find the issue. Clearly a compatibility thing.
It's made by the same company that made the CH341.
The bad: Only chinese datasheet!

The strange thing is that the settings are actually being saved.
Hopefully it'll be fixed by adding more time or resetting the watchdog more often while programming.
Otherwise better that you know chinese, because I don't! :D
« Last Edit: June 16, 2021, 04:14:16 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Offline RobHon

  • Contributor
  • Posts: 13
  • Country: br
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1103 on: June 16, 2021, 04:06:43 am »
Chinese?! I should learn it  :scared:

I believe you got it.

I changed the “System” > “Save Time” to the extreme settings (1s and 60s)

I conclude that there is a correlation. It’s more clear when I set it to 60s. The reset still happen, but after about 60s (temp already stable)


Btw, I’m very happy to know that it is the same manufacturer of CH341 :rant:   :phew:
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1104 on: June 16, 2021, 04:12:14 am »
I'd set it to 0 for now to avoid any resets, not saving the setpoint isn't a big issue.
But remember that it won't save anything!
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Offline Tugo

  • Regular Contributor
  • *
  • Posts: 68
  • Country: si
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1105 on: June 16, 2021, 05:22:34 am »
I did some testing yesterday and I didn't have time to upload anything so here are my pictures...
Everything was set at default for ADC and PID, probes are set to 1x (also in oscilloscope) and I did some test with different power supplies.
First 2 pictures are from the same power supply as I did all of my testing by now. It is a 20V 4.5A power supply for a laptop (I forgot which brand it is).
Then I tested with 3 other power supplies and each had different "problem".
In the last picture is a graph from a power supply that I will use with this controller but is "naked"  :-DD
This is the power supply: https://www.aliexpress.com/item/32850805623.html?spm=2114.13010708.0.0.3a994c4dq6R8js
It is 24V 4-6A and is ok to use it up to 5.5A, after that protection kicks in.

Back to topic...
Yellow line is 3.3V from regulator but I measure it directly on pin 5 of op-amp.
Blue line is output from op-amp.

I have to tell you again that I modified this controller from the original with 1 added diode (correctly  ;)) and 1 moved capacitor C8 (maybe 100nF?) to S and D on MOS.

Later today I intend to remove C8 and the diode to see what is going on but before that I will add some extra capacitors parallel to LED (between +op-amp and GND) and one in parallel to that 249k resistor (100pF as on your schematic) to see if anything changes.

Anything else I could do, David?
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1106 on: June 16, 2021, 05:29:14 am »
@RobHonn try the attached fw. It just clears the watchdog like crazy while writing to the flash.

Tugo, watch the 3.3V in AC coupling and much lower Vdiv, We need to see if there's correlation between supply and ADC noise.
Also measure 24V in CH1  (in AC mode) and amp output in CH2. If both have the same spikes, you know it's due bad filtering (Or C8, keep reading to know why)

Did you try the firmware before modding anything? Because not doing so is like searching in the dark.
You don't know where the problem comes from. You must ensure that your mods aren't the culprit.

I didn't notice the C8 thing before. I don't understand why put C8 between S and D. Originally it's between 24V and gnd, to filter trasients.
When the Fet turns on it will short out C8. Even 100nF can provide serious current spikes. Not nice!
A snubber is done with cap+resistor in series to dampen the spikes. And it requieres a lot of testing. But the inductive load here is very low.

But after switching off, the C8 will transfer all the high frequency noise from the power supply into the circuit. When the ADC is reading!
Set it as it was before. In any case, try putting a big capacitor in the 24V connector.

« Last Edit: June 16, 2021, 04:25:54 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 
The following users thanked this post: Tugo

Offline Tugo

  • Regular Contributor
  • *
  • Posts: 68
  • Country: si
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1107 on: June 16, 2021, 08:36:15 am »
"nonononono"  :-DD Good one  ;)

Why I did it? I did it to be like here in this schematic: https://github.com/dreamcat4/t12-t245-controllers-docs/blob/master/controllers/stm32-t12-oled/v2.1s-and-Ve2.1S/KSGER%20STM32%20Ver2_1S%20schematic%20rev%202_floobydust.pdf

I will put C8 to where it was from the start and leave diode from S to gnd and first check if anything good comes out of this.
Then I will do everything you said that I should do, ok?  :-+
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1108 on: June 16, 2021, 09:43:05 am »
Hmm. Maybe C8 there is smaller there. No value provided. Maybe 1nF, 100pF, but 100nF is too much
But doing so is not a good practice.

A proper snubber is done like this:


That one is for nasty inductive spikes, ex. flyback topologies in SMPS converters.
When the Fet turns on, the resistor limits the current, so the capacitor is discharged in a controlled manner.
When it turns off, if there's a negative spike, the diode will bypass the resistor, storing the energy on the capacitor, dampening the spike.

For not so harsh conditions, a properly tuned RC snubber tuned works perfectly.
And it's better than a diode because there's no response time.

Made some quick simulations, check the pictures.
The T12 heater model is roughly simulated as a resistor+inductance+capacitance. The values are empiric.

Tuning in this application is pretty easy.
At only 5Hz you don't have worries about resonances and those problems that do appear in the KHz/MHz range.
« Last Edit: June 16, 2021, 10:02:18 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 
The following users thanked this post: Tugo

Offline RobHon

  • Contributor
  • Posts: 13
  • Country: br
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1109 on: June 16, 2021, 02:46:02 pm »
David, thank you for the quick new .bin file.  :-+

My understanding is that the changes you did were effective for the reset issue.
I did set the “save time” to 1s, the reset didn’t occurred.

There is another unexpected behavior as you can see in this video: https://youtu.be/UPKiAZg0bRw
In 2:30 it happens, the uC understands a lower input voltage and the temps (tip and room) became messed.

Note that I saw this happen when I tried the .bin you post in message #1066.
That time I did some troubleshooting. The power supply (24v and 3.3v) did not change.
The tip temperature are not real. The PWM signal is lowered really.
I can’t figure out a reason, it’s intermittent and random, apparently.
So I returned to the version on GitHub. I forgot to mention this experience in my first message.


« Last Edit: June 16, 2021, 02:53:15 pm by RobHon »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1110 on: June 16, 2021, 03:22:00 pm »
The only difference is the extra care resetting the watchdog while saving.
That's a really weird issue. All the values get shifted but remain stable. Never seen that before.
Keep using the test version,  set Save Delay to 0 to see if the problem disappears.
Otherwise the readings are really nice and clean, no noise whatsoever.

Testing the CH32F103. Programming using the stlink takes 20x longer than with a genuine one!
However with their usb bootloader and WCHISPTool it only takes 1 second!

After modifying any option, keep moving the encoder until the saving timeout expires and the new settings are stored.
The screen freeezes for ~2 seconds. That was definitely the reset issue. The watchdog is set for 1 second if I remember correctly.
I'm trying with 2.5 seconds. But I can't set it much higher, otherwise the tip might burn dowm in case of a software stall/bug

I edited my last post, check "Quicko_CH32F103_Increased_watchdog.zip". Increased to 2.5 seconds, the CH32 doesn't reboot here
« Last Edit: June 16, 2021, 04:27:17 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Online wickated

  • Regular Contributor
  • *
  • Posts: 122
  • Country: ru
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1111 on: June 16, 2021, 03:58:37 pm »
something really wrong with power. as is can see while temp is maintaned and digits remain stable, power line(at bottom) do waves.
can u plz make high res photos of board ?

p.s. some really quick thoughts - rotate psu power AC plug 180, detach ground wire from iron handpiece(in case u dont have real ground line in your AC socket at home)
« Last Edit: June 16, 2021, 04:05:34 pm by wickated »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1112 on: June 16, 2021, 04:28:48 pm »
something really wrong with power. as is can see while temp is maintaned and digits remain stable, power line(at bottom) do waves.
can u plz make high res photos of board ?

p.s. some really quick thoughts - rotate psu power AC plug 180, detach ground wire from iron handpiece(in case u dont have real ground line in your AC socket at home)

Those small spikes in the blue wave are caused by the ADC sampling circuit...
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Online StephenR0

  • Contributor
  • Posts: 32
  • Country: us
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1113 on: June 16, 2021, 04:34:10 pm »
One thing that I thought I'd mention.  I believe that I have a cks32f103c8t6 on my board.  It's really hard to make it out, but that seems consistent with what I can read.  Also, I had to account for the fact that it returns 0x2ba01477 instead of 0x1ba01477 in OpenOCD.  After that it worked just fine.  I've had no trouble programming it in the open source version of stlink, which has provisions for the CKS processor.
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1114 on: June 16, 2021, 05:13:25 pm »
I've tried CKS before, no issues else than STM32 IDE complaining about non original part.
However the CH32F are a little diffferent, requiring some adjustments.
And better to not talk about searching timing and AC characteristics in the chinese datasheet...
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Online wickated

  • Regular Contributor
  • *
  • Posts: 122
  • Country: ru
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1115 on: June 16, 2021, 10:16:34 pm »
Those small spikes in the blue wave are caused by the ADC sampling circuit...
and cooling speed slopes are also caused by this?
And better to not talk about searching timing and AC characteristics in the chinese datasheet...
only senior ksger designers can do this
 

Offline RobHon

  • Contributor
  • Posts: 13
  • Country: br
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1116 on: June 17, 2021, 03:26:28 am »
@DavidAlfa,

I flashed the new firmware (increased_watchdog).
Note that the “System” > “Save Time” cannot be 0. Only values between 1 and 60 seconds are allowed. I'm maintaining it as 1sec.

The behavior remains the same.

Additional Information: eventually, I left the station turned on, with the problem (display shows unrealistic input voltage and tip temperature).
After some minutes, the message "Error 82 NTC read high!" so I realized that the temperature room (display top right) is ramping up, that stop when 99.9C is achieved.

During this tests, no resets, no freezing.

David, If you want to continue to investigate this case, you can count on me, otherwise, I will try to get a CKS.

@wickated, thank you for your thoughts.
I changed the power supply a more reliable one (Agilent E3632A), the issue remains.
see attached some photos. 
« Last Edit: June 17, 2021, 03:44:07 am by RobHon »
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1117 on: June 17, 2021, 04:34:42 am »
I see, at some point I set the min value to 1. Easy fix.
Will make some test builds that show more data in the screen, hopefully we'll get the problem source.
Do you have scope to debug some signals?
If by some reason the ADC is slower than the real STM32, maybe after a while the timing shifts and the ADC reads when the PWM already went high.

I added Quicko detection fix to github:
« Last Edit: June 17, 2021, 08:24:00 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 

Offline Tugo

  • Regular Contributor
  • *
  • Posts: 68
  • Country: si
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1118 on: June 17, 2021, 08:10:25 am »
I removed C8 from S-D MOS and put it where it was.
I also removed diode from S to GND so all of the attached pictures are now from the board that is not modified. Well... if not described differently below ;)

Pictures explained:
1.) Default board: 3.3V (yellow) and op-amp output (blue).
2.) The same as on the picture 1, just a zoom to ADC (reading) part.
3., 4. and 5.) All pictures was shoot when 100 % power was used and I can see no clear difference if unmodified board was used (3) or with a 1000uF capacitor added at the input of regulator (4) or with 1000uF at the input of regulator and 470uF at the output of regulator (5). I didn't put 1000uF capacitor directly to the 24 V power supply, it is a diode between 3.3 V regulator and 24 V. I just thought of this now  :( Maybe I should put another (at least) 1000u straight to 24 V line...
6.) AC coupling with full power load: 24 V (yellow) and 3.3 V (blue).
7.) The same as picture 6 just with DC coupling.

I believe that it got a little better than before but not that much.
Again I must point that I have more problems on lower temperatures (270 C) then on higher (360 C).
Does that make any sense? Maybe because of higher voltage to noise ratio?! David?

Thing I should do and didn't have time:
- different power supply
- checking noise, op-amp output and other locations on my daily using Ksger soldering station (I bought just controller and case from Ksger and I used different PSU then what you normally get with Ksger) that is working as it should just to see if there is the same noise

David, thank you for your information, simulation and everything else!  :-+
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1119 on: June 17, 2021, 08:26:26 am »
About putting 1000uF everywhere, check this:




1000uF at the 24V input is ok, you have wires and nasty load spikes.
But 1000uF at the output of a small 3.3V regulator... no! :-DD

What would I do? Instead adding such crazy big caps, add a series diode with the LDO instead. So the "low" spikes from the 24V supply can't pull current back from the LDO regulator capacitor.
Am I explaining well? Since it's a switching regulator... The best would be to convert to a higher voltage and then clean the signal with a LDO, like Quicko does.
« Last Edit: June 17, 2021, 10:35:17 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 
The following users thanked this post: Tugo

Offline RobHon

  • Contributor
  • Posts: 13
  • Country: br
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1120 on: June 17, 2021, 10:33:17 am »
Yes, I have a scope. I will install R999 and wait the new build. Thank you
 

Offline Tugo

  • Regular Contributor
  • *
  • Posts: 68
  • Country: si
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1121 on: June 17, 2021, 01:01:19 pm »
I had 1000uF at the input of regulator and not at the output.

If you ment to add diode between 24V and input regulator it is already there.
Today I checked about schematic and it is thr same as here https://github.com/dreamcat4/t12-t245-controllers-docs/blob/master/controllers/stm32-t12-oled/v3.0-and-v3.1/r2/STM32_T12_oled_v2.0.pdf
Elements are diffrently tagged but are the same elements.
Check about D2. Did you mean like that?

Which switching regulator? 24 V or 3.3 V?
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1122 on: June 17, 2021, 02:01:42 pm »
Oh, nice. Didn't notice the diode . I don't spend my time at "KSGER engineering Inc". Throw it to the bin and get a Quicko! :-DD
The 24V supply is not so important. What you need is a really clean 3.3V signal. And it's very ugly!
Oh wait, your's doesn't have switching regulator, but the spx2954am3-3.3 LDO, and a 10uF tantalum cap.
Why so much noise then? Disconnect the heater and check the difference.

« Last Edit: June 17, 2021, 02:07:49 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 
The following users thanked this post: Tugo

Offline Tugo

  • Regular Contributor
  • *
  • Posts: 68
  • Country: si
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1123 on: June 17, 2021, 02:48:00 pm »
Dear Ksger designer,
You are not fooling me  :-DD

Regarding throwing and buying Quicko... that was one thing I also thoght of but then I remembered why I wanted to do this FW mod and modifications to this pcb in the first place and I will stick with this till the end  :scared:

I will have to be more like engineer and stop taking shortcuts. I am short in time but I will do more work and less asking here  ;)
I intend to eliminate things step by step... I will also tell you what 3.3 V looks like without a tip... maybe today if I will have time.
Thank you for now mr. Ksger senior engineer.  :box:
 

Online DavidAlfa

  • Super Contributor
  • ***
  • Posts: 1057
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #1124 on: June 17, 2021, 03:56:16 pm »
Hmmm.. I found something weird in the PWM. I hope it's not the shitty Hantek fooling me!
The pwm has some issues. From time to time, the PWM period changes.
But at 200mS time it's really hard to detect. Not to talk with the analog scope I had.
I started to rise the PWM frequency, at around 40mS I caught some pulses happening too close, between 20mS or a little less.
It's like if the whole PWM cycle is being resetted, starting again. The ADC and everything is triggered again too.
The real stm32 handles this like a champ. I can compute this, no problem sir!
But the CH32 got some serious fecal incontinence issues! Something gets delayed, and when the ADC starts, it takes the punch from the active PWM.
Shouldn't  be a big issue. Seems a little bug flags/timing-related, coming from the ADC changes I made some weeks ago.
But I like things working like swiss clocks, so I definitely look at this.

Next time I get called ksger-whatever, better to start seeking for some chinese programmers, I'll quit! :D
« Last Edit: June 17, 2021, 04:00:01 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ
Stm32 Soldering FW      Forum      Github      Donate      I need calibration reports!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf