piezo buzzer question

hey peeps!
arduinofreaklol here!

i have a project that i want to make:

i need a piezo buzzer to make a quiet buzz and a potentiometer to change the sound and volume of the buzzer.

the piezo buzzer is supposed to make a soft, quiet buzz until the potentiometer is twisted to the right. if the buzzer is in this stage and the potentiometer is twisted left, nothing is supposed to happen. if the buzzer is in this stage and the potentiometer is twisted to the right, then the pitch of the buzz is supposed to rise, making the sound higher and louder.

i am sorry if that was complicated, but i have no idea how to program it to do that, or what the circuit is!

:frowning:

can you help me?

arduinofreaklol

Start with the "tone" examples in the Arduino IDE.

Have you been able to read a potentiometer and display the reading?

Be aware that "HELP ME FAST!!!!!" Will immediately stop some people reading or replying as most of the time there is no need for urgency supplied.

You are guilty of this. What is the need for urgency that you scream in the title?

Weedpharma

What is the need for urgency that you scream in the title?

Homework is due TODAY, of course.

There are 2 types of devices referred to as piezo buzzers.

One type emits a fixed tone when a voltage is applied whilst the other needs to have its pins driven with a voltage turning on and off at the required tone frequency. Which type do you have ?

ok

i do not really know how to use a potentiometer :frowning:
(sorry)

do you peeps know how to do what this post is asking?
(because i do not)

i need an example or something!

the point is:
i want the potentiometer to change the volume of the piezo from loud(which it's supposed to start at) to no sound at all, gradually softening until no sound is heard. i also want the potentiometer to do the oppisite then twisted the opposite direction.

do any of u peeps have some code and the circuit for something like this???

thx and plz help
arduinofreaklol

arduinofreaklol:
do you peeps know how to do what this post is asking?
(because i do not)

LOL

You are such a freak!

You wrote:
PLEASE HELP ME ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
nearly two weeks ago and got answers the same day in this thread.

Now after nearly two weeks you are telling us that you have problems in understanding an answer.

If you need help "ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" as you told us in a rude and most impolite way with all capital letters and a huge amount of exclamation marks, why didn't you ask earlier?

If you don't know anything, I'd suggest (and I do it in a way you seem to prefer):

LEARN THE BASICS OF ARDUINO PROGRAMMING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Ok guys!
Good news!

I figured out the potentiometer and know how to work it and the piezo! (YAY!)
The only question left is:
How do change the volume on the piezo?
I know how to make it make noises but not how to make the noises loud, regular, quiet, etc.

Can you help me?

arduinofreaklol

Did we ever establish whether you have an active or passive piezo ?
How about you post the code that you already have showing the use of the pot and the piezo ?

arduinofreaklol:
How do change the volume on the piezo?
I know how to make it make noises but not how to make the noises loud, regular, quiet, etc.

Can you help me?

Looks like the topic has changed from "PLEASE HELP ME ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" into "piezo buzzer question". Well done!

How are you "make noises" now?
Are you using the tone() function and a passive piezo to create different frequencies?

The tone() function always creates square wave output with maximum volume.

If you need a higher volume, there is just one solution: Use an amplifier to amplify the audio signal!

If you need a lower volume, you have two possibilities:

  • hardware (easy)
  • software (complicated)

A hardware volume control would just consist of a series resistance to the piezo: Put a resistor (fixed volume) or a potentiometer (adjustable volume) in series to the piezo.

Software volume control would be much more complicated, as you'd have to use a completely different method of creating sound. Perhaps something like Direct digital synthesis - Wikipedia