installation

How Solar Panels Work: A Complete Guide for Beginners

Photons hit silicon, electrons cross the P-N junction, DC flows to an inverter that makes AC. The full process from sunlight to outlet, explained.

· James Whitfield · 13 min read
Cross-section of a solar cell showing the P-N junction, photons hitting silicon, and electrons flowing through the circuit

A solar panel turns sunlight into electricity. Easy headline, but the actual physics involves quantum mechanics, semiconductor doping, and a couple of clever engineering tricks that took 150 years to figure out. The good news: you don't need a physics PhD to understand it. You need to know what photons do when they hit silicon, what a P-N junction does to the resulting electrons, and what an inverter does with the current that comes out the other side. If you want the current-generation stage on its own, our piece on how solar panels make electricity drills into just that step. Here's the full process, from the surface of the sun to the outlet in your wall, suitable for beginners.

TL;DR: Photons (light particles) carrying more than 1.12 eV of energy hit a silicon cell and knock electrons loose from valence band to conduction band. The P-N junction inside the cell has a permanent internal electric field that pushes free electrons toward one face and "holes" (electron vacancies) toward the other, creating DC current that flows through external wiring. A typical 400W panel converts 20-22% of incoming sunlight to electricity under STC conditions (1,000 W/m2, 25 deg C cell temperature). The DC output runs through an inverter that converts it to AC at grid voltage and frequency, typically 240V at 60 Hz in the US or 230V at 50 Hz in most of Europe. Residential systems are grid-tied (sell surplus, buy shortfall) or off-grid (batteries for storage). Roughly 95% of US residential systems are grid-tied because batteries cost more than grid backup. The photovoltaic effect itself has been understood since 1839 when Edmond Becquerel observed it; the first practical silicon cell came from Bell Labs in 1954 at 4% efficiency. We're now at 22-23% module efficiency in volume production with TOPCon and HJT, with the LONGi Hi-MO X6 hitting 23.0% module efficiency. For a deeper system-level view, see our residential solar complete guide.

The most surprising thing I learned working on solar systems was how little of the physics is "new". The photovoltaic effect was demonstrated in 1839. The semiconductor theory behind P-N junctions came together in the 1940s alongside the first transistors. What changed in the last 30 years is manufacturing scale: panels went from $300/W to $0.10/W between 1956 and 2025 (Lawrence Berkeley NREL data), enough to take a physics curiosity to a 1.6 TW global industry. The full arc, from Becquerel's 1839 observation to today, is in our piece on how solar power started.

What Is the Photovoltaic Effect?

The photovoltaic effect is the conversion of light into electrical current in a semiconductor material. Edmond Becquerel discovered it in 1839 when he found that certain electrolyte solutions produced a small voltage when exposed to light. The effect was understood theoretically through quantum mechanics in the 1920s and engineered into a practical solar cell at Bell Labs in 1954.

The underlying mechanism: photons (particles of light) carry energy proportional to their frequency. When a photon strikes a semiconductor with energy above the material's bandgap (the energy difference between valence and conduction bands), the photon's energy can transfer to an electron, kicking it loose from its bound state. The freed electron is then mobile, able to carry current if an external circuit captures it before it recombines with the hole it left behind.

For silicon, the bandgap is 1.12 eV, corresponding to photons with wavelengths shorter than about 1,100 nanometres. The solar spectrum at Earth's surface (AM 1.5G reference) carries useful photons from roughly 280 nm (UV cutoff in atmosphere) to 2,500 nm (where water vapor blocks longer wavelengths). Most of those photons are useful for silicon, the ones below 1.12 eV pass straight through without absorbing, the ones above 1.12 eV are absorbed but any excess energy beyond the bandgap is lost as heat.

This sets a fundamental efficiency ceiling for single-junction silicon at around 33.7% (the Shockley-Queisser limit). Production silicon panels are currently at 22-23% module efficiency; the gap between theoretical limit and production reality is closing slowly through better surface passivation, anti-reflective coatings, and contact metallization.

What about other semiconductors? Different materials have different bandgaps and different theoretical efficiencies. Gallium arsenide (1.42 eV) hits roughly 34% theoretical efficiency for single-junction. Multi-junction cells stack semiconductors with different bandgaps to capture more of the spectrum, NREL has recorded 47% lab efficiency for six-junction cells under concentration.

