Connecting Nano with ESP8266

Hi im new here.
I am using a 4-channel I2C-safe bi-directional logic level shifter to connect my Arduino Nano Every to the ESP8266. This level shifter is necessary because the Arduino operates at 5V logic levels, while the ESP8266 operates at 3.3V. The level shifter safely steps down the 5V signals from the Arduino to 3.3V signals that the ESP8266 can handle, and vice versa, ensuring that both devices can communicate without damaging the ESP8266's lower-voltage inputs.

Despite the correct setup, I encountered issues with the devices not communicating. I've rechecked all the connections and made sure the baud rates on both devices match, but the communication issue persists.

For the Arduino Nano Every, I've uploaded a simple sketch that sends a greeting message to the ESP8266 every two seconds.

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud rate
}

void loop() {
  Serial.println("Hello ESP8266"); // Send data to ESP8266
  delay(2000); // Wait for 2 seconds
}

On the ESP8266 side, I've loaded a sketch that listens for incoming serial data and prints any received messages to its serial monitor.

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud rate
}

void loop() {
  if (Serial.available()) { // Check if data is available to read
    String data = Serial.readString(); // Read the incoming data
    Serial.println("Received: " + data); // Display the received data
  }
}

Maybe someone can help me with my problem. I looked everywhere but could not find a solution.

How do you have it all wired together? A schematic would be most helpful, even a hand drawn one.

For the wiring, I did the following:

Power Supply: I connected the GND of my Arduino to the GND of the level shifter and then connected that to the GND of my ESP8266 to ensure they all share a common ground.

Level Shifter HV Side (High Voltage): I connected the HV pin of the level shifter to the 5V pin on my Arduino. Then, I connected the HV1 pin of the level shifter to the TX pin on my Arduino.

Level Shifter LV Side (Low Voltage): I connected the LV pin of the level shifter to the 3.3V pin on my ESP8266. After that, I connected the LV1 pin of the level shifter to the RX pin on my ESP8266.

I will draw later on a schematic and show it.

It is usually much better to leave the main Tx/Rx for communication/debugging with the Serial Monitor on your PC and use other pins for chip/chip communication. You then have to use SoftwareSerial.

RX/TX on Every is Serial1

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