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 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.

Leave a Reply

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

*