Switching Circuit Help

Discussion in 'The Projects Forum' started by icydash, Jan 3, 2012.

  1. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    Hey guys. So I'm trying to build a circuit that switches between music on my iPod and a guitar signal, as shown in the schematic below. Right now I'm simply using a function generator to represent the guitar signal.

    [​IMG]

    When I have music playing on the iPod, and I set the control to high (9v), the circuit works as it's supposed to, and I see the music at Vout on my oscilloscope. Likewise, when I set the control to low (0v), the circuit shows the output from the function generator. The problem occurs when I don't have music playing on the iPod (the music is paused or not playing). When that's the case, for some reason, no matter what I voltage I put as my control signal, Vout is always the output from the function generator. Ideally, I'd like it to be no output or 0v when no music is playing from the iPod. Vout will be connected to an amp or a mixing board.

    So what have I done wrong? Thanks!

    icydash
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    It's not stated clearly in the data sheet but I believe you need to capacitively couple the inputs (10uF) and output (22uF) as shown in the data sheet test circuit with cap polarity as shown.

    Since the chip operates on a single supply, it cannot readily transmit the negative half of the AC signal input. Thus you need the capacitors to allow the bias circuit to bias the input and output above ground to avoid clipping the negative portion of the signal.

    This lack of capacitors may be causing the crosstalk type problem you are having.
     
    icydash likes this.
  3. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    Yeah I saw that in the datasheet but I didn't really get what the caps were doing (both the 10uF and 220uF). Also, it seems like there are two Vout's, one with the cap and 1k resistor, one without, which I don't really get.

    UPDATE: I just tried adding in a 10uF cap to both inputs and it fixed the problem! I didn't add a 220uF at the output because I didn't think it was necessary and I'm not really sure what it's doing, but the 10uF's at the input fixed the issue. Thanks a lot for your help!
     
    Last edited: Jan 3, 2012
  4. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    Glad it's working.

    Even if you don't get what the data sheet is doing, you are taking a big chance on getting the circuit to work properly when you ignore the data sheet.

    The output cap is to block the DC bias voltage from the output. Some inputs already have a capacitor so aren't bothered by the DC. Other inputs may not tolerate DC so the cap insures there is no problem.
     
  5. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    You're definitely right, I just didn't want to place an order at digikey (I don't have most cap values just laying around), get charged 10$ for shipping on a 2$ order, and wait 3-5 days if I didn't have to. But now that I understand better what the caps do, I'll definitely start including them more.

    If you have time, I just have two more cap questions:
    1. Why is the value of the caps 10uF and 220uF? Just because the impedance will be pretty low using 1/jwc? If so, then why the different values at all (both 10uF and 220uF would seem to have low enough impedences) and not just 10uF for all three caps?
    2. Why is there a 10uF cap and a .01uF cap in parallel across V+ and GND? I'm assuming the 10uF is to help clean the V+ signal of any AC/stabilize it, but why is the .01uF cap necessary at all?

    This is all a hobby for me, so I'm learning little tidbits as I go where I can. Thanks!
     
  6. Adjuster

    Well-Known Member

    Dec 26, 2010
    2,147
    300
    It it is a bad idea only to fit those parts whose functions are known. Sometimes it may be possible to simplify a design by leaving out parts not needed for a given application - but only if we know what they are for.

    Coupling capacitor values are related to the impedance level (in simplified terms, the circuit resistance). Lower impedance requires more capacitance to give the same low frequency response. This switch circuit has a quite high input impedance, but the output impedance is lower - here the load impedance may be most important consideration. See datasheet: http://www.google.co.uk/url?sa=t&rc...sg=AFQjCNHId-HuhFsR51VWFg2wAMGO2AjI7g&cad=rja

    A small capacitor is sometimes used in parallel with a larger one because large capacitors may have higher values of internal parasitic inductance that make them less effective at high frequencies. The smaller capacitor may have lower parasitics, but is itself less effective at low frequencies. Two capacitors used together may provide effective filtering over a wider range of frequencies.
     
    icydash likes this.
  7. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    What is the sound quality of that analog switch?

    100%? 95%? Any volume attenuation or distortion added at all when going through the switch vs directly from the iPod when built in circuit as shown above?
     
  8. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    I'm not sure what the quality is, but it appears to be quite good. Just by ear, I hear no difference what-so-ever when playing my guitar/iPod through it. The data sheet is here: http://www.datasheetcatalog.org/datasheet/newjapanradio/de05024.pdf
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Don't skip the capacitors across +V and GND which power the IC. It might be working perfectly well right now, but if you are powering it from a 9V battery, that may change drastically as the battery is discharged.

    When a battery is discharged, the internal resistance increases. The large cap and small cap on the power lines will help keep the output distortion free on transients, which will allow you to run the battery a bit longer than usual, and with overall better transient performance/dynamic range for the entire life of the battery.
     
  10. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    Some companies have a smaller shipping charge for small quantities, such as Parts Express for audio components. I think Jameco and/or Mouser may also be better in that regard.
     
    icydash likes this.
  11. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    Yeah I have the 10uF, i just wasn't sure if I should add the .1uF cap in parallel.

    On the NJM datasheet, at the output, it seems to have two Vouts -- one with a 220uF cap and a 1k resistor, and one with nothing. I'm still not sure whether I should be using the 220uF + 1k branch or the Vout with nothing on it. My output will be connected either to other guitar pedals or an amp. I now understand better what the 220uF cap is doing, but I'm still not sure if it's necessary for my application and the NJM datasheet has both a cap and a noncap option for outputs.
     
    Last edited: Jan 5, 2012
  12. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    If you don't know whether the inputs can tolerate a DC bias, then you should use the capacitor output.
     
  13. icydash

    Thread Starter Active Member

    Jan 14, 2009
    81
    0
    OK thanks! I'm assuming I should use the cap and the 1k resistor, not just the cap?
     
Loading...