Solar Cell Simulation
1. Solar Cells and Silicon
2. Silicon and Electron Flow
3. P-N Junction
4. Photons
5. Cell Construction
1. Solar Cells and Silicon

Solar panels are pretty common. They're in your calculator, and they might even be on your house. But how do they take light and generate electricity? First, if you don't know already, electricity is the flow of electrons. So asking how a solar panel generates electricity is the same as asking how it makes electrons flow.

Well, a solar panel made of a bunch of individual solar cells. So to see how electrons flow, we're going to take a look at a single solar cell.

It's also worth noting that there are a bunch of different kinds of solar cells, and better cells are being researched all the time. We're just going to look at one common type here.


Most of a solar cell (also called a photovoltaic cell) is silicon. Silicon is an element that's everywhere - it's in sand, concrete, quartz crystals, and your computer. But for a solar cell we need very pure silicon (which is part of the reason solar panels are expensive).

The electrons in silicon crystals don't move around very much because each atom of silicon is bonded to its neighbors. But we need electrons to move to for electricity. So why are solar cells made of silicon? Well, part of the reason is that silicon is strong and stable, which makes it a good building material. But we can do something special to silicon to get the electrons moving. We'll look at that next.

2. Silicon and Electron Flow

What if we could add something to silicon to make it easier to get it's electrons moving? Well, we'd have part of what we need! We also need somewhere for the electrons to flow. Okay, so what if we could add something else to another bit of silicon to make it want extra electrons? Then we could match them up!

Well, it turns out we can do just that. If we add a donor impurity, like phosphorus, to silicon - it will have free electrons. If we add an acceptor impurity, like boron, to silicon - it will attract free electrons. Silicon with a donor impurity is called n-type. Silicon with a acceptor impurity is called p-type.

This lesson requires a newer browser. Please see this page for more information.

Why n and p? It comes from the charge of the particle that's allowed to move around. In the n-type these particles are the free electrons, and electrons are negatively charged. So the n is for negative. It's pretty easy to imagine the free electrons in the n-type moving around, but what about the p-type? Well, imagine that there is a hole that an electron can fit into. So an electron from the next atom over jumps into the hole. But now there's a hole where that electron was! Instead of visualizing this constant shuffling, it's easier to think of the hole moving around. Since the hole is "kind of" the opposite of an electron, we can say it has positive charge. So the p is for positive.


The important bit is that there are electrons moving around the n-type silicon, and "holes" moving around the p-type silicon. And that's because we've added an impurity to each kind of silicon.

Okay, so now we have an n-layer made out of n-type silicon and a p-layer made out of p-type silicon. Let's put them together and see what happens.

When these two layers are combined, it makes something called a p-n junction (the white line). A p-n junction is also how diodes, like LED's, work! The junction is just the spot where the layers meet. When this junction is formed, some of the free electrons on the n-side near the junction "drop" into the holes on the p-side.

This lesson requires a newer browser. Please see this page for more information.

But this can only happen near the junction, and only for a fraction of a second when the layers are first put together! Why? Well as electrons move into the holes at the junction, the atoms in the n-layer that lost these electrons become positively charged and the atoms in the p-layer that grabbed them became negatively charged. On the n-side, this band of positive charge repels the other free electrons. On the p-side, you can think of the band of negative charge as repelling the holes.

So, really quickly, they reach a point where no more electrons can move across, but this is because we've done something important - we've setup an electric field (that's the shaded part). Well, that's great, but how do we get the electrons to flow? Photons!

A photon is a particle of light. Right now we just need to know that this is how energy from the sun gets to the solar cell. The sun emits photons, and the photons are absorbed by the atoms in the solar cell. When this happens that extra energy can sometimes dislodge an electron. If that electron is in, or moves into, the electric field that we've setup, it will get shoved across into the n-layer.

This lesson requires a newer browser. Please see this page for more information.

If we sandwich the p-layer and n-layer between two conductive contacts (some kind of metal will work), and then attach a wire to the contacts, then the electrons that are shoved by the electric field will travel from the n-layer, through the wire, to combine with a hole in the p-layer! If you put something like a light or motor in the circuit, the electrons will do work for us as they flow through. That's electricity!

What if the electron doesn't move into the electric field? Well, then it doesn't get used to generate electricity right away. (This is part of why solar cells aren't perfectly efficient). Eventually the electron will bounce around into the field and then move through the wire.


5. Cell Construction

So now we know that a solar cell is made up of an n-layer, p-layer, and some electrical contacts. Are there any other considerations for making a solar cell? One big one is that the contact on the top has to let light through. How do we do that? Well, if you look closely at a solar cell, you'll probably notice a grid pattern. These lines are the top electrical contact!


When the cells are combined into a panel, they're attached to a support (like plastic), covered with glass, and sealed against moisture. Then it's ready to start generating electricity!

6. Lesson Done