Space Invaders : Adding a speaker

We have already shown how to add a simple piezo speaker to the Space Invaders project but what about a bit more umpppphhh….. We need a bigger speaker which the Arduino cannot drive directly, to solve this we need to add an audio amplifier and in this case it’s in the shape of the PAM8403 chip. These can be bought as handy modules with all discrete components already there for us, here’s one….

The details of these chips and adding them to any circuit has already been fully covered in this article and this video. All we’ll do here is list the components required for this build, show the circuit diagram and final breadboard build.

Kit List
8Ohm Speaker (0.25 Watt or above)
PAM8403 amplifier module (as pictured above)
10KΩ resistor
68Ω to 390Ω resistor (depending on speaker wattage)
10KΩ Logarithmic potentiometer (variable resistor)
Obviously some more wires!!!

Circuit Diagram
This is the final and actual circuit diagram for this build, now that all aspects are together (display, controls, amplified sound) we can present the fully finished circuit including the new audio amplifier circuit.  Note that the choice of resistor for R2 depends on what power your speaker is rated at, choose the appropriate value for your build.

 

Load up the full code from the previous article and test your build, if it doesn’t work double check your connections and that your have used the correct resistor for your speaker and that your speaker is not less than 8Ω. That’s it for now, in the next installment we’ll mount the entire project onto some strip-board to give it a more permanent home.