Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 226
Posts: 14106
Lua rocks!
|
 |
« on: August 30, 2011, 05:02:46 am » |
I got a few of these 0.25 W speakers: http://www.nkcelectronics.com/Thin-Speaker_p_236.htmlAfter a bit of searching I found this circuit from CrossRoads:  My electronics knowledge doesn't extend to working out how many watts that would pump through my speakers. Would that kill them? Can I drive (one of them) by just putting (say) a 1 uF capacitor in series with the Arduino digital pin? I just want to beep at various frequencies for a second, not play music.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 101
Posts: 9553
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #1 on: August 30, 2011, 05:23:49 am » |
My electronics is not so good either so I would put an additional potmeter in between and call it volume control 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Online
Faraday Member
Karma: 146
Posts: 4902
|
 |
« Reply #2 on: August 30, 2011, 06:04:37 am » |
If they're 0.25w speakers and their impedance is 4 ohms, then you don't need 12v to drive them. The circuit you gave could damage the speaker when the mosfet turns on.
Driving them with 1v RMS or 2v peak to peak (square wave) will feed them their maximum rated power of 0.25W. So I would use something like the following. Adjust R to get the volume you want - 3 ohms minimum. The transistors could be small power types, e.g. BD439 and BD440, although you can probably get away with using BC327/337 especially if R is significantly higher than the minimum.
EDIT: I see that the speakers you have are not the Gento speaker in the diagram, in fact they are 8 ohm impedance. This means they need 2.8 volts peak to peak to drive them at full power. The circuit I gave is still OK, with R = 2.2 ohms minimum. BC327/337 transistors should be adequate.
|
|
|
|
« Last Edit: August 30, 2011, 06:19:31 am by dc42 »
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
0
Offline
Tesla Member
Karma: 76
Posts: 6849
Arduino rocks
|
 |
« Reply #3 on: August 30, 2011, 10:59:58 am » |
If they're 0.25w speakers and their impedance is 4 ohms, then you don't need 12v to drive them. The circuit you gave could damage the speaker when the mosfet turns on.
Its a small speaker so the current spikes on turn-on could be too large - reducing the 220uF blocking capacitor to a smaller value is wise (perhaps try as little as 1uF at first, then if its not struggling up the value until its loud enough). Adding a series resistor (perhaps 20ohms or so) is series with the blocking cap would also control the spikes when the MOSFET conducts. I suspect this circuit as is would drive a much larger speaker fairly well.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17050
Available for Design & Build services
|
 |
« Reply #4 on: August 30, 2011, 11:55:17 am » |
Resistor values in my circuit were selected to get good volume out of that 94dB rated speaker to be heard clearly in a 40x40ft room full of fencers. I actually have a switch installed to allow two 68 ohms to be wire in parallel for 34 ohm, on series fotr 136 ohm for a hi/lo volume control. My wife says both are too loud 
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Online
Faraday Member
Karma: 146
Posts: 4902
|
 |
« Reply #5 on: August 30, 2011, 12:01:25 pm » |
Its a small speaker so the current spikes on turn-on could be too large - reducing the 220uF blocking capacitor to a smaller value is wise (perhaps try as little as 1uF at first, then if its not struggling up the value until its loud enough).
True, but a lower value capacitor will act as a high pass filter, so that the low notes are much quieter than the high notes. I suspect this circuit as is would drive a much larger speaker fairly well.
The 68 ohm resistor makes it very inefficient and limits the power it can deliver. The maximum voltage it can deliver into an 8 ohm speaker is 1.26 volts peak to peak, which corresponds to only 0.05W. To drive a speaker efficiently, you need active pull-up and pull-down, as in the circuit I suggested, or a transformer. [EDIT: but if you have a wife like CrossRoad's, maybe 0.05W is all you want!]
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17050
Available for Design & Build services
|
 |
« Reply #6 on: August 30, 2011, 12:08:12 pm » |
Well, we do have 6 of them, and when they warble all at once on power on its quite a din! And the beginner fencers are all fascinated with poking their own foot just to hear the buzzer while they wait for their opponent to get ready.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 226
Posts: 14106
Lua rocks!
|
 |
« Reply #7 on: August 30, 2011, 03:45:51 pm » |
Thanks for the suggestions everyone! I have more than one of the speakers so I suppose it isn't the end of the world if one goes. It's only for beeping at an RFID door opening system, it doesn't have to be that loud.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Sr. Member
Karma: 1
Posts: 360
I'm 15. I like making things. I like breaking things better.
|
 |
« Reply #8 on: August 30, 2011, 11:24:30 pm » |
If it only will be a beep, why not use one of those $1 buzzers from radio shack or the like. An audio-quality speaker seems like overkill to me.
|
|
|
|
|
Logged
|
Alice asked the Chesire Cat, who was sitting in a tree, "What road do I take?" The cat asked, "Where do you want to go?" "I don't know," Alice answered. "Then," said the cat," it really doesn't matter, does it?"
-Lewis Carrol
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 270
Posts: 17050
Available for Design & Build services
|
 |
« Reply #9 on: August 30, 2011, 11:30:23 pm » |
He's already got them tho, in Australia, with very expensive shipping 
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 226
Posts: 14106
Lua rocks!
|
 |
« Reply #10 on: August 30, 2011, 11:33:40 pm » |
Well I have the speakers now (they were shipped "in a bunch" with the magnets holding them together).
So whilst I hardly need "audio quality" I am hoping for audibility, and not either blowing up the speaker or the Atmega.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 226
Posts: 14106
Lua rocks!
|
 |
« Reply #11 on: August 30, 2011, 11:45:18 pm » |
Just to report back - I hooked up the speaker in series with a 33 uF capacitor and then a 33 ohm resistor, and connected it to pins 8 and Gnd. Then the toneMelody sketch worked OK.
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Online
Faraday Member
Karma: 146
Posts: 4902
|
 |
« Reply #12 on: August 31, 2011, 03:21:27 am » |
Glad it's working, however if you leave it like that you may damage the mcu because the abs max rated output current per pin is 40mA. 150 ohm instead of 33 ohm would be OK.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
|