relay based attenuator

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello,

Since there is no Amplifiers/Pre-amps forum, and the attenuator will be used with my chipamp, I am posting this here :)

Attached is the principal schematic of my relay based attenuator.
I have drawn only 4 relays i.o. the 13 relays needed, but that is because the cad tool's interface was :bawling: & :mad:.

I want relays i.o. the normal switch most people use for 2 reasons:
- being lazy I need a remote.
- being lazy I need a remote.

An externally hosted image should be here but it was not working when we last tested it.

This is how it is supposed to work:
There are 3 relays in the diagram connected to the multi-tap transformer, each of these relays is connected to 2 taps on the transformer. By activating one of these 3 relays 2 taps are connected to the 4th relays. This 4th relay is used for selecting either of these 2 'active' taps.

The relays are activated by the 74595 IC (through a driver not shown on the schematic)
The 595 can be controlled using only 3 wires, and by 'daisy chaining' the 595's a sufficient number of outputs is available.
Using opto-couplers the 595's are isolated electrically from the microcontroller board, and only when the volume is changing there is digital activity.
As a result there should be almost no spikes or other nasty things near the analog signals.

Per channel I would need a single board, using the daisychaining feature there is no real limit to the number of channels or taps on the transformers (for me it would be 2 channels and 24 taps transformers).

Does all this look like a project that could result in something good?
I can't find any flaws, but that probably only indicates that I'm not searching hard enough for them :)

Thanks for your input,

Peter
 
squadra said:
Attached is the principal schematic of my relay based attenuator.
I have drawn only 4 relays i.o. the 13 relays needed, but that is because the cad tool's interface was :bawling: & :mad:.
I'm working on the same thing, as you may have seen here: http://www.diyaudio.com/forums/showthread.php?s=&threadid=43067
But I use resistors (and six relays) instead of a transformer.

This is how it is supposed to work:
There are 3 relays in the diagram connected to the multi-tap transformer, each of these relays is connected to 2 taps on the transformer. By activating one of these 3 relays 2 taps are connected to the 4th relays. This 4th relay is used for selecting either of these 2 'active' taps.
That way the signal will pass through two relays - some will say that's very bad ;)

The relays are activated by the 74595 IC (through a driver not shown on the schematic)
The 595 can be controlled using only 3 wires, and by 'daisy chaining' the 595's a sufficient number of outputs is available.
I built a similar board a couple of months ago. You can see a bad photo here: http://stiftsbogtrykkeriet.dk/~mcs/SowVol2.jpg (the one at the bottom). I used an Allegro chip instead of the 595s. That way you can get 32 outputs with relay drivers using one chip instead of 8. The board has drivers for two channels (64 relays) and 16 aditional relays using the 595 and ULN chips on the right.

Using opto-couplers the 595's are isolated electrically from the microcontroller board, and only when the volume is changing there is digital activity.
Why? The clock signal will be off (i guess) when you are not changing positions. So I don't see what the optocouplers will achieve?

Best regards,

Mikkel C. Simonsen
 
TwoSpoons said:
Why not just use a volume control chip like the PGA2311?
I hope you mean the 2310?

The reason I don't like the 2310 a lot, is that you need a buffer on the input (if you read the datasheet), you also get an op. amp. on the output. That's two op. amps. that are not required in a transformer/resistor attenuator. You also get more distortion from the CMOS switches in the chip than you get from relays.

The attenuators I make can be made in any impedance, any number of steps (I think 64 is more than enough) and they can handle large signal swings without problems.

Best regards,

Mikkel C. Simonsen
 
Re: Re: relay based attenuator

mcs said:

I'm working on the same thing, as you may have seen here: http://www.diyaudio.com/forums/showthread.php?s=&threadid=43067
But I use resistors (and six relays) instead of a transformer.

That's cool, but I would like to use the transformers because they apparently have higher dynamics on low volumes.
With my solution there is no step where 2 relais need to switch their state.
Your site looks nice, btw.
Too bad you didn't use a PIC, that could have made it easier for me :)


That way the signal will pass through two relays - some will say that's very bad ;)
Some people can even hear differences in the direction a cable is connected in, even when an audio signal is alternating in it's nature :)


I built a similar board a couple of months ago. You can see a bad photo here: http://stiftsbogtrykkeriet.dk/~mcs/SowVol2.jpg (the one at the bottom). I used an Allegro chip instead of the 595s. That way you can get 32 outputs with relay drivers using one chip instead of 8. The board has drivers for two channels (64 relays) and 16 aditional relays using the 595 and ULN chips on the right.

I'm not going to try to solder that chip on a pcb :)
The 595 & driver ic's are very cheap and I can get them in the shop-around-the-corner.


