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!
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 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 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 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!
I might continue working on some of the missing features, but I do not promise anything.