Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No response from Drok buck PSU UART #3

Open
sidtupper opened this issue Mar 8, 2022 · 8 comments
Open

No response from Drok buck PSU UART #3

sidtupper opened this issue Mar 8, 2022 · 8 comments

Comments

@sidtupper
Copy link

sidtupper commented Mar 8, 2022

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.

@MiguelLameiras
Copy link

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.

@sidtupper
Copy link
Author

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 longqipro@foxmail.com for it.

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

@sidtupper
Copy link
Author

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/

@MiguelLameiras
Copy link

Thanks! I will try to contact Drok.

@MiguelLameiras
Copy link

MiguelLameiras commented Mar 29, 2023

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

@sidtupper
Copy link
Author

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

@bengineer19
Copy link
Owner

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

@sidtupper
Copy link
Author

sidtupper commented Apr 3, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants