mixing and volume

30,327

mixing and volume
mixing and volume

The LM386 amplifier section has been constructed and operates effectively. A five-conductor headphone jack has been acquired, which allows the left and right channels to connect to the mono amplifier when no headphones are plugged in, but disconnects the amplifier when a headphone plug is inserted. The issue arises as the amplifier still picks up a faint audio signal even when disconnected, likely due to antenna effects or power supply noise. The objective is to completely turn off the amplifier section when a headphone plug is inserted, rather than just disconnecting the input signal. The circuit prior to the headphone jack can mix three channels into two or control the volume, but not both simultaneously. The AY-3-8913 has three distinct voices: A, B, and C. The aim is to mix these such that A is routed to the left channel, C to the right channel, and a half-volume version of B is present on both channels. This mixing is accomplished using a resistor network, and output volume control is desired through a potentiometer. Two similar circuits are presented for these tasks. Although not depicted, both circuits connect their left and right outputs to the headphone jack, which is subsequently linked to the speaker amplifier section. One circuit, referred to as the Polish circuit, includes a 10K stereo audio potentiometer at the output, while the other, sourced from a ZX Spectrum hacking site, also incorporates an output potentiometer. Initially, neither circuit included a potentiometer. The mixing and attenuation functions conflict; mixing is effective due to varying total resistances between A, B, or C and L or R for different paths. In the Polish circuit, with the potentiometer at zero resistance between input and output, the total resistance from A to L is 1K, from B to L is 2.2K, and from C to L is 5.4K, resulting in A predominantly appearing on the left channel with minimal C. If the potentiometer is adjusted to near maximum resistance, the total resistances become more similar, leading to a loss of stereo effect. The left circuit utilizes larger resistors, resulting in less pronounced stereo loss but quieter maximum volume. Moving the potentiometer after the headphone jack would allow for volume control of the mono amplified speaker, but the headphone jack would remain at maximum volume, making it unsuitable for headphone use. Altering the stereo mix to route A and B to the left channel and C to the right, while avoiding a common path, is a straightforward but asymmetrical solution that may not yield pleasing audio. Implementing a transistor or op-amp as a voltage follower before the potentiometer could prevent resistance changes from affecting the resistor network for stereo mixing, potentially offering an optimal solution, although the design complexity raises concerns.

The LM386 amplifier circuit is a low-power audio amplifier designed for various audio applications, particularly in battery-operated devices due to its low supply voltage requirements. In this configuration, the amplifier's output can be directed to headphones or a speaker, depending on whether the headphone jack is engaged. The five-conductor headphone jack serves a dual purpose: it connects the audio signals while also providing a mechanism to disconnect the amplifier when headphones are inserted.

The mixing of the three audio channels from the AY-3-8913 is a critical aspect of the design. Each channel's output must be appropriately mixed to achieve the desired stereo effect. The resistor network plays a vital role in this mixing, as it determines the level of each channel that reaches the left and right outputs. The challenge lies in balancing the resistances to maintain a clear stereo separation while allowing for volume control through the potentiometer.

The use of a potentiometer introduces an additional layer of complexity, as adjustments to volume can inadvertently affect the mixing ratios. The analysis of resistance values illustrates how the potentiometer's position alters the overall impedance seen by each channel, which can lead to undesired audio characteristics.

To mitigate these issues, the implementation of a voltage follower configuration using either a transistor or an operational amplifier can be beneficial. By placing this component before the potentiometer, the mixing network's integrity can be preserved while still allowing for effective volume control. This solution would require careful consideration of the circuit layout and component values to ensure optimal performance without introducing additional noise or distortion.

In summary, the design of this audio amplification and mixing circuit necessitates a careful balance between channel mixing and volume control, with potential solutions involving strategic component placement and circuit design adjustments to achieve the desired audio output quality.I built the LM386 amplifier section, and it pretty much works. I purchased a five-conductor headphone jack, which passes the left and right channels through to the mono amplifier section when nothing is plugged in, but disconnects the amplifier section when a headphone plug is inserted. The only problem is that even when disco nnected, the amplifier section still picks up a faint copy of the audio signal (from antenna effects or power supply noise ) and amplifies it. Ideally the amplifier section would be switched off entirely when a headphone plug is inserted, instead of merely disconnecting its input signal.

The bad news: The portion of the circuit before the headphone jack seems able to mix three channels into two, or to control the volume, but not both. The AY-3-8913 has three separate voices: A, B, and C. I want to mix them so that A is on the left stereo channel, C is on the right channel, and a half-volume copy of B is on both channels.

This job is done with a resistor network. I also want to control the output volume with a potentiometer. Below are two similar circuits for performing these tasks. Although it`s not shown here, both circuits have their L and R outputs connected to the headphone jack, which in turn is connected to the speaker amplifier section as described above. On the right is the Polish circuit  I mentioned in my last post, with a 10K stereo audio potentiometer added at the output.

On the left is a circuit I found on a ZX Spectrum hacking site, also with an output potentiometer. Neither circuit included a potentiometer originally. You can probably see where this is going: the functions of mixing and attenuation conflict. Mixing works because the total resistance between A, B, or C and L or R is different for different paths. In the case of the Polish circuit (right side), if the potentiometer is turned all the way so there`s zero resistance between input and output, then the total resistance from A to L is 1K, from B to L is 2.

2K, and from C to L is 5. 4K. There more than 5x the resistance for C to L versus A to L, so A appears mostly on the left channel, and very little of C appears on the left channel. If the potentiometer is now turned almost to the other extreme, so there`s 9K resistance between input and output, the situation changes.

Now there the total resistance from A to L is 10K, from B to L is 11. 2K, and from C to L is 14. 4K. These are all similar enough that all voices go to both channels more-or-less equally, and the stereo effect is lost. This is where I`m stuck: I can get stereo mixing, or volume attenuation, but not both at the same time.

The circuit on the left uses larger resistors, so the loss of stereo is less pronounced, but the maximum volume level is quieter. Move the potentiometer to after the headphone jack. This would allow for volume control of the amplified speaker, which is mono anyway, but the headphone jack would always be at maximum volume.

In practice this would make the jack only useful as a line-out, and not for headphones. Change the stereo mix so that A and B go to the left channel, and C to the right, with no common path between them. This is simple but non-symmetrical, and the 100% stereo separation may not sound very pleasing. Use a transistor or op-amp as a voltage follower, inserted before the potentiometer, so that changes in the potentiometer resistance don`t affect the resistor network used for stereo mixing.

This might be the best solution, but I`m uncertain how to build it, and don`t want to add still more elements to an already large circuit. 🔗 External reference