Author Topic: CFW for STM32 OLED Digital Soldering Station with T12 Handle  (Read 93320 times)

dmulligan and 4 Guests are viewing this topic.

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #625 on: January 13, 2021, 08:00:39 pm »

This only happens at boot, you'll notice taht if you go to advanced and change the pwm duty or delay, it works, because in that function it's ok.
Fixed and updated.

Edit: Didn't update, I noticed that disabling the Timer master output does nothing? The pwm stays on!
This is critical for safety control, so I won't update util fixed
Edit2: Ok, That only works in advanced PWM timers that have dead time generation. Not for normal ones.

yes when changing pwm solves it , when the update is avaible ill report back.
edit: i have seen the update, working perfect.when in debug menu " Error In: graphics/gui/widgets.c" line:274
« Last Edit: January 14, 2021, 05:50:44 pm by jesusvallejo »
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #626 on: January 15, 2021, 05:54:08 am »
I know, that's why I didn't update here. Shortly after the update I noticed that, but it was late and I was tired, so I left it for other day.
I had done few widgets modification, added more data fields, (all signed/unsigned int 8/16/32) and put a check to ensure the last char is always 0 (string null termination), as otherwise it could get out of control.
This check wasn't done before, so you'd never know if a widget was incorrectly configured.
So after the update, one widget had an incorrect reserved char size, and the check detected it.
It didn't cause problems either because the assigned array was bigger, but it could crash the system in other conditions, so I decided to generate and error there.

The  issue now happens with the calibration. I'm faking it as I don't have tips, and it reboots at the end.
In any case it should take care of the correct conditions, and reject data if not correct.
There might be something not being checking causing an undefined behavior, or other problem that I haven't identified yet.

Edit: I had a last try. I think the issue was the calibration process. It always returned 1 (correct).
There was no implementation for returning 0 anywhere. So it worked if the conditions where correct, but if they was not the case, again undefined behavior.
I added a check at the end of the calibration that ensures that the adc and temp values are 200<300<400 and return error if not. Hopefully should fix it.
At least, now the calibration shows failed for me, what it should have done before because the ADC only collects garbage when the iron is not present.

Code updated but builds removed for now. It should be pretty safe anyway, the pwm stops, the watchdog triggers...

I don't have iron tips and I've spent too much timer lately into this... I left the testing to you, try the calibration, and see if it fails anytime.
The only way the stm32 hard reets without warning is if the watchdog triggers. And this only happens when the ADC/PWM stalls.

I was busy with some test at the hospital, I'm a bit saturated and will take a small break.

Yesterday I added another option for setting the steps in the setpoint adjustment.
Also redesigned the PWM updating method, as changing it directly would cause some issues with the iron process being updated within the ADC interrupt.
Now it's the iron process who updates the pwm if it was changed. Also few other modifications in the pwm period/pwm delay widgets to ensure they never overlap.


BTW, you had asked me how to connect the JBC handle...nothing special needed.
In the C245 you have 2 options: Wire it exactly as the T12, with the sensor in series with the heater (no modifications needed), or independently (Then you will need to modify the board).
The C210 connection uses series conenction internally so it's the only way.
Check the Dreamcat4 documentation repo, has a lot of info.


« Last Edit: January 15, 2021, 10:32:27 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 
The following users thanked this post: totalnoob, cosmin1, jesusvallejo

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #627 on: January 15, 2021, 11:56:09 am »
thanks a lot, ill do some testing and report back as usual, i hope your test was ok. :-+
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #628 on: January 15, 2021, 12:19:05 pm »
Fixed few widgets. More than fixed, reverted some test changes I inadvertendly commited...
And I think it's done.


