Hi,
There are a few volume control devices out there that have an MCU controlling six relays in an R2R network, can anyone share an example of the code used to switch the relays, I have read that the timing and sequence of the relays switching needs some TLC otherwise you can get unwanted noise in the audio, there was a mention of "carefully switching relays off before others on" and "special milli-second based timing of the relay state transitions".
I'm building a network-only R2R volume for my own Roon system and I don't want to reinvent the wheel.
Thanks for looking.
Cheers
Richard
There are a few volume control devices out there that have an MCU controlling six relays in an R2R network, can anyone share an example of the code used to switch the relays, I have read that the timing and sequence of the relays switching needs some TLC otherwise you can get unwanted noise in the audio, there was a mention of "carefully switching relays off before others on" and "special milli-second based timing of the relay state transitions".
I'm building a network-only R2R volume for my own Roon system and I don't want to reinvent the wheel.
Thanks for looking.
Cheers
Richard
Here is a thread about something similar.
Pop/click free HW-based relay attenuator V3
You will find details and a schematic that shows a hardware implementation.
From this hardware you can deduct a software code doing the same thing.
You will find too, my opinion: It is all BS, it will click and pop, whatever you do or claim, relays are too slow, bouncy, unequal about switching speed.
A better approach is using MDACs or FET switches.
Pop/click free HW-based relay attenuator V3
You will find details and a schematic that shows a hardware implementation.
From this hardware you can deduct a software code doing the same thing.
You will find too, my opinion: It is all BS, it will click and pop, whatever you do or claim, relays are too slow, bouncy, unequal about switching speed.
A better approach is using MDACs or FET switches.
Thanks, if I can get similar performance to my trusty old Schiit Saga R2R then I will be very happy, I'm well aware of what R2R volume changes sound like.
Clicks and pops in adjusting gain are called 'zipper noise' in the business - its even an issue when done purely in the digital domain, let alone with the unpredictability of relays. This pdf might be useful : https://snestracker.files.wordpress.com/2015/02/zipper_gain_clicks.pdf
"Zipper" is the abrupt repeated 1dB changes of a continuous switch.
When you have just 6 relays, there will be times you cut-out 16dB a little faster than you cut-in 1+2+4+8=15dB, and have a many-dB transient. Does not sound like a zipper. Sounds broken.
When you have just 6 relays, there will be times you cut-out 16dB a little faster than you cut-in 1+2+4+8=15dB, and have a many-dB transient. Does not sound like a zipper. Sounds broken.
Give whatever name you like, convolute whatever idea, it is clear that changing gain cannot be non audible.
That said, a solution based on relays, is the worst one. Gimmicks in that solution belongs to snake oils.
That said, a solution based on relays, is the worst one. Gimmicks in that solution belongs to snake oils.
Please, this is not a discussion on the merits of R2R volume.
Keep on topic please, if you don't have code...
Keep on topic please, if you don't have code...
https://www.diyaudio.com/forums/att...lay-attenuator-v3_schematic_digital-logic-pdf
https://www.diyaudio.com/forums/att...lay-attenuator-v3_schematic_supply-relays-pdf
Understanding these schematics leads to the code that does the same thing.
The author explains how it works, ask him for details.
I do not have the code, but I see in these schematics how I can make it. I gave you the keys to get it.
https://www.diyaudio.com/forums/att...lay-attenuator-v3_schematic_supply-relays-pdf
Understanding these schematics leads to the code that does the same thing.
The author explains how it works, ask him for details.
I do not have the code, but I see in these schematics how I can make it. I gave you the keys to get it.
Last edited:
- Home
- Source & Line
- Analog Line Level
- MCU code for R2R volume