DPS3005 PSU Module and MODBUS RTU Python & Arduino

DPS3005 Communication- version, Esp8266

I recently came across a DPS3005 PSU Module with PC control option , i have used similar modules before in a bench power supply and was impressed with the results . With the launch of a new version that included PC control i decided to order one ! (Banggood.com)

 

A few weeks later it arrived …

in the box was a

  1. DPS3005 Module
  2. Manual
  3. Usb serial Adaptor
  4. Bluetooth Module
  5. link lead (not pictured)

 

 

 

 

 

 

 

The PC / bluetooth was not mentioned in the supplied instructions and the pc software (windows 7+ only) was available from the sellers listing and also Manufacturers Youtube Channel. I decided not to install and see if i was able to control from a MCU such as an Arduino

 

Investigating The Interface

I started by investigating the interface by first connecting the Bluetooth and USB serial adapter to the unit and simply seeing if there was any data flowing on the com ports. This did not prove very successfully at all and wasn’t even able to pair the Bluetooth adapter with any device i tried. Though without a button on the bluetooth module i couldnt see a way of even putting it in pair mode !

Without giving up and i decided to look on the manufacture’s download link and found a interface datasheet, all in Chinese .  Using google translate i was able to see the command set and the interface was basically listed as Modbus Rtu, rs232,9600 baud and slave address 1.

I have no experience with modbus at all and had to do a bit of research to understand this very basics .

The following functions were listed as supported in the datasheet:

0x03Read data from one or more registers

0x06 – Write a single register

0x10Write multiple registers

 

basic Functions extacted from datasheet , needed for examples below

Voltage set  –               Register  0x00

Current set  –               Register  0x01

Voltage measured  –    Register  0x02

Current measured   –   Register  0x03

power on                –    Register  0x04

Loads more see manufactures datasheet for more info…

 

Luckly there are a wide range of software libraries available for different platforms to help communicate with Modbus Rtu devices. So i didn’t need to deal with the raw data on the serial port .

 

Python Testing

Rather than jumping straight in and connecting to an arduino i decided to use the supplied USB serial adaptor and python to see if i could work out the basics using the infomation exactracted above.

Below is a very simple example how i was able read the units measured voltage. One issue i did notice i had to increase the default timeout for it to work !

 

 

Arduino Testing

After confirming it worked using python and the measured voltage was successfully displayed i decided to move onto arduino. I noticed that it used a 3.3v logic level and rather than using level shifter i opted just to try and use a ESP82266 running arduino.  This made it really easy to hook up just three wires gnd, TX and RX. A software serial port was used to talk to the dps3005 psu module allowing the native (USB) serial port free to monitoring everything.

 

Note , the supplied link lead wire colours did not match the PCB marking on my unit and was completely reversed . I may have just had a  defect cable in my case but can confirm the PCB Marking on the DPS3005 module and usb serial convertor were correct.

 

 

Im very pleased how easy it was to get control of these great psu modules. Next.. im planning to making a new bench psu with a web interface using a esp8266.

COMMENTS

Raffaele

Hi Luke,

Thank you for this info. I am looking forward to read more about your progress with this PSU. Unfortunately I do not get a connection using the Windows Software (DPS3005 V1.3). But I was able to pair the BT module from Windows 10 using the pin 1234. The device showed up as “RuiDengDPS” and i just needed to press the “pair” button and to enter the pin.

Good luck.

Raffaele Biscosi

Hi Luke,

thank you for sharing your findings. Especially mentioning the datasheet and suggesting to use google translate was very helpful. I was amazed how well that works.

I was thinking about writing some kind of http based API instead of a web frontend for a start. Just enough to set voltage and current limits and to control the output. I would also like to control two supplies with one esp8266 so that one could build a +/-30V PS with it. It should also be no problem to have a small subroutine for charging single LiPo cells with different parameters. How about working together on this?

Raffaele

    Luke

    Hi Raffaele,

    Sorry for the very long reply, good to hear you found my post uselful! Recently i havent had as much time to do projects as liked, but had been working on a web interface using web sockets. Like yourself i was planning to have the ability to control two DPS3005 psu modules and have it mostly working with a few bugs to iron out. Will look at adding a basic http based API as well.

    How far have you got with your project ?

    Luke

      Raffaele Biscosi

      Hi Luke,

      thanks for you answer. I was also quite busy because of my job lately and preferred spending leisure time family and friends. Hope to find some time during the upcoming winter season.

      Raffaele

Mai Mariarti

“This made it really easy to hook up just three wires gnd, TX and RX. A software serial port was used to talk to the dps3005 psu module”
Really? What is the pin-outs?
Red is obvious 3.3V, the rest? Is green the ground or black? This is what happens when noobs write articles!

    Luke

    Hi Mai, if you read my post again you will notice that i have said that the colours of the wires we not right in my case but i used the labels (tx, rx, gnd) next to the socket on DPS3005 PCB or on the supplied usb to serial adaptor pcb. I had even highlight this in red text in quote marks underneath. Hope this helps . If your still stuck im happy to take some more pictures .

Leave a Reply

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

*