Generating clean +/- rails

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!
Post Reply
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Generating clean +/- rails

Post by miminashi »

I'm working on a Daisy-based Eurorack module. I've been trying to eliminate some noise on the outputs that is the result of the OLED display dumping noise onto the +12V rail (thread).

I've reduced a lot of the noise by using an isolated DC-DC converter for the OLED supply, and a bit of RC filtering on the rails feeding my output section. However, I'm a bit underwhelmed by the amount of noise reduction I've achieved, so I'm looking at alternatives.

What I'm thinking now is that I should ditch the "isolated" DC-DC converters (which are expensive, bulky, and don't seem to offer good isolation) in favor of voltage regulators. I need +5V for the Daisy, +3.3V for the OLED, and +/- rails to power the analog I/O (pre-ADC and post-DAC). The 5V and 3.3V supplies seem straightforward, but I'm not sure what I should do for the analog section.

I'm looking at LDO regulators which seem to offer good performance in terms of stability and noise suppression. But I'm not sure how I should choose regulators for the positive and negative rails. I'm thinking I can use +/- 9V, but I'm not finding a lot of suitable -9V regulators. I'm also not sure how closely I need to match the positive and negative voltages. I assume it's probably bad to use +10V and -9V, but honestly I have no clue.

Are there any recommended practices I can follow for generating clean rails for my I/O section?
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

Say you have swing of 1V and 100mV supply noise, which might be excessive. Your input opamp (buffer?) has a supply rejection of 80dB (TL074). Your opamps output SNR is 100dB right? That is already better than a 16bit opamp or an inverting opamp with 100k resistors. Why do you need ‘clean ‘ supplies? Or am I missing something? Isn’t it better to put the effort in proper grounding?
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

tmar92 wrote: Tue May 23, 2023 1:58 pm Say you have swing of 1V and 100mV supply noise, which might be excessive. Your input opamp (buffer?) has a supply rejection of 80dB (TL074). Your opamps output SNR is 100dB right? That is already better than a 16bit opamp or an inverting opamp with 100k resistors. Why do you need ‘clean ‘ supplies? Or am I missing something? Isn’t it better to put the effort in proper grounding?
I am not an EE so I can't really speak directly to your points. But I am applying ~5x gain to bring the DAC outputs up to modular levels, so that in itself is going to offset any ripple rejection (PSRR, or whatever -- it's all new to me :help: ) the opamps might offer.

As detailed in the thread I linked to, the noise can be eliminated with heavy RC filtering. But since the noise on the +12V rail is low frequency, filtering it out requires a larger filter cap than is practical for my design.

I have somehow arrived at the impression that regulated supplies are not uncommon for input and output stages. Am I mistaken? I'm looking at a whitepaper from TI that recommends using an LDO regulator (as I am considering) to prevent supply noise from appearing at the outputs. So it doesn't seem like such a crazy idea to me.
Since PSRR decreases with gain, it is necessary to preemptively filter power supply noise to prevent its coupling onto the output. Using a low-noise LDO like TPS7A39 is an effective way to ensure the supply rails are free of switching noise.
I'm not battling switching noise per se, but I think the advice is still applicable.
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

Power supply rejection ratio (PSRR) is the rejection of variation of supply voltage to the output. This is indeed frequency and gain dependent, as is pointed out in figure 6 in the paper by TI. As you also can see from this figure, is that for 10x gain, the low frequency psrr is still ok.
Sure, using a LDO will reduce the variation on the supply for low frequencies, but other noise sources are probably far more dominant in the first place. Any signal-to-noise ratio above 100dB will be swamped by noise from other Eurorack circuits/modules anyway.
The daisy-patch (I think?) uses a DC-DC isolator to dump the return current from the digital 3v3 supply used by the micro , which creates huge current spikes (at the isr frequency i think), to the -12V rail to avoid dumping the current in the ground rail, in order to keep the ground potential a stable reference. Not necessarily to keep the supply lines clean.
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

This is the output circuit from the Daisy Patch. I've changed the value of the feedback resistor to 50K to reduce the gain from 10x to 5x. 10x gain was clearly too much because in the firmware for the Daisy Patch they pre-scale the outputs by 0.5 to prevent clipping. So I reduced the gain to take advantage of the full-scale output from the DAC.
audio_output_circuit.png
Is there something about this circuit that is allowing the ripple on the +12V rail (which is induced by OLED activity) to affect the outputs? On my ancient surplus scope it looks like there is about 20-30mV of ripple on the +12V rail. If there is supposed to be 100dB of ripple rejection from the TL074, then surely 20-30mV should not be detectable on the output? And yet there is still an audible buzz. It's not super pronounced, but it is still noticeable to me and I would like to eliminate it if possible.

