I have an ESP32 pin driving a green SMD 0805 led through a 220R resistor.
It is set to pulse, but the led is leaking to ground and making a piezo on a different pin slightly pulse/operate.
I replaced the LED, but same issue. If I remove the LED, the issue goes away.
If I remove the ESP32 and directly operate the pin on the pcb with +3.3v (no processor) with a link wire, I get the same effect. It is definitely the LED that is causing the leakage.
Please post a schematic showing all parts and how they are connected, with special attention to where power is coming from and how it is provided to the parts that need it.
Hand drawn take a picture and post it is fast and easy.
If you replace the led, it slowly dies a death, and the piezo slowly starts beeping via a ground 'backfeed'.
I just put in a 5mm LED and tried again. It did the same, but this time the led didn't die.
So, just tried replacing the 0805 220R resistor with a 1/4w dip version.
See what happens now, but I am wondering if that was breaking down? Bit lost here to be honest.
The trace on my PCB is the default 0.1mm, but it only runs about 3cm which I didn't think would be an issue. At 1oz trace, I think that 'maybe' adds 60r to the resistance?
Not designed many pcbs, so not sure really.
Surely if the resistance is higher that should not be an issue? 3.3v @ lets say 2.2v across the led (old stock... not sure of the forward voltage). Even if the trace added 100r, then with 330r isn't that about 3.3mA through the LED?
Shouldn't be anywhere near the 40mA limit of the ESP32 pin (and nothing else is being driven)
Decent quality Meanwell enclosed PSU (I always use those). Supply seems fine.
Optically isolated inputs seem to work fine.
Oled works fine
The 2x Servos work fine. They have their own dedicated Meanwell 5v 5A psu and the 0v rails are linked.
Blue led should pulse with the onboard ESP32 led once a second using a millis timer.
Piezo beeps once at boot (sorry - code isn't to hand).
All ran fine for 6-7 hours, then I noticed the piezo had started to faintly beep once a second with the pulsed led.
Finally, the external led died. Servos, buttons and Oled still worked fine. ESP32 still running OK.
Changed the 0805 led. Died even quicker.
Changed the led to a 5mm. Didn't die, but the piezo beeped along with it.
Tried a 1/4w 220r resistor on the led. Same outcome, it just died.
Take the LED out of circuit.... problem goes away.
ESP32 seems fine (onboard led flashes fine) when secondary led is in place.
PCB tests fine. No shorts. approximately 60r resistance on the pcb track between IO2 and the led resistor.
No... it shouldn't be happening! yes, both declared as outputs. This is a super simple circuit so I am not sure what the issue is.
With the ESP32 out, no resistance between pins 3&4
I have a top and bottom ground plane. I am suspecting a slight pcb track 'leakage' to ground or something. It's a JLCPCB... I have found their quality to be a bit hit 'n' miss
What do you imagine under "LED leaking to ground"? How can anything related to the LED activate the piezzo? When one end of the piezzo is grounded and the other is driven by low impedance of the ESP pin?