Hi all,
Could anyone tell me please if the following (that I've come up with) is sensible, especially with respect to how many voltage regulators I am using and noise filtering in a mixed analog digital design?
(pictures attached)
I'm looking to make a pre-amp with input / output selector, so looking to use a microcontroller (PIC or AVR family, most likely try a PIC) so need a stable +5V DC supply, plus a PGA2311 Stereo Audio Volume Control chip thus requiring +-5V analog for the internal Op-amps, plus I'll be using a few HFD4/5 subminiture relays (+5V switching voltage).
I'm not sure if I need the LC filters at all. Would the LM7805/7905 regulators remove much of the digital switching noise from the microcontrollers?
Thanks! 🙂
Could anyone tell me please if the following (that I've come up with) is sensible, especially with respect to how many voltage regulators I am using and noise filtering in a mixed analog digital design?
(pictures attached)
I'm looking to make a pre-amp with input / output selector, so looking to use a microcontroller (PIC or AVR family, most likely try a PIC) so need a stable +5V DC supply, plus a PGA2311 Stereo Audio Volume Control chip thus requiring +-5V analog for the internal Op-amps, plus I'll be using a few HFD4/5 subminiture relays (+5V switching voltage).
I'm not sure if I need the LC filters at all. Would the LM7805/7905 regulators remove much of the digital switching noise from the microcontrollers?
Thanks! 🙂
A topic with thousands of posts behind it. Here and elsewhere.
Here is all I can think of without another cup of coffee.
Leave the old LM 78xx in the last century where they belong. Search the various forums for far better performing regulators.
I would absolutely use independent regulators for analog and digital. If you have room, I would use separate transformers. At a minimum, I would use independent rectifiers and banks.
Inductors are nice if you can afford ones big enough. Great on tube circuits where you are dealing with 380V, but for solid state, chips and regulators are a lot cheaper and smaller.
With proper layout, you can use the digital supply for the relays, though the MegaSquirt forum is solidly against that. A glitch in a preamp may not be as bad as in an EFI or Ignition system. Your call.
I also would build a tracking supply for the analog section. Circuits can make huge thumps when going up and down asymmetrically.
It is SOP now to use several stages of regulators in series if you are really serious. I have never needed more than two though. I have seen 6.
Some do not like the smallest imparlance in the +/- supplies, so would not use the same transformer winding for a +/- and a + supply, but your currents are so low, probably does not matter.
For the best performance, layout matters so pay attention to that.
Pay attention to the physical orientation of the transformer and direction of the external fields
Might look at CRC main filter banks as a preamp is not a huge variable load.
RF off the diodes is still quite a controversy. Fast or slow, caps or not. Read, decide and test for yourself.
Looks like you are using a Spice, so do your simulation. Play with supply source impedance and inject various noises to see what happens. I use LT Spice and obviously, they have good models for their regulators.
Here is all I can think of without another cup of coffee.
Leave the old LM 78xx in the last century where they belong. Search the various forums for far better performing regulators.
I would absolutely use independent regulators for analog and digital. If you have room, I would use separate transformers. At a minimum, I would use independent rectifiers and banks.
Inductors are nice if you can afford ones big enough. Great on tube circuits where you are dealing with 380V, but for solid state, chips and regulators are a lot cheaper and smaller.
With proper layout, you can use the digital supply for the relays, though the MegaSquirt forum is solidly against that. A glitch in a preamp may not be as bad as in an EFI or Ignition system. Your call.
I also would build a tracking supply for the analog section. Circuits can make huge thumps when going up and down asymmetrically.
It is SOP now to use several stages of regulators in series if you are really serious. I have never needed more than two though. I have seen 6.
Some do not like the smallest imparlance in the +/- supplies, so would not use the same transformer winding for a +/- and a + supply, but your currents are so low, probably does not matter.
For the best performance, layout matters so pay attention to that.
Pay attention to the physical orientation of the transformer and direction of the external fields
Might look at CRC main filter banks as a preamp is not a huge variable load.
RF off the diodes is still quite a controversy. Fast or slow, caps or not. Read, decide and test for yourself.
Looks like you are using a Spice, so do your simulation. Play with supply source impedance and inject various noises to see what happens. I use LT Spice and obviously, they have good models for their regulators.
Thanks for your reply. I've not got much time before I have to go for the weekend, but wanted to address a few points from your reply.
Which ones? I've heard MPS MP2331H being mentioned elsewhere, and other such single-chip buck converters, but never seen any so far (not an exhaustive search!) that do +- supply, all seem to be +V.
I know there were drop-in replacements for 7805 but not sure if any for 7905. Will search.
That's what I was thinking, glad I wasn't just paranoid.
I doubt I will have room for 2 transformers - it's for a small pre-amp to go on my desk.
Can I just parallel connect another bridge rectifier to one set of secondaries in the existing transformer and add the separate caps for that "branch" of the supply? Like this:
Is this like a servo supply?
Is that like a +-12V regulator, followed by a +-5V regulator, to help with keeping the regulator load down?
Is that one of those mains filters that are sometimes integrated into the IEC / switch unit?
I don't have LT Spice, will need to investigate.
Thanks! 🙂
Leave the old LM 78xx in the last century where they belong. Search the various forums for far better performing regulators.
Which ones? I've heard MPS MP2331H being mentioned elsewhere, and other such single-chip buck converters, but never seen any so far (not an exhaustive search!) that do +- supply, all seem to be +V.
I know there were drop-in replacements for 7805 but not sure if any for 7905. Will search.
I would absolutely use independent regulators for analog and digital.
That's what I was thinking, glad I wasn't just paranoid.
If you have room, I would use separate transformers. At a minimum, I would use independent rectifiers and banks.
I doubt I will have room for 2 transformers - it's for a small pre-amp to go on my desk.
Can I just parallel connect another bridge rectifier to one set of secondaries in the existing transformer and add the separate caps for that "branch" of the supply? Like this:
I also would build a tracking supply for the analog section. Circuits can make huge thumps when going up and down asymmetrically.
Is this like a servo supply?
It is SOP now to use several stages of regulators in series if you are really serious. I have never needed more than two though. I have seen 6.
Is that like a +-12V regulator, followed by a +-5V regulator, to help with keeping the regulator load down?
I dont have any test equipment for that - I will have a toroid transformer, so this should have minimal EM field I thought.Pay attention to the physical orientation of the transformer and direction of the external fields
Might look at CRC main filter banks as a preamp is not a huge variable load.
Is that one of those mains filters that are sometimes integrated into the IEC / switch unit?
Looks like you are using a Spice, so do your simulation. Play with supply source impedance and inject various noises to see what happens. I use LT Spice and obviously, they have good models for their regulators.
I don't have LT Spice, will need to investigate.
Thanks! 🙂
When there are two supplies in the same circuit:
1) Most ideal - Separate power supply, separate regulation (overkill in most cases).
2) Most common practice - Same power supply but separate regulators.
3) Least preferred - Same power supply, same regulator with LCL / CLC filtering for the analogue side.
In all the above cases, the ground planes must be separate with a small RF choke (<1uH) between the analogue and digital grounds.
1) Most ideal - Separate power supply, separate regulation (overkill in most cases).
2) Most common practice - Same power supply but separate regulators.
3) Least preferred - Same power supply, same regulator with LCL / CLC filtering for the analogue side.
In all the above cases, the ground planes must be separate with a small RF choke (<1uH) between the analogue and digital grounds.
IMHO the only real faults in your design are that
Inductors after the regulators will cause load-current variations (which usually contain your signal!) to induce supply voltage variations, which you really don't want. That way lies second- and third-harmonic distortions all through your signal chain.
With higher-voltage rails, you can do a bunch of preamp stuff (tone control, active crossovers, digital volume, whatever) at higher levels then attenuate later or have a bit less gain in the power amp, and thereby reduce your system noise-factor.
This may be useful to you:
https://github.com/phenidone/xover-psu
There are schematic PDF and layout PNG files there. It uses a transformer to produce the analogue rails and a separate AC/DC brick to produce 12V for control logic, fans, unmute-relay signals, etc. The unmute circuit is just a dumb timer; it should have probably been a rail-voltage check but oh well.
It fits in about 100x100x60mm.
(it also has an example of a CRC filter after its rectifiers, to answer your earlier question; see C3/R31/C4)
Yes you can buy fancier, newer linear regulators with less noise... but I don't think I've met anyone who can honestly and reliably tell the difference in an A/B test. There's no harm in using them if you want to, but an LM317 or 7812 or whatever is fine. The distortion from even the very best speakers is orders of magnitude greater.
- you probably want the inductors before, not after, the regulators, or replace them with a CRC pi-filter off the rectifier;
- the post-rectifier filter caps are a bit small, which means unnecessarily high ripple voltage going into the regulators;
- minor niggle: you probably want 12V rails not 5V, the latter is not really enough headroom.
Inductors after the regulators will cause load-current variations (which usually contain your signal!) to induce supply voltage variations, which you really don't want. That way lies second- and third-harmonic distortions all through your signal chain.
With higher-voltage rails, you can do a bunch of preamp stuff (tone control, active crossovers, digital volume, whatever) at higher levels then attenuate later or have a bit less gain in the power amp, and thereby reduce your system noise-factor.
This may be useful to you:
https://github.com/phenidone/xover-psu
There are schematic PDF and layout PNG files there. It uses a transformer to produce the analogue rails and a separate AC/DC brick to produce 12V for control logic, fans, unmute-relay signals, etc. The unmute circuit is just a dumb timer; it should have probably been a rail-voltage check but oh well.
It fits in about 100x100x60mm.
(it also has an example of a CRC filter after its rectifiers, to answer your earlier question; see C3/R31/C4)
Yes you can buy fancier, newer linear regulators with less noise... but I don't think I've met anyone who can honestly and reliably tell the difference in an A/B test. There's no harm in using them if you want to, but an LM317 or 7812 or whatever is fine. The distortion from even the very best speakers is orders of magnitude greater.
Fair enough. If you have little or no filtering occurring before the volume-control stage, there is little or no point in running a higher voltage.
You're going to face some annoying grounding problems; see the Layout Guidelines in the PGA2311 datasheet which requires separate AGND and DGND planes connected only at the PGA2311. That pretty much requires that your digital supply be a separate transformer (or a separate winding) from the analogue supply, otherwise you have a ground connection in the PSU and at the PGA2311, and therefore a loop.
With a two-winding transformer, you could use one winding to produce the 5V digital supply and the other in dual-half-bridge mode to produce the dual-rail analogue supply. The tradeoff there is that the rectifiers in your analogue supply run at half duty cycle, so you need more than twice the filter capacitance to keep the same ripple voltage. And you might need a larger transformer if your analogue rails are power-hungry - at which point you might have used more space than two transformers.
You can get tiny things like a HLK-PM01 which will give you 5V suitable for powering a microcontroller, but they're switchmode and noisy; solving the noise problems of having one of those present and indirectly coupled to your AGND is probably more hassle than it's worth. I used one in my design, but that's because I don't have any mixed-signal chips (the PGA2311) that force a join between AGND and DGND; everything is optocoupled.
The PSU schematic you showed with three full bridges is probably a pretty good tradeoff, all considered.
PS: your bleeder resistors totally don't need to be 2W. Calculate their actual dissipation 🙂 Related: don't use 15V secondaries to produce 5V rails, you will be burning heaps of heat in the regulators.
You're going to face some annoying grounding problems; see the Layout Guidelines in the PGA2311 datasheet which requires separate AGND and DGND planes connected only at the PGA2311. That pretty much requires that your digital supply be a separate transformer (or a separate winding) from the analogue supply, otherwise you have a ground connection in the PSU and at the PGA2311, and therefore a loop.
With a two-winding transformer, you could use one winding to produce the 5V digital supply and the other in dual-half-bridge mode to produce the dual-rail analogue supply. The tradeoff there is that the rectifiers in your analogue supply run at half duty cycle, so you need more than twice the filter capacitance to keep the same ripple voltage. And you might need a larger transformer if your analogue rails are power-hungry - at which point you might have used more space than two transformers.
You can get tiny things like a HLK-PM01 which will give you 5V suitable for powering a microcontroller, but they're switchmode and noisy; solving the noise problems of having one of those present and indirectly coupled to your AGND is probably more hassle than it's worth. I used one in my design, but that's because I don't have any mixed-signal chips (the PGA2311) that force a join between AGND and DGND; everything is optocoupled.
The PSU schematic you showed with three full bridges is probably a pretty good tradeoff, all considered.
PS: your bleeder resistors totally don't need to be 2W. Calculate their actual dissipation 🙂 Related: don't use 15V secondaries to produce 5V rails, you will be burning heaps of heat in the regulators.
Last edited:
The lm7805 is probably fine for a digital supply, something better would definitely be more noticeable on the analog side. If you choose low esr capacitors for the digital supplies, that will work better, but use standard parts for the analog rails.
I would look for an R-core transformer if possible that has +\- 12,9, and 9 to be able and stay out of trouble with noise and isolation issues.
If you do wind up tapping off one of your other rails for a 5v digital supply, you can try and use a ferrite on the + of the digital side to quiet it down a bit. A cascading approach to get from 12 to 9, then 5, can work too, using two regulators.
I would look for an R-core transformer if possible that has +\- 12,9, and 9 to be able and stay out of trouble with noise and isolation issues.
If you do wind up tapping off one of your other rails for a 5v digital supply, you can try and use a ferrite on the + of the digital side to quiet it down a bit. A cascading approach to get from 12 to 9, then 5, can work too, using two regulators.
@phase you still find low ESR not optimal for analogue supply rails? I see no reason not to use them there. I know the typical culprits here (oscon, or ceramic) arent overly popular in analogue rails, but I have not seen any evidence or explanation that satisfies me its a real problem; quite the opposite, the highest performance gear I know of (objectively), use low ESR caps in the power supply rails. I wouldnt use them for filtering necessarily, but we are talking about power here right? you have some concern about leakage? I might not use them to decouple a reference or something, but that is both A. some left over superstition on my part and B. not your normal power supply rails, given the usual complete lack of PSRR, so caps here should really be low leakage. I totally could be missing something here, so interested in your response.
Typically they sound bad, were made for the output of a switching power supply more than an analog circuit. If you dig around, there have been tests showing that certain parts will add distortion, and some won’t as much.
Sounds more like someone making a mistake in the design and layout and whacking a bunch of low esr caps on the output of a regulator that isnt specified for low ESR on its output. Nothing to do with switching vs linear, low ESR caps have been used successfully for linear electronics for decades now. Super-regs for example dont tend to like driving low ESR caps and can oscillate, which could certainly cause distortion (perhaps it was one of Jans articles relating to superregs and aps that mentioned it?, that I could understand), but its not a rule and would not be a good basis for a generalisation. As usual, it depends on the circuit. Film caps are VERY low ESR, are you saying they dont sound good on analogue rails? Ceramic, again, low ESR, Blackgate claims effectively zero ESR on their super-e configuration. blackgate are no good for analogue rails?
to the topic though, I tend to cascade 2-3 regulators to get down to a low voltage, low noise supply and I would definitely at a minimum use a dedicated winding for analogue and digital if possible, but I have seen very good designs that dont, as long as there are dedicated regulators and layout and decoupling is well sorted.
I am trying to give basic advice to someone who hasn’t had a lot of experience, maybe go start a thread in the lounge or something.
I believe I said that low esr electrolytic parts typically won’t sound as good as just specified for standard applications. Might want to read up on capacitor distortion if it interests you.
Getting a bit off topic talking about all that other stuff that won’t be relatable.
I believe I said that low esr electrolytic parts typically won’t sound as good as just specified for standard applications. Might want to read up on capacitor distortion if it interests you.
Getting a bit off topic talking about all that other stuff that won’t be relatable.
hat pretty much requires that your digital supply be a separate transformer (or a separate winding) from the analogue supply, otherwise you have a ground connection in the PSU and at the PGA2311, and therefore a loop.
The PSU schematic you showed with three full bridges is probably a pretty good tradeoff, all considered.
Only just getting back to this project.
@laplace I now have a 9V dual secondaries mains toroid, and it may be small-ish enough that I could have 2 side by side in a smallish case.
I think that would solve the ground loop issue that you raised, if I use 2 transformers.
With respect to your other comment quoted above, does that mean there'd be no issue with 3 full bridges and 2 transformers?
I've yet to test anything physically, so don't know what voltage the unloaded rails will be using the 9V toroid (mains might be a bit high here, my LM3886 project uses dual 25v secondaries and the unloaded is +-39V, which seems a bit higher than expected 1.404*25). Once I measure, I will calculate the bleed resistor values and power dissipation.
The usual voltage rating for transformers is at the rated current, unless the manufacturer is a bit cheaty. And a typical transformer might have about 8% regulation (more for smaller ones, less for larger), which means you should expect to see an open-circuit voltage about 8% higher than the nameplate voltage. So a 9V secondary with no load might give about 9.7V, or 12.3V full-wave rectified.
With three separate 9V secondaries, each of which has its own full bridge, you will get three rails of about 11.3V (9*1.414 - 1.4) under load, and be able to connect their grounds optimally at a single point under the PGA2311. Still a bit high in terms of regulator dissipation, but a heatsink can fix that.
You can also soak up another couple volts by putting multiple diodes in series in the rectifiers. Say you made a full-bridge rectifier with diode pairs, so 8 diodes total, that would give you 9*1.414-2.8 = 9.9V peak under load. A bit more if the diodes are large or schottky, but don't do that.
Mains voltage is also very variable in most places, certainly by more than 5%. Where I live in Australia, nominally 240V, I see anything from about 228V at night up to 256V when all the neighbours with their bad solar installs are cranking. At my previous house it would regularly drop to 210V when large machinery down the road was turned on. So yes, your rails will generally be several volts away from what you expected.
With three separate 9V secondaries, each of which has its own full bridge, you will get three rails of about 11.3V (9*1.414 - 1.4) under load, and be able to connect their grounds optimally at a single point under the PGA2311. Still a bit high in terms of regulator dissipation, but a heatsink can fix that.
You can also soak up another couple volts by putting multiple diodes in series in the rectifiers. Say you made a full-bridge rectifier with diode pairs, so 8 diodes total, that would give you 9*1.414-2.8 = 9.9V peak under load. A bit more if the diodes are large or schottky, but don't do that.
Mains voltage is also very variable in most places, certainly by more than 5%. Where I live in Australia, nominally 240V, I see anything from about 228V at night up to 256V when all the neighbours with their bad solar installs are cranking. At my previous house it would regularly drop to 210V when large machinery down the road was turned on. So yes, your rails will generally be several volts away from what you expected.
@laplace I'm not sure yet about the case I will use - it may have a big heatsink that I could use for the regulators.
I've also been considering a buck DC-DC converter, e.g. LM2596 for better power dissipation and efficiency. I'm not sure if it will be too noisy for audio uses. Yay or nay?
I doubt I can get a transformer with 3 secondaries. I could do 2 toroids, and use 2 secondaries from one for the dual rail, and 1 secondary from 2nd toroid for the +5v digital.
I've also been considering a buck DC-DC converter, e.g. LM2596 for better power dissipation and efficiency. I'm not sure if it will be too noisy for audio uses. Yay or nay?
I doubt I can get a transformer with 3 secondaries. I could do 2 toroids, and use 2 secondaries from one for the dual rail, and 1 secondary from 2nd toroid for the +5v digital.
A buck regulator will produce switching noise; you might as well just get one of the HiLink AC/DC bricks. Whether it's "too noisy" depends on how you use and and how you filter it. Might be bad to have it connected to a digital volume pot... but plenty of people (including me!) build power amplifiers that run off big switching supplies, and they're quite acceptable if you're careful.
By three secondaries, I mean your suggestion of two toroids, each with a couple of secondaries. They don't all need to be wound on the same piece of iron. Also if your digital supply doesn't need much current, you might be able to find an even smaller single-secondary transformer for that. 7.5V and 15V centre-tapped are pretty common, and that's a good voltage for making linear 5V supplies if you can get some.
You can do some funky arrangements of windings with multiple cores, for example I have an amp here that needs +-50V 300VA and +-70V 10VA rails. It is constructed using two separate toroids, being 35V+35V 300VA and 15+15V 20VA. The four windings are all in series, with the two 15V windings at the extremes, and GND at the junction of the 35V windings. Two bridge rectifiers, two sets of filters; one for 50+50V and one for 70+70V.
By three secondaries, I mean your suggestion of two toroids, each with a couple of secondaries. They don't all need to be wound on the same piece of iron. Also if your digital supply doesn't need much current, you might be able to find an even smaller single-secondary transformer for that. 7.5V and 15V centre-tapped are pretty common, and that's a good voltage for making linear 5V supplies if you can get some.
You can do some funky arrangements of windings with multiple cores, for example I have an amp here that needs +-50V 300VA and +-70V 10VA rails. It is constructed using two separate toroids, being 35V+35V 300VA and 15+15V 20VA. The four windings are all in series, with the two 15V windings at the extremes, and GND at the junction of the 35V windings. Two bridge rectifiers, two sets of filters; one for 50+50V and one for 70+70V.
Last edited:
How about buck regulator to get from 12.3V rectified to approx 7 or 8V, then LM7805 / LM7905 to help remove the noise? Or am I just needlessly complicating things and just stick with LM7805 / 7905?
Nah that's just way overcomplicating things and won't really help.
The 78xx etc have poor noise rejection at higher frequency; look at the ripple-rejection graph in the datasheet, you'll see it's 30dB worse at 100kHz than 100Hz, so switching noise at like 350kHz goes straight through them.
If you want to use a switcher, you will want to design something like a CLC filter to cut the switching noise. Don't bother, just put a heatsink on the linear regs because your power consumption is so low. It's not like you're building a 100W PSU here.
100mA * (12V-5V) = 0.7W dissipation per regulator with 100mA/reg load. Say max 50C ambient, 100C on the chip casing... you could get away with no heatsink since a bare TO-220 in free air is about 55K/W. A tiny clip-on sink is like 30K/W and would keep it plenty cool, especially because I don't think you'll see anywhere near 100mA load unless you're running a big microprocessor or something.
If your micro has a wifi/radio interface, they're usually power hogs and you might want to re-think. Or at least, be careful of the thermals on the regulator that's running your digital stuff and make sure you have very stiff decoupling.
Use three rectifiers, filters and regs off three windings if you have the room for that, otherwise three regs off two windings. To be honest, the single transformer with two windings will be totally fine too, especially if you are using separate bridge rectifiers as well as separate regulators for the digital and analogue parts.
We are totally into overthinking territory.
The 78xx etc have poor noise rejection at higher frequency; look at the ripple-rejection graph in the datasheet, you'll see it's 30dB worse at 100kHz than 100Hz, so switching noise at like 350kHz goes straight through them.
If you want to use a switcher, you will want to design something like a CLC filter to cut the switching noise. Don't bother, just put a heatsink on the linear regs because your power consumption is so low. It's not like you're building a 100W PSU here.
100mA * (12V-5V) = 0.7W dissipation per regulator with 100mA/reg load. Say max 50C ambient, 100C on the chip casing... you could get away with no heatsink since a bare TO-220 in free air is about 55K/W. A tiny clip-on sink is like 30K/W and would keep it plenty cool, especially because I don't think you'll see anywhere near 100mA load unless you're running a big microprocessor or something.
If your micro has a wifi/radio interface, they're usually power hogs and you might want to re-think. Or at least, be careful of the thermals on the regulator that's running your digital stuff and make sure you have very stiff decoupling.
Use three rectifiers, filters and regs off three windings if you have the room for that, otherwise three regs off two windings. To be honest, the single transformer with two windings will be totally fine too, especially if you are using separate bridge rectifiers as well as separate regulators for the digital and analogue parts.
We are totally into overthinking territory.
- Home
- Amplifiers
- Power Supplies
- Analog and Digital supply - how many voltage regulators?