# Battery and virtual ground

I have a 24V battery and I'm trying to obtain a virtual ground from it. 90% of the circuits I found limit themselves to an opamp, which has very low current sinking. I'm trying to add a pair of transistors in push pull configuration, but my simulations are failing and I have no idea why. I would appreciate very much if someone could help me with this. So far, so good. I'm simulating the scenario in which I have nothing connected between -V to 0, and a high load connected from 0 to V+. I'm having 10.8V on RL and that's great. But, when I try the scenario in which I have nothing connected from 0 to V+, and my load is between V- and 0, I get 0V on my load resistance. I thought that, in this second case, the opamp would provide a small base current for the Q1 transistor, which then would drive a higher current from the V+ line and feed the load resistor. It doesn't seem to work this way, however. Please, could anybody enlighten me or give me a few tips?

• Don't you need at least two Vbe drops between the bases of Q1 and Q2?
– jonk
Aug 3, 2016 at 7:14

The problem is that your feedback signal is taken from the wrong place. Figure 1. Corrected feedback loop. (Red = remove, green = add.)

In your original layout the feedback signal is monitoring the output of the opamp but has no idea what's happening at the load which is where it matters. If the circuit is working the voltage at RL2 would be the same as that on pin 3. I think that if you measure it you will find that it is out by 0.7, the emitter-base voltage drop of Q2.

Instead, take the feedback from the junction of Q1 and Q2's emitters. The opamp will now correct until that point is at the same potential as pin 3.

