Esp32 Uart connection to Arduino Nano

I have an EPS32 connected via UART to an Arduino Nano.

The connection is onedirectional so only the ESP sends small Data to the Nano.

The Problem is, if the ESP is connected via USB the transmission works without problems. If the ESP is connected to a DCDC converted which converts 12V to 5V the transmission doesn't work.

ESP Code:

if (canProv.exupECUMode)
    {
      webServProv.LogLinePrint("Stelle auf MCU");
      Serial.write("MCU");
    }
    else
    {
      webServProv.LogLinePrint("Stelle auf Manually");
      Serial.write("Manually");
    }

Arduino:

String receiveData = Serial.readString();
    if (receiveData == "MCU")
    {
#ifdef DEBUGX
      Serial.println("MCU1");
#endif

      ControlMode = true;
    }

Does anyone knows why this behavior happens?

Following tests i also done:

ESP USB an USB UART Bridge -> Works
ESP ext.5V an USB UART Bridge -> Works
ESP USB an Arduino -> Works
ESP ext.5V an Arduino -> Doesnt work

Serial is setted up with 115200 Baud

did you connect the GND between the 2 boards?

No. Should i?

The only wire which is connected is the ESP TX to the Nano RX

that's a problem for sure

try it.

(remember a voltage is a difference of potential, so against a somewhat arbitrary 0V reference. When you were powering through USB, the boards probably shared the same GND (voltage reference) through the USB connector or the computer. when they are not powered the same way, then the 0V of one might be different enough than the 0V of the other and the 3.3V you send on Tx might be seen as 10V on the other side and fry your arduino Rx pin..)

Better yet, forget about the whole Nano and stick with the ESP32. There's absolutely no reason whatsoever to have both a Nano and an ESP32 in a device. The Nano adds nothing but a burden.

It has a reason why i use a nano

That was the solution.

Thank you

Probably not a good one, though.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.