How does a speaker work?

For any electronic system to function, it has to first form a closed circuit. The flow of electricity must always return to the power source.

If you look at a headphone jack, you can see three metal sections separated by plastic rings. The plastic rings work as insulators to separate the different parts of the circuit. Two of the sections carry the input signals: one for the left audio, and one for the right audio. The metal section closest to the base acts as the return path.

Some headphone jacks have four sections; the extra section is used for microphones. Electricity flows from the input, through the speaker, and then back to the computer, forming a closed circuit. 

How, though, does a speaker create sound?

Sound

To understand this, we first have to understand what sound is. Sound is a form of energy created by vibrations propagating through a medium, in most cases air. When something creates a sound, it causes the air around it to vibrate, spreading waves through the surrounding matter. When these waves reach the ears, they cause the eardrum to vibrate, which the brain registers as a sound. 

Lorentz Force and Speakers

Most speakers contain three parts: a coil of wire, a magnet, and a diaphragm (often a flexible, plastic cone). The coil of wire is wrapped around the magnet, with one end connected to the input path and the other connected to the return path. The coil is also attached to the diaphragm. 

A magnetic field enacts a force on moving charges. This interaction between electricity and magnetic fields is called the Lorentz force. The Lorentz force causes the coil to move relative to the magnet. 

This movement is determined by the electrical input. Audio signals are sent in the form of alternating current. Alternating current does not always flow in the same direction, like regular (direct) current does. Instead, it periodically changes direction very rapidly. A computer can use these rapid switches to encode audio signals. 

As the current changes direction, the Lorentz force also changes direction. This causes the coil and the connected diaphragm to vibrate back and forth. These vibrations push around the air to produce sound waves, which are determined by the pattern of the alternating current of the circuit. 

How to build your own speaker

To build a speaker at home, you can recreate the same mechanisms out of items you have at home. 

For the wire, 30 AWG enamel cased wire should do. The diaphragm requires a stiff, slightly flexible material. I used a paper plate, though a styrofoam plate would work as well. For the magnet, the stronger the magnet, the stronger the Lorentz force, and the louder the sound. And finally, you need a long wire with a headphone jack on either end to plug into the computer, as well as two wires with alligator clips. 

First, wrap regular paper into a cylinder that fits slightly loosely around the magnet. I did this by wrapping one layer of paper tightly around the magnet, and then wrapping another around the first layer. Cut the second layer so it is shorter than the magnet. Then, wrap the wire 50 – 100 times around the second layer (discard the first layer). Leave enough length at the end and beginning of the piece of wire so the alligator clips can clip on. Hot glue the cylinder to the back of the plate and place the magnet inside the cylinder. Make sure that the glue has dried before placing the magnet because it should be able to move freely. Accordion fold two business cards or playing cards and glue them as well. Finally, glue the cards as well as the magnet to a base. Burn the ends of the wire and connect each to an alligator clip, and connect the other ends of each clip to the headphone jack.

Microphones

A microphone uses the same mechanism, but backwards. Instead of an output, sound is the input in this system. The soundwaves in the environment hit the diaphragm or cone, causing it to vibrate. Because of the moving magnet, the magnetic field around the coil of wire changes, or fluctuates. This change in magnetic “flux” as it is called leads to magnetic induction: the magnetic field induces a small current in the wire. The changing current encodes the audio signals, sending them back to your computer to be interpreted.