I know from experimentation that the noise can be eliminated with an impractical degree of filtering. Hence my search for a way to provide a clean supply to the output section. I acknowledge that I could be barking up the wrong tree, but using regulated +/- supplies for the outputs does not seem unreasonable to me. If there is a simpler or better solution I would definitely like to know about it.
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

If there is any resistance between the AGND terminal of the daisy seed and the opamp’s positive terminal and a ripple current from the OLED display is flowing through that resistance, the resulting voltage will add directly to the output: imagine a voltage source between the + terminal of the opamp and ground. This resistance can be caused by thin and long ground traces or by pinheader connections for example. You can probe the + terminal leg of the opamp and the ground terminal of the jack and see if there is any ripple. Or between the + terminal of the opamp and the AGND terminal of the daisy seed.
The filtering you mentioned keeps the current loop from the 12V to ground more local for high frequencies: instead of the current flowing from 12Vpin -> OLED -> ground in a loop, the loop is now through C+ terminal-> oled -> c- terminal.
Can you measure the supply ripple on the audio output? Or is it too small? Can you hear it if audio is playing?
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

I can't reliably measure the ripple on the output with my scope. I can definitely hear it, though -- that's how I know about it, and that's why I care about it. :razz: It's not a ton of noise, but the fact that it's kind of a buzz/hum makes it more noticeable. If it was more of a broad spectrum hiss it'd probably be more tolerable.

Yes, there is ~25mV of ripple on the + terminal of the opamps. The same ripple that appears everywhere on the +12V rail. I'm using a ground pour so there are no long, thin ground traces. I'm not able to measure any significant resistance between any two ground connections, e.g. between the ground terminal of the DC converter for the OLED and the ground terminal for the opamps. My meter reads about 0.07 ohms, but I get the same reading if I just press the two probes together. If there's any resistance it's in the neighborhood of 0.01 ohms. What magnitude of resistance is worrisome?
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

Well, its at least interesting that you see the 25mV on the + terminal of the opamp, but that you cannot measure it at the output. Is the ripple also present at int_audio_out_l, or at the left terminal of R101? Is the 25mV still visible if you measure the voltage between the + terminal of the opamp and the ground of the output jack?

About the resistance, with 0.01 ohm you need 2.5 amps to get to 25mV. I am not sure if the typical multimeter can measure resistances that low accurately.
User avatar
KSS
Super Deluxe Wiggler
Posts: 11658
Joined: Mon Jan 25, 2016 7:28 am

Re: Generating clean +/- rails

Post by KSS »

tmar92 wrote: Thu May 25, 2023 2:14 pm I am not sure if the typical multimeter can measure resistances that low accurately.
I am sure they -usually- cannot.
Measure votlage drop across R's and calculate.
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

tmar92 wrote: Thu May 25, 2023 2:14 pm Well, its at least interesting that you see the 25mV on the + terminal of the opamp, but that you cannot measure it at the output. Is the ripple also present at int_audio_out_l, or at the left terminal of R101? Is the 25mV still visible if you measure the voltage between the + terminal of the opamp and the ground of the output jack?
The ripple on the output appears to be about 3-5mV. Yes, the 25mV ripple is visible between the + terminal on the opamp and the ground of the output jack. Take all these measurements with a huge grain of salt, this scope is probably 30 years out of calibration. It's obviously well past time to invest in something decent.

3mV of ripple doesn't seem like a lot, and I have to monitor at a pretty high level for it to become really noticeable. It's an amount of noise I could forgive in a random piece of equipment. But since I'm iterating on the design anyway and have a chance to eliminate it, then I'd like to if possible.

Looking at the ground connections for the opamps, it is definitely a bit constrained. The connection to the rest of the ground pour is through that narrow channel between the resistor pads, which is about 7 mil wide. But there are two of em, at least. :) I could drop some vias to make a better ground connection on the bottom layer. Do you think it would help?

choked_ground.png
KSS wrote: Thu May 25, 2023 8:38 pm Measure votlage drop across R's and calculate.
Good advice. I'm a little gun shy about probing the live board since I just got a little spark and puff of smoke. Fortunately not the magic smoke since everything still works.
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

Adding ground vias will not hurt. The ground connections to the opamp don’t have to be low ohmic, because the opamp’s input terminals have an high input impedance. So no current and no voltage drop. However, if that is the only return path for currents from other components, then adding ground vias in all the corners of the picture you’ve shown might help as well.
User avatar
KSS
Super Deluxe Wiggler
Posts: 11658
Joined: Mon Jan 25, 2016 7:28 am

Re: Generating clean +/- rails

Post by KSS »

I'd nuke both of those thin 'ground plane' connectors.. With everything you've got going on between them, they're *not* attaching to the 'same' plane. Remember that ground planes can cause as many -or more- problems as they can -potentially*- solve.

*littlle GP humor.

Never run between pads of Rs and Cs if can at all help it.
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

Thanks, you two. I'll beef up those ground connections. But it doesn't seem like they're the root of the problem. Which AFAICT leaves me with filtering or regulation if I want to keep the noise out of my audio I/O. I'm looking at something like the TPS7A3901DSCR, but maybe that's overkill.
User avatar
KSS
Super Deluxe Wiggler
Posts: 11658
Joined: Mon Jan 25, 2016 7:28 am

Re: Generating clean +/- rails

Post by KSS »

miminashi wrote: Thu May 25, 2023 9:41 pm this scope is probably 30 years out of calibration. It's obviously well past time to invest in something decent.
Why not 'invest' in simply calibrating the scope you have? :hmm: :despair:

That seems a more 'obvious' answer than spending on a new scope.
miminashi wrote:Thanks, you two. I'll beef up those ground connections.
I didn't say to beef them up. I said -from the *very* small snapshot given- that you might not have a clear idea of how to use ground planes.
But it doesn't seem like they're the root of the problem. Which AFAICT leaves me with filtering or regulation if I want to keep the noise out of my audio I/O. I'm looking at something like the TPS7A3901DSCR, but maybe that's overkill.
If you're only going to have a conversation with yourself, with us as onlookers, that's fine. But it might not get you where you say you want to go.

Doesn't seem like it? Based on what? AFAYCT hasn't solved it, or you wouldn't be here.

I'm not trying to be a prick and I'm not saying it's not what you think it is. Neither of us yet know what the actual source problem is.
I *am* saying -from what's been shared so far- that you probably aren't clear on the actual problem you have. I know for sure I am not clear on what the problem is yet because you're not sharing enough to give good advice and instead keep pursuing your initial belief -better/more filtering!- instead of actually narrowing down the issues to get to the *source* rather than to address symptoms. <--This is a *very* common mistake and it's also quite human to keep going down the same corridor even after it's been shown to be not the droids you're looking for. Have you ever checked your pocket-purse for missing car keys more than once? Or found something you spent a long time looking for in that place you never checked because it couldn't wouldn't can't be there?

Thread title is good. generating clean rails. That's an important first step! After that comes *preserving* clean rails. *Then* you get to fixing dirty rails.<--And you hope not to need to get here because of what you do in the first two steps.

I said before that so-called ground planes can create more problems than they solve. Especially when they're sliced-up ground *pours* only pretending to be ground planes. I feel like tmar92 was trying to say this in a more tactful way than my post here.

There are reasons that hybrid circuits dealing with things like OLEDs and MCUs often go to 4 layers. Because a cargo cult ground pour is not necessarily a ground plane. Seek sources, not symptoms.
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

KSS wrote: Fri May 26, 2023 9:35 pm If you're only going to have a conversation with yourself, with us as onlookers, that's fine. But it might not get you where you say you want to go.

Doesn't seem like it? Based on what? AFAYCT hasn't solved it, or you wouldn't be here.
Seriously sage advice, and thank you for sharing it. And also thank you to tmar92 for initially questioning my desire to "clean up" the power, when it seems like the important questions are: What is "dirtying" the power? And, why are the opamps which have inherently good noise rejection failing to keep that noise away from the outputs?

These questions I cannot answer at the moment, but I'll think long and hard about the power and grounding in my design.

I used the Daisy Patch schematics as my starting point. The Daisy Patch exhibits the issue of activity on the OLED causing a bunch of noise to appear on the +12V rail, which then appears as a buzz on the audio outputs.

My first prototype, which followed the Patch schematic exactly W.R.T. the OLED power supply, exhibits the same issue to roughly the same degree. The layouts for the two boards are completely different, but that doesn't answer the question of whether the issue is inherent to the circuit or is some byproduct of the layouts (which might by chance have the same or similar deficiency).

I found through experimentation on my first prototype that the noise could be reduced by filtering the +12V rail. So I added that filter on my second revision. I also changed the supply circuit for the OLED to use an isolated DC-DC converter (similar to the one used to power the MCU, which does not dump any noise onto the +/- 12V rails that are feeding it) in the naive and ultimately vain hope that it would eliminate the noise.

Well, the noise is reduced, but not completely eliminated. Which prompted me to start this thread. And now we're back to those two fundamental questions of why the OLED supply is mucking up the +12V rail and why the outputs are affected.

The finger of blame keeps pointing to the grounding in my design. I will admit that I just added a ground pour (well, two actually, one on each side)
and called it a day. DRC passes, but I don't really have the mental tools to analyze things further. Switching to a 4-layer board would be relatively easy change. If a dedicated ground plane is likely to help then I can start moving in that direction.

Of course I don't want to do it again in a rote, "cargo cult" manner. This isn't something I gave no thought to. I did read up a bit when working on my initial design. But I read enough contradictory information on the subject that I figured I'd need a better theoretical footing and a bit of real world experience to be able to improve on my initial stab.
KSS wrote: Fri May 26, 2023 9:35 pm Why not 'invest' in simply calibrating the scope you have?
This is a "we're going to throw this in the dumpster, you wanna take it?" kind of scope. A Goldstar OS-7020A I got from my old advisor. I've actually been annoyed with it for years since it's mostly useless for signals below a few hundred Hz. If there is anyone in my area with the expertise to fix it I'm doubtful it'd be worth the time and expense. It might make a fun project, but I don't think it'd be a good investment.
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

Thanks KSS, you are explaining things a lot better than I am.

Using the inner two layers as a ground plane might be a step in the right direction. Even better would be to use split ground planes for analog and digital parts and join them at the power connector. Although this can generate huge current loops and make things worse if you’re not doing it right.

With these kind of designs, having the schematic, you’re only halfway. Mixed signal designs are really not trivial to layout. Debugging them without the right tools is even more difficult, as you found out the hard way :).

I’m willing to take a look at your design if you don’t mind sharing it with me. Disclaimer: I am an EE, but only doing module design as hobby. I do IC design as daytime job, where the same principles might apply but in a complete different context. So I can’t claim much experience and can’t guarantee anything.
miminashi
Wiggling with Experience
Posts: 451
Joined: Tue Aug 19, 2008 3:14 pm
Location: SLC, Utah

Re: Generating clean +/- rails

Post by miminashi »

I'm still trying to decide what I want to do with this project, and there's a decent chance it'll just end up on GitHub eventually. The main reason to not share it at this point is to save myself from embarrassment. But if you're willing to take a look I'd be a fool to not take you up on it. :) I'll send you a link.
tmar92
Learning to Wiggle
Posts: 35
Joined: Sun Jan 10, 2021 5:00 am

Re: Generating clean +/- rails

Post by tmar92 »

There is nothing embarrassing about trying stuff and making mistakes. It is usually a lot faster than trying to do everything perfectly in one go and solving issues that might not even matter in end.

Having a quick look at your design, you can definitely improve upon your grounding. Putting it bluntly, the top ground pour is more like a drc pleaser than a plane. It’s too crowded and there are too many thin wire connections. The bottom is better, but has too many long horizontal wires that split your plain. The top pour not properly connected to you bottom ground pour; only by the jacks and other through hole components. Add more ground vias.

https://www.analog.com/media/en/trainin ... pter12.pdf
This document is really worth a read and explains grounding and pcb layout a lot better than I can. A lot of the examples are directly applicable to your design. Maybe skip the stuff about transmission lines.
After reading this you will understand why your grounding is the far more likely cause for the noise than the supply. And also why the the ground of some of you decaps is not properly connected.

Improving your top plane will be difficult, because to much is going on there. You can try to make the bottom layer a better plane by giving it less interruptions, then adding vias to get better ground connection on the top plane.

The quick and dirty solution which will give you probably ‘better’ results is adding two inner layers solely for ground and adding ground vias close to every pad that reads gnd.

A good solution for your noise problem, would be to use separate grounds for digital and analog components. The DACs and the daisy should be on the boundaries since both have analog and digital ground pins. The planes should be connected at the return point: the power connector, or the isolated DC-DC converter.
Because you are using isolators you need to take care for which component which return path to use. I suspect you might not be using the isolating DC-DC converters properly, which might also explain the disappointing results.
Post Reply

Return to “Music Tech DIY”