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 11th October 2017, 09:27 AM   #41
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Hi Max,

Big part of your compliment goes back to you, since I've been greatly inspired by your designs!

Regards,
Oleg
  Reply With Quote
Old 11th October 2017, 10:42 AM   #42
schillg11 is online now schillg11  Germany
diyAudio Member
 
Join Date: Dec 2011
Location: near Stuttgart
Hi Oleg,

nice compact set of PCBs. Are you going to offer them here? or is it possible to get the gerbers.

For the firmware of the input selector display,one suggestion. I prefer the real name of the selected input in the display. Is that possible?

Best regards

GŁnni
  Reply With Quote
Old 11th October 2017, 11:25 AM   #43
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Thanks for the good words, GŁnni!

I usually offer my PCBs here on the forum after I test them. As for the real input names, it can easily be done by modifying few code lines. Since I personally have no good idea what will be connected where in my system I prefer numbered inputs for a time being, but since I plan to make the source code of the firmware public, it should be easy to make a custom version of it.

Regards,
Oleg
  Reply With Quote
Old 12th October 2017, 05:43 PM   #44
Morde is offline Morde  Finland
diyAudio Member
 
Join Date: Oct 2014
Cool project! I’m definately interested to aquire the boards if you will offer them at some point.
__________________
My finished headphone amp projects: 1, 2, 3, 4, 5, 6, 7

Last edited by Morde; 12th October 2017 at 05:47 PM. Reason: typo
  Reply With Quote
Old 12th October 2017, 08:33 PM   #45
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Thanks, Morde!

I'm currently testing the attenuator to make sure that it really is clean and does not produce clicks and pops in all possible regimes, e.g muting/unmuting, changing attenuation, especially when it crosses through 01111 -> 10000 state and also when changing inputs at various volume settings. I'll report when I am done and if everything is OK then the boards will be available.

Regards,
Oleg
  Reply With Quote
Old 13th October 2017, 09:31 AM   #46
Hans Polak is offline Hans Polak  Netherlands
diyAudio Member
 
Join Date: Mar 2005
Location: Blaricum
Quote:
Originally Posted by OlegSh View Post
Thanks, Morde!

I'm currently testing the attenuator to make sure that it really is clean and does not produce clicks and pops in all possible regimes, e.g muting/unmuting, changing attenuation, especially when it crosses through 01111 -> 10000 state and also when changing inputs at various volume settings. I'll report when I am done and if everything is OK then the boards will be available.

Regards,
Oleg
Nice PCB work.

As a matter of fact, this is not an R-2R attenuator but a logarithmic attenuator where all resistors have different values and also the topology is quite different.

To avoid pops or transients when changing volume, especially when going from 01111 to 10000 or vice versa, you should do as follows:
With every volume change go in between for about 4 msec to 00000, assuming that 00000 is the max attenuation.
You will not notice this 4 msec step in between, but all pops will be prevented.
So going from 01111 to 10000 will have to go like 01111 - 00000 - 10000.

Succes,
Hans
  Reply With Quote
Old 13th October 2017, 09:54 AM   #47
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Hi Hans,

Thanks for your comments. I totally agree that the name for the attenuator topology is not entirely correct. I just accepted what was previously used by others for similar attenuators, but I guess it simply has historical roots due to some similarity to a classical R-2R resistor ladder ADC.

The algorithm to avoid pops and clicks that you mention is exactly what I did in my earlier setup more than a year ago. In the case of this new setup I managed to get away without muting in between the steps so far. The key is that engage and release timing of the relays that I use is nearly the same with release being a tiny bit slower, and thus the new setting engage slightly before the previous setting releases. I just wanted to experiment further to see if it is always like this. Otherwise I'll put back the mute before switch code.

Regards,
Oleg

Edit: it seems that it must be that the release time of the relays is faster than the new setting is engaged for pop and click free operation in the new setup.

Last edited by OlegSh; 13th October 2017 at 09:57 AM.
  Reply With Quote
Old 14th October 2017, 07:10 PM   #48
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
I played with the attenuator a bit. It really works pops and clicks free so far. Also muting/unmuting and changing inputs at various volume settings is trouble free. The firmware is a bit too slow for comfortable use, so I'll try to optimize it a bit.

Since hardware works as intended and there is some interest in my PCBs I'll probably open a dedicated thread in commercial sector of the forum and offer the PCBs there. In the meantime simply PM me if you are interested in getting the PCBs before the firmware is ready or if you plan to write your own code.

Regards,
Oleg
  Reply With Quote
Old 14th October 2017, 09:28 PM   #49
maxw is offline maxw  United Kingdom
diyAudio Member
 
maxw's Avatar
 
Join Date: Jun 2004
Location: Berlin
R-2R attenuator PCB layout question
Quote:
Originally Posted by OlegSh View Post
I played with the attenuator a bit. It really works pops and clicks free so far. Also muting/unmuting and changing inputs at various volume settings is trouble free.
Congrats!

Quote:
Originally Posted by OlegSh View Post
The firmware is a bit too slow for comfortable use, so I'll try to optimize it a bit.
Be sure to disable/remove Serial and Serial.print when not debugging your code as this slows down the code execution. I used a boolean for this. e.g.


Code:
void setup() {
  ...
  // Serial
  if (debugEnabled) {
    Serial.begin (9600);
  }
  ...
}

void loop() {
  ...
  if (debugEnabled) {
    Serial.print ("Selected Input: ");
    Serial.println (selectedInput);
  }
  ...
}
  Reply With Quote
Old 14th October 2017, 09:55 PM   #50
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Thanks for the hints, Max!

Just did what you suggested, I had serial interface always running since using it for debugging the remote control codes. Unfortunately disabling it did not help. I guess I have some other issue since when I turn the encoder relatively quickly the relays start to chatter. This does not produce any artifacts in audio output and the volume is changing in the right direction, just a bit slower. I guess at some moment arduino loses state changes of the encoder and misread forward/backward rotation. This results in repeatedly setting neighbor volume settings back and forth until the right sequence is detected again.

Note, I use relatively high resolution encoder with 64 pulses per revolution which means it has 256 steps which I reduce to 32 attenuation steps.

Regards,
Oleg
  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 09:53 PM.


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