Passive Attenuator – Stumped with this simple circuit

Discussion in 'Analog & Mixed-Signal Design' started by squarecircletriangle, Jul 13, 2016.

  1. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    I'm working on building a passive attenuator for use eventually as a simple Arduino-controlled volume controller. I've found a similar schematic called the RelaiXedPassive Attenuator. It uses an attenuator ladder arrangement, using 6 relays to provide 256 steps of attenuation. I've started assembling it and testing it out with strange results, and I'm trying to determine what exactly I'm doing wrong.

    Here's the schematic I'm working off of (page 1, specifically). From what I understand, it has 6 stages, each with a relay that either sends the signal through a voltage divider or bypasses it. All bypassed = full audio volume, All on = no audio, and 254 other values in between.

    Here's what's going wrong:
    When I mock up a couple stages, audio goes through fine, but the difference between the first stage on and off is drastic – it's about half the volume. This is just the first stage, though, which should be the least amount of resistance. Why the huge jump? Looking at the circuit, it does makes sense...The signal is going through R202, a 2700Ω resistor. In fact, it seems like this isn't acting like a voltage divider circuit at all...When I remove R204 and leave pin 7 (9 on my drawing below) of the relay floating, it makes no difference to the sound at all. Those resistors seem to be doing nothing.

    Here's another view of the ladder arrangement, which I got from the same site's attenuator calculator. It's unclear to me what the entire bottom row of resistors are meant to achieve, as they do nothing to the sound of the audio when I remove them.

    Screen Shot 2016-07-12 at 9.58.27 PM.png

    Here's a very specific schematic I drew up of exactly what I've mocked up, in case I'm misreading something:
    attenuator_schematic-01.jpg
    R204 and R206 seem useless to this circuit.

    Just to be clear in the above drawing, I'm manually toggling pin 1 of the relays between 5V and GND to turn them on and off – that part is working fine.

    Did I do this right? What am I missing here?
    Thanks for your help!
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    You are missing the fact that the bottom row of resistors attenuate the signal when they are switched in by the corresponding relay contact.
    Of course, in the relay positions shown for the top (Design Result) circuit, the bottom row of resistors doesn't do anything since they aren't connected.
    But I do agree that the first left bottom resistor doesn't seem to do anything.

    You have your test circuit connected differently than the Design Result circuit.
    The design circuit has the relay wiper going to the input of the first resistor, and your test circuit has the wiper going to the output of the first resistor.
    Is that intentional?
    If you getting such a large attenuation change, I would suspect there is a wiring or component value error.
     
  3. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
    I interpret the 'design result' schematic to be using the same relay connections as the 'test circuit'.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    If the Design circuit and Test circuit both show the switches in the relay-inactive state then the two circuits differ. I interpret the Design circuit as showing the switch common terminal at the top.
    In the Design circuit, with no relay active, the signal bypasses all the top resistors and is not attenuated at all. In the Test circuit the signal is attenuated when no relay is active.
     
  5. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
    Agree.

    Agree, the relay operation is reversed, but the available attenuator configurations remain the same.
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    Not quite

    In the design circuit the 220k resistor does not change the attenuation since it's connected directly to the input source when the relay is energized (assuming the input source has no significant impedance).
    In the test circuit the 220k resistor does change the attenuation since it's connected to the output of the 2.7k resistor.
     
  7. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
    We are seeing the relay contacts in the 'design circuit' differently. I think the relay common is the upper connection, which makes the configuration the same as the test circuit (except as noted the relay function is reversed).
     
  8. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    You are right.
    I see now, after enlarging the picture, that I interpreted the wiper contact location on the design circuit incorrectly.
    Mea culpa. :oops:

    Here's my simulation of the Test Circuit attenuation for the 4 combinations of relay position:

    upload_2016-7-13_9-27-8.png
     
  9. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    Thanks for your responses! To shed some light, I am toggling the 5V on the relay and listening to both states. I did reverse the order of the output pins of the relay so that when the relay is powered off, volume will be at 0. If this inversion is the only difference, that shouldn't have any effect on the issues I'm having, right?

    My question at it's simplest is: In the "Design Result" circuit, does the bottom row provide any attenuation? If so, what would the first step down from pass-through be?

    I've also assembled a super simplified circuit without the relay to just test this as a simple voltage divider:
    voltage-drop_schematic_Artboard 2.jpg

    When I pull R204 out, I get no difference in sound. Is that just because 220KΩ is too much resistance to audibly hear? I tested other resistor values and I didn't really hear a difference until 500-100Ω.

    I'm starting to think I need to mock up the entire chain of relay/resistor stages to test this properly, but still confused about what the relationship is of the top row resistors to the bottom.
     
  10. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
    You have missed out the 27k resistor at the output of the attenuator.
     
  11. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    Tried it with that too - no difference in sound at all.
     
  12. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
    If you tried this circuit (rather than simulated it), it matters what impedance the input and output are connected to. The circuit assumes zero (= very low compared to 2k7) impedance input and infinite (large compared to 27k) impedance on the output. If these conditions are not met you are going to get different results.
     
  13. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    Yes, you don't hear any difference in you simplified circuit because 220kΩ is so large compared to 2.7kΩ.
    That's only an attenuation of about 0.1dB, which is largely inaudible. (Do you know how to calculate the attenuation of a resistor divider?)
    You need about 3dB to be just audible. The would be when R204 is about twice the value of R202.

    Yes, the bottom row provides attenuation when they are connected by the relay, as my simulation shows.
    Why would you think they wouldn't?

    My simulation of your test circuit showed about -1dB attenuation steps with a maximum attenuation of about -3dB.
    (The Design Result circuit states the average step will be 1.019dB) .
     
  14. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    What do you have connected to the output jack to monitor the output? If it's headphones then you won't notice any attenuation effect, because the resistor values are far greater than the impedance of normal headphones.
     
    squarecircletriangle likes this.
  15. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    Ah, okay. Yes, they are headphones. My understanding of impedance is pretty shallow.

    I intend to use this attenuator in addition to a source selector (more relays) as a device placed in between a few input devices (Aux cable from an iPhone, bluetooth receiver, vinyl record player w/ phono preamp) and powered speakers (Adam A7X). At its simplest, I'm trying to use an Arduino to control the volume and source selection of the analog audio.

    The Adam A7X's input impedance is 30KΩ. With the understanding of what I'm trying to achieve – is this the right approach?
     
  16. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    386
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    If your attenuator will come after the source selector and feed directly into the Adam A7X then you could probably omit the 27k resistor at the attenuator output, since the 30k input impedance of the Adam is a close match.
     
  18. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    This solved it for me - thanks Alec_t! I had no idea to expect different results when actually plugging in the powered speakers. The attenuator works just as it should. Thanks all!

    Out of curiousity, if I wanted to add a headphone out bypass output, how would I modify the attenuator for that? Would it need a completely different set of resistor values?
     
  19. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Good to know it's working for you.
    If you want the attenuator to feed both the Adam A7X and a headphone output then a buffer amplifier stage between attenuator and headphones would probably be better than modifying the attenuator.
    Does the Adam A7X have a headphone output?
     
    Last edited: Jul 15, 2016
  20. squarecircletriangle

    Thread Starter New Member

    Jul 13, 2016
    6
    0
    No it doesn't, but that makes sense. I don't actually need this for my project, but was just curious what the right approach would be for this. Thanks for your help!
     
Loading...