Passive volume control

Hi all,
i wanted to build my own relay based volume control. I've looked thru some designs and came up with a schematic. I still need to connect a display and an encoder. Can someone help/buide me with the best approach to this? I will be using an amega328 programed with arduino ide.

I'm better in drawing pcb's ( at least i think so :slight_smile: ) here's a mockup of the board (top layer) .. the board will have a thicker cupper layer .. will be gold plated and painted with black soldermask ( nothing fancy :stuck_out_tongue: )

thanks
Mike

I don't know what you mean by "encoder", but an I2C LCD would probably be the simplest way of adding a display.

Sorry i ment rotary encoder with push button :slight_smile:
can i connect it to any free pin i/o pins and add interrupts on these pins?

(and about the display) there will be no problem connecting and programing the display with two MCP23008 already connected because of their unique addresses right?

thanks for reply!

zatramusic:
Sorry i ment rotary encoder with push button :slight_smile:
can i connect it to any free pin i/o pins and add interrupts on these pins?

(and about the display) there will be no problem connecting and programing the display with two MCP23008 already connected because of their unique addresses right?

thanks for reply!

Probably simplest to attach the encoder outputs to INT0 and INT1, with the push-button on another, non-interrupt pin.

Your existing MPC23008s don't have unique addresses, because A0-A2 on both are unconnected.

Right .. i forgot about that .. if i give them addresses there will be no trouble adding a display.
I'm not an electronic guru, but i like to make own things. I'll correct the schematic and pcb.

Thanks again for fast replay.

You didn't label your inputs, outputs, grounds, etc...

Is this a balanced circuit? i.e. Do you have "pro audio" XLR connectors (or TRS connectors) instead of RCA connectors? If it's regular unbalanced "home audio", you can cut the number of relays & resistor pairs in half.

You've got a bunch of resistors in series (R1, R3, R5, etc.). That means your audio signal is always going through a bunch of resistors and you can't get to zero attenuation. (You can get close to zero attenuation if the sum of the resistors is small compared to the input impedance of whatever is connected.)

If you look at a standard [u]voltage divider[/u], you should be able to use one resistor for Z2, and switch-in different values of Z1, instead of switching pairs of resistors.

What does K17/K18 do?

Make sure that one relay closes before another opens. Otherwise, you may end-up with a few-millisecond full-volume "glitch" in-between volume-changes.

With any totally passive design, there will be interaction between the voltage divider resistance and the input-impedance of whatever is connected. If the input-impedance is (relatively) high, everything will be OK. But if it's not, you can run-into a situation where you don't get the expected attenuation. i.e. -6dB might end-up being more than -6dB. (At zero attenuation, there should be no problem as long as the series resistance is zero.) That's perfectly OK if you don't need precision.

So.... I'd "feel better" with an op-amp buffer stage at the output, and possibly another buffer at the input. I can understand your desire to keep it "pure" and passive, but personally I'd buffer....

You might consider analog switches as an alternative to relays. You can get an IC with several analog switches in one package... It's a little more "high tech" and less "clunky" than relays.

Or, you might consider a digital pot.

Hi DVDdoug, your right .. i have to label them :slight_smile:

this is a balanced circuit .. the relays are set so, that in non energized condition the circuit has maximum attenuation. In energized state they are dosconnected/ommited.

The impedance and resistor values will be calculated on this site
http://www.eijndhoven.net/jos/attenuator-calculator/index.html

7 stages with 1dB resolution from 0 to -127dB :slight_smile:

k17, k18 is used as a source selector.

Thanks for the buffer tip :wink: but i would like to stay pure and precise :slight_smile: maybe in my next project.

You could also look at the PGA2310 or 2311 volume control chips. I'm using the 2311, and the sound quality is fantastic.

Ian.