Secret UART On Cheap DCDC converters

I recently bought this fairly chunky buck converter from China, manufactured by a company called Yeeco. Despite its price, it works well and the quality of manufacture is high. 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.

UART_close

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 to 5V, 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 pin that was the problem. A 10K resistor between the 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.

Summary

  • The port runs at 4800 baud
  • V -> 5V
  • G -> Gnd
  • T -> Tx (NOT Rx)
  • R -> Rx (NOT Tx)

Commands

([CR] = Carriage Return, [NL] = Newline)

Reading

  • aru[CR][NL]    Read output voltage
  • ari[CR][NL]     Read output current
  • aro[CR][NL]    Read output state (1 = on, 0 = off)

Writing

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)

13 thoughts on “Secret UART On Cheap DCDC converters

  1. Reading capacity value is working very well until 6.5A on both BUCK display and UART. But after that, UART value rollovers and begins from 0.
    BUCK display is working very well beyond 6.5A and goes through upward. I couldn’t find the problem with the UART.

      1. Thank you for your quick response. This is the only reference on the internet for this kind of Buck Converter. Best regards…

  2. Thanks for all your efforts, you have saved me a lot of work. And these cc cv modules are rock solid. Well so far. I’m using them to charge batteries in an off grid solar setup. Was about to try what you have completed and arduino are awesome solution. Thanks again for sharing you knowledge. You were probably using a nano which is why you had to swap the rx and tx. Trips me up every so often when I forget.

  3. Hello Ben,
    Thank you to have sharing your experience about this module…
    I’m currently evalauting this module and facing to the following problem related to uart commands:
    once the output is switched-on, the command “awo0” reply “#wook” as expected and the set voltage (“00.70” in my use case) is well displayed.
    But:
    -> the out led still ON, the cc led still on
    -> the output seems switched-on. I measures 3.45V and 0.5A at output (I have a resistor load of 7Ohms)
    -> set voltage and current can be changed from buttons
    -> but, it is not possible to switch-off the output, nor by button, nor by uart command “awo0”
    -> the command “aro” reply “#ro00000000100” and sometimes reply “#ro00000000243”

    The only way to switch-off the output is to power off the module.

    Did you already faced to this issue?
    Thank you in advance for your reply.
    Best regards

    1. Hi Benjamin,
      Hmm that does sound strange. I don’t recall facing an issue like that.
      The only thing I remember that could be vaguely related is that the output had quite a bit of capacitance on it, so when the output turned off and was unloaded, it would take a while to drift back to zero.
      But it doesn’t sound like that’s what you’re experiencing as you have the output loaded and the On LED stays on.
      Sorry, I don’t think I have any other ideas!
      Cheers

  4. Hello Ben,
    Thank you anyway for your quick reply.
    I have asked the support of DROK.
    I will share you the information in case I find a solution.
    Cheers.

  5. Hello Ben,
    The issue seems come from my terminal.
    I used a simple “Putty” tool to send bytes to the module.
    With a “Realterm” tool, it is more easier and is working fine.
    Therefore we can close the topic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s