Author Topic: Korad KA3005P power supply faulty/repair  (Read 86683 times)

0 Members and 1 Guest are viewing this topic.

Offline moeyekung

  • Newbie
  • Posts: 2
  • Country: th
Re: Korad KA3005P power supply faulty/repair
« Reply #125 on: June 17, 2022, 02:39:33 am »
Hi everyone.Who do it success?.
I try with coocox+jlink but no luck.
Mr.Tony Mach Can you send me .bin or .hex
to flash mcu directly sir.My mcu dead
Now I bought new mcu already.
   Regard.


Well, I reached a crucial point with my firmware for my KA3005: The basic functionality (and everything needed for this) is working!!! I can adjust voltage and current, and the respective values are displayed!  :-DMM

It took a little longer than I thought to reach this point – but hey, I do this in my spare time, for free and for fun (at least my tortured sense of fun)…

There is a metric ton of caveats attached to this firmware:
  • This works on my KA3005 - other hardware revisions may have critical differences (There is much strangeness in the schematic…)
  • AFAIK one can not read out the original firmware - so once you overwrite the original firmware you can not go back
  • There is no calibration routine, the calibration values are hardcoded
  • CooCox and the debugger are strange… Relays sometimes switch when you load new firmware – this contributed to me having once shot the power transistors  :-BROKE The firmware was broken, so I wrote a new firmware, which broke the PSU - talk about irony… (But hey, I bought new transistors, fixed it  :-/O and learned an important lesson: Do not leave a load like a 12V 100W bulb attached when the debugger is attached - detach any bigger electrical load before you load a new firmware. A 230V 50W bulb on the other hand is fine.)
  • I make mistakes (I once reached a peak value late at night of 2 bugs per 1 line of code) – this also contributed to the aforementioned incident where I shot the power transistors  :palm: But now the switching of the relays should be solid.
  • Memory is not implemented (M1 to M5 not done)
  • The interface to USB/serial is not implemented (my PSU model is without the interface board, and one would need to reverse-engineer the protocol, so this maybe will never happen)
  • The keys are not debounced
  • No LOCK, no OVP, no OCP
  • The LEDs flicker under certain conditions (I know how to fix that, but haven't had the time to do it…)
  • Haven't fully figured out the temperature-ADC yet
  • Fan is switched on with the output, and runs aways with full speed while output is on
  • Other problems I forgot
  • Source code needs clean-up
  • No warranties whatsoever
  • No buzzer

But there are also good things:
  • No buzzer
  • IMHO the adjustment of voltage and of the current is nicer in my firmware (and I might improve it even further by a little bit)
  • Considering the power rating of the transformer, and of the transistors, I think it could be possible in future to "overdrive" the PSU and output more voltage, or possibly even more current, under certain circumstances (if one stays within the ratings of those components)
  • One could implement custom behaviour (e.g. "soft start", or specialized battery charger, or or or …)
  • One could add an output relay, or maybe even an MOSFET as an output switch


If you want to use this firmware, you need CooCox (I used 2.0.7, but other versions should do fine). I had to add cmsis_core, M051_BSP_CMSIS_V300_001 and C_library to my project (the C_library might not be necessary - the boilerplate I used needed it, but I haven't checked if I still need it).

Sorry, no pre-compiled binary from me, no turn-key project – if you want to use this experimental firmware, you need to know what you are doing. Have fun tinkering!  :-/O

I might continue working on some of the missing features, but I do not promise anything.  :P
« Last Edit: June 17, 2022, 02:45:01 am by moeyekung »
 

Offline VITHARANA AMILA ERANTHA

  • Newbie
  • Posts: 1
  • Country: kr
  • lapfix
Re: Korad KA3005P power supply faulty/repair
« Reply #126 on: July 09, 2023, 01:31:04 am »
i allso have same problam in my power supply ka3005d.
h
 

Offline nilsb

  • Newbie
  • Posts: 1
  • Country: de
Re: Korad KA3005P power supply faulty/repair
« Reply #127 on: December 05, 2023, 06:57:53 pm »
Although it's an old post - I want to thank Tony for this bold attempt to rewrite the firmware.

It was really exciting to read. Sources are uploaded maybe someone might be able to continue on this one day  :)

Nils
 

Offline dmulligan

  • Regular Contributor
  • *
  • Posts: 85
  • Country: ca
Re: Korad KA3005P power supply faulty/repair
« Reply #128 on: January 12, 2024, 07:32:52 pm »
I just came across this related blog post: https://m0wut.com/2019/08/25/power-supply-hacking-part-1/
 

Offline thphuong1978

  • Newbie
  • Posts: 1
  • Country: vn
Re: Korad KA3005P power supply faulty/repair
« Reply #129 on: May 02, 2024, 07:12:18 am »
Hi everyone.Who do it success?.
I try with coocox+jlink but no luck.
Mr.Tony Mach Can you send me .bin or .hex
to flash mcu directly sir.My mcu dead
Now I bought new mcu already.
   Regard.


Well, I reached a crucial point with my firmware for my KA3005: The basic functionality (and everything needed for this) is working!!! I can adjust voltage and current, and the respective values are displayed!  :-DMM

It took a little longer than I thought to reach this point – but hey, I do this in my spare time, for free and for fun (at least my tortured sense of fun)…

There is a metric ton of caveats attached to this firmware:
  • This works on my KA3005 - other hardware revisions may have critical differences (There is much strangeness in the schematic…)
  • AFAIK one can not read out the original firmware - so once you overwrite the original firmware you can not go back
  • There is no calibration routine, the calibration values are hardcoded
  • CooCox and the debugger are strange… Relays sometimes switch when you load new firmware – this contributed to me having once shot the power transistors  :-BROKE The firmware was broken, so I wrote a new firmware, which broke the PSU - talk about irony… (But hey, I bought new transistors, fixed it  :-/O and learned an important lesson: Do not leave a load like a 12V 100W bulb attached when the debugger is attached - detach any bigger electrical load before you load a new firmware. A 230V 50W bulb on the other hand is fine.)
  • I make mistakes (I once reached a peak value late at night of 2 bugs per 1 line of code) – this also contributed to the aforementioned incident where I shot the power transistors  :palm: But now the switching of the relays should be solid.
  • Memory is not implemented (M1 to M5 not done)
  • The interface to USB/serial is not implemented (my PSU model is without the interface board, and one would need to reverse-engineer the protocol, so this maybe will never happen)
  • The keys are not debounced
  • No LOCK, no OVP, no OCP
  • The LEDs flicker under certain conditions (I know how to fix that, but haven't had the time to do it…)
  • Haven't fully figured out the temperature-ADC yet
  • Fan is switched on with the output, and runs aways with full speed while output is on
  • Other problems I forgot
  • Source code needs clean-up
  • No warranties whatsoever
  • No buzzer

But there are also good things:
  • No buzzer
  • IMHO the adjustment of voltage and of the current is nicer in my firmware (and I might improve it even further by a little bit)
  • Considering the power rating of the transformer, and of the transistors, I think it could be possible in future to "overdrive" the PSU and output more voltage, or possibly even more current, under certain circumstances (if one stays within the ratings of those components)
  • One could implement custom behaviour (e.g. "soft start", or specialized battery charger, or or or …)
  • One could add an output relay, or maybe even an MOSFET as an output switch


If you want to use this firmware, you need CooCox (I used 2.0.7, but other versions should do fine). I had to add cmsis_core, M051_BSP_CMSIS_V300_001 and C_library to my project (the C_library might not be necessary - the boilerplate I used needed it, but I haven't checked if I still need it).

Sorry, no pre-compiled binary from me, no turn-key project – if you want to use this experimental firmware, you need to know what you are doing. Have fun tinkering!  :-/O

I might continue working on some of the missing features, but I do not promise anything.  :P



bạn đã làm thành công chưa ? có thể chia sẻ mình file hex được không ? xin cảm ơn !
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf