Upgrading your DPS5005

This is the third article about hacking the DPS5005. Part one covers the reverse engineering of the DPS5005 and part two covers the design of OpenDPS.

 

April 14th 2017 update: is has been verified that OpenDPS can push 5A. Thanks @johannes!

June 9th 2017 update: added a note on saving the STM32 peripheral settings before wiping the internal flash.

August 31st 2017 update: updated article with the new boot loader and a note to test your device prior to unlocking.

 

Although this guide is written for the ‘5005 it should work for the entire DPS family but I only have 5005s to test with. Before we begin I should mention that the stock firmware will be gone permanently. As readout protection is enabled on the STM32, the FW cannot be extracted and I have no source for it. Additionally, I take no responsibility if you destroy your DPS. That said, let the fun begin. You will need a DPS5005 (or similar), an STLink clone and some wire. Either you solder the wire onto the DPS or you can use female-male dupont wires for flashing.

Teardown

First you need to remove the PCB from the (semi) housing. Use a small flat screwdriver to prey the PCB loose from the retaining flaps.

Teardown
Teardown

Be careful not to break the retaining flaps (not that they’re fragile, but still). They are very much needed for holding the front panel in place when you press the buttons.

If you have an older version (below left) you can solder some AWG26 wire onto the SWO and UART ports. It is advisable not to solder pin headers as there is limited room inside the housing. I added dupont jumper housings at the end of the cables to aid in connecting them to the STLink clone and FTDI ditto. Hint: make the cables “stretch” backwards, from the display. For newer versions (below right) the 1.25mm JST-GH there is little room for the SWD wires. As a bonus, you need not solder the UART cables in case you bought one of the “communications versions”.

If you do not want to solder (and do not want any remote control) (and have steady hands) you could connect three female-male dupont cables to the STLink clone and hold them pressed against the DPS while flashing.

Debugger connected, UART cable at the top
Debugger connected, UART cable at the top

Building OpenDPS

With that in place you should install OpenOCD and an ARM GCC toolchain. For GCC, Launchpad is a good place to start. For OpenOCD, YMMW. If you are on macOS you can find OpenOCD here (it installs as /Applications/GNU ARM Eclipse/OpenOCD/0.10.0-201610281609-dev/bin/openocd). With the tools in place you’re ready for the next step.

Flashing

Next you need to unlock the internal flash of the STM32 before flashing (which causes a complete erase). Start OpenOCD:

You will receive a few lines of output ending with “Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints” if the connection was successful.

Please note! Before you unlock and erase the STM32 flash, you should make a dump of the STM32 peripheral settings of your stock DPS firmware. The DPS hardware might change at any time and if you flash OpenDPS and it does not work because eg. the GPIO pin enabling output power was changed, things get difficult. The ocd-client.py script will assist you now that OpenOCD is running. Please note that OpenOCD might interfere with the stock firmware. When you connect, the stock FW might lock up. First, power on the DPS and make sure the power output is disabled but set to e.g. 5V, start OpenOCD and type:

If needed, restart the unit (and OpenOCD), enable power output @ 5V and type:

Rinse and repeat for one or two more voltage levels. Check the log files, there should be no lines saying “Parsing error”. If your OpenDPS does not work, these files will enable me (or someone else, remember this is open source you 😀 ) to pinpoint the problem. Additionally, you should test the device before unlocking it. Enable power, connect something and verify that your unit actually works.

Now let’s wipe that flash. In another terminal:

and type:

You will probably get the following, ending with an error:

Keep calm. Restart OpenOCD, toggle power on the DPS and try again. This time you should see:

Time to flash (flash the app first, then the boot loader):

The last two lines should read:

and your DPS5005 is now an OpenDPS 5005.

OpenDPS
OpenDPS, now with wifi

Congratulations! If things went south somwhere, feel free to ask for help in the comments below.

From here you can use the OpenDPS as a stand alone device, control it via a serial port or control it via wifi by connecting an ESP8266.

Short User Manual

When you power on your OpenDPS, the current voltage and current limit settings are displayed and the power output is always disabled. Pressing ON/OFF will enable power output and the display will now show the measured output voltage and the measured current draw. If the screen flashes once and goes back to displaying the voltage/current settings, the over current protection kicked in. Press ON/OFF again to disable the power output.

