# Are speakers binary?

Discussion in 'General Electronics Chat' started by iqster, Nov 24, 2012.

1. ### iqster Thread Starter New Member

Nov 13, 2012
4
0
Hello,

I'm trying to understand how speakers work. After reading on the net and dissecting a bunch of speakers, I still don't get it ...

1) Lets say I pass a square wave of a certain frequency through my speakers. i imagine that this will cause cause the speaker to oscillate between its two states (up or down) depending on whether the signal is low or high. Is this correct?

2) What makes me think that (1) is not quite right is that most sounds are made from sine waves - pure and harmonics. How can the speaker be binary in the face of a sine wave? Is it the case that the up and down of a speaker's diaphagram happen at the peak and trough of a sine wave?

2. ### GopherT AAC Fanatic!

Nov 23, 2012
6,311
4,031
Speakers are not binary, they are very analog.

Basic construction:
A speaker consists of two magnetic parts. One is stationary, mounted to the speakers frame. One is the "voice coil" which is an electromagnet and mounted to the speaker's cone (notice the two wires near the cone center (usually covered with black rubbery insulation and most noticeable on the bigger woofers with paper cones).

Speaker outputs on a radio or amplifier are really AC power. That is, the voltage is swinging above and below the "ground" or neutral wire (of course this is a relative measurement but you designed the circuit or, if not, one is already black so lets assume we can identify "ground". In any case, when the voltage is above ground, then the speaker cone is pushing out of the frame. When negative, the speaker cone is pulled into the frame. This movement obviously makes the noise. Remember, when i mention positive and negative voltage, i am taking about the "instantaneous" voltage of the AC signal driving the speaker. The higher the voltage, the more the speaker moves in or out. The more closely the speaker's movement follows the input voltage, the less distortion you have.

In this case, I assume you are putting the signal from a 555 timer to a speaker with a 0 to 5 volt output. With this setup, you are only driving the speaker cone out a set distance and then allowing it return to the neutral (0 volt) input state. This circuit will measure 2.5 volts on the DC volt meter scale if you truly have a square wave (some exceptions apply).

If you put a good sized electrolytic capacitor (330 to 1000uF or more) between the circuit output and the speaker, then some fractions of a second after you start your signal, the digital 0 to +5 volt square wave will drop down to a symmetrical position above and below your ground wire and swing from -2.5 to +2.5 volts. DC Voltage measured across your speaker terminals will be 0 volts. In this case, the full range of your speaker cone's movement can be utilized (in AND out instead of just out to midpoint as above). This means more sound power can be transmitted before the speaker saturates (saturation = speaker reaches the end of the physical movement limits).

Note that a higher voltage signal at the same frequency means the speaker cone moves in and out a greater distance and, therefore, louder output. This is the volume control.

In summary, there is nothing digital about speakers. There are some speakers that are marketed as "digital" but means nothing in most cases.

iqster likes this.
3. ### iqster Thread Starter New Member

Nov 13, 2012
4
0
Thanks for your detailed reply. Now that I understand that there is a range of positions for the non-stationary voice coil, I can see how it would move up and down in response to a pure sine wave. This also clears up how putting an adjustable resistor in front of the signal affects volume (as you said, same frequency but higher voltage = more volume).

A separate but related question. I was able to drive more current (than provided on an output pin of a 082M picaxe) to a speaker by using an NPN transistor. I thought NPN transistors were binary. i.e. they would either let current flow from collector to emitter or not. Is this correct? Attaching the relevant schematic from the Snap Circuit Manual.

File size:
118.1 KB
Views:
13
4. ### #12 Expert

Nov 30, 2010
16,703
7,338
You do seem to be confused. First, speakers are pretty stupid. They are just a magnetic motor with a very small range of motion. The mere idea of a digital ready speaker makes me laugh. That's like saying, "digital ready incandescent light bulb". The speakers and light bulbs that Edison used were "digital ready"!

Driving these simple things with a digital signal is merely a matter of changing the intended signal into square waves that vary in either amplitude or duration (or both) and the driven device averages out the supplied power because of their inherent physical time constants. Both a speaker and a light bulb will respond down to DC, or zero frequency.

Now to your next question: Transistors can be used as digital or analog devices. Slapping them from zero current to full saturation, and back to zero, is called digital, but running them with an idle current that becomes less and more according to the base drive is a perfectly valid way to use them. (It's called a class A or single ended amplifier.) You are welcome to use them either way.

iqster likes this.
5. ### MrChips Moderator

Oct 2, 2009
12,635
3,454
There is common misconception between digital and analog.

In the context of electronic circuits, digital is analog, but analog is not digital.

Analog voltages is a continuum or continuous range of voltages. If a device can operate at any point within a range of voltages, then it is an analog device.

Digital means selecting two ranges within that continuum of ranges and designating one range as logic 0 and the other as logic 1. Note that digital is still analog.

A transistor is an analog device. If we limit the operation of the transistor to two ranges then we are using that transistor circuit as a digital/logic/boolean device.

iqster likes this.
6. ### GopherT AAC Fanatic!

Nov 23, 2012
6,311
4,031
No, npn transistors are not digital. No transistor is truly digital because it would need very high gain ("infinite" or in the range of 1000s to 100000 times gain ) like a comparitor to immediately jump from a 0 to a high (5 volt) state. In fact, your potentiometer controlling the voltage into the NPN transistor is actually controlling the current (see ohms law) into the base pin of a PNP or NPN transistor. The more current through the base to emitter, the more current is allowed to pass from the emitter through to the collector (when viewing current flow as electron flow (neg to positive). Carefully setting up the circuit will allow you to get what appears to be "digital" response with reasonably high gain and even convert a sine wave to a square wave (or approaching square wave with slightly angled sides if you have enough gain in your circuit design to saturate your signal with your transistor.

You can (and already have) shown how to get an analog response from a npn transistor in your circuit if i understand correctly (that is, the volume control still works so you are not saturating your input signal).

Note that NPN and PNP transistors are off the general type, bipolar transistors.

Mosfet and FET transistors are commonly operated as "Digital switches" based on digital "on or off" input but those too will have an analog region where output is not simply on or off.

iqster likes this.