Arduino BUZZER

I have arduino robot and all pwm pins used.(D2..D13)
I want to use buzzer for startup . I can be simple tone.
Can i use analog pins for buzzer or which type buzzer use active or passive?


Any idea for this problem?

Buzzers are less than US$1. Wire one of those up? Hit it with 5v from any pin. It'll make noise.




It's easier to use a buzzer that's internally driven - it has it's own oscillator circuit built in - particularly if you've used up all the PWM pins. The analog pins will work fine. Just use the same code you would use with a digital pin (pinMode, digitalWrite).

The analog inputs are actually digital pins with analog input as a special function. And like any digital pin must be set to pinMode(pin, OUTPUT) to control a buzzer.

Hello. Active piezo buzzer has the onboard circuitry to drive the noise when a power is applied. PASSIVE piezo buzzers are the stripped down version of active buzzers, without the circuitry to drive the noise. Passive buzzers require additional external circuitry, otherwise you will only hear a "CLICK" when power is applied and then removed. You can make fun noises and different tones with a passive piezo buzzer, but will probably need to be driven with a transistor if you want to hear a volume that needs to actually be an alert of some type in a room that is not absolutely silent.