DPS5005, now with comms

Updated on September 2nd 2017.

It’s exciting to see the continued development of the DPS5005 and ‘3005. Today Rd Tech released a version with USB/Bluetooth connectivity and I just ordered one to make sure OpenDPS runs on it. The new version seems be fitted with a JST has a JST GH connector which makes connecting an ESP8266 or a serial port a bit easier. It also has different MOSFETs by the looks of it.

Now I only need to wait 25-36 days for shipping. The wait is over and with a minor tweak (DAC needs to be disabled when turning off the output) OpenDPS is fully functional on the new DPS5005 “communication version”.

UART changes

There is no need to solder the UART anymore and you get a cable with the device. You can cut the cable in half to connect to your ESP8266 or FTDI-adapter but I recommend buying a set of cables and connectors from eBay. Search for “10SET JST GH Connector plug with Wires Cables” and get the JST-GH 4 pin kit. The pinout of the cable depends on what end you insert into your DPS (as both ends have female connectors). Thus, I will not say “red is VCC” as it will be “red is GND” if you connect the other end and observe the holy smoke. Look at the pinout below and determine which wire is which. The silkscreen is “V R T B” which I think should have been “V R T G“.

JST-GH UART
JST-GH UART

RXI indicates that this is the RX input (sic!) of the DPS5005. and TXO is the TX output (re-sic!) of the DPS5005. People have mixed up RX and TX for ages, calling your signals RXI and TXO will put an end to it. To the left of RXI is VCC which in the previous version could not power an ESP8266. I have not checked if the regulator has been changed to something more powerful in this version.

JTAG changes

The JTAG connector on these new devices is called JST-GH and has a tiny 1.5mm 1.2mm, 1.25mm spacing and there is not room for running the JTAG wires toward the back of the device which makes a permanent JTAG solution cumbersome. When flashing, I simply pressed three test needle probes agains the GND, SWCLK and SWDIO connectors. Then again, most people will not need permanent JTAG but we all want a easy upgrade option for OpenDPS.

JTAG pinout, same but tinier

UART firmware upgrades

The solution is a bootloader that accepts firmware upgrades over UART. When unlocking your stock DPS, use whatever needles or pins you can find to connect GND, SWCLK and SWDIO and flash the bootloader. Then use dpsctl.py for the firmware upgrade:

If you accidentally upgrade to a really b0rken version, the bootloader can be forced to enter upgrade mode if you keep the SEL button pressed while enabling power.

The display will be black during the entire upgrade operation. If it stays black, the bootloader might refuse or fail to start the OpenDPS application, or the application crashed. If you attempt the upgrade operation again, and upgrading begins, the bootloader is running but is refusing to boot your firmware. But why? Well, let’s find out. If you append the -v option to dpsctl.py you will get a dump of the UART traffic.

The fourth byte from the end in the received data (0x03 in this example) will tell us why the bootloader refused to boot the firmware. See protocol.h for the different reasons.

Still not affiliated with Rd Tech. Would appreciate a discount though *cough* *cough* 😉

