How Solar Panels Generate Solar Energy 

Solar panels convert light energy into electricity. But how exactly does it happen? In this blog, we explain how solar panels convert sunlight into electricity and how a solar system makes that electricity available for use. 

As you read this article, it will be important to understand and remember that electricity is the flow of electrons in a current. 

Solar HouseElectromagnetic waves carry sunlight to the earth

Sunlight is electromagnetic radiation. Electromagnetic radiation is made up of visible light, ultraviolet rays, gamma rays, and much more. Electromagnetic waves carry this electromagnetic radiation from the sun to the earth. It is the light that produces solar energy. 

Photons in sunlight stimulate electrons

Light carries particles called photons. Photons have energy and momentum but no mass. When matter absorbs photons, the photons transfer energy to the atoms that make up that matter. If you remember your science lessons, atoms are made up of electrons, protons, and neutrons. When an atom absorbs electromagnetic energy from a photon, the electromagnetic energy stimulates the electrons and they begin to move. 

Silicon AtomPhotovoltaic cells contain semiconductor silicon crystals

Solar panels are made up of photovoltaic (PV) cells. Photovoltaic describes the production of energy from electromagnetic radiation produced by sunlight, or photons. A typical solar panel contains 60 PV cells. Photovoltaic cells contain silicon, which is a semiconductor that conducts energy when stimulated by light.

There are three types of PV cells

Photovoltaic cells may be monocrystalline, polycrystalline, or thin film (mono means one, poly means many). Monocrystalline solar cells–which are the most efficient and most expensive–are made of individual silicon crystals. Polycrystalline solar cells are made of fragments of silicon crystals fused together. Thin film solar cells–which are the least expensive and least efficient–contain a thin film of silicon on a flexible sheet. 

Regardless of the type: monocrystalline, polycrystalline, or thin film, all PV cells work similarly. The silicon atoms in PV cells have four electrons in their outer shells. These electrons bond with other silicon electrons to form silicon crystals. When another element joins a silicon crystal, it forms new electron bonds.

Silicon Phosphorus electron bondExtra electrons create a negatively charged semiconductor

Silicon transforms into an n-type semiconductor with an element like phosphorus which has five electrons in its outer shell. Four electrons in the phosphorus atom join with one electron from each of four silicon atoms. This leaves one phosphorus electron unbonded and free to move about. The extra electron makes this an n-type of semiconductor, which has a negative charge.
Silicon Boron electron bond

A hole in the electron bond creates a positively charged semiconductor

Silicon transforms into a p-type semiconductor with an element like boron which has three electrons in its outer shell. Three electrons in the boron atom join with electrons in four silicon atoms. The missing electron creates a hole. This hole attracts electrons. When an electron moves to fill the hole, it leaves a new hole in its place. The holes make this a p-type of semiconductor, which has a positive charge. 

Photovoltaic cells contain a positive and a negative layer

A photovoltaic cell contains two layers of semiconductors, a p-type and an n-type. The positive and negative charges create a flow of electrons. However, the positive and negative semiconductors do not generate electricity by themselves. The electrons are hanging out, waiting for a little stimulation. This is where sunlight comes in. When silicon absorbs photons from sunlight, the photons transfer energy to the electrons and they begin to move. Direct Current

Solar energy moves in a direct current from the positive to the negative layer

Electrons in photovoltaic cells move in one direction, in a direct current (DC) from the positive to the negative semiconductors. Power plants generate alternating current (AC), in which electrons move back and forth between positive and negative semiconductors. AC is cheaper to generate, safer, and results in fewer losses when transmitted over long distances. AC is the electricity used by homes and businesses. 

Because solar energy is DC electricity, it must be converted to AC before use. This is done with an inverter. 

An inverter converts direct current to alternating current for use

Solar InvertersA string inverter converts DC to AC at one location

A string inverter receives electricity from a string of panels wired together. Think of a string inverter like a string of Christmas lights. If one bulb goes out, they all go out. A string inverter works similarly in that the electric current generated is only as strong as the weakest solar panel. If shade affects one panel, the entire array generates energy as if shade has affected all the panels. String inverters are inexpensive and easy to service because they have one point of access, usually on the side of the building.   

Micro inverters convert DC to AC at each solar panel

If an array has micro inverters, the inverters are attached to each solar panel. These inverters convert the current from DC to AC at the individual panels. Unlike an array on a string inverter, an underperforming panel does not bring down the entire array. Micro inverters are more expensive and more difficult to service because they are on the roof. 

Power optimizers located at each panel send DC to a string inverter

Power optimizers don’t convert DC to AC. Similar to a micro inverter, a power optimizer is attached to each panel and prevents one underperforming panel from diminishing the power generated by the rest of the system. Power optimizers are used in combination with a string inverter, which is where the DC is converted to AC. They are slightly more expensive than a string inverter alone, but less expensive than micro inverters. Like micro inverters, power optimizers are difficult to service because they are on the roof. 

Excess solar-generated power is stored

The grid accepts excess solar energy

An inverter that is ‘tied to the grid’ (connected to a local electric utility) provides solar energy to the home or business first to power the appliances. When a solar home or business uses more electricity than the panels can produce it draws electricity from the grid. When a home or business generates more solar power than it uses, the inverter feeds surplus electricity into the grid. For more information about how your electric utility credits you for excess solar energy, read our blog: What You Should Know Before Going Solar.Grid vs Battery Storage

A grid-tied solar array does not provide power during an outage.To avoid risk of shock to utility workers, a solar array cannot feed power into the grid during a blackout. In an outage, the only way to provide solar power is with solar battery backup, which stores excess solar power for later use. 

Battery storage stores excess solar energy.

There are two ways to store solar energy with battery backup. You can be grid-tied, or completely off-grid. 

Grid-tied battery storage: batteries store excess solar and then feed surplus into the grid.

With grid-tied battery storage, solar energy powers the home or business first, then solar batteries store any excess energy. Once those batteries are full, the excess solar energy feeds into the utility grid. Battery storage provides power when use exceeds production, during the night, and during a blackout. The utility provides power when battery backup power is depleted. 

Off grid: batteries store excess solar power.

An off-grid solar home or business is not connected to the utility–it relies strictly on solar-generated power. Solar energy powers an off-grid home or business first, then batteries store excess energy. Battery storage provides power at night and when use exceeds production. Because the home or business is off-grid there is no other source of power, unless the home or business owner adds a generator. 


Simply put, solar energy is generated when photons in sunlight activate silicon electrons which then move in a current. The flow of electrons in a current is electricity. Electrons move from positive to negative layers in a direct current (DC) through solar PV cells. An inverter converts the DC electricity to AC electricity for immediate use and excess energy feeds into a battery storage system and/or the utility grid. 

For more information about solar power see our blog What You Should Know Before Going Solar, or contact us at 480-430-1939. 

NABCEP certified Redline Electric & Solar is the best choice for your electrical and solar needs in Arizona. We are a family owned and operated electrical contracting business, with over 60 years of combined experience. We pride ourselves in our honesty, integrity and high quality work, with 100% satisfaction guaranteed to our customers. When you choose Redline Electric & Solar, you can have peace of mind and be confident that you made the right decision.