-->
Page 1 of 2

ESP-01 wont boot with buzzer plugged into GPIO2

PostPosted: Mon Oct 09, 2017 1:28 pm
by Voidable
Hello all,

I'm going to preface this by saying I have almost no experience with electrical projects like this, so if I use the wrong terminology or I'm doing something stupid please bear with me.

I've been trying to hookup an active buzzer to GPIO2 and have the ESP turn it on and off every few seconds as a test. It works fine if I leave GPIO2 un-plugged on boot then plug it in a few seconds later, but if I leave it plugged in at boot I just get a solid tone from the buzzer until I unplug it again.

Looking around I've found sources saying that I need a pull-up resistor as well as sources saying that there is one built in to the board, so I'm not sure what is going on with that. I'm don't really have a solid understanding of how the pull-up resistor helps in this case.

I did try putting a 10k resistor between the 3.3v input and buzzer's positive connection and that also resulted in a solid tone when plugging in the board.

I'm also powering this through the FTDI board that used to program the board, and I don't have a spec sheet for the buzzer. It came in a set of misc electronic parts.

Re: ESP-01 wont boot with buzzer plugged into GPIO2

PostPosted: Mon Oct 09, 2017 6:53 pm
by Barnabybear
Hi, I'm guessing you are attaching the buzzer between the GPIO2 and Ground, this is going to cause problems as GPIO2 needs to be high at boot and the buzzer will pull it low. One way round this is to connect the buzzer between 3.3V and GPIO2, this will pull GPIO2 high. The side effect of this is that with the code you had been running on will be off and off will be on. Just ammend your code.

Re: ESP-01 wont boot with buzzer plugged into GPIO2

PostPosted: Tue Oct 10, 2017 8:32 am
by Voidable
Yes, I was connected the buzzer between GPIO2 and Ground, so that makes sense now as to why it wasn't working. Is it safe to connect the buzzer between 3.3V and GPIO2 though, wouldn't that risk damaging something?

Re: ESP-01 wont boot with buzzer plugged into GPIO2

PostPosted: Tue Oct 10, 2017 8:40 am
by Voidable
Thanks Barnabybear, I tried what you suggested and it works fine now. My only question is, "Is this safe for the board?" My knowledge on this is pretty poor but I feel like there should be a resistor between the buzzer and board when connecting like this. Am I just being paranoid or is there a risk with this?