Hardware Reference
In-Depth Information
As for the amplitude, you can control that by changing the amount of the
current permitted to flow through the speaker. Using a potentiometer in-line
with the speaker, you can dynamically adjust the volume level of the speaker.
HowaSpeakerProducesSound
Speakers, much like the motors that you learned about in the preceding chapter,
take advantage of electromagnetic forces to turn electricity into motion. Try
holding a piece of metal up to the rear of your speaker. Did you notice anything
interesting? The metal probably sticks to the rear of your speaker, because all
speakers have a sizeable permanent magnet mounted to the back. FigureĀ 5-2
shows a cross section of a common speaker.
Figure 5-2: Speaker cross section
The permanent magnet is mounted behind the voice coil and pole piece shown
in the image. As you send a sinusoidal voltage signal (or a square wave in the
case of the Arduino) into the leads of the coil, the changing current induces a
magnetic field that causes the pole piece and diaphragm to vibrate up and down
as the permanent magnet is attracted to and then repulsed by the magnetic
field that you have generated. This back-and-forth vibration, in turn, vibrates
the air in front of the speaker, effectively creating a sound wave that can travel
to your eardrum.
Search WWH ::




Custom Search