Hi, I want to output sound with Arduino's tone() function through a small speaker I looted from a small radio. I've hooked it up on a digital out PWM pin and it works fine. But it's so damn loud! Now I've tried putting a resistor in between, but the problem now is, that the sound suddenly interrupts randomly. Seems like there's not enough current coming through or something. How can I otherwise reduce the volume on the speaker, keeping the tone() function on the software side? Thanks for your help!
alberto2000: I've tried putting a resistor in between, but the problem now is, that the sound suddenly interrupts randomly.
Sounds like a bad connection. Re-check the wires and connections.
connections are triple checked. seems like, the lower the resistor value, the less interruptions... any more clues?
Don't you need a capacitor in series? Try reading this:
I dont know why its working here: http://www.youtube.com/watch?v=ZaGN7k16GTs
I have the exact same setup now, but the sound still suddenly has interrupts...
That video shows a potentiometer used as a voltage divider. From your description I got the impression you were adding a series resister, instead.
How have you actually got it wired up?
Have you tried adding the decoupling capacitor that Nick Gammon suggested?
alberto2000: I have the exact same setup now, but the sound still suddenly has interrupts...
Perhaps post your own video to prove this point, or at least a photo.
When you say "interrupts" do you mean it pauses, or restarts from the start?