Hardware Reference
In-Depth Information
speaker that comes with this topic's kit has an internal resistance of 8Ω (as do
most loudspeakers that you can buy); this resistance comes from the windings
of wire that make up the electromagnet. Recall that Ohm's law states that V =
IR. In this scenario, the I/O pin is outputting 5V, and you don't want to exceed
40mA. Solving for R, you find that the minimum resistance must be: R = 5V /
40mA = 125Ω. 8Ω is already accounted for by the speaker, so your in-line resistor
must be at least 125Ω - 8Ω = 117Ω. The nearest common resistor is 150Ω, so you
can use that. By adjusting that resistor value, you can change the volume of the
speaker. To make this as easy as possible, you can use a potentiometer in-line
with the 150Ω resistor, as shown in Figure 5-4. In the schematic, R1 is the 150Ω
resistor, and R2 is the potentiometer.
Figure 5-4: Speaker wiring with volume adjustment knob
Note that unlike in your previous usages of potentiometers this configuration
uses only two pins: the middle (or wiper) pin goes to the speaker, and either one
Search WWH ::




Custom Search