Offline
Newbie
Karma: 0
Posts: 24
|
 |
« on: December 24, 2012, 11:10:47 pm » |
Hi I'm building game show buzzers and i want to have a buzzer noise. How can I do this? I will be attaching a small speaker to my arduino through one of the digital pins. Will the ffunction tone work?
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 90
Posts: 9401
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #1 on: December 25, 2012, 08:53:23 am » |
Will the ffunction tone work? have you tried it? be aware that 8 ohm speakers can result in more current in a pin than an Arduino can handle! Have you considered a wave-shield, with mp3 files, you can make as many sounds as you like: - per player - per round - depending on the score etc.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #2 on: December 25, 2012, 08:59:59 am » |
I really don't want to buy a shield because I want to keep this project cheap. Is there a speaker that you rrecommend me using?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #3 on: December 25, 2012, 09:04:16 am » |
A piezo beeper or buzzer driven near its resonant frequency is (1) quite loud, (2) inexpensive, (3) suitable for being driven from an arduino output pin with a small resistor, and (4) works well with tone() and notone(). Available everywhere, for example: https://www.sparkfun.com/products/7950?-br
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #4 on: December 25, 2012, 09:32:09 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 90
Posts: 9401
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #5 on: December 25, 2012, 10:50:59 am » |
no experience with that one. You might take a look at shieldlist.org
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #6 on: December 25, 2012, 06:48:25 pm » |
oh will the piezo buzzer work? ive seen people talking about the PIEZO buzzer http://www.a1parts.ca/buzzers/buzzers.htm
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
God Member
Karma: 37
Posts: 974
Get Bitlash: http://bitlash.net
|
 |
« Reply #7 on: December 25, 2012, 06:53:53 pm » |
You need to keep the current drawn from the arduino IO pin under 20ma. A couple of the items on that page require higher current and therefore would not be good candidates for a direct connection. There is a piezo buzzer there that should work, but you can't really tell how loud that 75dB is going to sound until you try it.
-br
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #8 on: December 25, 2012, 08:33:21 pm » |
Thanks, will check out the piezo buzzer
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #9 on: December 25, 2012, 10:16:07 pm » |
Oh also, can I connect the piezo to any pin or does it have to be digital? Analog?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Newbie
Karma: 2
Posts: 30
|
 |
« Reply #10 on: December 27, 2012, 10:36:53 am » |
Oh also, can I connect the piezo to any pin or does it have to be digital? Analog?
It believe from reading tone.cpp that any pin will work as it seems to use frequency modulation - but a more informed expert may correct me if I'm wrong :-) Note that use of the tone() function will interfere with PWM output on pins 3 and 11 (on boards other than the Mega) (according to this).
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 5
My robots solder for me!
|
 |
« Reply #11 on: December 29, 2012, 06:08:00 pm » |
There are different kinds of piezo beepers/buzzers. Some don't have an internal driver circuit, and must be given pulsed DC or AC, like a normal speaker. These use very little current, and should have a series resister with it. These can be powered by an arduino I/O pin. However, many piezos have a driver circuit built-in, so they run on DC. These probably use more current than an arduino can give through an I/O pin. In general, it is a good idea to look at the datasheet to see what kind of piezo it is. Hope this helped. 
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 24
|
 |
« Reply #12 on: December 29, 2012, 07:27:36 pm » |
The specs of the Piezo buzzer are this: Current: 2mA Sound output: 75db @ 10cm Frequency: 4KHz Do i need a resistor? or can i just hook it up directly?
|
|
|
|
|
Logged
|
|
|
|
|
Indiana, US
Offline
Full Member
Karma: 12
Posts: 161
|
 |
« Reply #13 on: December 29, 2012, 07:48:22 pm » |
Hi Evil^3,
Recently, I built a similar game show buzzer and spent a considerable amount of time finding the right "sound" and loudness for my bell and buzzer (I use both).
I'd like to tell you what to use, but it really comes down to your specific application. I didn't like any of the piezos I bought - they sounded wrong, so I decided to use a real buzzer. I tried a few different ones from Radio Shack before I settled on the one I did.
Other criteria to consider include whether the buzzer is inside the chassis (probably), and how loud is loud enough in a muffled and confined space, and how loud is too loud and obnoxious.
I used a teacher's desk bell for my bell, and "dinged" it with a solenoid.
On the software side, what does your logic look like? I allow other players to buzz-in if the 1st player gets the answer wrong. The selections are queued up in the order they come in and the "next" player's light indicates who's up next if the host presses the NO button. It took me quite a while to converge on the "business logic" for the software. Also... What are you planning to use for the chassis? I looked everywhere before finding the right look.
Good luck - I'm really interested in seeing what you end up doing on this!
Pat.
|
|
|
|
|
Logged
|
There are 10 types of people in the world, those that understand binary, and those that don't.
|
|
|
|
|