I am using the DFRobot Gravity: Active Isolated RS485 to UART Signal Adapter Module, which supports 3.3V/5V Logic Level. I tested this with Arduino (5V logic Level) & Teensy 4.1(3.3V logic level) and it worked fine but when I used this module NANO_ESP32 which is also 3.3V logic level then I did not get any data, only the TX LED is blinking according to my delay time.
Please someone help me with this. What could be the possible reason for this?
I follow this one also but this does not resolve my problem
Carefully read the top line in your posted picture, that tells you it will not work on the ESP devices. You need a different transceiver. Also you do not show the rest of the pins, why not?
Hi gilshultz and mikb55
I tested this module with Teensy 4.1 (which supports a 3.3V logic level) and it working fine (I connected this with Teensy without any voltage divider/level shifter). So, I am confused.
According to the above attached image the ratio should be 1:2. I used 3.3K resistors in which I connected the resistor like this to maintain that ratio.
Yes, I tested the code for both and its working one difference I noticed that on Nano ESP32 serial monitor it printing the one char at a time and at teensy serial monitor it is printing the whole string at a time.
Here I attached the response and codes of both
Teensy 4.1 Code
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial1.begin(115200);
}
void loop() {
if (Serial1.available()) {
char inByte = Serial1.read();
// Serial.write(inByte);
Serial.print(inByte);
Serial1.write("This is Teensy 4.1\n");
}
}
Nano ESP32 Code
void setup() {
// initialize both serial ports:
Serial.begin(9600);
Serial0.begin(115200);
}
void loop() {
if (Serial0.available()) {
char inByte = Serial0.read();
// Serial.write(inByte);
Serial.print(inByte);
Serial0.write("This is NanoESP32\n");
}
delay(1000);
}
One more thing, I exploring this on youtube and I found two video ( part1 & part2 )in which a guy told that in ESP32 the driver pin goes to low a few milliseconds before all the data tramitted because ESP32 has 2 core. I am not sure it is right or not.
If anyone know about this pls explain
That only applies when using a digital pin to manually drive the DE/RE pin on the ES485 chip.
On the DFRobot module there is circuitry to automatically drive DE/RE when the Tx line is active so there should be no lag.
To investigate your problem further you need to use an oscilloscope to check the ESP32 signal levels and confirm that it is able to drive the DFRobot device so that you get a RS485 signal appearing on the AB lines.
If Tx is failing then you will not get a response and this will give a false impression that Rx is failing.