BuckPSU icon indicating copy to clipboard operation
BuckPSU copied to clipboard

No response from Drok buck PSU UART

Open sidtupper opened this issue 2 years ago • 8 comments

I'm making a MPPT solar pump controller using a Drok buck PSU (200310) controlled with a UNO R3, as shown in the drawing at https://sidtupper.ca/wiring%20UNO%20R3%20to%20200310.jpg, and using the BuckPSU library. I'm stalled at not being able to communicate with the PSU. Running the library example, on a logic analyzer I can see that commands are getting to the PSU Rx pin but nothing is coming back on the Tx pin. I've tried obvious stuff like swapping Tx / Rx and various baud rates (9600 vs 4800) without success. I'd really appreciate hints on how to get past this.

sidtupper avatar Mar 08 '22 01:03 sidtupper

I'm making a MPPT solar pump controller using a Drok buck PSU (200310) controlled with a UNO R3, as shown in the drawing at https://sidtupper.ca/wiring%20UNO%20R3%20to%20200310.jpg, and using the BuckPSU library. I'm stalled at not being able to communicate with the PSU. Running the library example, on a logic analyzer I can see that commands are getting to the PSU Rx pin but nothing is coming back on the Tx pin. I've tried obvious stuff like swapping Tx / Rx and various baud rates (9600 vs 4800) without success. I'd really appreciate hints on how to get past this.

Hello, have you been able to communicate with the PSU? I am having the same issue.

MiguelLameiras avatar Mar 08 '23 18:03 MiguelLameiras

Hi, sorry for the late reply. No, I haven't made progress with this. The manufacturer sent me a link to an example "6012 application" but if I recall correctly, I couldn't access it. You could try asking Drok [email protected] for it.

If you solve it I'd really appreciate hearing from you.

sidtupper avatar Mar 12 '23 23:03 sidtupper

Also if you haven't already, have a look at comment threads at http://blog.benjames.io/2018/06/29/secret-uart-on-chinese-dcdc-converters/

sidtupper avatar Mar 13 '23 18:03 sidtupper

Thanks! I will try to contact Drok.

MiguelLameiras avatar Mar 14 '23 10:03 MiguelLameiras

Hi, I got it to work!

It was necessary to change the "-F3-" function in the board to "-00-". To do this, you have to hold the "SET" button and use the up and down arrow buttons in the board to move to "-F3-", then press "OK". Use the arrow buttons again to change to "-00-". There is a detailed explanation on how to do this here: https://manualzz.com/doc/52965331/drok-dc-voltage-regulator--dc-dc-buck-converter-module-10...

Then, drok emailed me the communications protocol below. The line termination needs to contain an /r /n (0x0D, 0x0A).

200310 communicate.pdf

MiguelLameiras avatar Mar 29 '23 08:03 MiguelLameiras

Great! Thanks to you I can resume that project after a year hiatus.

sidtupper avatar Mar 30 '23 03:03 sidtupper

Great to hear you got it working and apologies that I was unable to help more. Thanks for sharing Miguel🙌

bengineer19 avatar Apr 01 '23 06:04 bengineer19

The information was there all the time in the Drok documentation but I gave up too soon. Now I can communicate with the PSU with Putty but haven't got it going in my project context. Putty shows that it works with Rx<->Rx and Tx<->Tx, 8N1, at 9600 baud, but the following ESP32 code gets no reply from the PSU:

`#include <HardwareSerial.h> #define RXD2 16 #define TXD2 17

String psuData; HardwareSerial PSUserial(2);

void setup() { PSUserial.begin(9600, SERIAL_8N1, RXD2, TXD2); // psu <-> esp32 serial connection Serial.begin(9600); // serial monitor rate delay(500); }

void loop() { psuData = ""; PSUserial.write("arv" + 0x0d + 0x0a); // read set voltage while(!PSUserial.available() ) { Serial.print("."); delay(500); } Serial.println(); while (PSUserial.available() > 0) { psuData += PSUserial.read(); } Serial.print(psuData); delay(500); } `

Can you see what's wrong?

sidtupper avatar Apr 03 '23 17:04 sidtupper