From Sunlight to Sockets: How Solar Panels Work?
The cheapest energy source for your doom scrolling
Hey there 👋
Just yesterday, I took a walk with my brother to a big park that is about a kilometer or two from our house.
It had rained early in the morning so the weather was chill after quite a few days of 40 degrees here in Lahore.
While walking towards the park we noticed the roofs of plazas, offices and homes.
The surprising thing was that many of them were now full of solar panels that weren’t there a couple years back.
Mall Road is a place we visit quite frequently, but these solar panels are a new phenomenon.
Some roofs were so packed with the panels that my brother joked:
Look, there is a building under those solar panels :p
It’s not like we hadn’t seen solar panels.
But seeing them basically become a roof in many of the buildings is something new.
Even the light posts at the park had small solar panels strapped onto them.
I’m not sure about other neighborhoods. But where I live, people are trying their best to go solar.
Just a stroll around the place tells you much about it.
For a while now, I’ve wanted to explore how solar panels work. The question for me was: how could they generate usable electricity out of just sunlight?
Turns out, the answer is pretty simple to grasp and quite fun too.
Because, the history of solar panel technology literally sounds like science fiction.
So, instead of taking my 5th bath in this scorching summer, I’ve taken to writing a dedicated piece on how solar panels work :p.
What Is a Solar Panel?
A solar panel is a sandwich of materials that converts light into electricity.
The main ingredient is silicon, which is the same material used to make computer chips.
Silicon is a semiconductor. It can conduct electricity sometimes and block it other times depending on how you treat it.
This property makes silicon perfect for solar cells. You can engineer it to react to light in specific ways.
A solar cell is the basic unit of a solar panel. It is a thin wafer of silicon treated with different chemicals.
When light hits the silicon it knocks electrons loose. Those loose electrons create an electric current which is electricity.
One solar cell produces about 0.5 volts. Not enough to power anything useful but combined together they add up.
A typical solar panel can have 60 to 72 cells in it.
Those cells are sandwiched between protective layers. Glass on the front to let light through. A backing material on the rear for protection. An aluminum frame to hold it all together.
The result is a durable panel. One that can sit on your roof for decades converting sunlight to electricity every day.
The Science Behind Solar Panels
The concept behind solar panels is the photovoltaic effect. Photo means light. Voltaic means electricity. Light creating electricity is the basic idea.
You know that silicon atoms have electrons orbiting around them. These electrons are normally stuck in place.
But when light hits the silicon the photons in the light transfer energy to the electrons. This energy is enough to knock the electrons loose from their atoms.
Loose electrons can move around. Moving electrons are electric current.
So light hitting silicon creates moving electrons which is electricity.
That is the photovoltaic effect. And it was discovered in 1839 by a French physicist named Edmond Becquerel.
Becquerel was the first to observe that light could produce electricity. But it took over 100 years before anyone built a practical solar cell.
The first working solar cell was made at Bell Labs in 1954. It was only 4-6% efficient. It cost $300 per watt which was absurdly expensive.
For comparison modern solar panels cost less than $0.10-$0.30 per watt.
This is why solar is finally becoming mainstream. It got cheap enough to compete with fossil fuels which is where most of our energy comes from.
Silicon Powers All Tech
Silicon is everywhere in technology. Your phone chip is silicon. Your computer processor is silicon. And your solar panel is silicon.
But solar silicon is different from chip silicon.
Solar panels use what is called solar grade silicon.
This silicon is 99.9999% pure. Six nines.
That sounds very pure. And it is.
But chip silicon is even purer.
Chip silicon is 99.9999999% pure. Those are nine nines!!
The silicon has to be this pure or transistors do not work.
Solar silicon doesn’t need to be quite as pure as chip silicon, but it’s still quite pure by any normal standard.
The difference comes down to how transistors and solar cells each react to imperfections in the material.
This is why solar panels are cheaper than computer chips even though they use more silicon.
The manufacturing process is also different.
For chips you grow a perfect single silicon crystal and slice it into ultra-thin wafers. Then you build billions of transistors on each wafer.
For solar panels you either grow a crystal or just melt silicon and pour it into molds. Then you slice it into thicker wafers and add chemicals to create the photovoltaic effect.
Solar wafers are much simpler than chip wafers. They don’t need precision for billions of transistors.
This is why solar got cheap while chips stayed expensive. Solar manufacturing is simpler.
Most solar panels are made in China. Chinese companies like Longi, JA Solar, and Trina Solar dominate the market.
They have massive factories that produce panels at huge scale. This drives down costs.
In 2023, China produced about 80% of the world’s solar panels. The US and Europe are trying to build their own solar manufacturing but they are way behind.
For Pakistan, this means solar panels are relatively cheap to import. The technology is mature and competition keeps prices low.
The AC/DC Problem
This is quite a technical topic and I won’t turn this article into a physics paper.
But what you need to know is that there are two kinds of electricity.
AC, which stands for Alternating Current and DC, which stands for Direct Current.
Solar panels produce direct current or DC electricity. The same type of electricity from batteries.
But your home runs on alternating current or AC electricity. This is what comes from the grid.
So you need a device to convert DC from the panels into AC for your home. That device is called an inverter.
The inverter is arguably more important than the panels themselves. A good inverter can last 10 to 15 years. A bad one fails in 3 to 5 years.
When people complain about solar systems breaking, it is usually the inverter that failed, not the panels.
There are many types of inverters for households. But three common ones are:
On-grid Inverter
Off-grid Inverter
Hybrid Inverter
On-Grid Inverter
An on-grid inverter connects your solar system directly to the electricity grid. During the day your panels generate power, you use what you need, and the extra goes back to the grid.
Your meter basically runs backwards. At night, you pull from the grid like normal. The big advantage is cost. On-grid systems are the cheapest to install because you do not need batteries.
The weakness is obvious though. No grid, no power. If WAPDA cuts the supply, your solar system shuts off too. Even if the sun is shining.
This makes it a frustrating option for us Pakistanis. Because load shedding is the main reason people go solar here.
Off-Grid Inverter
An off-grid inverter has nothing to do with the grid at all. Your panels charge a battery bank and the inverter runs your home from those batteries. Complete independence.
Off-grid inverters are perfect for areas where there is no grid connection or where load shedding is so bad the grid is basically useless anyway. The downside is cost and complexity.
You need enough battery capacity to survive cloudy days and nights. That adds up fast. And batteries wear out. Most people in cities with at least some grid access find this setup overkill and expensive to maintain.
Hybrid Inverter
A hybrid inverter is the most popular option these days. Because the government doesn’t like net metering now :/.
A hybrid inverter basically does everything. It connects to the grid, manages your battery bank, and optimizes between all three sources: solar panels, batteries, and grid.
During the day your panels charge the batteries and power your home. At night the batteries take over. The grid only kicks in when both run low. During load shedding your system keeps running without interruption.
It is the most expensive of the three but also the most practical for a country where the grid exists but cannot be trusted.
Sunlight intensity isn’t consistent and it changes throughout the day.
Morning light is weaker than noon light which means less electricity generation in the morning. The same is true around sunset.
A good inverter tracks these changes and optimizes constantly. That is why a good inverter makes a huge difference in how much power your system generates.
Batteries are ever more important for us from our homes to smartphones. You can go through my article linked here which talks about the innovations happening around battery tech.
Why Solar Panels Keep Getting Cheaper?
In 1977 solar panels cost around $77 per watt. Today solar panels cost around $0.10-$0.30 per watt.
That is a roughly 99% price drop in 46 years.
This is one of the fastest cost declines for any technology ever. Possibly faster than computers, even smartphones.
Though the 99% price drop is cool, we should know that this is just for the solar panels themselves.
Normally you need to invest in a full solar system including an inverter, sometimes a battery and the panels.
Here, the costs do add up but they’re still usually cheaper than what the grid offers you especially in Pakistan.
Another question you guys may be asking: How did solar get so cheap?
First, manufacturing got better. Early solar cells were made by hand in small batches. Now they are mass-produced in gigantic automated factories.
Second, China invested heavily in solar manufacturing. The Chinese government subsidized factories and ramped up production.
This created massive oversupply, which drove prices down. This was bad for solar companies but great for customers.
Third, technology improved. Solar cells got more efficient. Panels produce more power from the same amount of silicon.
Fourth the supply chain matured. Silicon suppliers, panel makers, inverter companies all got better and cheaper.
The result is that solar is now the cheapest form of electricity in many parts of the world.
In sunny countries like ours and parts of the Middle East, new solar power plants are cheaper than coal or natural gas plants.
For home installations the economics depend on local electricity prices.
In Pakistan where electricity costs 30 to 50 rupees per unit, solar does make sense for many.
According to Al Jazeera, the solar share in Pakistan’s electricity supply has jumped from 2.9% in 2020 to a whopping 32% in 2025, most of it rooftop and off-grid, estimated from panel imports.
A household survey conducted by the Pakistan Bureau of Statistics showed that 25% of households now use solar power in some form.
Most of it was rooftop solar installed by homeowners and businesses.
Our electricity grid isn’t one you can rely on. The frequent spikes in voltage can kill your expensive electronics.
I wrote this article to share how you can protect your electronics from random electricity shocks that come from the grid.
Pushing Past Physics
Solar panels are pretty good now but there’s still a long journey to go. Because most commercial panels convert only 20% to 24% of sunlight into electricity.
The rest is wasted as heat. You might think this is bad. Why not make them more efficient?
The answer is that efficiency has diminishing returns. Going from 20% to 25% efficiency is very expensive.
It requires better silicon, better manufacturing, better materials. All of which cost money.
For home applications it is cheaper to just buy more panels. Why pay extra for 25% efficient panels when you can buy more 20% panels for the same price?
The exception is space. Satellites have limited surface area. Every square meter counts. So space solar panels use the most efficient cells available.
Solar cells used on satellites can hit ~34% efficiency. But they cost thousands of dollars per panel.
For rooftop solar, 20% efficiency is fine. You just need enough roof space.
There is also a theoretical limit. Silicon solar cells cannot exceed around 33% efficiency. This is called the Shockley-Queisser limit.
It is a physics limitation. Silicon can only absorb certain wavelengths of light. The rest passes through or reflects.
To beat this limit you need different materials. That is why researchers are working on perovskite and multi-junction cells.
But for now silicon at 20% efficiency is good enough for most uses.
The Next Decade of Solar Tech
Solar panels today are pretty good. But researchers are not satisfied with just that.
The silicon solar cell has been around since 1954. For 70 years we have been improving the same basic technology and we are now approaching its limits.
So scientists are working on what comes next. In the solar space, the biggest buzz right now is around perovskite solar cells.
Perovskite is a material that can absorb light very efficiently.
In the lab perovskite cells have already crossed 26% efficiency. Some experimental versions have hit 35% when layered with silicon.
That is a big deal because silicon alone cannot exceed 33% efficiency due to physical limitations of the material.
Perovskite layered on top of silicon lets you capture parts of the light spectrum that silicon misses. You are essentially getting two solar cells in one.
The problem is durability. Perovskite breaks down when exposed to moisture and heat. A rooftop panel needs to survive 20-25 years because that’s how long standard silicon panels last.
Current perovskite cells do not last anywhere near that long.
However, researchers are working on it. Some companies are already commercializing early versions.
Give it a couple of years and perovskite-silicon panels could be on roofs at a reasonable price.
The more immediate future is about better batteries and smarter systems. Panels themselves are already cheap enough.
The bottleneck is storage. As battery costs fall we’re going to see more solar.
This situation is going to change with sodium-ion and solid-state batteries. Both the US and China are heavily investing in them.
Both superpowers understand the value of harnessing renewable energy.
I think we will see batteries become more common for new solar installations.
The on-grid solar setup was the first step. But these days net-metering doesn’t make sense for new connections anymore. Affordable home batteries are the next step.
If you think about it, the panels on roofs today are the worst solar panels we will ever make. Everything from here gets better.
Solar Is (Almost) Everywhere Now
Solar panels cost money but the sunlight is free.
Without us knowing, the sun dumps an insane amount of energy on Earth every day.
In one hour the sun delivers enough energy to power all of human civilization for an entire year!! Just think about this for a minute.
The problem is that we do not know how to capture most of the sunlight and turn it to useful energy efficiently.
Solar panels are our best attempt so far.
Solar panels in markets today can produce up to 600 watts of electricity during peak hours.
That does not sound like much. But put 15-20 panels on your roof and you can power a whole average household.
There is caveat for us in Pakistan though. A decent solar system for an average home costs around a million rupees depending on size.
That is pretty expensive upfront. It can be 10% of the cost of an entire house here especially when you add batteries.
But solar panels are not just on the roofs of our houses. They are pretty much everywhere.
Traffic lights in remote areas use solar panels. Parking meters and street lights increasingly use them too. The panel sits on top and charges a battery during the day.
Calculators have used solar cells for decades. You probably owned one in school without thinking about it.
Satellites in space run on solar. The International Space Station has huge solar arrays.
In rural areas, the electricity grid is even worse than in big cities. Solar panels are life changing there. Even a small solar setup can power lights, TV, fans and charge phones.
Solar panels have been around for quite a long time but the tech is as accessible as ever.
The panels have become so good that we’re hitting limits of the current tech. And the next evolution of solar tech is already in labs today.
The work on affordable battery tech like sodium-ion is only getting more interesting this time around.
If you feel you enjoyed reading through this article. You can subscribe to SK NEXUS using the button:














