Configuring Arduino Mega with Ebyte-E32 Lora Module

I am using a E32-900T20D lora module over UART with an arduino Mega. My logic shifters are configured to convert the 5V mega IO to the 3.3V required by the E32, but to no avail. Running a test script I wrote,

// Define the serial connection using one of the additional hardware serial ports on the Mega
#define E32Serial Serial1

void setup() {
  // Begin the serial communication with the baud rate matching your E32 module's configuration
  Serial.begin(9600);      // Starts the serial communication with the computer
  E32Serial.begin(9600);   // Starts the serial communication with the E32 module

  Serial.println("Arduino is ready");
  // Send a message to the E32 module
  E32Serial.println("Hello E32");
}

void loop() {
  // Check if the E32 module has sent any message
  if (E32Serial.available()) {
    String fromE32 = E32Serial.readStringUntil('\n');
    Serial.print("Received from E32: ");
    Serial.println(fromE32);
  }

  // Check if the computer has sent any message to Arduino
  if (Serial.available()) {
    String fromComputer = Serial.readStringUntil('\n');
    // Send the computer's message to the E32 module
    E32Serial.println(fromComputer);
  }

  // Add a delay to prevent overwhelming the serial buffer
  delay(100);
}

shows no output.
Arduino Mega: RX1 -> Level Shifter (High) RX1
Arduino Mega: TX1-> Level Shifter (High) TX0
Arduino Mega: 3.3V to left hand rail , first hole to input it in (top left hole) (+ve rail)
Arduino Mega: 5V to right hand rail , first hole to input it in (top left hole in the rail) (+ve rail)

Arduino Mega: GND to left hand rail, bottom right hole (-ve rail)
Arduino Mega: GND2 to right hand rail, bottom right hole (-ve rail)

E32 : TXD -> Level Shifter (Low) RX0
E32 : RXD -> Level Shifter (Low) TX1
E32: VCC -> Plug under Arduino Mega 3.3V left hand rail of breadboard (+ve rail)
E32: GND-> Plug above Arduino Mega GND left hand rail of breadboard (-ve rail)

Level shifter: HV (5V) -> 5V rail ( plug under input power plug from mega)
Level shifter: GND (5V) -> 5V rail ( plug aboce output GND plug from mega)
Level shifter: GND (3.3V) -> 3.3V rail ( plug aboce input power plug from mega)
Level shifter: GND (3.3V) -> 3.3Vrail ( plug above output GND plug from mega)

My level shifter has no plugs labelled HV or LV, but instead has HV TX0, RX1 for high volt and LV TX1, RX0 for low volt.

Update: Using radiohead, the radio driver cannot initiliase. I imagine the issue is something to do with my wiring but I cannot see the issue.

you don't appear to have connected the M0 and M1 pins which control the operating modes - see LoRa_E32_Series_Library
try a web search for Arduino E32 - there are a number of links which may help
if you have any 3.3V logic devices (e.g. Arduino Due, ESP32, ESP8266, etc) it would simpler to switch from the Mega and get rid of the level shifter - reduces the number of connections and hence possible problems

Edit: at a minimum ground the M0 and M1 pins - the documentation states
UART and wireless channel is good to go

Post a link to technical data on your level shifter.

It is a duinotech level shifter
download

Thanks, I have not seen that one before. It appears you have it properly wired, do you have access to an o-scope

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