I recently bought this fairly chunky buck converter from China, manufactured by a company called Yeeco. Despite its price and origins, it works well and seems to be of fairly high quality. You can set voltage and a current limit on the “control panel”, and you get some CV/CC lights too – it tries to behave like a bench power supply.
On closer inspection I found 4 pins in the corner, with UART written next to them. I already had an idea for an upcoming project for which a programmable buck converter would be handy, so I soldered on some pin headers and investigated.
After some thorough scouring of the instructions it came with, as well the product page, I could find no reference to a serial port. I tried googling for other Yeeco products or if other people had investigated, but to no avail. A breakthrough came when eventually I found someone else asking about a UART in a forum post about a similar DROK product. Since there was chance that both models were manufactured in the same place and/or used the same firmware, I was slightly optimistic.
I’d misplaced my USB-serial adaptor, so I connected an Arduino MEGA with a serial bridge program running, enabling me to send commands to the unit from my PC. I connected V to 5V, G to ground, T to Serial1-Rx and R to Serial1-Tx. Alas, after trying different baud rates and all the commands listed I could get no response, and was beginning to think that the port was just for factory use. Just before I gave up, I switched Rx and Tx – so that T on the device went to Serial1 Tx etc. It worked! I was able to send and receive commands, and they seemed to work perfectly.
There was just one problem: when connected to the Arduino, the buck unit produced voltages 0.2V higher than those it was set to. On closer inspection it turned out that it was current leaking through the T pin that was the problem. A 10K resistor between the T pin and the Arduino’s Tx line solved this, and did not affect the communications.
So, I will summarise the information I found in the hope that it might save someone else a lot of trawling.
I’ve also written a quick library for Arduino. I had to write it for meself anyway, so it’s on GitHub in case it’s useful to anyone else.
- The port runs at 4800 baud
- V -> 5V
- G -> Gnd
- T -> Tx (NOT Rx)
- R -> Rx (NOT Tx)
([CR] = Carriage Return, [NL] = Newline)
- aru[CR][NL] Read output voltage
- ari[CR][NL] Read output current
- aro[CR][NL] Read output state (1 = on, 0 = off)
XXXX represents the numerical value to set the voltage/current to. The string must be 4 chars long. For example, 0500 = 5V. 0001 = 10mV.
- awuXXXX[CR][NL] Set output voltage, XXXX is voltage in centivolts (yes, I know)
- awiXXXX[CR][NL] Set output current, XXXX is current in centiamps
- awoX[CR][NL] Set output state, X is 1 or 0 (1 = on, 0 = off)