I'd like to be able to control about 7 or 8 5V G6K relays without consuming 7 output pins. This will be used to control a resistor ladder network for audio volume control.
I'm just not clever enough to figure out the best way to do this... anyone have any suggestions?
The only way to use truly one pin is to use 1 wire bus devices. You can get I/O expanders for this, but if you have two wires free then a shift register is better.
Anyway relays for a volume control? Don't they make a noise and using 8 of them is only going to give you 256 steps in the volume control, and linear control at that.
I should probably clarify - the title of the topic probably isn't accurate. I should state that I want to get away with using as few pins as possible.
256 steps of control should be fine. Since it's a ladder network for signal attenuation, I can vary the value of the resistors to approximate a logarithmic control. I was thinking of something like what's been done with the "Joshua Tree" product over at Twisted Pear Audio (see: Joshua Tree - A Twisted Log Attenuator). Though they are using a ATiny85 and I2C control. There's a schematic for the relay & control boards over @ DIY Audio but it's not complete (see: A twisted tale about a logarithmic relay attenuator | Page 3 | diyAudio, down near the bottom)
I could just mimic what Russ has done with the JT - but I figure I got this Ardunio sitting here that used to be the heart of an aquarium temp controller, a 20x4 LCD backpack and a parts bin full of goodies that I ought to be able to tie into a nice volume control and source selector unit. The Arduino is probably overkill for this, but I don't have any other projects to use it for at the moment.
As for a click - the Omicrons are pretty quiet, and it's easy to do. Using the relays keeps the signal and control paths separate as well. In the past I've just picked up some logarithmic pots, but good ones that don't cause pops or hissing are awfully hard to find.
I'll look into the 595 suggestion. I was thinking a shift register would work when I originally posted, but I've never used one before and don't have any on hand. Looking at the tut that CaptianObvious posted should work just fine I think.