I am developing an OSD project which also manipulates audio signals.

The aim is to add a 'mux' system, which allows a microcontroller to select between the input audio and an internally generated audio signal as the output. This allows it to add a voice to the signal or transmit data in the right audio channel.

Does anyone have any solutions for this? I would like to avoid something like a 4066 which takes up valuable space. Also, since line level is alternating current, it needs to somehow work well with this.

  • 3
    \$\begingroup\$ OSD = Open Source Design? Object Storage Device? or Other Strange Definition? \$\endgroup\$ – Kevin Vermeer Oct 1 '10 at 19:54
  • 1
    \$\begingroup\$ On Screen Display, which is also an Open Source Design. :) \$\endgroup\$ – Thomas O Oct 1 '10 at 20:29

You need something like the 4066. Luckily, there are smaller versions with only one switch inside, like a tiny 6-pin SPDT, with 1/3 the circuitry of a 4053.

(I was just looking at these parts for this question.)

You can find examples of how to bias and interface with these kinds of parts here:

  • \$\begingroup\$ Will this work with AC? (line level ±2V max.) \$\endgroup\$ – Thomas O Oct 1 '10 at 20:31
  • \$\begingroup\$ Yes, but you need to get the biasing right. The analog input needs to be between the power rails of the IC, so 4 Vpp would fit if you use +5 V supply. Typically you use DC-blocking and bias the signal up to half of the supply as it passes through the IC, then back down to 0 on the other end. Alternately, you can use negative supplies, or switch the summing junction of an inverting amplifier so the voltage is always 0 and it's just current flowing through the switch. \$\endgroup\$ – endolith Oct 1 '10 at 20:40
  • \$\begingroup\$ I could use an oscillator and a charge pump to generate a negative supply, but I'd rather not... (that is, size is a problem.) \$\endgroup\$ – Thomas O Oct 1 '10 at 21:31
  • \$\begingroup\$ But your signal is +-2 V? It's generated by some other circuit? Or is it already biased? \$\endgroup\$ – endolith Oct 1 '10 at 21:43
  • \$\begingroup\$ I'm using a common battery ground. I am taking the output from a video camera with an audio channel. I haven't checked, but I suspect the output is ac coupled, so will have a ±2V or so swing. \$\endgroup\$ – Thomas O Oct 1 '10 at 21:49

I have come up with my own solution to this.

As I'm not worried about distortion I simply use a passive adder circuit which adds 3V to a ±2V signal. This can be switched using conventional, ground referenced circuits. Then, when I want to output it, I pass it through a capacitor + emitter follower amplifier.

The biasing adds some DC to the AC, muxes it appropriately (not shown), then amplifies it and converts it back to AC

  • \$\begingroup\$ The "passive adder" is the same circuit you'd use to bias the signal going into the analog switch. The bias resistor should be large compared to the signal resistor, though, not equal, and there should be a large capacitor across the 1k to ground to filter out power supply noise. \$\endgroup\$ – endolith Oct 4 '10 at 15:42
  • \$\begingroup\$ Thanks for your suggestions. How large should the cap be? I'm working on a size constrained board. \$\endgroup\$ – Thomas O Oct 4 '10 at 15:46
  • \$\begingroup\$ Depends on how much noise is on the 5V line and how much you care about it. The value of C sets the cutoff frequency of the RC filter, above which the noise will drop off with frequency. Using a larger than necessary value will cause it to charge up slowly, so the device will take longer to become functional. \$\endgroup\$ – endolith Oct 4 '10 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.