Using regulator output for virtual ground?

Started by mark2, June 26, 2020, 02:40:59 PM

Previous topic - Next topic

mark2

I have a 5V linear regulator to power an IC, on a 9V pedal. I'm trying to keep parts count low.

I'm using an lm358 to boost a signal so the ADC on the IC can read it.

Any reason not to simply use the regulator output for the virtual ground on pin 5? e.g. would it introduce noise?

Noise isn't particularly problematic here since this is for a rough visualization - e.g. spectrum analyzer - as opposed to audio... but I'm curious nonetheless since I haven't seen this done in other circuits that have 5V regulators.

amptramp

Where you have an ADC, you usually have a processor which uses a constant clock signal.  This is not that much of a problem since the clock is usually running at frequencies above audio.  But if the processor has a varying current drain then this will modulate the virtual ground.  Whether this noise is acceptable depends on what sort of specification you set for the accuracy of the ADC.  You don't see this done often because it does add noise that could be reduced by orders of magnitude with only a few more parts.

ElectricDruid

Someone here did it on (I think) a PT2399 circuit. Since there was a 5V regulator for the PT2399 and the rest of the circuit was running at 9V, why have a virtual ground? Why not just bias the op-amps to the existing 5V? I thought it was a neat trick to save a few parts.

HOWEVER...that's not an ADC. That part does concern me.

I think finally you just have to try it. The idea is sound and it'll work. The question is whether the performance is acceptable, and that's a mixture of trying it out and settling on your own standard of "acceptable".

mark2


merlinb

Quote from: mark2 on June 26, 2020, 02:40:59 PM
Noise isn't particularly problematic here since this is for a rough visualization - e.g. spectrum analyzer
For that application it should be fine, but when I did something similar in a PT2399 echo circuit it introduced a lot of noise.

composition4

Whenever I've done this it has introduced a lot of noise. Might be okay for a low gain circuit but definitely a no-go for high gain.

My theory is that as ground and 9v wiggle up and down slightly due to power supply noise, the VREF doesn't wiggle up and down because the regulator is doing its job. So any power supply noise is effectively showing up on your reference voltage due to the difference in voltages... Whereas if VREF is a resistive divider, it moves with the power supply noise and noise is effectively ignored by whatever the VREF is referencing.

Sorry I hope that makes sense, words aren't my strong point pre-coffee.

Rob Strand

#6
QuoteWhenever I've done this it has introduced a lot of noise. Might be okay for a low gain circuit but definitely a no-go for high gain.

My theory is that as ground and 9v wiggle up and down slightly due to power supply noise, the VREF doesn't wiggle up and down because the regulator is doing its job.  So any power supply noise is effectively showing up on your reference voltage due to the difference in voltages... Whereas if VREF is a resistive divider, it moves with the power supply noise and noise is effectively ignored by whatever the VREF is referencing.
There's many issues to think about with both set-ups and you need to look closely to see the differences.

The problem you are trying to avoid:  When you connect opamps to the VREF rail it as assumed that the rail is noiseless.   If it is noisy bad things happen.   The noise on VREF appears directly on the audio signal, or in some cases that noise is amplified by the circuit configuration.

If you take the output of an LM7805 regulator the noise can be crudely estimated to be 125 nV/rtHz.   A typical opamp used on a pedal might be 10nV/rtHz to 20nV/rtHz; FYI the LM358 is worse than that.  So even that simple scenario isn't looking good.    The normal resistive VREF circuit doesn't have this problem since the big cap shunts out all the noise.

If you use the regulator to power digital circuits then that can put additional noise on the power rail.  In fact having digital noise on the VREF, which should be as quiet as possible, is about as bad as it gets.

So a way around both those issues is to filter the power before going to the analog circuit.  A suitable circuit is as follows.  Take a look at the schematics for some modern Boss pedals and you will see it in there,

https://www.electronics-notes.com/articles/analogue_circuits/transistor/capacitance-multiplier-circuit.php

Another type of noise is hum from the power supply.     For the case of the LM7805 it could well be better than the resistive divider.   The LM7805 removes the hum through regulation.  The resistive divider also removes hum by filtering;   the big VREF cap removes the hum.

So outside of the noise problem(s):  The disadvantage of using a regulator for VREF is you lose a lot of opamp output swing when the battery starts to go flat.   For a 9V battery and 5V VREF you can swing at most +4V in the positive direction and -5V in the negative direction.  However, when the battery goes flat to say 7V the negative swing stays the same at -5V but the swing positive direction is now only (7V-5V) = +2V.  The output swing becomes limited by the positive swing.    For the resistive divider it keeps the opamps in the middle for all battery voltages so the swing for the 9V supply case you get +/-4.5V and for the 7V supply case you get +/-3.5V.  To make matters worse for the regulated VREF case real opamps don't swing to the full power rail, you can lose 1V to 2V, and that means there's isn't much swing left at all for a 7V battery.
   
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

jonny.reckless

#7
Also bear in mind, in addition to the noise problem, that a 7805 is only designed to source current; not sink it. Typically a virtual ground is expected to have symmetric DC and AC impedance for sourcing and sinking current. Using a regulator like this the impedance when sourcing current will be lower than when sinking current, as the reservoir cap needs to sink the current. In general I would avoid it - an opamp is usually better in all respects, and for most circuits you can get away with just a resistive divider and a large electrolytic cap.



ElectricDruid

Quote from: Rob Strand on June 26, 2020, 11:37:55 PM
..when the battery starts to go flat..