Press the SET button to go into editing mode. Press the V and A buttons to move between the voltage and current settings. Press the rotary knob to step sideways and turn the knob to change the values. Press SET again to exit editing mode.

Press and hold the knob for two seconds to lock the keys, long press again to unlock. A long press of the SET key will invert the display.

When your OpenDPS starts it will wait for a wifi connection from a connected ESP8266 and the wifi icon will flash at 1Hz. If it does not get a wifi connection, the wifi icon will be turned off after 10 seconds. If there was an error connecting to your wifi network, the wifi icon will flash at 4Hz.

Remote Serial Control

If you soldered wires to the UART port, connect an FTDI adapter and try the dpsctl.py tool:

The TFT should flash once as a visual indication. If you get ‘Error: timeout talking to device’, check if you swapped RX and TX and/or forgot to connect GND.

The port setting can be set in an environment variable

After setting the DPSIF variable, you can try setting the output voltage to 3.3V:

enable the output:

check the measurements:

Run a firmware upgrade over the serial port (extra usable for newer versions where adding SWD is a hassle):

 If serial control is what you aimed for, you can get rid of the annoying flashing wifi icon by adding WIFI=0 when building OpenDPS

Remote Wifi Control

For wifi control, any good old ESP8266 board with the UART exposed will work. Connect GND, RX and TX, build and flash esp8266-proxy (don’t forget to set your wifi credentials) and you should be good to go.

Note that you currently cannot use the master branch on the main ESP Open RTOS repository as my PR for a function needed for multicast has not been merged yet.

When your OpenDPS has connected to your wifi network, try the ‘scan’ command to find out its IP number:

Next try pinging it:

The TFT should flash once as a visual indication. If you get ‘Error: timeout talking to device 172.16.3.203’, check if you swapped RX and TX. The dpsctl.py tool has the same functionality over wifi as well as the serial port.

Sadly, you cannot power your ESP8266 from your OpenDPS. The VDD pin next to the SWO port is connected to U4 (under the TFT), an MD7133H 3.3V regulator which only provides a measly 30mA (yes, thirty). Additionally, this regulator is powered by U3 (on the backside, next to the screw terminal) which is an XL7005A supplying 400mA @ 5V which could be a bit over the edge for a power hungry, cold booting ESP8266.

 

Todos

There are a few todos in the code but overall OpenDPS should be stable for everyday use.


That’s it, have fun hacking your DPS5005!

 

