So, I've been trying serial communication between Arduino Uno and ESP32 using a jumper cable, and it works really well, I can send data from ESP32 to Arduino, and Arduino send back data to ESP32. But when I replace those jumper cable to RS232 cable and RS232 to TTL module, nothin happen in the serial monitor. What do I do wrong?
In both Arduino and ESP32, I'm using SoftwareSerial library. Both serial 1 and 2 usinh Baud rate 9600.
In Arduino
I am using pin 2 and 3 for Serial2, 0, 1 for Serial1
to RS232 module, I connect the pin, RX to RX TX to TX and VCC to 5V, GND to GND
In ESP32 I use pin 16, 17, and the same rx tx like Arduino and gnd and vcc to 3V3.
I use the exact same code from which I use to serial communication using jumper cable.
What do I do wrong? What is the different between communicating using jumper cable and RS232 cable?
I already try to cross the rx tx, and also change the VCC in Arduino to 3V3, but still nothing happen... Can somebody help me?
I don't understand what you are doing. please post the schematic you are planning.
according to my experience arduino can do serial communication with esp32 by direct jumper cable. from the problem you mentioned, do you want to replace the serial interface (both arduino and esp32) by using the RS232 -TTL module?
Is your circuit structured like this?
ESP32 => RS232 TTL module => RS232 cable => RS232 TTL module => Arduino
I've never used ESP32 + RS232 TTL serial communication so can't really give any advice.
Yess, my circuit exactly structured like that. Oh it's too bad that you don't have experience on this matter, but I new too in this kind of programming, but it works well when I'm using jumper cable, but it doesn't work when I'm using RS232 cable
I can not see which terminals you have attached the wires to. Please provide a wiring diagram. You have now been asked three times. Also information about the RS-232 modules.
Is your serial cable a crossover cable? It has to be, connections cross over like:
RX<->TX
TX<->RX
which needs more attention is on the esp32 - rs232 ttl module. Ic Max232 requires a supply voltage (Vcc) of 5V (based on datasheet). maybe you can try using the ttl level shifter module to connect the esp32 with the rs232 TTL module.
esp32 => ttl level shifter module => rs232 ttl module => rs232 cable => rs232 ttl module => arduino
@aarg asked if you are using a RS232 crossover cable???
if you are not sure use jumpers on the 9 pin RS232 connectors
pin 2 to pin 3
pin 3 to pin 2
pin 5 to pin 5
Check the module specification, that should tell you.
Also, have you carried out a simple loopback test on each module? Connect a module Tx to its Rx and send a few characters. You should receive what you sent. However, I note you mentioned SoftwareSerial, and i'm not sure it can send and receive at the same time.