Why? The clock signal will be off (i guess) when you are not changing positions. So I don't see what the optocouplers will achieve?
That is true, and exactly why I will use the optocouplers :)
The clock on the digital board isn't stopped, and this way there is a very high degree of separation between analog and digital boards. Well, that's my aim anyway :)



Best regards,

Mikkel C. Simonsen

Cheers,

Peter
 
TwoSpoons said:
Why not just use a volume control chip like the PGA2311?
256 steps, 0.5dB/step, SNR of -114dB (IIRC), simple SPI interface to the micro, which can be daisy-chained.

I'm putting 3 of them in my 6-ch home theatre amp.

Because I wanted to check if these transformer based attenuators sound better as some people claim, and it is a nice, fairly easy project.

Cheers,

Peter
 
I built a relay attenuator for a headphone project and it was very fun. I will just share what I learned from that project. The design works great and functions as a wonderful attenuator but man, it is noisy. If I were to implement the design again (and I might), here's what I would do:

1) Use relays with an electrostatic shield. The relays I used couple a lot of noise into the signal.

2) Use low-noise resistors. Because my design is a series attenuator, with 16 resistors in the signal path, the resistor noise adds up easily.

3) Use a regulated power supply. The amount of current required to drive the relays and electronics turned out to be quite significant. I initially had used a simple zener and pass transistor regulator, but that wasn't enough regulation and it overheated anyway.

Don't listen to anyone who says you can't drive a relay with a '595. I drive the relay straight off a '595 without any problem.
 
I do mean the 2311.

The THD+N is quoted as 0.0002% at 1khz. Thats going to be completely swamped by the distortion in the LM4780.

I have an input buffer anyway - INA163 - because I'm doing balanced inputs to try to kill the hum loops that inevitably form when connecting several pieces of equipment together.

Good luck with the relays - make sure you pick signal relays, as the power relays require a decent 'wetting' current to keep the contacts clean.

A trafo with less than 0.0002% distortion is going to be a costly beastie, silicon is much cheaper and I'm on a budget ;).

Edit: Just noticed something - the input impedance seen by your source is going to change according to which tap you pick. Is this OK for you?
 
jwb said:
1) Use relays with an electrostatic shield. The relays I used couple a lot of noise into the signal.
I have made a small testboard with different relays. I have had no noise problems at all with those (and I don't think they have shields).

2) Use low-noise resistors. Because my design is a series attenuator, with 16 resistors in the signal path, the resistor noise adds up easily.
I have 6 resistors max. so the problem should be smaller.

3) Use a regulated power supply. The amount of current required to drive the relays and electronics turned out to be quite significant. I initially had used a simple zener and pass transistor regulator, but that wasn't enough regulation and it overheated anyway.
I always use an 7805 - I have a lot of them :)

Don't listen to anyone who says you can't drive a relay with a '595. I drive the relay straight off a '595 without any problem.
Depends a lot on the type of relay. A common type like the Omron G5V needs about 100mA as far as I remember...

TwoSpoons said:
I do mean the 2311.
Why not use the 2310 with the added headroom and (i assume) lower real-life distortion?

The THD+N is quoted as 0.0002% at 1khz. Thats going to be completely swamped by the distortion in the LM4780.
That distortion is probably not the worst-case distortion...

A trafo with less than 0.0002% distortion is going to be a costly beastie, silicon is much cheaper and I'm on a budget ;).
But transformer distortion may sound a lot nicer than silicon distortion :D

Edit: Just noticed something - the input impedance seen by your source is going to change according to which tap you pick. Is this OK for you?
Who are you talking to here?

Best regards,

Mikkel C. Simonsen
 
jwb said:
I built a relay attenuator for a headphone project and it was very fun. I will just share what I learned from that project. The design works great and functions as a wonderful attenuator but man, it is noisy. If I were to implement the design again (and I might), here's what I would do:

1) Use relays with an electrostatic shield. The relays I used couple a lot of noise into the signal.

2) Use low-noise resistors. Because my design is a series attenuator, with 16 resistors in the signal path, the resistor noise adds up easily.

3) Use a regulated power supply. The amount of current required to drive the relays and electronics turned out to be quite significant. I initially had used a simple zener and pass transistor regulator, but that wasn't enough regulation and it overheated anyway.

Don't listen to anyone who says you can't drive a relay with a '595. I drive the relay straight off a '595 without any problem.

Build another version, it is fun and also nice to discuss :)

1+2: How much noise is generated by the resistors, and how much by the relais?

3: There will be a regulated power supply, probably using a simple 7805.

BTW, I'm not going to skip the drivers, they are cheap and it could be a problem if i have a pcb created and the current required is too high for the 595's.