The tests, well, that's just their routine before the next surgery, it should be ok.The surgery worries me more...
Before the first surgery, I was very active, doing a lot of trips, training... they advised to do the surgery because it the could become cancer in my 40's, so better to to it now I was in good shape.
It was a hard recovery, as the surgery was extensive, but after 15 days I was already walking and went to home.
Only 10 days after, all got so wrong that had another 3 surgeries, each screwed me up worse, and the last one was done to half-revert what they had done, had to stay 2 months in the UCI(ICU in english), new problems were appearing every day, and after that and one additional month to hardly be capable of standing up by myself for brief moments, and another month to be able to walk without fainting after 1 or 2 minutes...
And this surgery is to repeat that again, so I think I'm not being over dramatic?. But I'm optimistic anyways, as always. Maybe too much, close to idiotness maybe? :-DD.
« Last Edit: January 15, 2021, 12:42:52 pm by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 
The following users thanked this post: totalnoob

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #629 on: January 15, 2021, 01:41:17 pm »
keep it up  :bullshit: , youll beat it soon :box:, and be back to your normal life. with covid everyone has lost the last year so youll catch your normal life right where you left it  :phew:
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #630 on: January 15, 2021, 06:46:46 pm »
Yeah, I hope so. Enough off topic  haha.
Try the damn thing :-DD
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #631 on: January 15, 2021, 09:17:11 pm »
ok i have tryed everything i could think of and seems to be working spot on  :-+
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #632 on: January 16, 2021, 02:06:07 pm »
Great! Any new options you might consider adding?
I feel the menu is a bit randomly organized, but there are lots of options and it's no so easy.
I might do a separate "Profile options". Anyway, now it's a breeze to rearrange the menu, as the widgets aren't attached to the screen itself but to the combo widget.

Updated builds. Any ksger user wants to try? I think now it's easier than ever to adapt.
The 3.1s 64-pin is known to work. I don't have extensive test report yet, but the PWM, display, buzzer and encoder is working.
Yet I have to know if the 2.1s 64-pin version with i2c works.
Dreamcat4, wasn't your blue board that version?

Now the main task would be to collect calibration results from different boards and set them as base into the firmware.
So anyone could use the firmware without huge temperature differences if not calibrated.

And to start adding the rest of KSGER boards, 48-pin versions.
« Last Edit: January 16, 2021, 09:07:19 pm by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #633 on: January 16, 2021, 08:25:26 pm »
maybe an option to have stand detection , that lets you select off,slp or stb. Also i know is more aesthetic to have te menu in current order but pid for example seems pretty advanced in compare to system settings, calibration  or iron, so mb changing the order or not idk  :-DD . also whats the real use for the edit tip menu, because if im correct the tip profile follows an algorithm based on the calibration c200 c300 and c400 and its different between tips, so i dont know why it lets you add new tips or else.
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #634 on: January 16, 2021, 09:05:57 pm »
The edit tips menu is not only the name... each tip have its own pid data, max power... ;)
The specific tip pid settings are loaded when you change it, and pid control uses that data.
Then each specific profile (T12, C245, C210), has its own pwm settings, adc delay and few others.

Yes, I think the PID can be now moved elsewhere, as by long-pressing over the tip selection widget, it enters the PID menu.
Before, you would go to it very often to adjust the settings.
« Last Edit: January 16, 2021, 09:44:42 pm by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #635 on: January 19, 2021, 09:16:20 am »
Added 2 new options:
- Encoder rotation inversion
- Wake input mode (Shake, Stand)
    - Shake mode: Any change triggers wake up
    - Stand mode: Input=0: Set Standby mode, Input=1: Set normal mode.
Stand mode enabled will disable "wake on button activity" mode.
« Last Edit: January 19, 2021, 09:35:50 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #636 on: January 19, 2021, 08:44:11 pm »
Added 2 new options:
- Encoder rotation inversion
- Wake input mode (Shake, Stand)
    - Shake mode: Any change triggers wake up
    - Stand mode: Input=0: Set Standby mode, Input=1: Set normal mode.
Stand mode enabled will disable "wake on button activity" mode.
cant build it
Description                                                 Resource   Path                                                 Location    Type
'hiwdg' undeclared (first use in this function)   board.h   /STM32SolderingStation/Core/Inc   line 74   C/C++ Problem
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #637 on: January 20, 2021, 06:47:34 am »
Added 2 new options:
- Encoder rotation inversion
- Wake input mode (Shake, Stand)
    - Shake mode: Any change triggers wake up
    - Stand mode: Input=0: Set Standby mode, Input=1: Set normal mode.
Stand mode enabled will disable "wake on button activity" mode.
cant build it
Description                                                 Resource   Path                                                 Location    Type
'hiwdg' undeclared (first use in this function)   board.h   /STM32SolderingStation/Core/Inc   line 74   C/C++ Problem

I see. Accidentally deleted lines 47 and 48 from main.h when cleaning it:

https://github.com/deividAlfa/stm32_soldering_iron_controller/commit/4cf254cf907bdde44662d51738522e1ff0ab7bb8#diff-4b24e111cbd493caaec9ed931db8ef718fe3ad9ffd30e549011705431eccf5fbR45

Restoring those should make it  work again. Will fix that later in the day. Sorry!  :palm:
« Last Edit: January 20, 2021, 06:51:14 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #638 on: January 20, 2021, 12:34:18 pm »
Added 2 new options:
- Encoder rotation inversion
- Wake input mode (Shake, Stand)
    - Shake mode: Any change triggers wake up
    - Stand mode: Input=0: Set Standby mode, Input=1: Set normal mode.
Stand mode enabled will disable "wake on button activity" mode.
cant build it
Description                                                 Resource   Path                                                 Location    Type
'hiwdg' undeclared (first use in this function)   board.h   /STM32SolderingStation/Core/Inc   line 74   C/C++ Problem

I see. Accidentally deleted lines 47 and 48 from main.h when cleaning it:

https://github.com/deividAlfa/stm32_soldering_iron_controller/commit/4cf254cf907bdde44662d51738522e1ff0ab7bb8#diff-4b24e111cbd493caaec9ed931db8ef718fe3ad9ffd30e549011705431eccf5fbR45

Restoring those should make it  work again. Will fix that later in the day. Sorry!  :palm:

correct, flashed already will test later. ok how does the stand detection mode works? i cant see pa15 mapped to detect the tip touching the stand.
« Last Edit: January 20, 2021, 04:16:35 pm by jesusvallejo »
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #639 on: January 20, 2021, 08:56:20 pm »
No, you use the existing pin that would go to the handle sensor.
It works exactly as I already wrote in the previous post.
Connect the tip to the ground and the stand to the pin.
Or whatever that makes the signal go to ground when the handle is in the stand.
« Last Edit: January 20, 2021, 09:01:35 pm by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #640 on: January 20, 2021, 09:00:24 pm »
im plain dumb  :scared: , i cant see how that works , the stand is connected to nothing so how do you know is touching it  :=\
edit: a ok so you are using the remaining pin in the connector for that instead of pin pa15 right?

ok so handle switch changed by cable to the stand but eventhough connection is good , the detection gets crazy when its on the stand.
« Last Edit: January 20, 2021, 09:52:25 pm by jesusvallejo »
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #641 on: January 20, 2021, 11:13:06 pm »
I'm not using any remaining pin.
The pin that normally goes to the handle "wake" switch is disconnected and then wired to the stand.
And the part of the handle that touches the stand is connected to ground.

Is the handle connected to solid ground?
By default it isn't, there's only a 100K resistor to gnd for esd protection.
Otherwise it will pick noise and go crazy...
« Last Edit: January 21, 2021, 12:54:43 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #642 on: January 20, 2021, 11:50:26 pm »
Is the handle connected to solid ground?
By default it isn't, there's only a 100K resistor to gnd for esd protection.
Otherwise it will pick noise and go crazy...
3 ohm from tip to chassis so dont know why it happens it should work.
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #643 on: January 21, 2021, 12:56:27 am »
I repeat that the Quicko gnd is not chassis.
The chassis goes to main's earth.
And it's connected to the internal gnd through a 100K resistor you will find next to the soldered connector in 45° angle, next to the mosfet.
You can put a solder bridge over that resistor


« Last Edit: January 21, 2021, 01:01:21 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 
The following users thanked this post: jesusvallejo

Offline jesusvallejo

  • Regular Contributor
  • *
  • Posts: 66
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #644 on: January 21, 2021, 01:01:49 am »
I repeat that the Quicko gnd is not chassis.
The chassis goes to main's earth.
And it's connected to the internal gnd through a 100K resistor you will find next to the soldered connector in 45° angle.
so i replace it with a 0 ohm and good to go right?
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #645 on: January 21, 2021, 01:07:03 am »
Correct! :-+
New update in the graphics drawing system, it's been in my head for a while now.
The original firmware redraws the whole screen everytime, no matter if there are changes or not. That causes the oled drawing process to consume almost all the cpu power.
I modified the code to add content checking, also in strings widgets (doing a quick checksum from the string data and comparing values), so unless force_refresh variable is set, the widgets won't be drawed if there are no changes.
This checking is done for each widget, and updated independently from the others.

Initial tests show almost 20x less cpu usage (the main loop went from 108Hz to 1800-2000Hz in the heaviest screen, STM32@48MHz, SPI DMA).
So there's a lot of power left for other applications that could be embedded in the fw.
Software-updated displays will benefit a lot from this with increased refresh rate.

I think it's time to announce the end of the project.
The main target was for myself, to replace the terrible Quicko firmware and to learn about stm32 hardware and programming.
Because I'm not egocentric, since the beggining I decided to develop it to be multi-target friendly.
But there's almost zero  interest, so I will not bother further. Once finished for the 64 pin KSGER 3.1 and 2.1s, that will the end.
I might still do small updates from time to time correcting small bugs or adding new features I might need, but I won't be working actively on it anymore!
« Last Edit: January 21, 2021, 08:50:11 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 
The following users thanked this post: dreamcat4

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #646 on: January 21, 2021, 10:42:53 am »
the detection gets crazy when its on the stand.

Regardless of your wrong gnd connection, I added a 500mS debouncing time for changing the mode.
So as long as the mode isn't stable for more than 500mS, it won't be applied.  This will ensure stand clean and stable operation.
« Last Edit: January 21, 2021, 10:45:04 am by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline Duffy82

  • Newbie
  • Posts: 2
  • Country: de
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #647 on: January 21, 2021, 11:07:42 am »
Hi,
how can I connect a 245 Tip to Quicko?
There is no jumper, so have I to cut traces?
 

Offline DavidAlfa

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: es
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #648 on: January 21, 2021, 12:38:49 pm »
Beware that the stock fw can't handle C245 cartridges.
You will probably burn the cartridge as it's set for T12 only and doesn't allow calibration.

A big problem with the Quicko is that the connector is soldered and to have access to the back of the pcb you must unsolder it.
That is calling for trouble, the board will get damaged for sure.

I found a simple way to connect the C245 without much hassle. This is how I did and it worked very well.
Only a trace must be cutted and a wire soldered.
It uses the pin normally used for the handle NTC, not used with JBC, neither in this firmware.
The existing circuitry shouldn't be a problem.
I found best performance PWM settings with 50mS Period and 5mS Delay. Less delay will catch random noise from conmutation and affect the temperature reading.
Keep in mind that calibration is a must! Select the C245 profile, and use a temperature sensor for calibration, be careful to not do anything wrong that could end burning the tip!

« Last Edit: January 21, 2021, 12:55:29 pm by DavidAlfa »
Stm32 soldering station firmware: https://github.com/deividAlfa/stm32_soldering_iron_controller
Want support for your board? Put detailed info in the forum and get ready for testing. Issues? Before reporting, always flash the latest github FW and make a full reset.
Please use the forum, don't PM me!
 

Offline Duffy82

  • Newbie
  • Posts: 2
  • Country: de
Re: CFW for STM32 OLED Digital Soldering Station with T12 Handle
« Reply #649 on: January 22, 2021, 07:12:36 am »
Is it possible to use the handle sensor amp instead of the tip sensor amp for 245?
The schematic seems the same.
So we dont have to cut anything.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf