Automatically switching 2 audio signals based on input l

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
chessman
Posts: 292
Joined: Tue Jan 14, 2003 1:01 am
Location: Issaquah, WA
Contact:

Automatically switching 2 audio signals based on input l

Post by chessman »

Basically, I need to switch 2 audio inputs based on which one is currently "active", and I need to do it automatically.<p>More in depth, here's the actual situation: I was given a GPS receiver for my Pocket PC for Christmas. The Pocket PC speaker isn't loud enough for me to hear over road noise and my music. I'd like to connect my PPC to my car's equalizer (which feeds the rest of my audio system) as well as connecting my head unit to the EQ.<p>Normally just music will be playing, and there won't be any audio outputting from the PPC. At those times I want the head unit "connected" to the EQ. When the PPC plays a voice guidance prompt, I want the PPC signal to automatically be routed to the EQ. When the voice prompt is finished playing, I want the music to come back on.<p>So:<p>- 2 inputs, 1 output
- automatic switching of inputs based on the levels passing a set threshold
- Pocket PC input takes signal priority
- no degradation of sound quality
- quick fade in/out of audio would be less harsh to the ears than a sudden switch, but it sounds tough to implement<p>My proposed method of implementation:<p>- op-amp comparator to output yes/no for each input signal
- create a logic table for input precedence to implement with as few logic chips as possible
- either cmos analog switch (worried about sound quality) or relays to actually switch the A/C audio signal<p>Any further thoughts or ideas? I'm by far not the greatest with electronics, so I just wanted to bounce my ideas off all you wizards out there ;) <p>edit: oh yes, I forgot to mention that the input threshold would be adjustable, but I neglected to include that mainly because it only involves placing a pot instead of a fixed resistor, and I can figure that out on my own :p<p>[ December 29, 2004: Message edited by: chessman ]</p>
dyarker
Posts: 1917
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by dyarker »

Sounds like a plan to me!<p>No need to detect music level though, just PPC level. The PPC needs to take control whether the music is blaring or off.<p>Relays might be too slow switching. New CMOS switches should be okay for quality. Old CMOS switches like 4066 (?? memory?) may be a slight quality problem.
Dale Y
chessman
Posts: 292
Joined: Tue Jan 14, 2003 1:01 am
Location: Issaquah, WA
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by chessman »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by Dale Y:
Sounds like a plan to me!<p>No need to detect music level though, just PPC level. The PPC needs to take control whether the music is blaring or off.<p>Relays might be too slow switching. New CMOS switches should be okay for quality. Old CMOS switches like 4066 (?? memory?) may be a slight quality problem.<hr></blockquote><p>Good point, I tried to over-complexify the solution :D <p>I also seem to have had a problem of over-simplifying...after laying down in bed last night I realized I can't just use a simple comparator with an A/C input and D/C reference voltage and expect a suitable output! I was thinking to solve the whole alternating current problem I could rectify the waveform and then pass it through filter caps much like a power supply's AC->DC conversion. I'm really not sure what the end waveform would look like, and I quit the job that supplied a free scope...so I'll just have to guess and hope that it'll work. It seems to me like it should...all I want is a positive-only voltage that will continuously stay a certain threshold while audio is playing, and then drop below when the audio stops.<p>Wow, I should really stop designing at 3am. Next I'll try and use a transistor as an A/C switch! :p
User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: Automatically switching 2 audio signals based on input l

Post by Chris Smith »

Any signal coming from one source, can be used to switch on or off a "Audio Switch” which is similar to a Video switcher. <p>Some video switchers are made to carry audio signals, and you can even opto isolate the system to turn on using Bar graph chips like the Lm 39-14, 15, & 16 which is designed to take a audio signal level, and turn it into a 10 led bar graph visual based on logarithmic increases or a linear signal increase.<p>A audio signal will light up to ten LEDS in these chips based on the volume strength of the signal, which allows you to trigger your second switch based on a low, high, or anywhere in between signal.<p> One or more of these Ten LEDs in the display, can be removed and a simple opto isolator placed back in, which in turn controls the off and on to the signal switching device of your choice. <p>Even a Solid state Relay which is controlled by a low signal Fet can handle the audio signal to begin with because Solid state realays like their mechanical counter parts are either off, or on.
jimandy
Posts: 572
Joined: Sat Dec 04, 2004 1:01 am
Location: Birmingham AL USA
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by jimandy »

