Hello,
I was about to do a simple exercise to answer a post and explain a few things about the ESP32 sleep modes… but as soon as I plugged the board into the USB port, my enthusiasm ran out :-/
I guess I must have done something stupid… but I don’t know what it was…
If someone can help me, that would be really nice. So, here’s my initial wiring:
Here’s a zoom on the apparent damage:
The anodes of the LEDs are wired to the following pins:
- GPIO27: red LED
- GPIO25: yellow LED
- GPIO32: green LED
The button is wired to GPIO34 with a pull-down resistor of 10 kΩ.
As soon as I plugged the board in, I felt like a warm-up that happened gradually. I figured something must have been wrong with the power supply for the push button and the sensor pin (GPIO34). So I unplugged the USB port, and then I also unplugged the red cable from the 3.3V pin of the ESP32.
When I plugged the USB port back in, I got a nice fireworks with lots of sparks. It all happened very quickly. But in the end, I noticed that a component had literally burned out (I don’t know what this component was by the way). And needless to say that my board is probably dead…
Luckily, I have 2 others, but I don’t dare to plug anything anymore so as not to risk to burn another one !!!
Does anyone see an obvious mistake on my part?? Or was there a manufacturing defect on my board?
Hi Stephane,
In general, it’s usually safer to always use a pull-up between power and an input pin to limit current. It’s OK to ground an input pin. (Assuming the IO pin is programmed correctly as input)Â For output pins, always use a current limiting resistor to ensure your not running a high output directly to ground or setting a pin low that is tied directly to power. Hope this helps.
Hi Stéphane.
I’m sorry for that issue.Â
Looking at your circuit, everything seems to be fine. And considering that your USB cable was providing 5V, I can’t see why that would have happened.
It seems that the Voltage regulator AMS1117 may also be damaged due to its color.
There probably was a short-circuit somewhere, but where and how? I don’t know.
I use ESP32 boards for a long time and that never happened to me.
Is your USB cable in good condition?
Regards,
Sara
Hey guys,
Thank you both for your answers.
I think I understand the usefulness, and the necessity, of placing a resistor in series, whether in pull-up or pull-down between the microcontroller and the power supply or ground. And Sara confirms that I didn’t screw up my wiring. However, when my board burned out, the button was not pushed, so the switch was open! That is to say pin GPIO34 was connected to ground through a 10 kΩ resistor.
The diagram above shows a supply voltage of 5V but it should be read considering that it is indeed 3.3V on the ESP32.
So one of two things:
- Either the pin was configured as an input pin, in which case the signal received should have been LOW, and I don’t see what could have created a short here.
- Or the pin was configured as an output pin, in which case the sent signal could potentially be HIGH, in which case the potential difference with ground should have been 3.3V (assuming that the regulator does its job), so the current intensity could not exceed  330 µA.
The fact is that to make this circuit, I used a brand new ESP32 DevKit board. And in my haste, I didn’t bother to reset its firmware before plugging in the whole circuit. I don’t know in what state these boards are delivered when I buy them. But, in any case, assuming that pin GPIO34 has been set as an input or output pin, I still don’t understand what could have gone wrong…
I can only bring myself to think that it probably had a manufacturer defect…
Well, I finally used another board and I reconfigured my circuit with 2 buttons this time, applying the same reasoning regarding pull-down resistors. And this time, everything works fine:
I will finally be able to tackle the little demonstrator I wanted to make to differentiate the ESP32 sleep modes for another reader of the forum.
Thank you both again,
Regards,
Steph
Hi Steph.
Thanks for your detailed description.
As I’ve told you, it is very difficult to figure out what might have caused the issue. It could have been a defect in your board, but I don’t know. I have many ESP32 boards and that never happened to me.
I’m sorry that I can’t help much about this issue.
Regards,
Sara