Electrical – LTspice not giving correct output

ltspiceoutput

I'm trying to make a negative voltage power supply, mainly for opamps. I did some googling and found a circuit I like, so naturally before making it, I wanted to simulate it first.

It has 12V on the input and inputs around +12 and -12V or there about if you take the diode voltage drops into account. However LTspice just calculates that there's 12V at the output and the -12V output is at 0V as is the gnd. I've no clue if this is a bug or if I'm doing something wrong. I've tried electrolitic and nonpolarised capacitors and the default diodes as well as some randomly picked ones and some 1N4007 ones. The output is always the same apart from the +12V which obviously changes with the different voltage drops across the diodes.
Does anyone know what's going on and why?
Here's a picture of the circuit as well as the output I measure at the supposed -12V
enter image description here
enter image description here
P.S. I've tried another simulation software and it worked properly.

Here's a picture of the circuit working properly with a 12V DC supply. The points measured are the two wires.
enter image description here

Here's a link to a video where a guy builds the circuit and it seemingly works.
video
He measures DC volts, but I'm not sure if he actually uses a DC source. That's why I wanted to simulate it.

Best Answer

As pointed out, you need an AC supply (like output of a step down transformer that has no middle common terminal). For a lot less complexity, the circuit below also works. It may supply a bit less current than a full wave rectifier, but this is not a problem with op amps. Also, electrolytic caps are cheap. Remember that you need voltage regulators (e.g. LM317 and LM337) to reduce the ripple further. LM317 requires about 2V headroom at low currents.

enter image description here

enter image description here

If you're looking to get opamp dual supply, from a single ended DC, you need a rail splitter. This needs to have ability to both source and sink current at the midpoint (Virtual Ground).

Something like this will split a regulated DC into halves (eg 10V to ±5V, or 12V to ±6V). Note that the BJT sinking the +ve is bigger (TO92), as that current is usually higher. (I'd probably also change the 3904 to a 2222 just to be safe.)

enter image description here

Here's another that splits an arbitrary higher ripple DC and then has a +5V regulator. The tracked -ve is done with the left over opamp. Q2 is only a regulator for the -ve, so does not need to be beefy. But Q1 sinks the +ve rail so may need some heatsinking if it's passing a lot of current, and the input DC is much more than 14V (78L05 requires 2V headroom).

enter image description here

And finally, this is an extremely quick and very dirty solution. The LM358 can source upto 40mA but can sink only 20mA (so your load on the +ve rail is severely limited).

enter image description here

Here are some additional links to rail splitters https://tangentsoft.net/elec/vgrounds.html https://www.maximintegrated.com/en/app-notes/index.mvp/id/4344 https://www.tubecad.com/2018/02/blog0412.htm (That last page has circuits similar to what you have posted)