Hi, I want to ask about ESP32, especially about connecting ESP32 to WiFi.
I previously had no problem connecting ESP32 to WiFi or mobile hotspot, as long as the power source of ESP32 is obtained from USB. The problem is when the power source is not using USB, such as a power supply, ESP32 cannot connect to WiFi.
I have also tried using ESP8266, and the results are quite satisfactory. With or without using USB, ESP8266 can connect to WiFi. But a different thing happens with ESP32 as I explained earlier.
Has anyone experienced this before? If anyone knows something about this, please help me.
What kind of power supply (voltage and current). Which ESP32.
How did you connect the supply to the ESP32.
The easiest way to power an ESP32 board is with a 5volt cellphone charger, connected to the USB port of the ESP. Make sure you use a quality USB lead, because an ESP32 can use higher peak currents than an ESP8266.
I assume your code doesn't have while(! Serial) in setup.
Leo..
I use DOIT ESP32 Devkit V1 with ESP-WROOM-32 Module. The power supply I use is ONGLAI FIXTOOL PS305DM, it is a power supply that can be adjusted voltage.
To connect the source voltage to the ESP32 is to connect the + pin on the power supply to the VIN pin (in my case using 5V) or 3V3 (if I use 3.3V) and the - pin to the GND pin.
Well, I don't know about this. When I try to connect the ESP32 to the power supply, the power supply display always shows 93mA. I tried turning the knob of the electric current, but the result is still 93mA.
I don't have user manual for your power supply, but I expect you regulate the current like this:
Disconnect the leads from Esp and short them together. You should now have LED on cc.
Adjust the current to 1.00A. Separate the leads and adjust voltage to 5V.
Connect to Esp (VIN).
Hi, don't know if you fixed this issue, but I had the same problem. It occured to me that - very superficially speaking - the only difference between a regulated power supply and plugging in a USB-C is the grounding. Sure enough, when I connect a wire from the outer casing of the USB-C to the ground on the ESP32, the WiFi connects. I can't seem to replicate this on another board so perhaps it's a manufacturing problem....
I guess that as it's a dev board, we should expect little gotcha's like this.
Don't limit the current.
An ESP draws that 93mA constantly, but peak currents during WiFi trafic can be >400mA.
Ifyou restrict supply current, then you will likely have issues with WiFi.
Leo..
Don't limit your current, as @Wawa says. Most devices will only draw the current they require (ofc LEDs and such do need current limiting resistors though). It's up to you to ensure the power supply of your choice can tolerate the amount of current your devices require at peak, times about 1.5 for overhead.
I see your power supply is set under 5V. If connecting to the VIN pin, I think you want to use 6V.
Another way would be to convert one end of your power supply wires by splicing into the +5V and GND wires of an old USB plug and using that via the ESP USB-C jack.