Batteries?!? What is this crazy talk?!? ;) I haven't put batteries in a pedal in twenty years. I haven't even designed in the option in ten or more.

niektb

Quote from: ElectricDruid on June 27, 2020, 06:27:45 AM
Quote from: Rob Strand on June 26, 2020, 11:37:55 PM
..when the battery starts to go flat..

Batteries?!? What is this crazy talk?!? ;) I haven't put batteries in a pedal in twenty years. I haven't even designed in the option in ten or more.

Hahah same, I hate batteries. They're always empty when on a gig XD

Rob Strand

QuoteBatteries?!? What is this crazy talk?!?
I don't use batteries in pedals either.  Some people do!

The point about the loss of swing holds with or without batteries.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

niektb

And if you need to sink more current into a virtual ground, those TDA amplifiers work pretty well! I once used a 15W amp (with cooling block) to sink to almost 500mA current  :icon_mrgreen: (I used that to create 6V bipolar supply from a 12V DC source)

anotherjim

I'm not sure if I reason not to use the series regulator - provided there is effective bypass capacitance, what's the difference between it and a resistor divider (some use very large value resistors)?
Digital noise might be being introduced via the common ground if it occurs on the audio.

Regarding AC blocking, is there any difference between a series regulator and the series protection diode many of us fit?

antonis

Quote from: Rob Strand on June 27, 2020, 07:17:10 AM
I don't use batteries in pedals either.  Some people do!

Probably some of those ultra lazy guys who don't wish to deal with ripple/hum/noise/efficiency/phase angle/LPFs and other so nasty fussings..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

mark2

If anyone's curious, it resulted in a strange sag on the top of the sine wave I was feeding in.  I haven't done any deep investigation yet, other than to notice  there's a very visual difference between using the regulated out as a virtual ground vs. simply halving the VCC.

jonny.reckless

Quote from: mark2 on June 27, 2020, 10:06:51 PM
If anyone's curious, it resulted in a strange sag on the top of the sine wave I was feeding in.  I haven't done any deep investigation yet, other than to notice  there's a very visual difference between using the regulated out as a virtual ground vs. simply halving the VCC.
Most likely due to the asymmetric impedance of your virtual ground as the regulator cannot sink current; only source it. You can probably kludge it by putting a 1k (you may need to go smaller) resistor from virtual ground to real ground to make sure the regulator is always sourcing current, but as I mentioned I believe you're better off not doing it that way to begin with.

jonny.reckless

Quote from: anotherjim on June 27, 2020, 11:31:40 AM
Regarding AC blocking, is there any difference between a series regulator and the series protection diode many of us fit?
You always draw current from the power supply, you don't deliver current back to it. Signal currents into a real or virtual ground tend to be AC if they are ground referred, so the ground needs to sink and source equally well for the circuit to behave in most cases.

antonis

#17
Frankly speaking, any output stage consisting of an Emitter follower suffers from load "symmetrical" driving capabilities..
(it can source plenty of current but it can only sink limited current amount due to Load/Emitter resistor voltage dividing effect..)
By replacing Emitter resistor with a current source we can substancially raise current sinking capability but we can't make sourcing-sinking capabilities ideally equal.. (unless we deal with an ideal current source, of course..)
A further improvement could be a push-pull class A output arrangement but we've already gone far away from OP initial query so, IMHO, for realy SMALL signal variations, 7805 output could exhibit a decent sinking behavior..
(restricted, of course, by Load/(R19+R20) ratio - ignoring Q6 respective circuitry..)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Rob Strand

QuoteFrankly speaking, any output stage consisting of an Emitter follower suffers from load "symmetrical" driving capabilities..
(it can source plenty of current but it can only sink limited current amount due to Load/Emitter resistor voltage dividing effect..)
By replacing Emitter resistor with a current source we can substancially raise current sinking capability but we can't make sourcing-sinking capabilities ideally equal.. (unless we deal with an ideal current source, of course..)
If you know in advance that the DC current is one direction you can use a PNP or NPN to suite; as it can dump more current in one direction.   Obviously that changes the direction of the VBE voltage drop.

The voltage divider kind of handles current in either direction by raising or lowering the VREF voltage a bit.

The hanging point is *if* current is being injected *into* the regulator.   The dummy load already mentioned is the way to go.    Most regulators have some internal feedback resistors which can draw a very small amount of current.

For things like opamps normally the DC current on VREF is pretty small and we rely on the bypass cap to stop the voltage wandering with AC.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

anotherjim

If the bypass caps are close to zero impedance (including self-inductance) at all important frequencies then the AC path is via the caps it doesn't need to sink via the supply.
I take the point where there are bi-directional currents to handle in the virtual ground, but ...
I'm only thinking of reference voltage supply.
The regulator is supplying another circuit, it has a resistive path to 0v via that circuit -  so that can sink some DC current.
Some opamps really do only need to "see" the reference voltage. It's far more important that the reference is clean and noise free.
Some op-amps (LM358 etc) do need relatively large input bias currents compared to others, but it's still only a little and that path can sink through the regulators other loads.

I've used 5v regulator references with PT2399, MOSFETS and voicememo chips and MCU's and don't hear any problems injected to the clean paths.

Often, the desire to separate digital circuits from analogue, a need to optimise headroom (5v ain't half of 9v) and other layout considerations, may mean its better to fit a local resistive Vref for opamp packages.

LM358/LM324 headroom -  those amps don't have a symmetrical swing in or out and a reference below 1/2 supply is optimal.