Pop/click free HW-based relay attenuator V2

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Really a nice design but do I understand it right that balanced operation ist not possible with your attenuator?

Currently not.

However, I am working on a V3 with all the bugfixes included and an option for adding expander boards on top of the mainboard so you would get a stack of boards. Then you could expand the attenuator from 2 channels to 4, 6, or 8 channels.

It is a work in progress so I have no ETA, but a guess is sometime from September and onwards.

I have some other stuff I am working that also needs some attention.

But the cat is out if the bag, V3 is going to happen.
 
Last edited:

fab

Member
Joined 2004
Paid Member
Simple really. If you were to control the realys without the Flip-flops you might risk having no attenuation at times when changing volume. Remember, when the realys are not turned on you have maximum attenuation, so when you turn up the volume you turn relays on and some off, but when you reach full volume, no attenuation, all relays are on. The problem is that realys do not make or break instantly, as an example, the realys I used has a make or break time of 3ms max, but it could be anywhere between ~1.5-3ms according to the datasheet.

Worst case is going from 1000000 to 0111111 where you might risk turning on all the LSB relays before you turn the MSB relay off. Basically you could risk it going from 1000000 to an intermediate value of 1111111 before you end up at your desired value of 0111111. 1111111 would be the same as no attenuation at all, not good.

By using 2 x octal flip-flops with their outputs fed into quad dual input and gates you can now control when the relays turn on and off.

Using the same example as above, you will now go from 1000000 to an intermediate value of 0000000 and end up at the final value of 0111111. Here 0000000 being full attenuation.

It is all about timing, you first take the realys that need to be turned off and turn them off and then 5ms after you turn on the relays that needs to be turned on. A full cycle take 10ms.

Hope that answers your question. :)
Nice project you have here :)

I wonder if only a delay of 5 to 10ms to turn on each relay and no delay for turn off each relay would also prevent the click and pop...
Thanks
Fab
 
@Neutrality
may I ask you why did you choose to supply U11 and U12 with diffrent supply than VCC?


I wanted to be sure that the input to the ADC could go all the way to the reference voltage to get all 1's at the output. Since the ADC reference voltage and the voltage for the potentiometer is both 5VDC the opamps in the input need to be able to go rail to rail. But since they can't, I supply them with a higher supply voltage and the problem is now solved.

Technically I might not need them to go all the way to 5VDC since I am not using the the lowest bit for relay control, but I do not know the input impedance of the ADC so I wanted to be absolutely sure that the ADC input could reach a point that was close enough to the reference voltage.

Hope that explains it.
 
Last edited:
Nice project you have here :)

I wonder if only a delay of 5 to 10ms to turn on each relay and no delay for turn off each relay would also prevent the click and pop...
Thanks
Fab

Actually you could do something else, use a buffer, resistor, capacitor and a diode at each output of the ADC and you have something that might work.

You end up saving 2 x octal flip flop, 2 x quad dual input and gates and 4 x 100nF capacitors. But then instead you need an IC with 7 buffers + capacitor for it, 7 resistors, 7 capacitors and 7 diodes and it will end up taking more or less the same space and the cost wont be much different.

I wont go into detail about it since it is not something I feel like doing. It was just an idea I got and there might be a few issues I haven't thought about.
 

fab

Member
Joined 2004
Paid Member
Actually you could do something else, use a buffer, resistor, capacitor and a diode at each output of the ADC and you have something that might work.

You end up saving 2 x octal flip flop, 2 x quad dual input and gates and 4 x 100nF capacitors. But then instead you need an IC with 7 buffers + capacitor for it, 7 resistors, 7 capacitors and 7 diodes and it will end up taking more or less the same space and the cost wont be much different.

I wont go into detail about it since it is not something I feel like doing. It was just an idea I got and there might be a few issues I haven't thought about.

Actually my comment intent was not to change your design but to get your opinion so I can try to save an another existing implementation from eBay with that pop problem...
Thanks for your response since there seems to be hope to fix my built per your experience...
Fab
 
Actually my comment intent was not to change your design but to get your opinion so I can try to save an another existing implementation from eBay with that pop problem...
Thanks for your response since there seems to be hope to fix my built per your experience...
Fab

I did not see your comment as that, so no worries. :)

I could give you a more detalied desciption of my alternative idea in the next few days, if you are interested. It is not something I have tried but it might work.
 

fab

Member
Joined 2004
Paid Member
Hi
Thanks for your offer.
This is the circuit I had in mind in my existing setup (I do not want to hijack your thread...). I have built a point to point prototype for test purpose but only for 4 of the MSB relays. It has reduced a lot the pop associated with the worst relay contact change.
The input of the delay circuit is the eBay pcb output and the output is shown as the led and resistor at collector output which simulates the relay coil.
The drawback is a small perceived volume reduction upon MSB relay position change. Maybe the delay is too long....

Fabien
 

Attachments

  • IMG_2051.PNG
    IMG_2051.PNG
    166.3 KB · Views: 320
Last edited:
The drawback is a small perceived volume reduction upon MSB relay position change. Maybe the delay is too long....

That small perceived volume reduction is unavoidable. To get rid of huge uncontrolled pops in the signal you have to go to a lower intermediate volume level before you end up at your final volume level.

Another thing that is unavoidable is what I call "temporary DC". This is because there is no zero-crossing detection and since you can't implement zero-crossing detection when using relays you have to live with the fact that the relays might switch ON at the peak of the waveform, which is going to sound like a very small pop. This is something that all attenuators based on relays have, even expensive high end commercial offerings with built in R-2R attenuators. Even my own attenuator sesign has that "feature".

