If you want to free your electronic circuits from the tyranny of batteries, which eventually die, you’ll need to learn how to make your circuits work from an alternating current (AC) power supply. That means getting a good understanding of AC power.

One good way to get your mind around how AC works is to look at the device that's most often used to generate it: the alternator. An alternator is a device that converts rotary motion, usually from a turbine driven by water, steam, or a windmill, into electric current. By its very nature, an alternator creates alternating current.

Essentially, a large magnet is placed within a set of stationary wire coils. The magnet is mounted on a rotating shaft that's connected to a turbine or windmill. Thus, when water or steam flows through the turbine or when wind turns the windmill, the magnet rotates.

As the magnet rotates, its magnetic field moves across the coils of wire. Because of the phenomenon of electromagnetic induction, the moving magnetic field induces an electric current within the wire coils. The strength and direction of this electric current depends on the position and direction of the rotating magnet.

You can see how the current is induced in the wire at four different positions of the magnet’s rotation. In part A, the magnet is at its farthest point away from the coils and oriented in the same direction as the coils. At this moment, the magnetic field doesn't induce any electric current at all. Thus, the light bulb is dark.

But as the magnet begins to rotate clockwise, the magnet comes closer to the coils, thus exposing more of its magnetic field to the coils. The moving magnetic field induces a current that gets stronger as the magnet continues to rotate closer to the coils. This causes the light bulb to glow.

Soon, the magnet reaches its closest point to the coils, as shown in part B. At this point, the current and the voltage are at their maximum, and the light bulb glows at its brightest.

As the magnet continues to rotate counterclockwise, it now begins to move away from the coil. The moving electric field continues to induce current in the coil, but the current (and the voltage) decreases as the magnet retreats farther away from the coils. When the magnet reaches its farthest point from the coils, shown in part C, the current stops and the light bulb goes dark.

As the magnet continues to rotate, it now gets closer again to the coils. But this time, the polarity of the magnet is reversed. Thus, the electric current induced in the wire by the moving magnetic field is in the opposite direction, as shown in part D. Once again, the light bulb glows as the current passing through it increases.

And so on. With each revolution of the magnet, voltage starts at zero and rises steadily to its maximum point, then falls until it reaches zero again. Then the process is reversed, with the current flowing in the opposite direction.