Could you guys confirm I'm doing this correctly:
One of the digital outputs on the uno to the + in on the breakout board
Ground on the uno to the - in on the breakout board
Positive on speaker to + out. Negative on speaker to - out
Solder potentiometer on breakoutboard vertically in those 3 holes in lower right hand corner for volumn control
get rid of solder in lower right hand of board
Then I can use the tone command to make noises right?
I can't readily find a circuit of the board on the website.
Because this amplifier uses PWM and you propose to generate your signal using PWM, the two PWM frequencies are likely to clash and produce strange effects.
Actually, you are better off to use a driver circuit, such as one of the "lightweight" Motor drivers to directly amplify your PWM and feed it to the speaker (through a capacitor like the one on the breakout board).
Could you guys confirm I'm doing this correctly:
One of the digital outputs on the uno to the + in on the breakout board
Ground on the uno to the - in on the breakout board
Positive on speaker to + out. Negative on speaker to - out
Solder potentiometer on breakoutboard vertically in those 3 holes in lower right hand corner for volumn control
get rid of solder in lower right hand of board
Then I can use the tone command to make noises right?
Thanks,
Stephen
Yes. The inputs are ac-coupled so that's OK - you will need the pot to reduce the gain so that a 5V input
doesnt overload the input.
Schematic is easy to find on sparkfun's site, if you think to search for it!
stephencampbell:
I want to be able to make a beep noise from my arduino. I heard you could damage the pin directly connecting the speaker to the arduino.
Yes, that is why a 100 ohm resistor is added to the speaker.
See this example: http://arduino.cc/en/Tutorial/Tone2
Even with a piezo element it is better to use that 100 ohm resistor.
You don't need an amplifier, with a 100 ohm resistor it will probably be loud enough. If you don't have a 100 ohm resistor, you can use any resistor between 100 to about 470 ohm. Give it a try.
It is even possible to double the loudness with the toneAC library. It uses the same 100 ohm resistor, but uses two (specific) Arduino pins to double the sound level. Arduino Playground - HomePage
Peter_n:
Yes, that is why a 100 ohm resistor is added to the speaker.
Strictly speaking, 100 ohms is incorrect, especially if the output is left in the HIGH state, the current is excessive - 220 ohms is more appropriate. I won't comment on the ToneAC function.
Also, speakers operate better when fed with no DC component, so there should also be a 47 µF capacitor in series - with its positive side connected to the Arduino output pin - in which case the 100 ohm resistor is OK.
KeithRB:
I used that board and hooked it up directly to the arduino. Tone() works fine to play music. At least the star-wars theme. 8^)
You seem to have it hooked up exactly as I did. You do need to hook up the voltage supply too, you did not mention that.
Ok so you hooked it up like I described in the first post?
stephencampbell:
Could you guys confirm I'm doing this correctly:
One of the digital outputs on the uno to the + in on the breakout board
Ground on the uno to the - in on the breakout board
Positive on speaker to + out. Negative on speaker to - out
Solder potentiometer on breakoutboard vertically in those 3 holes in lower right hand corner for volumn control
get rid of solder in lower right hand of board
So just to clarify:
One of the digital outputs on the uno to the + in on the breakout board
Ground on the uno to the - in on the breakout board
Positive on speaker to + out. Negative on speaker to - out
5.5v on uno to pwr + on breakout board
gnd on uno to pwr - on breakout board
So I'm putting two grounds into the breakout board?
Thanks,
Stephen