100 V in, 50 V out – or even 400 V: how does a transformer do it? The animation shows the windings, the magnetic field in the core and the electrons in the wire, all in slow motion. Set the voltage, the numbers of turns and the load, and watch the waveforms and the characteristic respond.
Embed this animation in your website or learning platform
Copy the code and paste it into your website or learning platform (e.g. Moodle, ILIAS – in HTML mode). The animation stays up to date automatically, and the link leads back to this page.
<div style="position:relative;width:100%;aspect-ratio:16/9"><iframe src="https://www.educational-animation.org/web-animations/transformer/en/transformer.html" title="Interactive Animation: Single-Phase Transformer" style="position:absolute;inset:0;width:100%;height:100%;border:0" allowfullscreen loading="lazy"></iframe></div>
<p><a href="https://www.educational-animation.org/en/single-phase-transformer/">Single-Phase Transformer – educational-animation.org</a> · MIT licence</p>
Links
Have you fixed a bug in the animation or made an improvement? Send us your animation via our contact form.
Animation Description
On the left you can see a single-phase transformer. The grey core made of electrical steel carries two copper coils (orange): on the left the primary winding with \( N_1 \) turns, on the right the secondary winding with \( N_2 \) turns. Each drawn turn stands for 100 real turns.
The purple field lines show the magnetic field in the core. The more lines, the larger the magnetic flux \( \Phi \); the small arrows above and below the window show its direction. The dark blue dots on the wire are electrons: they swing back and forth in step with the alternating current.
The reference arrows \( U_1 \) (blue) and \( U_2 \) (red) mark the primary and secondary voltage. A load resistor \( R \) (white rectangle) is connected to the secondary side.
At the top right is the time plot: \( u_1(t) \) in blue, \( u_2(t) \) in red and the flux \( \Phi(t) \) in purple (right-hand axis, in mWb). It covers 40 ms – two periods of the 50 Hz mains frequency. The animation runs in slow motion at 1:100, so one period takes 2 seconds. A dashed time cursor marks the current instant.
At the bottom right is the characteristic \( U_2(U_1) \) with the red operating point. Lower-case letters (\( u_1 \)) are instantaneous values, upper-case letters (\( U_1 \)) are RMS values.
Interactive Controls
- Voltage U1 (top left, 0–100 V in steps of 5 V): RMS value of the primary voltage. Start value: 100 V.
- Turns N1 (top centre, 300–1200 in steps of 100): number of turns on the primary winding. Start value: 800.
- Turns N2 (top right, 300–1200): number of turns on the secondary winding. Start value: 400.
- Load resistance R (bottom centre): ∞ (no load), 1000, 500, 200, 100 or 50 Ω. Start value: 100 Ω.
- Magnetic field (checkbox, bottom left): shows or hides the field lines.
- Pause / Play (bottom left): stops time or lets it run on.
Physical Background
The alternating voltage on the primary winding drives an alternating current. It creates a magnetic field in the iron core that keeps changing its strength and direction. The core guides this field through the secondary winding as well.
Every change in the magnetic field induces the same voltage in every turn. More turns therefore mean more voltage. That is why the ratio of the numbers of turns decides how much the transformer steps the voltage up or down. It does not work with direct voltage: a constant field induces nothing.
Law of induction and turns ratio
According to the law of induction, the voltage across a winding is proportional to its number of turns and to the rate of change of the flux:
\[ u_1 = N_1 \cdot \frac{\mathrm{d}\Phi}{\mathrm{d}t}, \qquad u_2 = N_2 \cdot \frac{\mathrm{d}\Phi}{\mathrm{d}t} \]
In the ideal transformer the same flux passes through both windings. Dividing one equation by the other cancels \( \mathrm{d}\Phi/\mathrm{d}t \):
\[ \frac{U_2}{U_1} = \frac{N_2}{N_1} \]
- \( u_1, u_2 \) – instantaneous primary and secondary voltage in V
- \( U_1, U_2 \) – RMS values in V
- \( N_1, N_2 \) – numbers of turns
- \( \Phi \) – magnetic flux in Wb (weber)
In the animation: with the start values (\( U_1 = 100\ \mathrm{V} \), \( N_1 = 800 \), \( N_2 = 400 \)) you get \( U_2 = 50\ \mathrm{V} \). The characteristic is a straight line through the origin with the gradient \( N_2/N_1 \). Change \( N_1 \) or \( N_2 \) and the line tilts.
How large is the flux?
For a sinusoidal voltage, the law of induction gives the peak value of the flux:
\[ \hat{\Phi} = \frac{\sqrt{2} \cdot U_1}{2\pi f \cdot N_1} \]
- \( \hat{\Phi} \) – peak flux in Wb
- \( f \) – frequency in Hz (here 50 Hz)
With the start values this is \( \hat{\Phi} \approx 0.56\ \mathrm{mWb} \). The maximum in the animation, 1.5 mWb, is reached with \( U_1 = 100\ \mathrm{V} \) and \( N_1 = 300 \) – then all field lines are visible.
Notice that neither \( N_2 \) nor the load appears in the formula. The flux is set by the primary voltage alone.
The flux is also shifted by a quarter period relative to the voltage. The voltage is greatest when the flux changes fastest – at the zero crossing of \( \Phi \). You can see this in the time plot: where the purple curve crosses the axis, the blue and red curves reach their peaks.
Currents and power
Even without a load, a small current flows in the primary winding: the magnetising current \( i_\mu \). It builds up the magnetic field and oscillates in step with the flux. You can see it at no load (\( R = \infty \)): the electrons in the primary winding swing back and forth, while those in the secondary winding stand still.
With a load on the secondary side, the current \( I_2 = U_2/R \) flows there. Its magnetic field opposes the change in flux (Lenz’s law). The primary winding therefore draws extra current until the effects balance out (ampere-turn balance):
\[ N_1 \cdot I_{1,\mathrm{load}} = N_2 \cdot I_2 \quad\Rightarrow\quad \frac{I_{1,\mathrm{load}}}{I_2} = \frac{N_2}{N_1} \]
The current is transformed in the inverse ratio to the voltage. So the power is the same on both sides – the ideal transformer loses nothing:
\[ P = U_1 \cdot I_{1,\mathrm{load}} = U_2 \cdot I_2 \]
Example with the start values: \( U_2 = 50\ \mathrm{V} \) and \( R = 100\ \Omega \) give \( I_2 = 0.5\ \mathrm{A} \) and \( P = 25\ \mathrm{W} \). On the primary side this needs \( I_{1,\mathrm{load}} = 0.25\ \mathrm{A} \) at 100 V.
The magnetising current adds to this. It is shifted by a quarter period relative to the voltage and transfers no power on average.
Reference arrows and signs
In the animation both windings have the same winding sense, and both reference arrows point from the lower to the upper terminal. That is why \( u_1 \) and \( u_2 \) are in phase: the red and blue curves cross zero at the same moments.
The primary side takes in power, the secondary side passes it on to the resistor – it acts as a source. With the same reference direction on both sides (passive sign convention), the secondary current therefore comes out negative.
Things to Try
- Step up, step down: Set \( N_2 \) to 1200. The characteristic gets steeper and \( U_2 \) rises to 150 V. With \( N_1 = 300 \) and \( N_2 = 1200 \) the operating point reaches the top edge: 400 V.
- The load does not change the field: Switch the load resistance from ∞ to 50 Ω. The electrons in the secondary winding start to swing, and those in the primary winding swing further. The number of field lines stays the same – the flux depends only on \( U_1 \) and \( N_1 \).
- Fewer turns, more field: Change \( N_1 \) from 800 to 400. The flux doubles and twice as many field lines appear. At the same time \( U_2 \) doubles.
- Voltage and flux are out of step: Watch the field lines and the time cursor. When \( u_1 \) reaches its peak, the field lines vanish for a moment. There are most lines when the voltage crosses zero. Press Pause to freeze an instant.
Notes on the Model
The animation shows an ideal transformer: no winding resistance, no losses in the iron (eddy currents, hysteresis) and no leakage flux. That is why \( U_2 \) stays the same for every load. In a real transformer the secondary voltage drops a little under load, and the transformer warms up.
The core is linear and never saturates. To make the magnetising current visible, it has deliberately been made large (permeance of the core Λ = 1 µH). In real mains transformers it is usually only a small fraction of the rated current.
The electrons show the direction and relative size of the current. Their movement is greatly enlarged: in an alternating current real electrons only move back and forth by a tiny fraction of a millimetre. Very large currents are limited together for the display. The frequency is fixed at 50 Hz.
Practical Applications
- Power grid: high voltage for transmission (a smaller current means lower losses); substations step it down again for homes.
- Power supplies and chargers: traditionally with a 50 Hz transformer, today mostly switched-mode power supplies with a small high-frequency transformer.
- Welding transformer: steps the voltage down and supplies large currents in return.
- Isolating transformer: ratio 1:1, separates a circuit galvanically from the mains – for example when working on electrical equipment.
Use in the Classroom
Tasks
Tasks you can work on with the animation:
- Read off U2 with the initial values and confirm it with U2 = U1 · N2/N1.
- Set N2 larger than N1. What does the transformer become? Name an application.
- Reduce the load resistance. How do I2 and the load current on the primary side change? Explain with the balance of ampere-turns.
- Switch on the field lines and watch the time curves. When is u1 greatest – at large flux or at a fast change of flux?
Worksheets
Worksheet “Single-Phase Transformer” with answers: Word (editable) · PDF
Graphics
Graphics from the animation as SVG – they scale without loss for worksheets, slides or the board. Click to open a graphic; right-click → “Save as …” to download it.
Transformer: core, windings and magnetic field
Transformer: core and windings (instant with zero flux)
Transformer: u1, u2 and magnetic flux against time
Licence for graphics and worksheets: CC BY 4.0 – please credit “educational-animation.org”.
Further Resources
- Transformer – Wikipedia – design, types and equivalent circuit
- Transformer basics – Electronics Notes – turns ratio, current and impedance
- Law of Induction – educational-animation.org – the basis of the transformer as an interactive animation
Related Animations
Overview
| Title | Single-Phase Transformer |
| Target Audience | Teachers and Lecturers |
| Features | Full-screen mode Lossless scaling Large screens and projectors supported |
| Licence | Animation (code): MIT · Text and graphics: CC BY 4.0 |
Sources and Origin
- E. Hughes: Electrical and Electronic Technology. Pearson, Harlow.
- IEC 60076-1: Power transformers – General.
Parts of the program code for this animation were created with the help of AI tools. The idea, design and technical responsibility remain with us.
Cite this post
The animation (code) is published under the MIT licence, text and graphics under CC BY 4.0: you may use, share and modify everything freely – please give credit. The easiest way is to copy this citation:
Sebastian Rikowski: Interactive Animation: Single-Phase Transformer. educational-animation.org, 2026. https://www.educational-animation.org/en/single-phase-transformer/ – Licence: code MIT, text and graphics CC BY 4.0.
If you use the animation, we would greatly appreciate a link to our site or a brief mention of it. It helps others find us – and helps us keep going.


