ADC0804 Relay Attenuator - diyAudio
Go Back   Home > Forums > Source & Line > Analog Line Level

Analog Line Level Preamplifiers , Passive Pre-amps, Crossovers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 21st November 2013, 03:08 PM   #1
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Default ADC0804 Relay Attenuator

64 step relay attenuator using an ADC0804 8-bit ADC.

I am not using the 2 lowest lsb's.

The biggest problem when using something like an ADC0804 together with relays for attenuation purposes is that you can get situations where one relay releases(breaks) before other relays has time to operate(make). This is especially a problem with 100000>011111 transitions where you risk having no attenuation if the first relay turns off before the 5 other relays activates.

The solution is to implement a make before break action. This is usually done by having a microcontroller control all the relays which makes it easy to insert delays that give you the desired make before break action.

However, what if we could use the characteristics of the relays to get the same desired make before break action?

Looking at the datasheet for the excellent low signal relay Omron G6K-2P-Y it is shown that operate and release times are identical at 3mS MAX with 1.4mS as a typical value. Bummer. However, when designing with relays it is good practice to include a flyback diode to protect the BJT or FET used for switching on/off the relay. The downside to this is that you get longer release times, usually on the order of 5+ mS.

In this case the longer release times should in theory give you enough time delay between the making and breaking of the relays to avoid the no attenuation situation.

This is what I have tried to implement here.

The pot should be wired so that when it is turned fully ccw, you get the full voltage to the ADC which makes all the relays go on and giving you full attenuation. Now as you turn the relay the voltage drops, turning on/off relays as you go. Since we have slowed down the release time due to using a flyback diode all the relays should in theory ensure you get a make before break action at all times.

Does the theory hold true in real life? I do not really know but I have convinced myself that it would work just fine.
Attached Images
File Type: png RAB-schematic.png (51.9 KB, 406 views)
File Type: png RAB-Layout.png (190.3 KB, 400 views)

Last edited by Neutrality; 21st November 2013 at 03:11 PM.
  Reply With Quote
Old 24th November 2013, 10:15 AM   #2
Nisbeth is online now Nisbeth  Denmark
diyAudio Member
 
Nisbeth's Avatar
 
Join Date: Jan 2001
Location: Denmark
Looks good - let us know if you build a prototype

/U.
__________________
DIY projects blog
  Reply With Quote
Old 24th November 2013, 12:00 PM   #3
dmills is offline dmills  United Kingdom
diyAudio Member
 
Join Date: Aug 2008
Location: High Wycombe
If you were to use say a 6V relay with a resistor to the +12V rail, and placed a cap from the junction to the negative rail, then on switch on the relay would see 12V dropping to 6V once the cap discharged.

Where to place the catch diode takes thinking about, and using a low Vf diode will also delay the turn off.

This is a fairly standard trick in TR switches in HF radios where getting the antenna transfer relay over quickly improves the operational experience (especially when sending morse).

73 Dan.
  Reply With Quote
Old 7th January 2014, 06:17 PM   #4
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Sorry for the crappy picture.

It is alive and it works!

It has 64, 1.3 dB steps, min volume is essentially the same as mute.

I do have some "popping" sounds when turning the volume, from min volume to max volume I get about 2-3 "pops" and the same when turning down the volume.

Also, it is possbile to set the pot so that the realys goes into full chatter mode, not a good thing but it happens rarely.

The sound? Hard to say what the difference is between this and a cheap Alps RK27. However, what the relay attenuator definately does better is channel balance, it is perfect all the way down to min volume.

Also it does sound a little bit clearer and more detailed than before, but that could just as well be my mind playing a few tricks on me.

Could I live with the few "pops" and the risk of the relays going into full chatter mode? Hard to say, I definately have to play around with it some more.
Attached Images
File Type: jpg 20140107_195617.jpg (550.4 KB, 290 views)

Last edited by Neutrality; 7th January 2014 at 06:21 PM.
  Reply With Quote
Old 7th January 2014, 06:30 PM   #5
diyAudio Moderator Emeritus
 
jean-paul's Avatar
 
Join Date: Sep 2002
Location: Germany
Quote:
Originally Posted by Neutrality View Post
Also it is possible to set the pot so that the relays go into full chatter mode, not a good thing but it happens rarely.

Hi, why is that and can it be solved ? Software thing ? Better still include the flyback diodes although IC2 is supposed to be protected or at least add the pads.

Just an idea: this device will probably be mounted on the internal back side of the preamp/amp ? Why not include the potentiometer on the board and operate it with an extension rod ? When the MKDSN connector is also added the device will be more versatile. I get carried away but just 4 relays added would make it a complete input switcher and volume control board (totally passive)....

Also please consider the use of an RC filter at the input to keep our friends HF and RF outside.

Do I hear Group Buy ? I am sure I did !
__________________
It's only audio. Official member of the Norske Brillegeit Gang.

Last edited by jean-paul; 7th January 2014 at 06:41 PM.
  Reply With Quote
Old 7th January 2014, 06:41 PM   #6
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Quote:
Originally Posted by jean-paul View Post
Hi, why is that and can it be solved ? Software thing ?

Do I hear Group Buy ? I am sure I did !
There is no software, the ADC0804 is n 8-bit uP compatible A/D Converter, there is no software needed.

You basically just have a pot with the same voltage on it as the ADC0804 is supplied with and use that to vary the voltage the ADC0804 sees on its inputs and it corverts it into bits, which controls the relays.

The chatter most likely happens when you turn the pot and end up with a voltage that is just between 2 different bits and that makes the ADC0804 go crazy. I could probably add a decoupling cap to the input pin and see if that makes any difference.

The 2-3 "pops" I get is most likely something I will have to live with, but who knows, I might find a solution at a later date.

Group buy? I don't know, almost everything is SMD and people would have to live with the occasional "pop" and relay chatter.

Last edited by Neutrality; 7th January 2014 at 06:52 PM.
  Reply With Quote
Old 7th January 2014, 06:50 PM   #7
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Quote:
Originally Posted by jean-paul View Post
Better still include the flyback diodes although IC2 is supposed to be protected or at least add the pads.

Also please consider the use of an RC filter at the input to keep our friends HF and RF outside.
IC2 has flyback diodes included in the IC, no external flyback diodes required.

There will be an RC filter on a separate Input Gain board, that will be connected before the Attenuator.

Basically my plan is this :

Input Gain Board(variable between 2 gain settings, most likely 1x(0dB) and 2x(6dB)) > Attenuator > Output gain boards(Fixed 2x(6dB) gain, output buffer, BUF634).

Last edited by Neutrality; 7th January 2014 at 07:08 PM.
  Reply With Quote
Old 7th January 2014, 06:55 PM   #8
diyAudio Moderator Emeritus
 
jean-paul's Avatar
 
Join Date: Sep 2002
Location: Germany
Quote:
Originally Posted by Neutrality View Post
There is no software, the ADC0804 is n 8-bit uP compatible A/D Converter, there is no software needed.

You basically just have a pot with the same voltage on it as the ADC0804 is supplied with and use that to vary the voltage the ADC0804 sees on its inputs and it corverts it into bits, which controls the relays.

The chatter most likely happens when you turn the pot and end up with a voltage that is just between 2 different bits and that makes the ADC0804 go crazy. I could probably add a decoupling cap to the input pin and see if that makes any difference.

The 2-3 "pops" I get is most likely something I will have to live with, but who knows, I might find a solution at a later date.

Group buy? I don't know, almost everything is SMD and people would have to live with the occasional "pop" and relay chatter.
Got that, was reacting too fast and I reread. So it could be "in between" bits or maybe the potentiometer that varies value in a certain angle ? What if you use a stereo potentiometer with both channels in parallel just to test ? Can hysteresis be added ? Just asking as I am not familiar with this solution> Mostly I see the PIC buzzword when reading about relay driven volume control...

IMO the device asks for a GND reference resistor as the series resistors always are in series but their value can change. They are however always connected. The shunt resistor for the chosen volume level can momentarily loose its connection to GND as the relay is switching so GND reference is lost for a short while. This would cause plops either from loosing GND or from an unexpected change in volume..... So 1 resistor that always makes GND reference after R11/R12 could be enough if GND reference is what's needed. Or it is simply the lack of timing possibilities for "make before break" which would aks for a PIC. Just thinking out loud.

- A shunt resistor from the middle pin of the potentiometer to GND to have a resistance value and no open input of the ADC if it scratches or has conduction problems ?

- From the middle pin of the potentiometer an RC filter to the input pin of the ADC ?

And RC filters at both boards at different - 3 dB values wouldn't hurt.
__________________
It's only audio. Official member of the Norske Brillegeit Gang.

Last edited by jean-paul; 7th January 2014 at 07:10 PM.
  Reply With Quote
Old 7th January 2014, 07:07 PM   #9
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Quote:
Originally Posted by jean-paul View Post
Got that, was reacting too fast and i reread. So it could be "in between" bits or maybe the potentiometer that varies value in a certain angle ? What if you use a stereo potentiometer with both channels in parallel just to test ? Can hysteresis be added ? Just asking as I am not familiar with this solution> Mostly I see the PIC buzzword when reading about relay driven volume control...

IMO the device asks for a GND reference resistor as the series resistors always are in series but their value can change. They are however always connected. The shunt resistor can momentarily loose their connection to GND as the relay is switching so GND reference is lost for a short while. This would cause plops either from loosing GND or from an unexpected change in volume..... So 1 resistor of 100 kOhm after R11/R12 could be enough if GND reference is what's needed. Just trying to help.
Hysteresis? Well, It could probably be added but that would increase the complexity and it would be easier to do everything in software instead and software, that is not something I do.

There is already an resistor after R11/12, it is in the amp the attenuator is connected to, it is 21K5(it should ideally be 10K, but for testing purposes 21K5 will do).
  Reply With Quote
Old 7th January 2014, 07:11 PM   #10
diyAudio Member
 
Join Date: Oct 2004
Location: Denmark
Quote:
Originally Posted by jean-paul View Post
Or it is simply the lack of timing possibilities for "make before break" which would aks for a PIC. Just thinking out loud.
Exactly, that is most likely the issue, I hoped my implementation of it would work around that without the need for a PIC or similar processor

It does seems to have minimized the issue somewhat since I only get the aforementioned 2-3 "pops" in a full turn of the pot.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Yet another relay attenuator jwb Solid State 34 21st July 2010 07:17 AM
YET another relay attenuator question robmil Solid State 0 14th April 2008 05:44 AM
Relay Attenuator for tube amp Vidi Tubes / Valves 9 11th December 2006 04:09 PM
relay based attenuator squadra Solid State 21 1st December 2004 10:10 PM
Ladder relay attenuator or so? Eccu Solid State 0 6th October 2003 11:00 AM


New To Site? Need Help?

All times are GMT. The time now is 07:17 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2