VOGONS


First post, by jarreboum

User metadata
Rank Member
Rank
Member

And why the two in the middle are never connected?

I've only ever seen PC speakers, be they with a diaphragm or piezoelectric, with two wires going to pin 1 and 4. What is the function of the other two pins and why don't anyone use them?

Pin Number 	Pin Name 	Pin Function
1 -SP Speaker negative
2 GND or KEY Ground, or unwired key
3 GND Ground
4 +SP5V Speaker positive +5V DC

Reply 1 of 19, by Errius

User metadata
Rank l33t
Rank
l33t

"key". That's presumably to stop you plugging it in the wrong way round. A 3 pin connector would have ambiguous orientation. Does it matter which direction the speaker current flows though?

Is this too much voodoo?

Reply 2 of 19, by Scali

User metadata
Rank l33t
Rank
l33t
Errius wrote:

Does it matter which direction the speaker current flows though?

The speaker itself doesn't care much. Technically if you reverse the pins, the phase of the sound is rotated 180 degrees, but that's not something you'd notice (a real speaker, that is, I'm not sure if it is 'safe' for a piezo as well).
However, when connecting other things to the pins, such as an amplifier or such, then it does matter, since it generates +5v, which is a very 'hot' signal. You may damage the equipment if you connect the +5v incorrectly.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 3 of 19, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
jarreboum wrote:

And why the two in the middle are never connected?
What is the function of the other two pins and why don't anyone use them?

Good question, but it goes back to IBM 5150 design.
The speaker connector in the first IBM PC was 4-pin and has been ever since.
The speaker is just connected directly to +5V and buffer output that can control current flow on and off through a 33 ohm resistor (and some low-pass filtering 10nF capacitor).
The ground is not needed for anything.
Only thing known from the manuals is that it's 2 1/4 inch and can handle about 0.5 watts.
I don't know the speaker impedance so I don't have an estimate the power rating it is being driven with.

Errius wrote:

"key". That's presumably to stop you plugging it in the wrong way round. A 3 pin connector would have ambiguous orientation. Does it matter which direction the speaker current flows though?

No, speakers don't care, but the cone will move outwards or inwards depending on which way the current flows. But the emitted sound should be identical to ears in both cases even if the direction is inverted (180 degree phase shift).

It is possible that they went for keyed connector with ground so that you could later plug something to it, like an amplifier board between speaker and motherboard, and it would be sure the connector orientation is correct.

Even so, it's still convenient to have 4-pin speaker so you don't accidentally plug it into wrong place on motherboard, or plug something like front panel switches or leds to speaker connector on motherboard. That could break something.

Edit: Oh scali beat me to it, and with almost same ideas 😁

Reply 4 of 19, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
Scali wrote:

The speaker itself doesn't care much. Technically if you reverse the pins, the phase of the sound is rotated 180 degrees, but that's not something you'd notice (a real speaker, that is, I'm not sure if it is 'safe' for a piezo as well).
However, when connecting other things to the pins, such as an amplifier or such, then it does matter, since it generates +5v, which is a very 'hot' signal. You may damage the equipment if you connect the +5v incorrectly.

I don't think it matters, even for a piezo. The diaphragm has to be designed to flex both ways as it will always oscillate about the neutral position when the voltage applied on the piezo is cut.

All hail the Great Capacitor Brand Finder

Reply 5 of 19, by jarreboum

User metadata
Rank Member
Rank
Member

That reminds me at some point I briefly entertained the idea of driving the pc speaker output into the sound card line in, to have all my PC sounds output to one device. Then I realised that amplifying computer bleeps through expensive hifi speakers doesn't make any sense.

If one were to try something like that though, how would they make their cable? Pin 4 to line in, ground to ground? Or Pin 1 to ground? I'm not good at audio stuff.

Reply 7 of 19, by David_OSU

User metadata
Rank Newbie
Rank
Newbie

Just pulled out my original IBM PC Technical Reference manual (3-ring printed version), and it has the following pinout:

1: DATA
2: KEY
3: GROUND
4: +5VOLTS

In the schematic diagram, pin 1 is connected to a 75475 output driver through a 33 ohm resistor. Pin 3 is digital ground and pin 4 is +5V logic power. Pin 2 is not connected, with the pin removed from the connector for keying.

The speaker was connected between pins 1 and 4 so that the 75475 will sink current from the +5V supply through the speaker coil and 33 ohm resistor.

Many old soundcards had a PC speaker input, with signal and ground inputs. To connect this to the motherboard, a pullup resistor is used between pins 1 & 4, and the signal input is between pins 1 and 3 (to the soundcard). If you connect pin 4 to the soundcard PC speaker input ground, you create a short between logic 5V and ground, and bad things happen.

Reply 8 of 19, by Scali

User metadata
Rank l33t
Rank
l33t
jarreboum wrote:

If one were to try something like that though, how would they make their cable? Pin 4 to line in, ground to ground? Or Pin 1 to ground? I'm not good at audio stuff.

You can't just feed the PC speaker signal to a line-in, it's too 'hot'.
Sound cards with a PC speaker input are designed specifically to take the PC speaker signal as-is.
For a regular line-in, you can find various simple circuits, usually a combination of a capacitor and a resistor. See here for example:
http://www.oldskool.org/guides/speakerrecording
http://www.deinmeister.de/e_sbpcqlnk.htm

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 9 of 19, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

A simple resistor divider would suffice. Inputs should have DC decoupling caps as a matter of course.

All hail the Great Capacitor Brand Finder

Reply 10 of 19, by Scali

User metadata
Rank l33t
Rank
l33t
gdjacobs wrote:

A simple resistor divider would suffice. Inputs should have DC decoupling caps as a matter of course.

I believe the idea of adding a capacitor is to create a low-pass filter, to approximate the non-linear frequency response of the actual PC speaker, which takes some of the harshness off the higher frequencies.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 11 of 19, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

A LPF tuned for, say, 3-5khz wouldn't be a bad idea, but the circuit in the ASCII art figure in the first link is actually a high pass filter. A first order LPF will have a series inductor or a capacitor in parallel with load.

All hail the Great Capacitor Brand Finder

Reply 12 of 19, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:
gdjacobs wrote:

A simple resistor divider would suffice. Inputs should have DC decoupling caps as a matter of course.

I believe the idea of adding a capacitor is to create a low-pass filter, to approximate the non-linear frequency response of the actual PC speaker, which takes some of the harshness off the higher frequencies.

The series cap in question is to block any DC in the signal, which might be bad. So it's a high pass filter, but it should be big enough cap to pass things above 20Hz. Also it works as a safety measure, it will block DC even if you plug +5V somewhere.

Yeah, it does not hurt to low pass too to limit harmonics.

The resistor divider can bring signal level down, but you need a special arrangement, as the DATA pin (at least on a real IBM 5150) is an open collector type of output, so it can only pull current into it, or do nothing. It can't push current out. So you still need a resistor from DATA to +5V to see voltage go high and low on the DATA pin. Then you can arrange the pull down from DATA to ground, so that either the DATA pin pulls the audio output low, or when it does not, the resistor divider will pull the audio output to say 0.5v. There are other arrangements possible as well.

Reply 13 of 19, by David_OSU

User metadata
Rank Newbie
Rank
Newbie

On the original IBM PC, there was no capacitor in series with the DATA signal, only the 33 ohm resistor is in series. There was a 0.01uF capacitor to ground in between the 75475 output pin and the 33 ohm output resistor. This provides a low pass RC filter of 39kHz (assuming an 8 ohm speaker), so it has almost no audible effect (probably there for EMI more than audio filtering).

Reply 14 of 19, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie

Isn't that more like 388 kHz?

Yes it most likely there for EMI reasons plus it also acts as a snubber for the inductive speaker coil.

The 75477 does have a clamping diode on its output and it's connected to 5V, but usually the inductive kickback dies out faster with RC snubber than a clamping diode.

It has to die out fast as there is nothing else to drive zero volts over the speaker coil (so that both ends of the speaker are at +5V).

Reply 15 of 19, by David_OSU

User metadata
Rank Newbie
Rank
Newbie

Yes, 388 kHz, misread my calculator.

Many soundcards that have a 2-pin PC speaker input will be pinned as INPUT and GROUND. The soundcard biases the INPUT pin and includes any necessary voltage dividers so INPUT can be driven by a common collector driver.

Theoretically, you only need one wire between the soundcard and motherboard, connecting the DATA pin on the motherboard to the INPUT pin on the soundcard, since the ground is common. However, if you do this, the current from the soundcard to the motherboard (going through the open collector to ground) will have to find a return path to the soundcard. This creates a ground-loop, and results in a really noisy PC speaker input. By providing a dedicated ground for the return current from the motherboard to soundcard, the ground loop is eliminated. Also, twisting the SIGNAL and GROUND wires on this cable, and keeping length to a minimum, will help reduce noise pickup.

Reply 16 of 19, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
Jepael wrote:

The resistor divider can bring signal level down, but you need a special arrangement, as the DATA pin (at least on a real IBM 5150) is an open collector type of output, so it can only pull current into it, or do nothing. It can't push current out. So you still need a resistor from DATA to +5V to see voltage go high and low on the DATA pin. Then you can arrange the pull down from DATA to ground, so that either the DATA pin pulls the audio output low, or when it does not, the resistor divider will pull the audio output to say 0.5v. There are other arrangements possible as well.

Makes sense. They're just using a single transistor to do pull down. Showing the expanded equivalent circuit for the data pin, we should have output voltages bouncing between R2/(R1+R2) * Vcc and saturation voltage of the pull down transistor.

Vcc
|
R1
|
|----------Vout
| |
R2 Qdata
| |
GND GND
David_OSU wrote:

Many soundcards that have a 2-pin PC speaker input will be pinned as INPUT and GROUND. The soundcard biases the INPUT pin and includes any necessary voltage dividers so INPUT can be driven by a common collector driver.

That also makes sense, although they may implement an active level converter.

More food for thought. Does the output filter apply to audio coming through the mixer section on SB cards?

All hail the Great Capacitor Brand Finder

Reply 17 of 19, by Jepael

User metadata
Rank Oldbie
Rank
Oldbie
David_OSU wrote:

Many soundcards that have a 2-pin PC speaker input will be pinned as INPUT and GROUND. The soundcard biases the INPUT pin and includes any necessary voltage dividers so INPUT can be driven by a common collector driver.

Theoretically, you only need one wire between the soundcard and motherboard, connecting the DATA pin on the motherboard to the INPUT pin on the soundcard, since the ground is common. However, if you do this, the current from the soundcard to the motherboard (going through the open collector to ground) will have to find a return path to the soundcard. This creates a ground-loop, and results in a really noisy PC speaker input. By providing a dedicated ground for the return current from the motherboard to soundcard, the ground loop is eliminated. Also, twisting the SIGNAL and GROUND wires on this cable, and keeping length to a minimum, will help reduce noise pickup.

Some soundcards just have one pin active which is for DATA input. This is to avoid anyone frying anything with +5V from speaker connector connected to sound card ground.
If sound card uses the DATA pin as analog input (just like line/aux input) it can bias it to locally generated noise free analog 5V and send it to volume controls.
Some sound cards use DATA pin as digital input, and use the digital state to feed a 1-bit DAC to re-generate noise free analog signal at requested volume.
I believe there are even sound cards that do not require connection to speaker connector, as they sniff the ISA bus traffic for speaker related operations and have matching logic to generate the speaker drive signal onboard the sound card.

Reply 18 of 19, by Scali

User metadata
Rank l33t
Rank
l33t
Jepael wrote:

I believe there are even sound cards that do not require connection to speaker connector, as they sniff the ISA bus traffic for speaker related operations and have matching logic to generate the speaker drive signal onboard the sound card.

Yes, the PAS16 does this. Works amazingly well.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 19 of 19, by David_OSU

User metadata
Rank Newbie
Rank
Newbie
Scali wrote:
Jepael wrote:

I believe there are even sound cards that do not require connection to speaker connector, as they sniff the ISA bus traffic for speaker related operations and have matching logic to generate the speaker drive signal onboard the sound card.

Yes, the PAS16 does this. Works amazingly well.

Very cool -- those Media Vision engineers were very clever.

I've built my own PC speaker input cables to a couple of legacy soundcards (Vibra 16 and Phillips Acoustic Edge). In both cases, hooking up this input resulted in a slight increase in background noise level from the soundcard output (mostly noticeable with headphones). Adding a ferrite bead with a couple of turns at the soundcard connector side didn't help much.

Muting the PC speaker input in the volume mixer would eliminate the increased noise, but even at the lowest mixer level the noise would appear. As a result, I would generally just keep the PC input muted unless I was playing a game that used the PC speaker.