# How Electricity is Made

Electric Generators at the Hoover Dam

In our previous projects, we used a battery to power our circuits. Batteries play a critical part in powering our everyday devices, from mobile phones and laptops, to watches and hearing aids. Batteries are a common source of power for many electronic devices, but it's certainly not the only option for electrical power.

Most of the electrical energy we use in our everyday lives comes from the power company. This electrical energy is readily available to us through electrical outlets around our homes — it heats our houses, runs our computers, cooks our food, lights our rooms, recharges our batteries, and so much more... But, where does the energy to do this come from, and how does it get to our homes?

There are a number of different ways that the power company provides electric power, but the most common way is through an electric generator. A generator is a device that converts mechanical energy (movement) into electrical energy. When everything is set up properly, all you need to do to generate electrical energy is to provide the mechanical energy to turn the generator. For example, if you actually turn a generator by hand, then you can generate electrical energy.

One thing to remember, though — electrical energy is never "made" out of thin air. The energy already exists — we simply convert other forms of energy (like the energy you use to turn the generator) into electrical energy.

But how does an electric generator "convert" mechanical energy into electrical energy? That's where magnets come into play...

Funky magnets. How do they work?

It turns out that magnetism and electricity and are two very related concepts — either one can be used to create the other. If you put a magnet near a conductor and move it around, it will generate an electric current; likewise, an electric current moving through a conductor creates a magnetic pulling force.

This is the principle used by the power companies in their electric generators. By repeatedly moving a magnet within a closed loop of conducting wire (or moving the wire around the magnet), a current is generated in the loop.

Keep in mind that the reverse is true as well: an electric current flowing through a conductor that's near a magnet will pull the magnet (since the electric current creates a magnetic pulling force). This is how an electric motor works — a current in a loop of wire causes a magnet to turn. This is good to understand, as electric motors are used everywhere — they spin washing machines, they run air conditioners and refrigerators, they pump water, and they even turn the wheels on electric vehicles.

Now that you know that power companies create electric current by rotating a magnet around a loop of wire (or a loop of wire around a magnet), you may be wondering how the magnet (or the wire) is rotated. As you might imagine, power companies don't actually have people turning cranks on a generator all day to generate power. So, exactly how do they do it?

Turning an electric generator is generally accomplished by pushing steam through a turbine (which is basically a large fan with many fan blades) — the steam pushes the blades of the turbine, which turns the shaft of the generator, which moves the magnet (or wire) to generate electrical energy.

Which leads us to our next question — how do you generate steam? To generate steam, we need to boil water. This can be done in one of many ways:

- We can burn something to heat the water. In the United States, this is the primary way of generating electrical energy and typically the thing that we burn is coal (and sometimes natural gas). This is why you will often hear that coal is used to generate electricity.

- We can use nuclear energy. Nuclear reactors use a process of "splitting" atoms and that process releases vasts amount of energy. This energy can be used to boil water.

- We can use the sun (solar energy). Using mirrors and lenses, we can reflect the sun's light to a small location which generates a huge amount of heat that can be used to boil water.

Boiling water to turn a turbine isn't the only way to turn a generator and generate electrical energy. In fact, sometimes you can turn generator directly. For example:

- A hydroelectric power plant user the power of a water fall to turn the shaft of a generator.

- A wind turbine uses the force of the wind to directly turn the shaft of a generator.

And, there are other ways to generate electrical energy as well, including solar cells, which directly convert the sun's energy to electric current, without any moving parts at all!

# Electricity Transmission

It's a long and somewhat complicated process, but that is how electrical energy is typically generated. But, how does it go from being created by the power companies in their buildings to powering the electronics in your home? Power lines (also called transmission lines) are long thick metal cables that connect the power source to your home. The power company relies on a vast network (often called "the grid") of interconnected transmission lines that delivers electrical energy from the places where it is being created all the way to you and your neighbors' homes.

Heat

Steam

Turbine

Generator

Transmission Lines

Its important to note in the above picture that the generator, wires, and lightbulb form one continuous loop. It's a big loop — but like we mentioned earlier, all working electric circuits must form a closed loop. It is no different when that electrical energy is coming from the power company.

Think about this as you work on the following project, where we will stop using the battery to power our circuit and will instead use power coming from the Raspberry Pi. The Raspberry Pi gets it's power from the wall outlet, which is connected to a generator at a power plant far away in one long continuous loop. So, while you may be thinking that you have created a small closed loop circuit on your breadboard, in reality, you have created a closed loop that's miles long all the way back to the power plant.