Something else, have you tried to measure the actual release time of your relays? Looked at the datasheet values for release time? Depending on the quality of relay it might be longer than 10ms and a flyback didoe across the relay could make the release time it even longer. Knowing the operate and release time of the relays used is a must if you want to have any success at making a timing circuit.
 
Last edited:
How to do a Delayed ON and fast OFF circuit.

You have already made a circuit that does it, and my suggestion is similar.

Input to the buffer is the output from the ADC.

The FET is the low side relay driver.

Input goes high and it charges the capacitor through the resistor, and turns on the FET which turns ON the relay. Simple delay, adjust the resistor and capacitor values, taking in consideration the VGS of the FET, to get the required delay. The diode does nothing since it is reverse biased.

When the input to the buffer goes low, the capacitor is discharged more or less instantly due to the diode now being forward biased and the relay goes OFF.

The buffer could be an IC with 7 or 8 buffers in a single package. The FET relay driver could be something like an ULN2003V12 which has 7 low side FET drivers and includes flyback diodes and ESD protected inputs.
 

Attachments

  • Delay.png
    Delay.png
    13.3 KB · Views: 279
Last edited:
Member
Joined 2011
Paid Member
I just use an inexpensive 2N5551 relay drive transistor rated VCEmax = 160 volts, plus a flyback clamp (51V zener diode) from collector to ground. The flyback pulse in this circuit is tall and very narrow, which turns the relay OFF very quickly. About 5X faster than a ULN2003 can turn off the relay with its inbuilt diode-to-COM-pin-9.

The super low cost MPSA42, beloved by Nixie tube hobbyists everywhere, is even cheaper and is rated for even higher maxVCE: 300 volts. Here it is for $0.05, qty=1

_
 

Attachments

  • relay_driver.png
    relay_driver.png
    8.2 KB · Views: 274
Last edited:
I just use an inexpensive 2N5551 relay drive transistor rated VCEmax = 160 volts, plus a flyback clamp (51V zener diode) from collector to ground. The flyback pulse in this circuit is tall and very narrow, which turns the relay OFF very quickly. About 5X faster than a ULN2003 can turn off the relay with its inbuilt diode-to-COM-pin-9.

The super low cost MPSA42, beloved by Nixie tube hobbyists everywhere, is even cheaper and is rated for even higher maxVCE: 300 volts. Here it is for $0.05, qty=1

_

It is a good alternative to the ULN200X series of relay drivers if you absolutely need/want very fast relay release times.

I have actually measured(*) the Omron G6K 5VDC relays I use in my project together with an ULN2003V12 relay driver and the results are far better than expected. The G6K datasheet max operate/release time of 3ms, typical value around 1.5ms and this is without using a flyback diode.
If I remember correctly I measured around 2-3ms release time while using the included flyback diode in ULN2003V12. I also measured the voltage peak, it peaked at about 5.7 VDC, as expected and was down to 5VDC after around 1ms.

(*) I won't guarantee that I haven't made an error somehow when doing my measurements, but did them several times with the same resuslt so they should be accurate.
 
Member
Joined 2011
Paid Member
Connect 5 relays to form an inverting ring oscillator. Now with an oscilloscope you can VERY accurately measure turn-off time, including both the coil delay and the armature/contact delay. Why 5 relays? To give the armature plenty of time to settle down and reach steady state equilibrium after switching. 7 relays would be even better.
 

fab

Member
Joined 2004
Paid Member
That small perceived volume reduction is unavoidable. To get rid of huge uncontrolled pops in the signal you have to go to a lower intermediate volume level before you end up at your final volume level.

Another thing that is unavoidable is what I call "temporary DC". This is because there is no zero-crossing detection and since you can't implement zero-crossing detection when using relays you have to live with the fact that the relays might switch ON at the peak of the waveform, which is going to sound like a very small pop. This is something that all attenuators based on relays have, even expensive high end commercial offerings with built in R-2R attenuators. Even my own attenuator sesign has that "feature".

Something else, have you tried to measure the actual release time of your relays? Looked at the datasheet values for release time? Depending on the quality of relay it might be longer than 10ms and a flyback didoe across the relay could make the release time it even longer. Knowing the operate and release time of the relays used is a must if you want to have any success at making a timing circuit.

These are vary valid points.
The relays from the eBay pcb are EA2 from NEC with 1ms release time but excluding bounce time according to data sheet. It is true that I have also added fly back diode (1N914) on coil....

Zero crossing detection is implemented with PGA2311 but I suppose that you mean that with "slow" relays it is too difficult to implement....
With fast SSR instead of slow relays that me be achievable....

Fab
 

fab

Member
Joined 2004
Paid Member
How to do a Delayed ON and fast OFF circuit.

You have already made a circuit that does it, and my suggestion is similar.

Input to the buffer is the output from the ADC.

The FET is the low side relay driver.

Input goes high and it charges the capacitor through the resistor, and turns on the FET which turns ON the relay. Simple delay, adjust the resistor and capacitor values, taking in consideration the VGS of the FET, to get the required delay. The diode does nothing since it is reverse biased.

When the input to the buffer goes low, the capacitor is discharged more or less instantly due to the diode now being forward biased and the relay goes OFF.

The buffer could be an IC with 7 or 8 buffers in a single package. The FET relay driver could be something like an ULN2003V12 which has 7 low side FET drivers and includes flyback diodes and ESD protected inputs.

Since the output of the eBay pcb to drive the relays are open collectors, I may use an resistor to V+ at input of inverters IC. The solution with 2 IC instead of discrete transistors is elegant. Thanks
Fab
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.