Once again, I found an awesome project via twitter, this time from Johan Kanflo via this article from hackaday folks:
Or more directly, Johan's blog here:
After reading the details, I promptly ordered my own device, specifically this RD DPS5015 Buck Power Supply LCD color display step-down voltage converter on eBay. This DPS is similar, but different than the one Johan used, going on the assumption that it is similar: "Although this guide is written for the ‘5005 it should work for the entire DPS family but I only have 5005s to test with ."
Upon inspection, I found that the onboard processor is an 32F100C8T6B with the LQFP48 pinout using the same pin configuration as on the DPS5005 in Johan's project:
"Medium-density devices are STM32F100x8 and STM32F100xB microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes." [*1]
The [x] is a placeholder for only 1 character, not "all characters until the end, excluding the last B". The "B" in STM32F100CB means "128KB". This is not to be confused with STM32F100C8 or in the case of the DPS5015 - the STM32F100C8T6B - which are 64KB devices.
Don't confuse the 8 or B with the trailing "B" on the end, That last B is an "Internal Code" having nothing to do with flash size.
I had OpenOCD for Windows installed via the sysprog VisualGDB app, so I used that one:
openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg
Compiling on Windows turned out to be a real pain, giving lame errors like this:
make: No rule to make target desig.o', needed byC:/workspace/libopencm3/lib/libopencm3_stm32f0.a'. Stop.
make: [lib/stm32/f0] Error 2
@ChuckM over on the libopencm3 gitter:
...suggested that I install the WSL
and so ok, once I have Ubuntu on Windows (am I the only one to find that crazy?!?! *Ubuntu* on *Windows* - wow!)... all the toolchain items need to be installed fresh. None of the Windows binaries will run. So I installed the items listed here:
sudo apt-get update
sudo apt-get install binutils
sudo apt-get install gcc
sudo apt-get install gdb
sudo apt-get install make
sudo apt-get install build-essential
sudo apt-get install python
sudo apt-get install gawk
sudo apt-get install openocd
then download the GNU ARM Embedded Toolchain from:
sudo tar -xvjf gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2
(I put mine in c:\Downloads\arm\ aka /mnt/c/download/arm in Ubuntu window)
All this ended up needing a path like this:
I ended up hosting the OpenOCD from MINGW64 bash prompt, but programming via the Ubuntu bash prompt (this is NOT a good idea). The problem is with the apparent path. When doing a "make flash" - I kept getting a "couldn't open opendps.elf" error (yet the file was there).
Doing a "pwd" from the OpenOCD telnet session revealed all!
This is despite the fact that MINGW64 sees the path as:
and the Ubuntu Bash sees it as:
the libopencm3.rules.mk file had this simple command for "make flash":
program $(*).elf verify reset exit
so I used a manual command in the OpenOCD telnet session:
program c:/workspace/opendps/opendps/opendps.elf verify reset
I found a couple of nice cases on Aliexpress: this console-style and this this shelf unit style.
There's also this interesting hack that uses an Arduino to control the unit by emulating the button presses: http://www.instructables.com/id/Power-Supply-Automation-DPS5015-DP50V5A-Controlled/
The Hangzhou Ruideng Technologies Co., Ltd store can be found here:
There's also this video:
Next step: follow Johan's instructions for using ESP8266 for WiFicontrol....
*1 - page 6 of PM0063 Programming manual STM32F100xx value line Flash programming
Copyright (c) gojimmypi all rights reserved. Blogger Image Move Cleaned: 5/3/2021 1:35:51 PM