I've built an audio detector to logic level circuit along your rectifier idea. All that was needed was a diode, a .1 mfd cap and a resistor in a simple half wave rectifier config . The resistor was a pot to adjust sensitivity. The trick is to follow it with a schmitt (sp?) trigger - one stage of a 74c14 or c132 or an opamp wired for snap action.
"if it's not another it's one thing."
chessman
Posts: 292
Joined: Tue Jan 14, 2003 1:01 am
Location: Issaquah, WA
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by chessman »

Okay, here's where I ask for help.<p>This is what I have so far, it's basically the audio detection module of the circuit:<p>Image<p>V1 is the PPC audio source. The 1k resistor after the opamp is just a dummy resistor for simulation purposes. R2 is just a random value, and is used for sensitivity adjustment. C1 is a random value. I can't seem to get the simulation (I have CircuitMaker 2000) to run the way I think it should.<p>This is basically a random circuit based on the way I think things should work, and I have no idea if it'll actually turn out to work like this or not. I have limited knowledge on getting things to work - I just posses the theory. What am I doing wrong?
Enzo
Posts: 276
Joined: Tue Sep 14, 2004 1:01 am
Location: Lansing, Michigan, USA
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by Enzo »

Well, on the face of it, the input bridge looks wrong. Unless that is a balanced line, you have no ground reference. You need to reference the incoming signal to your circuit's common. Can I assume you meant to ground the bottom of the cap? Leaving that out will kill your sim.<p>4700 sounds awfully high to me. You need the cap just large enough that every tiny bit of static doesn't trip the thing. Try 10uf or 1uf or even .1.<p>There is no DC discharge path for the cap, so I am not sure that once it charges up it doesn't just stay that way. Once the thing trips, you need to decide how it will untrip itself.<p>Long ago I had a need for a similar circuit. I recorded some music on one channel of a cassette, and on the other channel I put cue tones to trip a relay to work some animation. (It was a talking dollar bill changer for an arcade) And All I did was rectify the audio on the cue track to turn on a relay. You used an op amp, I think I just used a darlington xstr.<p>You can buffer the detector. You have the signal charging the cap directly here, but you could easily put a op amp stage in to increase the signal level before detection. You might find it easier to work with a few volts of signal rather than the millivolts you start with.
k7elp60
Posts: 226
Joined: Wed Dec 05, 2001 1:01 am
Location: Ivins, UT
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by k7elp60 »

All this sounds like what you need is very similar to AVC on AM radios. A simple 1/2 wave rectifier with a short time constant would probably do the trick, as far at a control voltage. You may have to amplify the audio before you rectify it, but a LM324 would probably fine for the amplifier, and comparators.
jshaffer
Posts: 1
Joined: Thu Jan 20, 2005 1:01 am
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by jshaffer »

Chessman,
Did you get your switch to work? Similar to you, I want to have 2 inputs, one from a GPS and one from an IPOD going to a single audio input on a motorcycle communicator and I need a switch just like yours to control it. I am not an electronic wiz so I can't build my own, but would you be interested in building a one-off replica of your prototype?
Bernius1
Posts: 349
Joined: Sat Sep 21, 2002 1:01 am
Location: NY
Contact:

Re: Automatically switching 2 audio signals based on input l

Post by Bernius1 »

Chessman, Enzo is right about cap size. As far as an op-amp, if it's single-supply, you need a false 'floating' ground to simulate Vcc+ and Vee-. In your case, a resistive divider. Then V+in needs to be referenced to that, and capacitively coupled to the bridge. But I would use two diode-res-cap averaging networks, one from each source, into a LM311-type comparator. This because I don't think you're looking for delicate musical variances, but the presence/absence of the 'second' signal. If you read the comparator Lit for 'schmitt-triggered comparator with hysterisis', you'll see sample schematics. I'm assuming that the output will be TTL into the flip-flop that a certain button controls ? (instead of YOU hitting the button, you're hot-wiring this ckt to do it?)
Can't we end all posts with a comical quip?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 40 guests