What Is a P-N Junction and Why Does It Matter?

A P-N junction is the boundary between two regions of silicon doped with different impurities. The doping creates the permanent electric field that turns absorbed photons into directional current rather than just heat.

Pure silicon is a poor conductor at room temperature. Doping it with phosphorus (which has 5 valence electrons versus silicon's 4) creates N-type silicon, with extra mobile electrons in the conduction band. Doping with boron (3 valence electrons) creates P-type silicon, with "holes" where electrons should be in the valence band. Putting N and P regions adjacent creates a junction where electrons from the N-side diffuse into the P-side and vice versa, leaving fixed positive ions on the N-side and fixed negative ions on the P-side.

The result is a built-in electric field across the junction, around 0.6-0.7V for silicon, pointing from N-side to P-side. This field is permanent, no external voltage needed. When a photon excites an electron-hole pair anywhere in or near the junction, the field accelerates electrons toward the N-side and holes toward the P-side, separating them faster than they can recombine.

That separation is the entire point. Without the P-N junction, photons would still excite electron-hole pairs, but the pairs would just recombine and release the energy as heat. With the junction, they're separated and forced through an external circuit, which is what we call electric current.

The N-type and P-type layers in a typical silicon cell are very thin: roughly 200-500 nm of N-type emitter on top, with a P-type base of 150-200 micrometers underneath. The junction itself sits a fraction of a micrometre below the surface. The active region where photons get absorbed and electrons get separated is in those first 50-100 micrometres of silicon.

For more detail on the materials and fabrication that produce a working cell, see our piece on what solar panels are made of.

How Does DC Current Get Out of the Cell?

Once electrons are separated by the P-N junction's field, they need a path out of the cell to do useful work. That path is the metallization on the front and back of the cell. The front surface has fine silver grid lines (the visible "busbars" and "fingers" on a typical panel) that collect electrons from the N-type emitter. The back surface has a full aluminum-back-surface-field or copper contact that collects holes from the P-type base.

The metallization is the critical part of the engineering. Front grid lines have to be thin enough not to block too much light (shading the cell) but thick enough to carry current without resistive losses. Modern multi-busbar cell designs (9, 12, or 16 busbars instead of the older 3-5) reduce resistive losses by shortening the path electrons travel between absorption and the busbar. The Longi Hi-MO X6 uses 9-busbar architecture with half-cut cells for this reason.

Each cell produces roughly 0.55-0.65V open-circuit voltage and 9-11A short-circuit current at STC. Connecting 60-72 cells in series gives a typical panel ~40-50V open-circuit voltage at the same current. Stringing 10-15 panels in series gives a typical residential array 400-700V DC.

What happens to that DC current? It flows through a junction box mounted on the back of each panel, into MC4 connectors, and through the array's DC wiring to the inverter. Junction boxes contain bypass diodes (typically 3 per 60-cell panel) that route current around shaded or damaged sub-strings to prevent reverse-biased cells from overheating. The bypass diodes are why partial shading doesn't kill an entire panel's output, the diodes shunt around the affected cells while the rest keep producing.

What Does the Inverter Do?

The inverter converts DC from the panels to AC at grid voltage and frequency. This is non-trivial because DC and AC are fundamentally different waveforms, DC is a constant voltage, AC swings sinusoidally between positive and negative peaks at 50 or 60 Hz.

Modern inverters use high-frequency switching (typically 16-20 kHz) through power electronic devices like IGBTs (insulated gate bipolar transistors) or SiC MOSFETs (silicon carbide). The switching cuts the DC into thousands of small pulses per second, then a passive output filter smooths those pulses into a sinusoidal AC waveform that matches the grid.

Three subsystems matter:

  • Maximum Power Point Tracking (MPPT): adjusts the operating point of the panels to extract maximum power as conditions change. Panels have a non-linear V-I curve and the "max power point" shifts with temperature and irradiance. MPPT samples the curve continuously and lands at the peak power point. Modern inverters have 2-4 MPPT channels so different orientations or shading conditions can be optimized separately.

  • Grid synchronization: monitors grid voltage and frequency, and produces AC output that aligns precisely in phase. Inverters export power by producing a slightly higher voltage than the grid, the difference drives current outward. Without precise sync, the inverter can't safely connect.

  • Anti-islanding protection: detects grid outages and disconnects the inverter within seconds (UL 1741 requirements). This prevents the inverter from energizing a downed line and electrocuting utility workers. Anti-islanding is why grid-tied systems don't run during a blackout unless paired with battery backup or generator capability.

Inverter efficiency runs 96-98% for residential models from SolarEdge, Enphase, SMA, Fronius, and others. The 2-4% loss shows up as heat from the power electronics, which is why inverters need ventilation and don't last as long as panels. Typical inverter lifespan is 12-15 years for string models, 20-25 years for microinverters thanks to lower operating temperatures.

Grid-Tied vs Off-Grid vs Hybrid: How Are They Connected?

About 95% of US residential solar is grid-tied, the inverter feeds the home electrical panel, and the utility meter tracks net flow in either direction. Surplus production exports to the grid (running the meter backward or accumulating credits depending on meter type), shortfalls import from the grid.

Net metering policies vary widely by state and utility. Full retail net metering (still common in much of New York, Massachusetts, New Mexico) credits 1 kWh exported at the same rate as 1 kWh imported. Reduced compensation policies like California's NEM 3.0 cut export rates by ~75% in 2023, pushing new installations toward battery storage for self-consumption rather than grid arbitrage.

Off-grid systems combine panels, batteries, and a charge controller for full independence from the utility. They cost significantly more for equivalent service, the battery bank alone runs $15,000-$45,000 for a typical 30-50 kWh storage capacity. Off-grid is the right answer when grid connection costs are extreme (remote properties with miles of line extension), or when the homeowner wants full energy autonomy regardless of cost.

Hybrid systems use a hybrid inverter that handles both grid-tied operation and battery management. The hybrid inverter manages charge/discharge cycles, prioritizes self-consumption over export, and provides backup power during grid outages by isolating from the grid through an automatic transfer switch. Hybrid is increasingly the default for new installations in states with weak net metering or frequent outage risk.

For deeper coverage of these architectures, see our residential solar complete guide and our solar system optimization guide.

What About Microinverters and Power Optimizers?

Traditional string inverter systems wire panels in series, the whole string operates at one voltage and current set by the inverter's MPPT. Module-level power electronics (MLPE) change this by giving each panel its own optimization point.

Microinverters convert DC to AC at each panel rather than at a central string inverter. The Enphase IQ8A microinverter handles up to 480W of panel input and outputs 240V AC. Advantages: panel-level monitoring, no string-level shading losses, simpler installation in shaded or complex roof geometries. Trade-offs: higher cost per watt, more equipment on the roof, and the inverters are harder to access for service.

DC optimizers like the SolarEdge P370 and Tigo TS4-A-O take a different approach. They optimize each panel's voltage and current independently but still pass DC up to a centralized string inverter. SolarEdge's architecture requires a SolarEdge inverter; Tigo modules can work with any compatible string inverter. Optimizers cost less than microinverters and concentrate failure points at the inverter rather than per-panel.

When does MLPE make sense? Three cases:

  • Significant shading from chimneys, trees, or neighboring buildings
  • Complex roof geometry with multiple orientations
  • NEC 690.12 rapid shutdown compliance (most US installs after 2019)

For an unshaded south-facing roof, a basic string inverter delivers the same energy at lower cost than MLPE. Most installations these days end up with MLPE anyway because of the rapid shutdown requirement, but it's worth understanding when the additional cost is paying for real performance versus just code compliance. For a deeper comparison, see our piece on power optimizer vs microinverter.

What Happens to Solar Panels Over Time?

Silicon panels degrade slowly under sustained sunlight, temperature cycling, and UV exposure. NREL's PV Fleet Performance Data Initiative (2020) tracked thousands of silicon modules across multiple climates and found a median degradation rate of 0.5%/year for crystalline silicon. A 400W panel at 0.5%/year retains:

  • Year 1: 397W (light-induced degradation, then stable)
  • Year 5: 388W
  • Year 10: 379W
  • Year 25: 349W (~87% of rated)
  • Year 30: 339W (~85% of rated)

Premium panels degrade slower. TOPCon (0.35-0.45%/year) and HJT (0.25-0.35%/year) outperform standard PERC (0.45-0.55%/year). The LONGi Hi-MO X6 warranty guarantees 87.4% retention at year 30 (0.42%/year). REC Alpha Pure-R guarantees 92.0% at year 25 (0.32%/year).

What causes the degradation? Multiple mechanisms:

  • Light-induced degradation (LID) in the first few weeks
  • UV-induced encapsulant browning, slow EVA yellowing reduces light transmission to the cells
  • Potential induced degradation (PID) in high-voltage systems with susceptible cell types
  • Thermal cycling stress on solder joints and cell contacts
  • Cell micro-cracking from mechanical load (hail, snow, wind)

Modern panels are designed to limit each of these. The IEC 61215 certification standard requires 1,000 hours of damp heat exposure, 200 thermal cycles between -40 and +85 deg C, and several other stress tests before a panel can be sold. Field data from systems installed in the 1990s shows many panels still producing >70% of original rated output after 30 years, well above the warranty floor.

For a deeper look at panel aging, see our piece on what happens when solar panels get.

Citation capsule: Solar panels convert sunlight to electricity through the photovoltaic effect: photons with energy above silicon's 1.12 eV bandgap excite electrons across the band gap, and the built-in electric field of the P-N junction separates them as DC current (NREL, US DOE). Modern silicon panels achieve 20-23% module efficiency under STC conditions of 1,000 W/m2 irradiance and 25 deg C cell temperature, with industry-median degradation of 0.5% per year over their 25-30 year design life.

Summary

Solar panels work by converting photons to electrons through the photovoltaic effect in a silicon P-N junction. Photons above the 1.12 eV bandgap excite electrons that the junction's built-in field separates as DC current. The DC flows through an inverter that converts to AC at grid voltage and frequency, typically 240V/60Hz in the US or 230V/50Hz in Europe. Modern panels hit 22-23% module efficiency in volume production with TOPCon and HJT technologies, and degrade at 0.3-0.5% per year for a 25-30 year service life. About 95% of US residential installs are grid-tied with net metering handling the daily and seasonal mismatch between production and consumption. The whole system: panels, junction boxes, MC4 connectors, MLPE (often), inverter, AC disconnect, meter, and the utility grid. None of it is complicated individually; the engineering art is in making it work reliably for 25 years on a residential roof. For deeper coverage of system design and optimization, see our residential solar complete guide, the solar optimization guide, and our best solar panels 2026 ranking.

Frequently Asked Questions

How do solar panels actually generate electricity?
Solar panels use the photovoltaic effect. Photons with energy above silicon's 1.12 eV bandgap knock electrons loose from valence to conduction band, where the P-N junction's built-in electric field pushes them in one direction creating DC current. A typical 400W panel converts 20-22% of incoming sunlight to electricity at the cell level under STC conditions.
What is a P-N junction in a solar cell?
A P-N junction is the boundary between two regions of silicon doped with different impurities, phosphorus for N-type (extra electrons) and boron for P-type (electron holes). The junction creates a permanent internal electric field. When a photon knocks an electron free, the field pushes electrons toward the N-side and holes toward the P-side, driving current through an external circuit.
What is the difference between DC and AC in solar systems?
Solar panels produce direct current (DC) at typically 300-600V for a residential string. Homes and the grid use alternating current (AC) at 120/240V in the US, 230V in Europe. An inverter converts DC to AC and synchronizes the output to grid voltage and frequency. Inverter efficiency runs 96-98% for modern residential models.
Do solar panels work with the grid or independently?
Both. Grid-tied systems sell surplus to the utility via net metering and draw from the grid when production is insufficient. Off-grid systems pair panels with batteries and charge controllers for full energy independence. Hybrid systems do both, batteries plus a grid connection. About 95% of US residential solar is grid-tied because it's cheaper than full battery backup.
How long do solar panels actually last?
Modern silicon panels are warranted to retain 80-87% of rated output at 25-30 years, with industry-median degradation of 0.5% per year (NREL PV Fleet Performance Data Initiative, 2020). Premium TOPCon and HJT panels (LONGi, REC, Panasonic) degrade slower at 0.3-0.4%/year. Real-world data from systems installed in the 1990s shows many panels still producing >70% of original rated output after 30 years.

Sources