TwoSpoons said:
I have an input buffer anyway - INA163 - because I'm doing balanced inputs to try to kill the hum loops that inevitably form when connecting several pieces of equipment together.
Wouldn't the isolation provided by a transformer be very useful for that?


Good luck with the relays - make sure you pick signal relays, as the power relays require a decent 'wetting' current to keep the contacts clean.
The relay I have in mind is Zettler's ZA832, a small gold plated relay.
Over here they are about 3 euro each (and cheaper in larger numbers)

Edit: Just noticed something - the input impedance seen by your source is going to change according to which tap you pick. Is this OK for you?

The input impedance of the chip amp is about 100k, if the transformer is ideal then the impedance as seen by the source is 100k or higher.
My source has buffered outputs, but even without buffer I think all should be well.

Peter
 
mcs said:
It looks fine to me. But why don't you just use one relay for two consecutive tabs? Like 0 and -2dB? I think that would make the wiring easier.
I don't use 2 tabs because there is a difference in the switching.
When we use 4 relays there are 6 possible positions:
Code:
Pos Rel1 Rel2 Rel3 Rel 4
 0    1     0     0     0
 1    0     1     0     0
 2    0     0     1     0
 3    0     0     1     1
 4    0     1     0     1
 5    1     0     0     1
As you can see switching between 2 positions requires 2 relais to change their state (except from pos. 2<->3, in that case only relay 4 is (de-)activated)

In your proposal we have:
Code:
Pos Rel1 Rel2 Rel3 Rel 4
 0    1     0     0     0
 1    1     0     0     1
 2    0     1     0     0
 3    0     1     0     1
 4    0     0     1     0
 5    0     0     1     1
In this case either we have 1 relay changing state (i.e. from pos. 0<->1) or 3 relays changing state (i.e. from pos 1<->2)

There is no difference in complexity of the pcb, the transformer wires are long enough and they will be connected on the pcb right beside the relays.


I'll draw a dual-channel, single-chip version of that schematic later today (if you don't mind...) :)
I don't mind at all, the more the merrier :)

Best regards,

Mikkel C. Simonsen

Cheers,

Peter
 
squadra said:
I don't use 2 tabs because there is a difference in the switching.

OK. But I have made attenuators where up to 6 relays change state at the same time (using one right now), and that's no problem.

There is no difference in complexity of the pcb, the transformer wires are long enough and they will be connected on the pcb right beside the relays.
Yes, but if you use resistors my option is easier (unless I've overlooked a layout option). It looks like everything will fit on a single-sided euroboard...

Best regards,

Mikkel C. Simonsen
 
Everything did fit on a Euroboard - just.

Here's the layout:
RelVol2_PCB.gif


I don't think it can be made a lot smaller/simpler than that... And when using a transformer either switching arrangement can be made using this board design I just realized.

Best regards,

Mikkel C. Simonsen
 
mcs said:
Everything did fit on a Euroboard - just.

Here's the layout:
I don't think it can be made a lot smaller/simpler than that... And when using a transformer either switching arrangement can be made using this board design I just realized.

Best regards,

Mikkel C. Simonsen

Nice, but I didn't check the traces :)
I've read that the relays should be at least 5mm apart from eachother to prevent them from interfering.
Maybe that's not true for all dil relays?

You could also connect the 4 unused outputs to relais for input switching.
That would lead to a 1 IC preamp wih 4 inputs and passive attenuation :D

Cheers,

Peter
 
squadra said:
Nice, but I didn't check the traces :)
I didn't get any DRC errors, so if the schematic's OK then...

I've read that the relays should be at least 5mm apart from eachother to prevent them from interfering.
Maybe that's not true for all dil relays?
I have read that also. I also once found a datasheet that explained why. The manufacturers cannot guarantee that the relays work correctly if you operate them on low voltages, submit them to shock and strange temperatures etc. all at once, unless you keep that distance. For normal use you can place them a lot closer - and I have done so in the past.

You could also connect the 4 unused outputs to relais for input switching.
That would lead to a 1 IC preamp wih 4 inputs and passive attenuation :D
Yes, if only there was more space left on the PCB... :(

Best regards,

Mikkel C. Simonsen
 
OK, I also have been playing around with the pcb design package.

I have created 1/2 a board.
To get a complete channel you would assemble 2 boards and daisychain them.
Placing them on top of eachother allows me to build a really compact housing.

The pcb is 80 * 50 mm (about 3" * 2").
IC1 = ULN2803
IC2 = 74595 in SMD package
C1 = 100nF
Rel1..7 could be Zettler AZ832 or similar

Top layer:
An externally hosted image should be here but it was not working when we last tested it.


Bottom layer:
An externally hosted image should be here but it was not working when we last tested it.


Silkscreen:
An externally hosted image should be here but it was not working when we last tested it.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.