Science, physicsLabelled diagramUpdated 8 October 2026
How Solar Panels Turn Sunlight into Electricity
A solar panel is made of silicon cells that turn light straight into electricity. Light frees electrons, an electric field at the p-n junction pushes them one way, and they flow round a circuit as direct current, which an inverter changes to AC for homes.
Interactive
Explore it step by step
6 labelled parts: Sunlight enters → Electrons freed → Charges separate → Current flows → Panel arrays → Inverter makes AC. Press play, or choose a number to explore.
Step 1 of 6: Sunlight enters
Sunlight arrives as tiny packets of energy called photons. An anti-reflective coating on top helps more of them pass into the silicon instead of bouncing off.
Step 2 of 6: Electrons freed
When the silicon absorbs a photon with enough energy, an electron breaks loose. It leaves behind a gap called a hole, which behaves like a positive charge.
Step 3 of 6: Charges separate
Where the n-type and p-type layers meet, an electric field pushes freed electrons towards the n-type side and holes towards the p-type side, like the two ends of a battery.
Step 4 of 6: Current flows
Electrons leave through the front metal contacts, pass through a load such as a lamp, and return through the rear contact to fill holes. This one-way flow is direct current (DC).
Step 5 of 6: Panel arrays
One cell gives very little power, so cells are wired into sealed panels and panels into arrays. Output is highest when panels face the Sun; heat, dirt and shade reduce it.
Step 6 of 6: Inverter makes AC
Homes and the grid run on alternating current (AC). An inverter converts the panels' DC into AC so it can power appliances or be sent to the grid.

Use this infographic
Free under CC BY-NC 4.0, with credit to InfoGraphHub.
The short answer
A solar panel turns light directly into electricity. It has no moving parts and burns no fuel. Inside, it is made of many photovoltaic (PV) cells, usually thin slices of silicon, a semiconductor.
Three things happen in every cell. Light frees electrons inside the silicon. An electric field built into the cell pushes those electrons in one direction. Metal contacts then collect them, so they flow round a circuit as an electric current.
Inside a silicon solar cell
A cell is a sandwich of layers, each with a job:
- Anti-reflective coating: a very thin layer on top that cuts down how much light bounces off the shiny silicon.
- Front metal contacts: thin metal lines, called fingers, printed across the top. They collect electrons but are narrow so they block as little light as possible.
- n-type layer: a thin top layer of silicon mixed with a tiny amount of phosphorus. This gives it spare electrons that can move about, so it is called n-type (n for negative).
- p-type layer: a much thicker layer below with a shortage of electrons. The gaps where electrons are missing are called holes and act like positive charges, so it is called p-type.
- Rear metal contact: a metal layer across the back that completes the circuit.
The boundary where the n-type and p-type layers meet is the p-n junction. It is the most important part of the cell.
From photon to free electron
Light travels as tiny packets of energy called photons. When a photon hits the cell, it may be reflected, pass straight through, or be absorbed. Only absorbed photons can make electricity.
If an absorbed photon has enough energy, it knocks an electron free from its place in the silicon. The electron can now move through the material, and it leaves a hole behind. Scientists call this an electron-hole pair.
On their own, these pairs do not last long. A free electron soon drops back into a hole, and the energy it carried is wasted. To get useful electricity, the cell must pull the electrons and holes apart before that happens.
The p-n junction: a one-way push
Joining the two kinds of silicon creates a permanent electric field across the junction. It is built into the cell when it is made, so no battery or power supply is needed to create it.
That field acts like a one-way gate. When light frees an electron near the junction, the field sweeps it across to the n-type side, and the matching hole is pushed towards the p-type side. Electrons pile up on the front of the cell and holes at the back. The front becomes a negative terminal and the back a positive one, just like the two ends of a battery.
Current, inverters and the home
Connect a wire from the front contacts to the rear contact, with a lamp in between, and the electrons have a path. They leave the n-type side through the front contacts, flow through the lamp and give it energy, then re-enter at the rear contact, where they fill holes in the p-type layer. As long as light keeps arriving, the flow continues.
The electrons always move the same way round the circuit, so a solar cell makes direct current (DC). Textbook circuit diagrams draw current the other way, from positive to negative: this is called conventional current, and it describes the same flow.
Homes and power grids use alternating current (AC), which keeps reversing direction. So a solar power system needs an inverter, a box of electronics that converts the DC from the panels into AC.
Panels, arrays and what affects output
One cell produces only a little power. Cells are therefore wired together and sealed into a weatherproof panel (also called a module), and panels are joined into an array. More panels means more power. A typical home rooftop system in the United States has about 30 modules.
Panels make the most electricity when they face the Sun directly. Heat, dirt and shade all reduce how well they convert light. Even the best commercial panels convert only about 18–22% of the light energy that reaches them, and there is a theoretical limit of about 32% for a silicon cell. Efficiency has risen a lot: commercial panels averaged under 10% in the mid-1980s, and the most advanced modules are now approaching 25%.
Frequently asked questions
Do solar panels produce AC or DC electricity?
Solar cells produce direct current (DC), because the electrons always flow the same way round the circuit. An inverter converts it into alternating current (AC) for use in homes and on the grid.
Why does a solar cell need both n-type and p-type silicon?
Where the two layers meet, they create a built-in electric field. That field pushes freed electrons one way and holes the other, so they are separated before they can recombine. Without it, the freed electrons would just drop back into holes and no current would flow.
Which way do the electrons flow in a solar cell circuit?
Electrons leave the cell through the front contacts on the n-type side, travel through the load (such as a lamp), and return through the rear contact on the p-type side. Conventional current, as drawn in circuit diagrams, is shown flowing the opposite way.
How efficient are solar panels?
The best panels for commercial use convert around 18–22% of the light energy that hits them into electricity. The theoretical maximum for a silicon cell is about 32%.
What reduces how much electricity a solar panel makes?
Panels work best when they face the Sun directly. Heat, dirt and shade all lower their output, which is why panels are angled towards the Sun and kept clean and clear of shadows.
Sources & methodology
Every fact is checked against the sources below. We write original explanations and draw original graphics; no figures are copied from textbooks. Spotted an error? See our corrections policy.
- Photovoltaics and electricity (Solar explained) (U.S. Energy Information Administration (EIA), accessed 8 Oct 2026)
- PV Cells 101: A Primer on the Solar Photovoltaic Cell (U.S. Department of Energy, accessed 8 Oct 2026)
- Light Generated Current (PVEducation (C. Honsberg and S. Bowden), accessed 8 Oct 2026)
- Screen Printed Solar Cells (PVEducation (C. Honsberg and S. Bowden), accessed 8 Oct 2026)
Approved for publication by InfoGraphHub editorial team on 9 Oct 2026 · Updated
Made by the InfoGraphHub editorial team (how we research and check: editorial and AI policy). First published 9 October 2026, last reviewed 9 October 2026. Found a mistake? Tell the editors.
For teachers: ages and curriculum fit
Ages 11–16 · Grades 6–10 (US) · Years 7–11 (UK) · Classes 6–10 (India)
Embed this on your site
Paste this HTML into your page. Keep the credit line: it is required by the CC BY-NC 4.0 license.
Related infographics
For teachers and parents: new InfoGraphHub resources by email
One short email when new free resources go live. For adults (18+) only. No spam, no tracking in emails, unsubscribe anytime.