Note that this arrangement can be problematic in some situations (push-pull audio amplifiers, for example, because the to switch from sourcing base current for Q1 to sinking base current from Q2 the opamp has to suddenly switch from +0.7 V to -0.7 V. To solve this a biasing arrangement is used to pass some "quiescent current" to keep both transistors slightly on near this point. It may not matter in you application.

It is failing in simulation because you're using a comparator rather than an op-amp.

The comparator is not unity-gain stable and it has an open-collector output, meaning it can't source current and if it could, it would oscillate.

Use a op-amp such as an LM358 and it will work, but it would be better to feed back from the output (transistor emitters) rather than the op-amp output. There is little danger of instability unless you have a very large load capacitance, because the transistors have no voltage gain.

• +1: especially because you noticed the part number beyond the blatant "mistake" of not enclosing the BJTs in the feedback loop. (I completely missed that tiny number! :-) Aug 3, 2016 at 20:41

A glaring problem in your example is that you hadn't provided any biasing for your BJTs. They each need a $V_{be}$ to operate in their active region and tying the bases together means that isn't going to happen. Their emitters are then just mostly "floating." So you need to start out by providing reasonable biasing.

A very cheap way to do this is to jack the bases apart by using two diodes which themselves are forward biased and operating. (You 'hope,' for now, that the two diodes provide enough of a difference to provide that biasing.) A resistor can provide those diodes with some current. But you'll need two in this case, to put the diodes roughly at the midpoint and also so that both bases aren't tied to their collectors. Those two resistors, in my first example these are $R_3$ and $R_4$, should be of the same value to do that.

You need to make sure that there is enough current flowing through the $R_3$, $D_1$, $D_2$, $R_4$ chain so that siphoning off some of it to drive either $Q_1$ or $Q_2$ won't upset the halfway point too much. Partly, this is solved by making $R_3$ and $R_4$ low enough. Partly, this is solved in this first circuit by adding $C_1$ and $C_2$, to help stabilize for time dependent changes. (In the second circuit, the opamp does that chore.) The values I gave for the capacitors is just an educated guess. A real design would come up with a way to quantify those better. The same is true for $R_3$ and $R_4$, which of course do need to be designed with your maximum BJT base currents in mind. simulate this circuit – Schematic created using CircuitLab

The above schematic also includes some emitter resistors. They help to set and stabilize the quiescent current, to allow some current sensing for overload protection, and to help avoid thermal runaway. The discussion gets complex, though, because it starts by arguing over the issues of how important (or not) the quiescent current actually is and eventually comes around to realizing that it is more about the voltage across the $V_{be}$ and/or emitter resistor. The focus then gets to the optimal crossover point. And frankly I don't think I want to get into all this here. So let me just say that you can "play" with the values a bit and see what works for you. Just put something in your circuit, so you can play with the values. You don't want them to drop too much voltage. But some. Perhaps try something that is between 2 and a factor of 10 more than the $\frac{kT}{q}$ voltage of some 26-30mV as a starting point?

Regardless, if you've made some accommodation for those emitter resistors, you can always just short them out. It may be just fine for you to do that. But at least you have a place to go to cure some observed 'problem' if you leave some room for them here. My value of 10$\Omega$ didn't get any thought from me.

Now for the opamp case. simulate this circuit

Also, you can connect the opamp output to the $Q_2$ base instead, or the $Q_1$ base instead. Or the middle of the two diodes, as shown. It doesn't really matter here, as all three of those nodes are well within the output voltage range of the opamp and the diodes just "stack." So it's not important. I used the mid-point of the diodes because it looks more like the first schematic. (Because of past experience, I might choose the base of $Q_2$ just because it reminds me more of where the VAS controls things in a more usual audio amplifier.)

You may consider a $V_{be}$ multiplier between the bases instead of two diodes as shown so that you can adjust the voltage between the bases for optimal operation. These are built from a BJT and some resistors and allow you to tinker with the biasing spread of between the bases of $Q_1$ and $Q_2$. The diodes as shown might not be enough, though usually they are fine. But different diodes behave differently and it is theoretically possible (while typical emission coefficients for diodes vs BJTs makes this unlikely) that you'd choose diodes which wouldn't get you where you wanted.

I won't belabor that except to present a diagram of what one might look like: simulate this circuit

The above, comprising $R_7$, $R_8$, $R_9$, and $Q_3$, replaces the diodes. The values shown for $R_7$, $R_8$, and $R_9$ are completely meaningless, in the example. You actually need to calculate them. But $R_8$ and $R_9$ set the voltage spread and $R_7$ compensates for the Early effect in $Q_3$. I could tell you how to compute all that, but unless you really need to go there, I'll hold short.

[Edit: Also, tempco may be important. The $V_{be}$ of $Q_1$ and $Q_2$ changes a lot with temperature (not uncommonly near $\frac{-2.2mV\pm 0.2mV}{^\circ C}$ after all is said and done with both the Ebers-Moll and $I_s$ tempcos.) So work goes into getting some kind of biasing that attempts to hold the quiescent current less temperature dependent. This may involve thermal bonding of the diodes, or else the $V_{be}$'s multiplier BJT, to $Q_1$ and $Q_2$. Exact strategies abound.]

The output of the opamp would probably be set to the node where the base of $Q_2$ is located, as shown.

(You could also just go buy a TLE2426.)

• Your second diagram looks good but you could improve the answer by (1) explaining how the diodes help, (2) What you mean by Vbe multiplier, (3) "placeholders" may confuse. (4) What the 10 Ω resistors are for. (5) Break the text up into paragraphs or bullets for each topic for improved legibility. (6) Explain what the first diagram is about. "OK. Start simple:" may not be much help to the OP. Aug 3, 2016 at 8:02
• Hmm. It's late tonight but I see your points and may give some of it a shot. (Not sure what you mean by placeholders.) Possibly tomorrow, though. Depends. Just thought I'd get a rough sketch out to help. But you are pressing me! hehe.
– jonk
Aug 3, 2016 at 8:05
• You're tired (and it's the morning here so I'm awake). "Obviously, the BJTs are just place holders." Yes, I'm encouraging you to write well formatted answers that answer the OP's question but that educate as well! Good night. Aug 3, 2016 at 8:10
• I'm going to bed. Started to write about kT/q, temperature stabilization and degeneration, how to design a Vbe multiplier and compensate for Early effect with a collector resistor, etc. Then discovered that while I know how to write Latex over in the mathematics board side of things, I've no clue here. I thought $\frac{kT}{q}$ would work. But I guess not. Very frustrating being ignorant like that. So I'm going to sleep and will address things tomorrow using ugly text equations.
– jonk
Aug 3, 2016 at 9:16
• The MathJAX delimiters on this site are \$ for inline and $\$ for separate line. Don't go over the top - you need to estimate the OP's knowledge level and aim just a little higher. A simple one-liner explaining the reason for each component would do the trick. Aug 3, 2016 at 9:27

You write you're satisfied with 10.8V when you draw current from the positive rail. You shouldn't. You expect 12V, as the virtual ground is right in the middle. The difference comes from the base-emitter voltage of Q1. This can be compensated for by deriving the feedback from a different point, as Transistor has pointed out. With his modification, you'd get 12V over the load.

But this does not solve the question your asking: Why doesn't it work at all when drawing current from the negative rail. The answer is it does not work because you have not used an operational amplifier. The LM293 is a comparator with open-drain output. It sinks current, but does not source it. Replace it with a real operational amplifier, like the TL081 that was mentioned in another answer, and your problems are gone.

If you also want good dynamic bahaviour, you'll also need to bias the transistor bases like shown in the schematics from Jonk.

Edit: I wrote 12V because I neglected the protection diode D3. Taking that into account you can only expect 11.7V of course.

• I missed the comparitor. Welcome to EE.SE. +1 for a good first answer. Aug 3, 2016 at 14:38

What about something like this? This circuit uses only 1 transistor. Virtual ground will be at collector. simulate this circuit – Schematic created using CircuitLab

UPDATE:

It depends what exactly you want to achieve. If you want to make ±12V source from 24V battery, and want to load approximately equal loads on both rails (let's say you want to have ~1A load on +12V rail, and ~1A load on -12V rail) it will be sufficient.

But if you want to have very different loads on those rails, than the difference will have to be dissipated in that transistor. Let's say, you want to load 1A from +12V and 1mA from -12V, that transistor will have to dissipate 12W of heat! In that case it would be maybe better to make some switching source instead of this simple transistor-only based solution.

• Maybe you should explain your solution. Or it is just another question? Aug 3, 2016 at 7:04
• No, that is not another question. That is suggestion to OP. But OK, I can add some explanation to my answer. Aug 3, 2016 at 7:09