0

While using a 3.3v Pro Mini & Wemos mini to communicate via Serial was successful, when tried with a 5v Pro Micro it fails.

To overcome different logic level I used a 10K + 20K resistors to lower Pro-Micro's 5v to 3.3v successfully to Tx and Rx pins. Also since they are on the same PCB, GND pins are connected and RAW to 5V at wemos mini is also connected. At the moment, it is powered up using MCU's USB input ( tried to connect to Pro-Micro only, Wemos Only, and both ).

Schematics What might be the problem ?

13
  • It sounds like you have tried to put level shifting on both the TX and the RX pin. You want it only between the Arduino's TX pin and the ESP's RX pin. Not between the ESP's TX and Arduino's RX.
    – Majenko
    Feb 27, 2021 at 15:37
  • 1
    Yes, I thought you might have. ESP TX to Arduino RX needs to be a simple wire, nothing more.
    – Majenko
    Feb 27, 2021 at 15:39
  • 1
    Also you may find that your resistors are too high value. I use 1k/2k.
    – Majenko
    Feb 27, 2021 at 15:39
  • 1
    For I2C you really want an active I2C level shifter. I2C is not push-pull like serial, but open drain. However you can probably just ignore it since the Arduino's internal pullup resistors will limit the current to such a tiny amount that the ESD diodes in the ESP8266 won't care (and there are somewhat unsubstantiated rumours that it's 5V tolerant anyway).
    – Majenko
    Feb 27, 2021 at 15:49
  • 1
    @Majenko - Wrongly jumpered the Rx @ Pro-Micro. Now when Tx is has 10K and 20K and Rx is connected directly + Juraj's Serial1 - Problem is now SOLVED
    – guyd
    Feb 27, 2021 at 19:28

1 Answer 1

2

You don't need a logic level conversion between 5 V Micro Arduino and 3.3 V Wemos D1 mini. The 5 V ATmega 328p reads 3.3 V as HIGH and the esp8266 can tolerate 5 V logic level for tests. For long term connection you can add logic level conversion with a voltage divider to convert the 5 V of ATmega TX to 3.3 V of esp8266 RX.

RX/TX pins on Arduino Mini are Serial. RX/TX pins on Arduino Micro are Serial1. Serial is only USB on Micro.

9
  • But it has Tx and Rx actual pins, which are use Serial.begib(9600) the same way
    – guyd
    Feb 27, 2021 at 16:15
  • This I know. Does it change Majenko’s answer?
    – guyd
    Feb 27, 2021 at 16:22
  • @Guy.D, the logic level difference is not the problem. so I guessed you used the same sketch with Serial for Mini and Micro, instead of using Serial1 for Micro. you don't need to use level shifting for a test.
    – Juraj
    Feb 27, 2021 at 16:28
  • yes, same code was used.
    – guyd
    Feb 27, 2021 at 16:32
  • @Guy.D, then I guessed right and that was the problem. for Micro use Serial1 to communicate with the Wemos
    – Juraj
    Feb 27, 2021 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.