How to Handle Active Buzzer with Arduino

Sometimes we need an indicator that indicating status of our appliance / system. For some reason the visual indicators can’t be used, for example, in standard IPxx (ex: IP56, IP65, IP67 etc.) box that must be water proof and dust proof, it’s very difficult and expensive to attach visual indicator. I think it’s possible to made but must a big factory not a DIY maker like us J. Or another case, our instrument is in environment that’s too far away to be seen or dark for naked eye. Well, if you meet these situations, sound indicator can be your solution. The sound indicator can increase the resale value of your instrument or at least look more professional and easily troubleshoot in case of equipment failure.


For this sound indicator you can use a 'buzzer' or ‘tweeter’, which is a kind of electric current modifier transducer into human-audible frequency (20 Hz - 20 KHz). Buzzer sounds can only be monotone, but by adjusting frequency of the incoming voltage to the buzzer pinout, you can issue a simple melody with this component. There are two kinds of buzzer available on the market, namely passive and active buzzer. Both of them is very cheap.

Arduino - Active Buzzer Experiments

If using passive buzzer, we must use additional circuit, i.e. a transistor current amplifier and a resistor on its basis. If our system is a complex circuit, it will spend an additional PCB space and make it difficult to manufacture PCB layout. Well, the solution you can use is using an active buzzer that can be directly connected to Arduino’s digital pin. Buzzer active has a current amplifier in its internal circuit, so we can immediately wired to the Arduino digital pin that only has current sink of 10 mA.


Handle active buzzer with Arduino is fairly easy. Try to open example sketch in File-Example-Basic-Blink in Arduino IDE menu (download in arduino.cc if you do not have one). Then connect the buzzer’s longer pinout to Arduino pin 13, and the shorter one to pin Ground (GND). Upload the sketch and listen, the buzzer will sound once every 1 second.



If you want more fun again, now try opening example sketch in File-Example-Digital-toneMelody menu. Connect the active buzzer longer pinout to Arduino pin 8, while the short one fixed at Arduino GND pin. Shortly after uploading to the Arduino sketch, listen to the 'music' that came out of the buzzer. It's fun, isn’t it? You can either advance the sketch by issuing a more varied tone for your project.
Previous
Next Post »