logoalt Hacker News

bsolestoday at 3:19 AM1 replyview on HN

Driving a buzzer directly from the GPIO pin will probably fry the output port if the buzzer draws anything more than about 20-50 mA.


Replies

duskwufftoday at 5:21 AM

Small piezo beepers typically don't draw much current. The article doesn't say what part they're using, but a datasheet for a typical piezo beeper [1] says it draws 12 mA at 12V - and much less at 3.3V, which is what this device is operating at. So it's probably going to be fine, especially since it's only running the buzzer for <50 ms at a time.

[1]: https://www.mouser.com/datasheet/3/6118/1/cpe_350a.pdf