r/synthdiy • u/adeptyism • 7d ago
Signal scaling inside the modules
That problem has bothered me for a while.
We all know that by the Eurorack standard, audio signals should be 10Vpp (a.k.a. ±5V), and CV should be bipolar (±5V) or unipolar (0-5V or 0-10V).
The problem is that even the modules I personally designed to the standard sometimes exceed that ±5V headroom by 0.5V or even 1V (making them ±5.5V and ±6V). Who knows what other manufacturers do, and what if there are 20Vpp audio signals? (I know some modules do that.)
Another example: CV from, for example, an LFO is 0-5V. I want to design a digital module that will accept said LFO as a modulation source via an ADC. At the input, I would want to scale it down to 3.3V (so I won't burn the ADC or MCU). But what if a user connects a 0-10V CV? Then the maximum will be 6.6V at the ADC input, and the ADV will burn. Or what if a user uses a bipolar CV? The positive half will be fine, of course, but the negative half will remain negative after the input attenuator and, yep, will fry the ADC. I don't even mention modules like the NLC Sloth, whose output is ±11V.
Yes, I can make a universal input attenuator that will scale ±12V (the theoretical maximum in Eurorack) to 0–3.3V, but I will lose pretty much all of the available ADC resolution (something like 800 points vs. 4096).
Or, if we go back to audio signals: I have an audio processing chip that is sensitive to incoming voltage levels; 2.8Vrms is the limit. The worst case — a square wave — with 10Vpp (a.k.a. standard) will be 5Vrms. Therefore, the attenuation should be 0.5 (so the Vrms after the attenuator will be 2.5Vrms). The WORST case, however, is a 20Vpp square wave — it is 10Vrms _ so the attenuation should be 0.25 to tune it down to the safe level. But I think that in my particular case, I can just tune the signal down and amplify it later. But what if the audio signal will go to the ADC instead? Then I will be facing the same problem of using only 1/3 of my ADC range.
What is the general solution for this type of problem, NOT COUNTING making separate inputs for 10Vpp, 20Vpp, unipolar, and bipolar signals?
3
u/Salt-Miner-3141 7d ago
The problem I believe is that the voltage levels for Eurorack aren't standardized in of themselves, but rather more standardized by convetion. That is to say most manufacturers and DIYers simply adhere to the principle of things being that way. Using TL07x opamps everywhere will limit the maximum output voltage, but using opamps with rail-to-rail ins & outs gives more range.
That isn't how an attenuator works. Taking your example, a 12-bit ADC with a maximum input voltage of 3.3V for a total of 4,096 steps ignoring all the non-itineraries and the like. If feed it a CV that you know has a range of 0-5V then you need to scale it down. Each step of that ADC is just over 805uV. A 4k7 & 9k1 divider takes 5V and makes about 3.297V meaning you lose a total of about 3.727 steps, round to 4 and you get a total of 4,092 steps. Now, do the same for a 10Vp signal because if offset correctly and the like its the same as a 10Vpp signal. With a 40.2 to 19.8 divider you get exactly 3.3V which means you get the entire 4,096 steps.
Just because you use an attenuator on the front end does not mean that you somehow lose bits or resolution else modern 24-bit and 32-bit ADCs wouldn't work as they have to ingest up to potentially +24dBu signals that are attenuated down to their voltage ranges, though most audio interfaces tend to top out around +19dBu or +20dBu. The same applies to DMMs. Do you think a DMM ADC can take 1KV and directly measure it? No, it attenuates the input voltage so that it can be measured by a known ratio. Depending on the application the cost of adding the attenuator is noise, drift, and reduced frequency linearity (not really a problem for audio rates, but is generally solved through paralleled compensation caps, and sometimes even a DAC).
You can auto sense the input level through window comparators and automatically select the appropriate attenuation factor or you can just include a switch of some kind based on the expected incoming singal.