Driving the DPS5005 power supply with the Yoctopuce API

Driving the DPS5005 power supply with the Yoctopuce API

For our own purposes, we had to make a small do-it-yourself device that would allow us to change on demand the voltage on a USB cable. Given the success that our DIY based on the Ruideng RD6006 power supply gets on a daily basis, we thought that we could also give this opportunity to its little sister, the DPS5005 power supply.



The DPS5005 power supply

The DPS5005 model is in fact a much earlier model than the RD6006, but the principle stays exactly the same. The module takes the shape of a tiny front panel. It takes as input a voltage from 6 to 55V and can output up to 50V. Here as well, we are dealing with a buck: the output cannot go above the input voltage minus about 1 Volt. Wonderful gesture from Ruideng, there is a serial input enabling us to drive the power supply with a Yocto-Serial, for example.

The DPS5005 power supply, front side
The DPS5005 power supply, front side


Back side
Back side



You can find this power supply for $25 on Alibaba, but this time we again preferred to get our supplies from a European reseller.
As with the RD6006 version, you can optionally buy a metallic enclosure in which to put the power supply. The enclosure is provided with some accessories, such as a switch, terminal pins, and so on...

The optional enclosure
The optional enclosure



Assembling

To power the DPS5005, we selected a tiny AC/DC converter, the Traco Power TIW24-124, which takes as input 100 to 240 V AC to output 24V AC at 1A, that is 24W, largely enough for what we intend to do with it. We mounted it on a plexiglass panel that we put in the enclosure. On this panel, we also installed Fix-2.5mm some spacers to mount Yoctopuce modules.

The AC/DC converter
The AC/DC converter



Safety

For the plug of the AC/DC converter, we chose the C14 format. As the converter doesn't have a ground connection, we could have done with a less voluminous C8 plug, but we preferred a format with a ground connection for two reasons:

  • This enables us to connect the housing of the enclosure to the protective ground. If by some misfortune one of the power supply wires were to become unsoldered and to touch the enclosure, this would certainly blow up the fuse, but this would spare the life of the user.
  • The fact that a C14 plug is not reversible enables us to wire the power supply so that the main switch always cuts the phase and not the neutral, which limits the number of parts under current when the switch is OFF

For added safety, we covered all the contacts with dangerous voltages with liquid insulant in case a fool were to open the enclosure without unplugging it first.

Connections

The connections are rather simple. You must simply know that the serial port of the DPS5005 power supply works in 3.3V and the pin-out order is, seen from the back, from left to right: GND, TX , RX et 3.3V. You don't need to connect the 3.3V, but don't forget to cross TX and RX.

Pin-out of the serial port of the DPS5005 power supply
Pin-out of the serial port of the DPS5005 power supply



In our case, we wanted to use the power supply to vary the voltage in a USB connection. So we added a faceplate Micro-B connector at the back of the enclosure. This connector is connected to a Micro-USB-Hub-V2 installed in the enclosure. A Yocto-Serial is connected to one of the hub ports. On the enclosure front panel we put a USB A faceplate connector which is connected to another port of the hub. Except for VBUS which is provided by the power supply. The USB ground and the output (-) are put in common. We selected Encitech connectors for their small size, but you must know that they are rather expensive.

Diagram for a USB connection with a varying voltage
Diagram for a USB connection with a varying voltage



This being said, if you are only interested in building a tiny laboratory power supply that you can drive with the Yoctopuce API, you need neither the hub nor the USB connector on the front panel. You only need to connect the Yocto-Serial on the back USB connect and the output of the power supply on the front face headers.

Diagram for a standard power supply
Diagram for a standard power supply



Software

The software part works in the same way as version RD6006. You only need to send the MODBUS commands on the serial port, which the Yocto-Serial knows how to do natively. There are however two small differences:

  • The default communication speed of the DPS5005 serial port is 9600 bauds, but you can change it by powering the power supply while maintaining the V/M1 button pressed. When the modification is made, press twice on the "set" button to save the new configuration.
  • The MODBUS addresses that you need to use are not the same.


In other words, it took us only minutes to convert the library that we had written for the RD6006. The DPS5005 version is available here.

Result

In one big morning, we built a small power supply that we can drive remotely and which will enable us to torture Yoctopuce modules by making their power supply voltage vary. We are very happy :-)


Front side  Rear side
It's working!


Add a comment No comment yet Back to blog












Yoctopuce, get your stuff connected.