108 thoughts on “Upgrading your DPS5005

  1. Jon Raymond

    This has truly been an interesting series of articles to read. As I come from the hardware design side I often find what you software guys do seems like magic. Thanks for laying out clearly. I really enjoy reading your blog. Thanks for sharing it.

          1. Jack Lanangan

            Awesome job, please provide precompiled elf & bin without wifi as well. thanks before

          2. Johan

            Thanks. Time does not permit compiling and releasing the STM32 binaries, especially since building these are very easy given the ARM support of gcc.

          3. Mai Mariarti

            Hi Johan.
            Excellent hack. You link to the compiled code goes 404.
            I don’t have the tool-chain or the knowledge to do any of these. Could you update the link?
            Thanks again.

      1. diego

        I did find a very interesting item but I wanted to ask if it was possible via software to vary the reference current from 5A to a higher amperage by changing some power parts. Could you help me with this mission?

  2. Allen Derusha

    Fantastic effort! If I might make a suggestion – this would be even better if it could tie into sigrock: https://sigrok.org/wiki/Supported_hardware#Power_supplies

    Being able to remotely control and read values from a DC power supply is crazy handy when testing devices to optimize for power utilization. I have this very supply sitting on my desk, so I guess it’s time to crack it open and get to hacking! Thanks for sharing this work.

    1. Johan

      Thanks! I guess the PUSs all talk SCPI which would not be that difficult to get into OpenDPS. Besides the wifi/serial control there is a build option for command line support (make COMMANDLINE=1) which could serve as a starter for SCPI support.

  3. Aaron Dayton

    I am looking on ebay to buy one of these things now 🙂
    Can programming be done via the Bus Pirate? or Bus Blaster?

    Thanks!
    –Aaron

    I like the detailed write up.

  4. Leonard Pitzu

    do you still have the original firmware? i upgraded to your’s but forgot (got carried away) to back the original one up. I plan on extending your firmware to support most things the original FW had but in the mean time i need the thing to test my gadget 🙂
    Anyways great work!!!

    1. Jon Raymond

      Sadly the original firmware can’t currently backed up because the chip has the read out protection set. Johan mentioned this in his blog post

    1. SkinnyV

      One of the most obvious change is that the display is much cleaner with the custom firmware. Beside that, it appear that it will allow you to control it from serial and wifi (if you connect an esp8266). Most of the change can be found in part two of the article.

  5. Rainer

    Is it possible to add a compiled Hex file of the ESP8266-Proxy, in my case for a ESP8266-01, to your Github for those of us with limited software skills?

  6. Johannes

    Thank your for the excellent work 🙂

    I’ve just flashed my DPS5005 with OpenDPS. Testing with a 12 ohm power resistor, I can’t get it to output anything more than ~0.32A. If I set voltage to 6V and current limit to 0.7A, the output drops down to ~3.95V/0.32A once I turn it on. Is this expected?

    1. Johan

      Thanks! That seems like an unwanted feature. Could you try two things? First, check the voltage reading with open terminals? Second, verify the readings with a multimeter? I am thinking it could be an issue with the ADC readings.

      1. Johannes

        Hi, with open terminals the voltage reads 6V. The current reading looks correct when measured with a multimeter. Will check voltage reading later today with the resistor connected.

          1. Johan

            That is very strange indeed. The only time I have seen voltage drop is when shorting the terminals. You didn’t happen to test before reflashing your ‘5005? Oh, and what is the input voltage and what is the rating of your power supply?

          2. Johannes

            Unfortunately I never tried the thing before reflashing, so no idea if it’s caused by OpenDPS.
            Power supply is 12.4V (old PSU) rated at 18A/432W.
            Any debugging tips for troubleshooting further?

          3. Johan

            Wow, that ought to provide enough juice. Could you try with something drawing less current? An LED or an Arduino? Do any components on the ‘5005 feel warm when the resistor is connected?

          4. Johannes

            An LED seems to work fine – ‘5005 is stable at 6V with 0.013A current draw. Nothing seems to be running hot with the resistor connected.

          5. Johan

            Could you try with the resistor and vary the voltage from 1V to 6V? As you get 6V with the LED (and open terminals) the DAC conversion is working but somehow the ‘5005 is unable to provide enough juice when 500mA is drawn and chokes.

          6. Johannes

            1-4V seems to work:
            1V: 1V 0.08A
            2V: 2V 0.16A
            3V: 3V 0.24A
            4V: 4V 0.32A

            5-6V does not:
            5V: 4V 0.32A
            6V: 4V 0.32A

          7. Johan

            That is odd, it seems the output gets capped at 4V. What is the reported input voltage?

          8. Johannes

            Input voltage reported is still 12.4V. I guess the next step would be to probe around the circuit and try to find where the voltage is dropping… Did you produce any schematics when reverse engineering?

          9. Johannes

            So I did some more investigation with the scope. I had a look at the input pin of the LM5106 gate driver. I see a PWM waveform on this pin. Without the load connected, the duty cycle changes when I adjust the desired output voltage. However, with the load connected, the duty cycle remains constant. The PWM signal appears to originate from the controller board, which isn’t accessible without desoldering. I’m not too familiar with buck DC-DC converters, so can’t say for sure if this is expected.

            Out of curiosity, what kind of loads have you tested on your device? Are you able to drive several amps?

          10. Johan

            I got a 4.7ohm 10W resistor and I can reproduce your findings, voltage drops to 1.4V @ 256mA. So far I have been running a power hungry ESP8266 design at 5V/180mA. I did not produce any schematics per se, byt identified which pins of the STM32 was routed to which component. It’s all in ocdclient.py. I will update the docs with proper component identifiers. The LM5106 PWM is controlled by the STM32 DAC in pwrctl.c. I will do some measurements as I have a board with the STM32 exposed.

          11. Johan

            There is a fix on master that I will push 2A. The PSU I have does not deliver any more juice but I will scavenge the office lab for something more powerful.

  7. Olof Tångrot

    Hej Johan.
    It works (not tested with ESP8266 or any heavy load) for me. It looks like a suitable platform for a maximum power point tracker. May by someone has tried that all already?

    Anyway, nice of you to make the effort of writing up the instruction and sharing the source code. Kind of miss the indication of the computed output power though.

      1. 小杜

        I think doable, as you can attach an external antenna wire to the esp8266 and put outside the case without too much extra effort.

        Taobao actually has a whole bunch of options for casing for DPS5005 and other similar models, eg DPS3005. There appears to be a mini industry around it actually!

        eg
        https://item.taobao.com/item.htm?id=539017902870
        (they’re doing some interesting things with UImeter too – https://github.com/xjtuecho/uimeter )

        More cases from the 100mhz store – https://100mhz.taobao.com/category-1289129232.htm?search=y&catName=DPS%CF%B5%C1%D0%CA%FD%BF%D8%B5%E7%D4%B4

        Some interesting stuff coming out of China!

  8. gojimmypi

    This is an awesome project! I was able to get your instructions to work with the DPS5015! Things were a little bumpy trying to compile on Windows though.

    http://gojimmypi.blogspot.com/2017/04/opendps-with-dps5015.html

    The only thing a little annoying, is that the FAN is on all the time now. It was never on before, so I suspect there’s a temperature sensor. Is this a feature on the 5005? I suppose I will need to order another to try your register-debugging to see how that works, eh? That’s ok, I wanted a pair for positive and negative voltages anyhow 🙂

    1. Johan

      Aha, the ‘5005 does not have a fan. Using OpenOCD, see if you can find out how the fan is controlled (e.g. GPIO PWM, …). I’d be happy to add support for the ‘5015. Nice writeup btw!

      1. gojimmypi

        I’ve ordered another 5015… as there’s no way to tell if they did PWM to control speed since I reflashed. The good thing is that I determined the fan is on GPIO B-11

        on: ./ocd-client.py w 0x40010c0c 0x00005b30
        off: ./ocd-client.py w 0x40010c0c 0x00005330

        .. the bad thing is that somehow during this process, I toasted my 5015, as there’s no voltage on the output anymore. 🙁 even upon reflashing once again; no luck. Everything else is working – just no output voltage. I saved the port operations if you’d like to inspect to see what might have caused the problem.

        1. Johan

          Ouch, sorry to hear you toasted your ‘5015 although I cannot see how that could have happened. PB11 is PWM capable but it would be good to learn how the stock FW takes temperature measurements.

          1. gojimmypi

            actually – I’m not so sure my ‘5015 is toasted after all! 🙂 In anticipation of my new one arriving in a few weeks – I was browsing your source code recently – in particular I noticed the port used in pwrctl_enable_vout (in pwrctl.c) – it’s using GPIOB-11 !! (the same port I determined was used to control my fan on the ‘5015). So apparently the software is not directly compatible between different models. That seems really odd to use different software for hardware that is so similar… but if I can determine the port needed to turn the voltage on – we could add a simple conditional compile. I jumped in so quickly to investigate the fan issue – I’m not sure if I ever actually measured voltage on the output after the modification.

            oh – and I believe I recall reading somewhere that the fan on the stock 5015 is not controlled by temperature – rather current: it turns on at a specific level.

            In any case – warning to other readers that the 5015 may not actually work as-is. Stay tuned…

        2. tman

          @gojimmypi

          The DPS5015 page mentions “When the current is more than 10A or the temperature is more than 45 °c , the fan will begin to work. when the temperature is more than 65°c, the module will stop working” so there must be a temperature sensor in there.

          1. gojimmypi

            @tman ah yes, I thought I read something like that. Thanks for the reminder on the specifics. I found that on one of the aliexpress pages, but is there more complete documentation somewhere? That info is not in the little pamphlet that ships with the unit

  9. tman

    There appears to be a newer/different DPS5005 design. I ordered one DPS5005 from Banggood and one direct from RD on Aliexpress and they’re slightly different. The Banggood one is exactly the same as Johan’s one. The RD one however has a much smaller UART and SWIM header and there appears to be a few extra components on the board. I’m wondering if this is a new revision of the DPS5005.

    See http://i.imgur.com/P2CgTjW.jpg for the connections on the new module. The UART header is on the top and the connections are VDD, RX, TX and GND. The SWIM header is on the bottom and has the same connection arrangement as the other DPS5005 with VDD, nRST, GND, SWDCLK and SWDIO.

    I uhh… had an accident with the RD module however and it doesn’t work now. I hadn’t gotten around to installing the OpenDPS firmware on it so I can’t confirm it is compatible but the boards look similar enough that I expect it is. The onboard 3.3V regulator has died and is a dead short now >< Splitting the two boards so I can get at the regulator is too much hassle at the moment so I've thrown it into my junk box for now.

  10. Leonard Pitzu

    do you still have a precompiled version released? i’m asking because my supply + programmer are in my office where i can’t really install all tools needed to compile the firmware.

    1. StefanB

      Any chance you can convert the schematic to something more widespread, e.g. KiCad, Eagle, …? Or provide a PDF?

      And can you make it downloadable – currently you have to:
      1. Sign up for CircuitMaker
      2. Install CircuitMaker (Windows only)
      3. Download the schematic from inside CircuitMaker

  11. nico

    Mine does not really switch off the voltage.
    The screen shows the max values and the on/off icon disappers, yes, but the output is still active.

    Second problem, but this is not really bad… in windows, I dont get your python script running. I think, there is a module missing or something. I am not really fit in python and used a stock installation.

    1. Johan

      That’s odd. I know there are newer hardware revisions so pins could have changed. Does your DPS look like mine if you look at the SWD and UART pins on the back side?

          1. nico

            I think, the other things work so far besides the “current capping”. On overcurrent, the display toggles, but there is no voltage regulation. But I think, you have written somewhere, that you did not implement this so far. Also the color toggling can be confused when playing around a bit, eg setting a new value while on overcurrent.

  12. Vahe Ganapetyan

    Hi Johan!
    I am trying to install your OpenDPS following your instructions in this article. I am new to STM32, so please forgive if I am asking stupid questions.

    I have DPS5015 (BTW, in my version the microcontroller and external connection pins are situated on the same board with power elements and not on the board with LCD and encoder/buttons). I am using ST-LINK V2, and I installed OpenOCD on a Mac computer. I connect the pins marked G, C, and D on the DPS board to GND, SWCLK, SWIO on the programmer, but do not connect the power pin (it doesn’t work when I connect the power pin) – instead, I apply external power to the DPS board.

    When I execute the script “openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg” on Launchpad, I get several lines starting with “Info :”, and the last line is “Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints”, as you suggested in the article, so I assume that the connection was successful.

    However I get an empty line after this, with block cursor at the beginning, and cannot go any further. I tried to leave it on for a couple of hours with no changes at all. The LED on the ST LINK keeps flashing all the time – about 4 times red and once green, and I do not get the command line prompt to execute the ocd-client.py script. When I break by Ctrl+C, I get back to the command line but when I execute the script, when I open the file 5V-off.txt, I get an error message in it: “Failed connect to Open OCD”.

    I am a bit confused. What am I doing wrong?

    1. Vahe Ganapetyan

      Oh, I didn’t realize I must run the python script from another console while OpenOCD was running in the terminal. It now worked and I obtained the 5V-on and 5v-off dumps. I will now proceed with the rest of the instructions.

        1. Vahe Ganapetyan

          Thanks for your reply, Johan

          I managed to upload OpenDPS on my board but its behaving very weirdly. When I apply power to the board, the fan is working all the time. The display shows the input voltage correctly. When I set the output voltage and press the output enable button, the fan stops. There is no voltage on the output regardless whether it is enabled or disabled…

          I am afraid I have a different hardware revision of the board and they have changed some pin assignments…

          1. tman

            You didn’t set the firmware to be built for a DPS5015. RD changed the pin assignments slightly between a DPS5005 and a DPS5015. The output enable pin on a DPS5005 is the fan enable for a DPS5015 and the output enable for a DPS5015 is another pin entirely.

            Edit opendps/dps-model.h and recompile your firmware.

  13. Vahe Ganapetyan

    Oh, great, thanks, tman. Uncommenting the define in dps-model.h fixed it.

    However, now the fan is always ON when the output is enabled. Besides, there is about 0.1-0.15V difference between the output value displayed on the screen and the actual voltage measured by an Agilent meter with 3 digits accuracy after decimal point. Is it possible to calibrate the indication?

    Also, when I press the output enable/disable button, the output indicator on the bottom right corner does not always appear when output is enabled. I didn’t figure it out yet when exactly does this happen, but sometimes the indicator is enabled with power output, and sometimes there is output but the indicator is not there…

    1. tman

      The fan being always on when the output is on is “normal”. The DPS5015 support isn’t 100% complete yet. The code doesn’t monitor the temperature yet so it just turns on the fan when the output is on. See https://github.com/kanflo/opendps/commit/b25b1a0105cecaa7a60ef38876e40814df795ce7

      AFAIK there isn’t any way to calibrate it without altering the code in opendps/pwrctl.c You’ll need to either adjust the constants or modify pwrctl_get_vout to offset it. I’ve not tried doing this myself so you’ll need to do some experimentation.

      I’ve no idea what the problem is regarding the output indicator though.

  14. Vahe Ganapetyan

    I think weird operation of the output enable button is related to some debouncing delay on this button. When I press it slowly, like, 1 second press, it works on the release. If I make a few very fast clicks, the indicator stays locked in whatever state it was (either ON or OFF) and further presses on the enable/disable button do not change the indicator state anymore, until a power cycle. Seems to be some timing bug.

    Thanks for pointing me on which file to look at for calibration. Will try to play with it when I have time.

    The fan being ON all the time is not very good… Maybe it will be easier to disconnect the fan and connect it to an external hardware temperature controller…

  15. Vahe Ganapetyan

    There is clearly a bug with how the output enable button works. If you try to click it many times in a row, even, say, with 1 sec. intervals, after some 5-10 tries the indicator stays locked in some state, although the output continues to toggle (judging by the fan going on or off). If you continue pressing the button, at some point the screen goes white with no indication, and only a power cicle will reset it back to normal functioning.

      1. Vahe Ganapeetyan

        Yes, quite similar to what I am witnessing but that thread seems to have stopped some 9 days ago. I think these problems must be linked with some common cause…

  16. Vahe Ganapetyan

    I am trying to enable serial comms, but when I launch dpsctl.py I get “ImportError: no module named serial” on line 42. Any help would be greatly appreciated

  17. Frederik Kemner

    Do I have to have the nRST pin connected for this to work? I’m getting this:

    > reset halt
    timed out while waiting for target halted
    TARGET: stm32f1x.cpu – Not halted
    in procedure ‘reset’
    in procedure ‘ocd_bouncer’

  18. Frederik Kemner

    In the end I was able to do this instead of the reset halt:

    > stm32f1x.cpu arp_halt
    target halted due to debug-request, current mode: Handler HardFault
    xPSR: 0x81000003 pc: 0x080001d6 msp: 0x20000998

  19. Joep

    Hi Johan,

    I installed opendps on a 5005 with the new pin-layout, but it seems I need to flash dpsboot after opendps in order to get the software running.

    Now the software is running, display and controls work as expected. However, when I enable the output, there is no voltage on the output pins and the display shows 0V and 0A. Inputvoltage is shown correct (20V). Data was collected before the original software was erased and at that time the output voltage on the screen was correct, but unfortunately haven’t verified the actual output so this might have been the setpoint…
    Any chance this is a software issue that could be resolved with collected data? Has anyone used this software on a new 5005? Or is this likely to be a faulty unit?

    Regards,
    Joep

    1. Johan

      Hi Joep. Did I forgot to add a note about flashing order? Will fix that. I have a DPS5005 with the new connector for adding USB or Bluetooth. Is that the one you are using? Please email your measurements and I’ll have a look at them. My address is on my GitHub page.

  20. Joep

    Hi Johan,

    Thanks for your reply!
    Dpsboot is mentioned on your GitHub page, but not on this blog page. My DPS5005 is indeed one with the new serial connector.
    The good – but odd – thing is output voltage was okay when I tried it again this evening. Can’t think of any reason – didn’t reflash it and did cycle power quite a few times yesterday – but I’m glad it’s okay now 🙂
    Output voltage is about 6% below setpoint (and 1% lower than readout) but that’s probably some calibration parameter somewhere.

    1. Johan

      Thanks for your comments 😉 It seems to me that one vital STM32 IO pin is floating and depending on luck, ESD and solar eclipses the signal it is supposed to drive flips this or that way. It might not work tomorrow and I need to find the pin. Should probably ask people to run ocd-client.py before reflashing to get the GPIO map of their devices…

  21. Chris

    Yeah, so things went wrong. Black screen when I turn it on now.
    openocd output:

    target halted due to debug-request, current mode: Handler HardFault
    xPSR: 0x00000003 pc: 00000000 msp: 0x464c455c
    target halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0x00010100 msp: 0x464c457c
    ** Programming Started **
    auto erase enabled
    Info : device id = 0x10016420
    Info : flash size = 64kbytes
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x2000003a msp: 0x464c457c
    wrote 43008 bytes from file /home/chris/opendps/opendps/opendps.elf in 3.194768s (13.146 KiB/s)
    ** Programming Finished **
    ** Verify Started **
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x2000002e msp: 0x464c457c
    target halted due to breakpoint, current mode: Thread
    xPSR: 0x61000000 pc: 0x2000002e msp: 0x464c457c
    verified 42632 bytes in 0.783986s (53.104 KiB/s)
    ** Verified OK **
    ** Resetting Target **

  22. rmax

    Thanks, Johan for this great project!

    It made me order a DPS3005 which arrived today and another DPS5005 that is still on it’s way.

    FYI, RD seems to ship the new board designs now also for modules that are ordered without the communications option. At least my DPS3005 has the smaller connectors for SWD and UART. I’ll let you know if the same is true for the DPS5005 once I get it.

    Oh – and I found two larger solder points labelled RX and TX (mirrored as XT) on the backside of the logic board right of the JST footprints. They seem to be connected in parallel to the R and T pins on the JST.

    BTW, you mistyped SWD as SWO in a few places above.

  23. Luca

    hi,

    thank you for your amazing work! i just finished erasing the internal memory (I just arrived to this line:” erased address 0x08000000 (length 65536) in 0.079614s (803.879 KiB/s)”) nad everything seems good 😃but i can’t flash the firmware 🙁 i had tried to use your commands ( make -C opendps flash make -C dpsboot flash ) right after this line ( erased address 0x08000000 (length 65536) in 0.079614s (803.879 KiB/s) ) but the terminal tell’s me that make is not a command ( invalid command name “make” ) so i can’t move on, can you help me?

    Thanks

    Luca

  24. vitaliy

    Hello guys, nice you see your development 🙂

    and i want to ask.
    i own DPS5015 v.1.1 which does not have uart support.
    it seems like chinese guys added support for uart interface in version 1.2 of thier original firmware.
    they also developed pc software for thier new verion DPS board.
    i wondering if it possible somehow update firmware for older version of boards to bring support for uart and bt/wifi etc. ?
    or there is no other way except opendps?
    https://www.mediafire.com/folder/3iogirsx1s0vp/DPS_communication_upper_computer

    1. tman

      No. RD Tech have never released their firmware and the STM32 has the readback protection enabled so you can’t read the firmware out of the chip. This means you can’t upgrade your existing DPS to a DPS Comms. RD Tech have said they won’t upgrade it either and you have to buy a new module. If you want remote control then OpenDPS is your only option at the moment.

  25. Sonny Horton

    Beautiful project and very well documented! Thank you!

    I purchased a DPS 3012 and happened to mention it to a fellow maker/ham/hacker and he pointed me to your project. I’m excited to dive in and play with it. I’m not sure I have the skills, but I *might* try and attack the temperature control of the fan and/or the wattage display (perhaps a second “page” of the screen that alternates when output is enabled????)

    Thanks again – very well done!

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*