Pages: [1] 2   Go Down
Author Topic: Loudest speaker that I can drive with Arduino?  (Read 2902 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 254
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to install a bunch of audio synthesizers (see Auduino) in an art installation, using various kinds of sensors to make noise, and would like to find out how loud of a speaker I can power using only the Arduino, and no external amplifier or circuitry.

In the past, I have used 8ohm, .5W speakers (not piezo, more like this http://www.sparkfun.com/products/9151). In small, quiet rooms, they worked *okay*, but in the gallery with lots of people scuffling around and talking, it might not work too well.

If need be, I can probably run multiple Auduino's through a cheap mixer and patch them all into a single sound system, but then people might be a little more confused about which sounds are coming from which devices.
Logged

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 241
Posts: 24470
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
In the past, I have used 8ohm, .5W speakers
How did you drive them?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2487
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Theoretically, you can't get more power, than state by Ohm Law:
P = R x I^2 / 2 = 8 x 0.04 x 0.04 / 2 = 6.4 mW.
It sounds a little louder than that due presence high harmonics components and high efficiency
speaker on middle frequency range.
To drive more power you have to amplify current, using at least one transistor TIP120,
and simple schematic: http://www.techlib.com/electronics/graphics/classa1.gif
You can make it even more simple, with one resistor between arduino output and base of transistor and speaker in collector circuitry.

 

Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 5
Posts: 989
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

my only experience with this was making a sound effect for a pumpkin one Halloween.  I used a small external speaker/amp that was left over from something.  maybe you could find a few battery powered mini-amps.

http://www.radioshack.com/product/index.jsp?productId=2062620 might be one to try.
« Last Edit: July 15, 2011, 06:35:30 pm by bill2009 » Logged

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 254
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@AWOL - by plugging them directly into the Arduino, just like the website suggests: http://www.arduino.cc/en/Tutorial/Tone

@Magician: I might give that a shot, I think i've built simple amplifiers like that before in an electronics class, and they worked very well. We definitely used TIP120s there. Thanks!

@bill2009: Definitely a good option, but we're thinking of making between 10-20 of these devices, so the price starts to climb up there with even cheap external amps. But if the home-made amp idea from magician doesn't work, we'll scale back and check those things out. thanks!
Logged

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 254
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to order this speaker from MPJA, but I see it is a 4 ohm speaker. The schematic posted shows different resistors for different speaker impedances, but doesn't mention 4ohm. How can I calculate the required resistor value?

Speaker: http://www.mpja.com/prodinfo.asp?number=14618+SP
Logged

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2487
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Schematic has negative feedback implemented in it, so it's not really affected by changes in R of load, and resistors don't have to be adjusted.
 The same time, it'd make sense to decrease value of both resistors to 10 - 50 k ohms, in order to get more power with less distortions for more powerful speaker.
Logged

0
Offline Offline
Sr. Member
****
Karma: 2
Posts: 254
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm expecting this speaker to be .5W, will a reduction in both of the resistors result in too much power for that rating?

Edit: On a related note, *should* I go with a 1W-2W speaker, or would a .25W or .5W speaker be easily audible in a casual crowd indoors?
« Last Edit: July 16, 2011, 02:09:27 pm by h4t » Logged

Grad student, creative technologist, OSHW engineer
http://jason-webb.info

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2487
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As amplifier shown on schematic is class A, it will provide maximum undistorted output power when voltage distributed equally, between transistor and speaker.
 Vp / 2 = 2.5 V
And electrical power dissipated in speaker coil:
 P = U^2 / R = 1.56 W
This value should be less than speaker is design for. In other words, optimum balance voltage 2.5 V is "out of reach" for speaker with less than 2W  power.
Summing all this up, resistors  have to be adjusted not according R of speaker (4/8/16 Ohm)
but rather wattage of available speaker.
Exact formula to calculate resistors is little bit complicated, approximate values for 0.25 W:
25 k (upper) and 10 k (lower), and 10 k and 10 k  for 2 W speaker.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23860
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That is a very nice speaker, I drive it from a 12V supply with a MOSFET controlling the switching.
You should be able to get 6W from it, with an amplifier like this:
Adjust the 68 ohm for the volume  you want with a 5v supply,
and a logic level MOSFET
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=RFD3055LE-ND
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23860
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
And here are the code pieces that I make a cellphone like warble with.


[code]
// info on alarm sound
 #include "e_pitch.h"

// notes in the melody to play when a touch is scored:
int thisNote = 0;
int noteDuration = 0;
int pauseBetweenNotes = 0;
int melody[] = {
NOTE_B5, NOTE_G5, NOTE_B5, NOTE_G5, NOTE_B5, NOTE_G5, NOTE_B5};
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
12,12,12,12,12,12,4};
Within loop, if a sound is to be made then buzzer is set to 1:
Code:
***********************************************************************************************
  // Buzzer section - connect pin D17 to speaker driver
  // ***********************************************************************************************

if ((buzzer == 1))  // code above started buzz
  {
    buzzer = 0;  // reset for next pass thru
    // use ledPin for feedback for now
    //digitalWrite(ledPin, LOW);    //LED on
    // create a warble once
    for (thisNote = 0; thisNote < 8; thisNote++)
    {
      // to calculate the note duration, take one second
      // divided by the note type.
      //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
      noteDuration = 1000/noteDurations[thisNote];
      noTone(17);       //apparent known bug - need this for the tone to play next.
      tone(17, melody[thisNote],noteDuration);
      // to distinguish the notes, set a minimum time between them.
      // using the note's duration + 10%:
      pauseBetweenNotes = noteDuration * 1.10;
      delay(pauseBetweenNotes);
      // stop the tone playing:
      noTone(17);
    }
  }
include this, I have it as a tab in the IDE called e_pitch.h
probably just need the notes actually used
Code:
/*************************************************
 * Public Constants
 *************************************************/

#define NOTE_B0  31
#define NOTE_C1  33
#define NOTE_CS1 35
#define NOTE_D1  37
#define NOTE_DS1 39
#define NOTE_E1  41
#define NOTE_F1  44
#define NOTE_FS1 46
#define NOTE_G1  49
#define NOTE_GS1 52
#define NOTE_A1  55
#define NOTE_AS1 58
#define NOTE_B1  62
#define NOTE_C2  65
#define NOTE_CS2 69
#define NOTE_D2  73
#define NOTE_DS2 78
#define NOTE_E2  82
#define NOTE_F2  87
#define NOTE_FS2 93
#define NOTE_G2  98
#define NOTE_GS2 104
#define NOTE_A2  110
#define NOTE_AS2 117
#define NOTE_B2  123
#define NOTE_C3  131
#define NOTE_CS3 139
#define NOTE_D3  147
#define NOTE_DS3 156
#define NOTE_E3  165
#define NOTE_F3  175
#define NOTE_FS3 185
#define NOTE_G3  196
#define NOTE_GS3 208
#define NOTE_A3  220
#define NOTE_AS3 233
#define NOTE_B3  247
#define NOTE_C4  262
#define NOTE_CS4 277
#define NOTE_D4  294
#define NOTE_DS4 311
#define NOTE_E4  330
#define NOTE_F4  349
#define NOTE_FS4 370
#define NOTE_G4  392
#define NOTE_GS4 415
#define NOTE_A4  440
#define NOTE_AS4 466
#define NOTE_B4  494
#define NOTE_C5  523
#define NOTE_CS5 554
#define NOTE_D5  587
#define NOTE_DS5 622
#define NOTE_E5  659
#define NOTE_F5  698
#define NOTE_FS5 740
#define NOTE_G5  784
#define NOTE_GS5 831
#define NOTE_A5  880
#define NOTE_AS5 932
#define NOTE_B5  988
#define NOTE_C6  1047
#define NOTE_CS6 1109
#define NOTE_D6  1175
#define NOTE_DS6 1245
#define NOTE_E6  1319
#define NOTE_F6  1397
#define NOTE_FS6 1480
#define NOTE_G6  1568
#define NOTE_GS6 1661
#define NOTE_A6  1760
#define NOTE_AS6 1865
#define NOTE_B6  1976
#define NOTE_C7  2093
#define NOTE_CS7 2217
#define NOTE_D7  2349
#define NOTE_DS7 2489
#define NOTE_E7  2637
#define NOTE_F7  2794
#define NOTE_FS7 2960
#define NOTE_G7  3136
#define NOTE_GS7 3322
#define NOTE_A7  3520
#define NOTE_AS7 3729
#define NOTE_B7  3951
#define NOTE_C8  4186
#define NOTE_CS8 4435
#define NOTE_D8  4699
#define NOTE_DS8 4978
[/code]
« Last Edit: July 16, 2011, 09:01:01 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3538
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Back in the day, nothing beat a Klipschorn at about 105 dB/watt.  Not sure whether that's been equaled or surpassed.

Sorry, couldn't resist the image of connecting an Arduino to one smiley-lol
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16565
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Back in the day, nothing beat a Klipschorn at about 105 dB/watt.  Not sure whether that's been equaled or surpassed.

Sorry, couldn't resist the image of connecting an Arduino to one CD

Nope, still the most efficient SPL/watt transducer available even after many decades. However they are huge in size, have a rather sharp sound and have always had a rather small but loyal following.

Lefty
« Last Edit: July 17, 2011, 01:59:08 am by retrolefty » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Nearly two years ago, my KLF-20s were destroyed in a toilet flood.  Oh, I miss those wonderful speakers.  smiley-cry
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23860
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You must have had great sounding showers to start the day smiley-wink
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1] 2   Go Up
Jump to: