Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

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

R-2R attenuator PCB layout question
R-2R attenuator PCB layout question
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 4th January 2015, 08:56 PM   #1
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Question R-2R attenuator PCB layout question

Hello!

I've been playing around with R-2R attenuator board for my diy system. The attenuator will be controlled by the Arduino. The attached schematic is fairly standard. I have sketched two possibilities: with through hole and SMD resistors. I have not decided yet which way to go but am more inclined towards SMD version. I also decided to wire the relay coils off board via the pinheads. I've tried to follow the signal while routing the PCB but may have overlooked something. I am new to the PCB design.

Could some of the gurus advise me if either side of the PCB (through hole or SMD) have problems? Any input is highly appreciated!

OlegSh
Attached Images
File Type: png AttenuatorSCH.png (42.2 KB, 1307 views)
File Type: png AttenuatorBRD.png (39.9 KB, 1291 views)
  Reply With Quote
Old 5th January 2015, 05:19 PM   #2
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
I'll try to be more specific about my worries.
Could the connection scheme of the relay coils induce "switching" noise into the audio signal when relays turn on/off? There will be an unavoidable loop created by the wires feeding the relay coils. Four layer PCB would be easier but it is too expensive.
  Reply With Quote
Old 6th January 2015, 01:47 PM   #3
mickeymoose is offline mickeymoose  Canada
diyAudio Member
 
Join Date: Nov 2008
You need to add back-EMF snubber diodes across the relay coils, as close as possible to the coil (surface mount on the bottom?). I also would try to bring out all connections to one side of the board (one common for the relays?). This way you could flip the board for troubleshooting. E
  Reply With Quote
Old 6th January 2015, 02:01 PM   #4
jackinnj is offline jackinnj  United States
diyAudio Member
 
jackinnj's Avatar
 
Join Date: Apr 2002
Location: Llanddewi Brefi, NJ
R-2R attenuator PCB layout question
You can purchase a 16 channel relay board for Arduino for less than $20.
  Reply With Quote
Old 6th January 2015, 02:04 PM   #5
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Thanks a lot mickeymoose,

I just checked and SMD version of 1N400x would fit perfectly between the relay pins on the underside of the PCB. Initially I wanted to have them on the controller side... As for the connections I'll have to think how to route them to one side.
  Reply With Quote
Old 6th January 2015, 02:27 PM   #6
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
I know jackinnj.

But my interest is to learn something by doing. Being new to the PCB routing I would like to keep my PCB simple and may be avoid problems which others might have by making their designs to suit different uses or parts selection. I'll post the board here if I succeed to create anything decent:-) Otherwise I'll end up buying one of the existing boards but will definitely have some knowledge after this try...

Also there are not so many designs using SMD resistors which allow to keep the layout really compact.
  Reply With Quote
Old 8th January 2015, 07:39 AM   #7
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: Berlin
Quote:
Originally Posted by OlegSh View Post
I just checked and SMD version of 1N400x would fit perfectly between the relay pins on the underside of the PCB.
If you use a relay driver IC like ULN2003A there is no need for the diodes.

Some info including eagle files from one I made a couple years ago here:
http://www.diyaudio.com/forums/analo...ube-stage.html

I would go SMD and keep all the resistors on one side of the PCB
  Reply With Quote
Old 8th January 2015, 12:11 PM   #8
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Hi maxw,

I've seen your board before. I aim at a similar layout except I would prefer to have controller separated from the audio circuit. This would allow to use any possible solution for controlling the relays.

I also have a question why placing the resistors on the same side is beneficial? In my layout I made it such that the signal and its return matching exactly by placing the parallel resistors on the ground plane side.

Below is the current state of the PCB. I'm in doubt if the relay coils wiring isn't too tight? I checked the creepage distance between traces for 5 VDC and it seems to be sufficient. Now I'm wondering if PCB producer can handle such a spacing...

Now regarding the termination resistor. The attenuator supposed to see a fixed load which is a combination of input resistance of the following stage and the resistor to ground on the board (if necessary) to match the desired value. Would it have any drawback if I use a DIP switch and install a set of different resistors to ground? This way I could adjust the load seen by the attenuator by simply operating the switch... Are there any sonic concerns of such an approach?

Regards,
OlegSh
Attached Images
File Type: png AttenuatorBRD2.png (42.0 KB, 1163 views)
  Reply With Quote
Old 8th January 2015, 04:03 PM   #9
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: Berlin
Quote:
Originally Posted by OlegSh View Post
I've seen your board before. I aim at a similar layout except I would prefer to have controller separated from the audio circuit. This would allow to use any possible solution for controlling the relays.
Sounds good!

Quote:
Originally Posted by OlegSh View Post
I also have a question why placing the resistors on the same side is beneficial?
I honestly don't know. I just did it this way in order to use less vias and because I'd seen this type of separation in other designs. I don't really know what I'm doing

Quote:
Originally Posted by OlegSh View Post
Below is the current state of the PCB. I'm in doubt if the relay coils wiring isn't too tight? I checked the creepage distance between traces for 5 VDC and it seems to be sufficient. Now I'm wondering if PCB producer can handle such a spacing...
PCB manufactures will state their tolerances and sometimes even let you load them into Eagle with the DRC file and then Eagle will tell you if it's too close in the DRC check. OSHPark do this.
  Reply With Quote
Old 8th January 2015, 04:05 PM   #10
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
I also discovered that my manufacturer has the DRC file for Eagle too. Will try it on my board before ordering.

OlegSh
  Reply With Quote

Reply


R-2R attenuator PCB layout questionHide 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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New project : R-2R Attenuator With Remote Control V2 bbp Swap Meet 179 15th November 2015 04:43 PM
amplifier PCB, question on overall grounding layout 00940 Solid State 28 27th September 2013 11:15 PM
Help with 6-Bit R-2R Relay Attenuator benproiii Analog Line Level 1 17th December 2012 04:58 PM
FS - R-2R Attenuator With Remote Control V2 Guiness Swap Meet 3 23rd November 2012 10:07 PM
UcD700 PCB Layout Question Randy Knutson Class D 7 19th June 2006 07:46 PM


New To Site? Need Help?

All times are GMT. The time now is 10:38 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki