So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Voidable
#70748 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.
User avatar
By Barnabybear
#70753 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.
User avatar
By Voidable
#70772 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?