Mains transformer, 230 V or 120 V to 12 V
Two windings on one iron core: mains AC in, low-voltage AC out, with nothing joining the two sides. Rectify it for DC.
- 5 pins
- 1 setting
- In 1 project
The Mains transformer, 230 V or 120 V to 12 V in brief
What it is, and every setting the properties panel gives it.
A mains transformer is two coils on one iron core. Alternating current in the primary makes a changing field in the iron, and that field makes a voltage in the secondary in proportion to its turns, so fewer turns give a lower voltage and more current. The only link between the two sides is the field, which is why the secondary floats until the circuit gives it a ground. The Mokxi part has five pins: P1 and P2 for the primary, S1 and S2 for the ends of the secondary, and CT for its center tap. Seven models are rated like the ones sold, from 230 V to 12 V at 1 A to 120 V to 24 V at 1 A. It reproduces the turns ratio, the isolation, the regulation (a 12 V 1 A model reads about 13.2 V with nothing on it) and the primary’s magnetizing current of about a tenth of the rating at no load. A steady DC voltage passes nothing. Saturation, core loss, heating and the switch-on inrush are not modeled.
- Family
- Power and wiring
- Pins
- 5
- model
- 230V to 12V 1A (or 230V to 12-0-12V 1A, 230V to 9V 1A, 230V to 6V 500mA, 120V to 12V 1A, 120V to 12-0-12V 1A, 120V to 24V 1A)
5 pins
Named as the editor names them, so a wire lands where you expect it.
How to use a mains transformer in a power supply circuit
There is no wall socket in a simulator, so the project uses the signal generator as one: a 50 Hz sine of 325 V peak, which is 230 V rms, wired to the primary on P1 and P2. For 120 V mains use 170 V peak at 60 Hz and a 120 V model. The secondary’s ends S1 and S2 swing in opposite directions around CT, and CT is the circuit’s ground.
Each of two 1N4007 diodes passes the half cycle in which its end of the secondary is positive, so a 1000 uF capacitor is topped up every 10 ms, a full-wave rectifier with two diodes instead of four. Each half of the secondary is a little over 12 V rms at this light load, about 18 V at the peak, and less one diode drop the capacitor charges to about 17.2 V.
A scope shows the blue trace as a sawtooth with about 1.2 V of ripple, and the multimeter sits in between at about 16.5 V into 100 ohms. Try 100 uF and the ripple grows ten times; try a 1 k load and it almost vanishes; take out one diode and it is half-wave, topped up only every 20 ms. On a real bench, never build the primary side on a breadboard.
The low-voltage side can feed a regulator and a board. Only build that side by hand, on a plug-in adapter or a transformer wired and insulated by someone qualified.
Common Mains transformer, 230 V or 120 V to 12 V errors and fixes
Questions and answers
How do I simulate mains with a transformer?
Use a generator set to sine at the mains frequency with offset 0 and the amplitude at the peak: 325 V for 230 V rms, 170 V for 120 V rms. Wire its OUT to P1 and GND to P2.
What does the center tap do?
On a 12-0-12 V model it is the middle of the secondary. Tied to ground, it makes two 12 V halves of opposite sign, which two diodes turn into a full-wave rectifier. On single-secondary models you can leave it unconnected.
How much does the primary draw with nothing on the secondary?
About a tenth of the rated current, the magnetizing current. Real ones also get warm from core loss, which the model leaves out.
Is it safe to build this circuit on a real breadboard?
No. The primary is lethal mains. Simulate that side here and build only the low-voltage side, from a sealed plug-in adapter or a properly insulated transformer.
What is true about the Mains transformer, 230 V or 120 V to 12 V, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
- The turns ratio, and the isolation between the two sides.
- Regulation: a small transformer is sold by its voltage at full load, and its open-circuit voltage is about 10% higher. So a 12 V 1 A model reads about 13.2 V with nothing on it and 12 V at 1 A.
- The magnetizing current: the primary draws about a tenth of its rated current with no load at all.
- DC passes nothing. A steady voltage on the primary only drives current through the copper, which on a real one blows a fuse or burns the winding.
From Mains transformer, in full.
See the Mains transformer, 230 V or 120 V to 12 V in a project
One built-in project uses it. It opens in the editor, already wired.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Mains transformer, 230 V or 120 V to 12 V
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.