I connected the ESP to multiple Arduino Nanos via a bi-directional level converter (3,3V/5V).
The circuit is supplied by a 5V PSU to which the Arduinos are directly connected to.
The ESP is supplied by a module holding a AMS1117 to get the 3,3V.
All microcontrollers are powering up but when I read the serial output of the ESP I only get garbage.
Now you would say "maybe it's the baud rate" but it all works correctly without touching any software part when I disconnect the 5V PSU and power the circuit by attaching a USB cable to one of the Arduinos and plug it into my computer. That's how I powered the circuit before and did not notice the problem.
I thought that maybe the ESP does not get enough power and the tx is behaving incorrect because of that but when I use the 5V PSU I measure exactly 3,32V on the VCC/GND pins of the ESP.
Is there any other explanation?
Maybe my circuit is just wrong?
This is a rough picture of the circuit with just one Arduino.
Are you using the USB to power the ESP? I found the serial port shared pins with the USB. To get output to the serial monitor I had to switch over to serial2 which only outputs.
In my use of the ESP32, when the ESP32 does the WiFi thing, there is a current spike that some power supplies cannot handle. I'd start with a electrolytic cap as close to the ESP as possible and a 103 ceramic cap. I, typically put the caps on the 3.3V pin.
Next, I'd look to the power supply, some are not able to do provide for the WiFI's current demand.
The ESP is an ESP8266-01S with no USB. The USB port is on the Arduino and I'm reading the TX on the ESP.
The two caps in the schematic are one large electrolytic cap and one faster ceramic to get around the spikes.
What is the purpose of the ESP? If it's just to connect the Arduino to WiFi, why not just use a board that already has WiFi, like the Wemos D1 Mini or NodeMCU?