32 thoughts on “DPS5005, now with comms

  1. Juan

    Did you finally get it?

    I’m about to take the plunge for a couple of these and would go for the new comms version if I were sure that opendps would work with it.

    Thanks!

  2. Robert Kovacs

    Hi Johan,

    I would like to ask for your help. I got a 5005 power supply module that got a bit of surge and it broke. The “F3” mark on one of the pictograms was split in. I found one half of it and managed to find a similar one in the other part of the panel I tagged in the other picture. Can you tell me what kind of part it is and what can I replace it for?
    Here is the pictures:
    https://drive.google.com/folderview?id=0B6r8mF38RhlPbUJKcy1EelJQaG8

    Thank you for your help in advance.
    Robert

    1. Johan

      Hi Robert. Ouch, that must have been some power surge for components to crack. F1 could be a ferrite bead but that is only a guess. Unfortunately chances are other components got fried. You could always test short circuiting the F1 pads.

        1. Johan

          Interesting. None of my ‘5005s look like that. You seem to have a revision between the one I have in the original post and the comms version. Order a 1206 2A fuse from a suitable distributor depending on you location and do some soldering. Hopefully it sorts things out. Good luck!

  3. Mac

    Do you know if OpenDPS works with the DPS5015?

    I’m guessing the model number is different on RD’s AliExpress site because they are including a 15A supply.

    Regards,
    Mac

        1. Gidimiz

          Hi.

          Did you managed to update your 5015? I also got one PCB V2.2.
          https://photos.app.goo.gl/ktLAQt3hdAqsRrEi1
          The main board looks different the the above pictures and also the LCD screen, doesnt have the jtag connection, only the main board has them ( next to the ST MCU ). have a look at this video, they have the same board connection:
          https://youtu.be/igY0s4drtlc

          Please advise who managed to update the board correctly. Also, will the PC software work with the open source?

          Regards.

  4. Jim Beans

    Anyone know what the real serial protocol is on the “communications version”? It looks like RD’s GUI front end is just filling information found from that protocol. So anything might control the board? Not just their GUI.

    1. Raffaele

      The protocol is called “modbus”. You can find some basic info on http://ls-homeprojects.co.uk/dps3005-psu-module-and-modbus-rtu-python-arduino/ (hope it is ok to post a link to another page).

      There is a description of the communication protocol on https://www.mediafire.com/folder/3iogirsx1s0vp/DPS_communication_upper_computer. It’s in chinese but with help from google translate and the basics found on ls-homeprojects i was able to control and monitor the DPS with a simple python script under linux.

  5. Raffaele Biscosi

    You are welcome.

    I wonder if the stock firmware version on the modules is still different between comm and no-comm hardware. I am planning to remote control the module(s) exclusively via esp8266 so I actually do not need any usb-to-serial or bt-to-serial converter. Maybe we should suggest to sell a new bundle with just the module and a jst-to-dupont-cable to the manufacturer.

  6. Francesco

    Dude, let me tell you that your work is superb. Thank you!
    Just a question: do you know if the DPH3205 (the buck/boost version) is also compatible with this software? Did anyone else tell if it is compatible?
    Thank you

      1. Francesco

        Hi
        In fact today I opened the github with my mobile and I found an issue asking for this 😉
        If I buy it, I’ll definitely try to reverse engineer it.

        Thank you

  7. Jack

    Hi guys
    I have just connect a Bluetooth module to my DPS5005 and it works fine using the “DPS5005 PC Software v1.3”.
    I use a SPP-C Bluetooth module like this one :
    https://www.aliexpress.com/item/SPP-C-Bluetooth-serial-pass-through-module-wireless-serial-communication-from-machine-Wireless-SPPC-Replace-HC/32404292882.html?spm=a2g0s.9042311.0.0.uKpTkw
    Connecting :
    When you look to the DPS components face, with the connector at in the lower right corner, you see 4 pins connector “1 2 3 4” (from left to right) :
    1 – VCC to the VCC module
    2 – Tx to the RXD module
    3 – Rx to the TXD module
    4 – Gnd to the Gnd module

    Bluetooth module must have been set to 9600 baud rate (8 bits, no parity).
    COM number is given by OS when you connect to the Bluetooth module. Have a look to the Windows “Device manager”

  8. Johnny Quest

    Hello Johan:
    Thanks for all your effort. The rest of the posters as well. I have a DPS3005C on order, so it comes with a USB2TTL bridge and a BLUETOOTH bridge. I have not had a chance to look at the source code for OpenDPS. I have the STM32 support tools and the ST-LINKv2 programmer as well.

    Could you verify if OpenDPS supports the DPS3005?

    Thank you again.

    Peace and blessings,
    Johnny

    1. Johan

      Hi Johnny. I can offer no guarantees as I have no DPS3005C but I do have a fully supported DPS5005C. I would be very surprised if its sibling was not supported.

  9. Steve

    Hi Johan,

    I just started to catch all available information on these modules. According to the translated comspecs there is a “slave-address” (always set to 01H) for addressing different devices on the same bus. Is the module capable to set different adresses with the stock firmware and/or Open-DPS?

    Reason:
    Plans to build a bench-power-supply with two or three modules (galvanically isolated inputs for each module), software control of more than one module using USB-interface (modified optocoupler system for ORed TXO)

    Great work & Thx
    Steve

    1. Johan

      Hi Steve. I am not sure what bus you are referring to. Both the stock FW and OpenDPS uses a serial protocol over a point to point UART. Still, you could build something with an eg. STM32 with three UARTs connected to each DPS.

  10. Johnny Quest

    Hi Johan:
    I received the DPS3005C and case today. No instructions on the case component assembly but it came together just fine.

    Before closing up the unit, I wanted to access the STM32 using the ST-LINK. It looks like they are using the same SWD port pinout as the DPS5005C you are using. I tried just GND, SWDCLK and SWDIO and received the following error:
    ====================================================
    [$] → openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg
    Open On-Chip Debugger 0.10.0-dev-00247-g73b676c (2016-03-23-17:10)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    adapter speed: 1000 kHz
    adapter_nsrst_delay: 100
    none separate
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : Unable to match requested speed 1000 kHz, using 950 kHz
    Info : clock speed 950 kHz
    Info : STLINK v2 JTAG v26 API v2 SWIM v5 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 3.226877
    Error: init mode failed (unable to connect to the target)
    in procedure ‘init’
    in procedure ‘ocd_bouncer’
    ====================================================

    I ended up connecting all 5 pins, nRST and 3.3V VDD and still no joy. Any recommendations?

    Thanks for your work and effort.

    Peace and blessings,
    Johnny

    1. Johan

      Hi Johnny. That sounds strange. The only things I can think of are the connection (there are two different pinouts on the ST Link v2 clones), a non powered DPS (the ST Link cannot power the CPU on the DPS) or a locked SWD port in newer DPS:es (_really_ hoping this is not the case).

Leave a Comment

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

*
*