Buzzer problems

Hey guys!

Running into a super strange problem. I'm in college and they gave us these little remote control arudino cars to build and program some functions. I'm trying to add a buzzer to it (extra credit lol). I am using the TimerFreeTone Library because I kept running issues with timer1 and timer2.

When I have a sketch that only makes it beep its fine. BUT when I have it running in the car sketch the buzzer is SUPPERRR quiet, like I have to hold it in my ear quiet.

I'm not using any transistors or anything just plugged it into port 0 and gnd. Any ideas?

Which little remote control arudino [sic] cars?

Certainly have an idea. There are active buzzers and passive buzzers. By the description you have a passive buzzer. It requires the driving voltage to create the sound. The active buzzer has an oscillator built in that makes the signal to make the sound.
If your buzzer is passive you will have to use, perhaps, the tone() function. Do a search on the forum for more info. Or Google.


What model Arduino controller are you using?
Pin D0 is usually a programming pin, you should avoid using it for I/O.

Tom... :smiley: :+1: :coffee: :australia:

For testing & debugging try tone(2000). That's assuming you have a passive transducer.

Those things usually have the strongest output at about 2kHz and human hearing is also most-sensitive at around 2kHz.

They are basically "tweeters" so they are useless for low frequencies and not good for making "car motor sounds".

The cheapest ones they could find. LAFVIN is the company

I totally would've gone the tone way but it was conflicting with other required libraries

I swear to you I've tried other ports but it was at 3AM so I tried it now and it works! Strangely though when I used port 0 on a test code to try out the NoTimerTone Library it worked flawlessly.

It ended up being the port I was using.

Thank you everyone for your quick and fast help. Really appreciate it! <3

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.