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 22nd October 2017, 01:00 PM   #71
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Back panel done! Neutrik USB connector allows powering and programming the attenuator without opening it. I just have to remember how the peripherals are connected

Oleg
Attached Images
File Type: jpg BackPanelDone.jpg (100.9 KB, 355 views)
  Reply With Quote
Old 27th October 2017, 11:58 AM   #72
Morde is offline Morde  Finland
diyAudio Member
 
Join Date: Oct 2014
I'm having some problems with the Arduino library IRLib2. When I try to run the code I get this kind of error message in IDE:

"In file included from C:\Program Files (x86)\Arduino\libraries\IRLib2/IRLibAll.h:22:0,
from AttenuatorArduinoCode.ino:2:
C:\Program Files (x86)\Arduino\libraries\IRLib2/IRLibDecodeBase.h:13:28: fatal error: IRLibProtocols.h: No such file or directory
#include "IRLibProtocols.h"
^
compilation terminated.
"

I have downloaded the IRLib2 library from GitHub and my libraries folder looks like in the attached screen shot. I think I do have the "IRLibProtocols.h" file, but it still doesn't work. Please help as I'm an Arduino noob.
Attached Images
File Type: png libraries.png (81.7 KB, 314 views)
__________________
My finished headphone amp projects: 1, 2, 3, 4, 5, 6, 7
  Reply With Quote
Old 27th October 2017, 12:07 PM   #73
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Quote:
Originally Posted by Morde View Post
I'm having some problems with the Arduino library IRLib2. When I try to run the code I get this kind of error message in IDE:

"In file included from C:\Program Files (x86)\Arduino\libraries\IRLib2/IRLibAll.h:22:0,
from AttenuatorArduinoCode.ino:2:
C:\Program Files (x86)\Arduino\libraries\IRLib2/IRLibDecodeBase.h:13:28: fatal error: IRLibProtocols.h: No such file or directory
#include "IRLibProtocols.h"
^
compilation terminated.
"

I have downloaded the IRLib2 library from GitHub and my libraries folder looks like in the attached screen shot. I think I do have the "IRLibProtocols.h" file, but it still doesn't work. Please help as I'm an Arduino noob.
I have no experience with arduino IDE on Windows, since I work on Linux most of the time, but I see that there is directory separator problem in the error message that you get. I highlighted the problematic parts: backslash (Windows style) change to a slash (Unix/Linux style). Maybe this is the problem.

Regards,
Oleg
  Reply With Quote
Old 27th October 2017, 12:29 PM   #74
Morde is offline Morde  Finland
diyAudio Member
 
Join Date: Oct 2014
Ok, so where should I try to change the directory separator? In your attenuator code or in the IRLib2 library? I don't remember facing this kind of problems with my earlier Arduino experience: Arduino based LDR volume and source selection controller

Quote:
Originally Posted by OlegSh View Post
I highlighted the problematic parts: backslash (Windows style) change to a slash (Unix/Linux style). Maybe this is the problem.
__________________
My finished headphone amp projects: 1, 2, 3, 4, 5, 6, 7
  Reply With Quote
Old 27th October 2017, 12:31 PM   #75
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
I guess in IRLib2 since in my code there are no directory separators used.
  Reply With Quote
Old 27th October 2017, 07:50 PM   #76
Morde is offline Morde  Finland
diyAudio Member
 
Join Date: Oct 2014
YAY!! I got it working quite ok after I updated my ancient IDE version 1.6.1 to the latest 1.8.5. Also my Chinese LCD display had a different I2C address than what was on the original code. I changed this in the code (bold):

"LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7); // Set the LCD I2C interface"

Now I think it's just my encoder (Bourns PEC11R series) that needs the resistors and capacitors as described in the datasheets. Now it's like a machine gun when I turn the encoder.

The IR functionality I didn't test. What kind of remote control do I need for it? I have an old Logitech Harmony 555 remote that I can learn the commands if I just knew what to look for.
__________________
My finished headphone amp projects: 1, 2, 3, 4, 5, 6, 7
  Reply With Quote
Old 27th October 2017, 07:56 PM   #77
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Congrats for the first successful steps What you experience with the encoder is probably its contacts bounce, so RC filters recommended in the datasheet should fix it.

The remote can be any which has carrier frequency similar to your IR receiver. Using serial terminal you can learn all the necessary button codes and add extra "cases" to the "switch" clause to do the necessary functions.
  Reply With Quote
Old 30th October 2017, 06:52 PM   #78
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
6 channel input selector PCBs arrived!
Attached Images
File Type: jpg InputSelector.6Ch.jpg (660.5 KB, 280 views)
  Reply With Quote
Old 5th November 2017, 02:32 PM   #79
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
Cleaned up and slightly optimized the code. Also implemented the input selection by using the numbers on the IR remote and standby mode (turns the LCD off, releases all relays which effectively sets max attenuation and mute, and disconnects all inputs). So far standby is only triggered by the remote control. In the future it should also be possible to engage by a long button press on the front panel.

Regards,
Oleg
Attached Files
File Type: zip AttenuatorArduinoCode.New.zip (3.5 KB, 20 views)
  Reply With Quote
Old 20th November 2017, 03:32 PM   #80
OlegSh is offline OlegSh
diyAudio Member
 
Join Date: Dec 2010
Location: Germany
R-2R attenuator PCB layout question
To minimize the space the USB input takes inside the chassis I found a nice rugged USB-B socket from Amphenol (mouser part number: 523-MUSB-D511-N0). To make connection convenient I also designed a small adapter PCB for it (see attached).

Regards,
Oleg
Attached Images
File Type: jpg USB-B.Socket.jpg (138.4 KB, 184 views)
File Type: jpg USB-B.Breakout.PCB.1.jpg (171.2 KB, 177 views)
File Type: jpg USB-B.Breakout.PCB.2.jpg (432.9 KB, 60 views)
  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:22 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