They’re an increasingly common sight on the tops of buildings and residential properties: sometimes blindingly reflective panels that absorb sunlight and convert it into usable energy. Noted futurist Ray Kurzweil thinks we’ll all be using them by 2028. But how do solar panels work? Your basic understanding of solar panels—that they convert sunlight directly into electricity—is true. It’s called the photoelectric effect, and it was first discovered in the 1800s. Scientists learned that photovoltaic (PV) cells made of selenium were ideal for this purpose. While they later turned to the semi-conductor silicon, the idea remained the same: Up to a third of the energy found in the sun’s rays could, theoretically, be harnessed for electrical power under the most basic setup, and over 40 percent for the more expensive and complicated models. Silicon crystals by themselves aren’t necessarily great for this purpose, though. They need to be altered with boron and phosphorus and layered. The layer of boron-altered silicon has fewer electrons than it needs to form a bond, so an electron “hole” is created. The layer of phosphorus-altered silicon, meanwhile, has too many electrons. The space between is known as the P-N junction. As the sun’s photons enters the PV cells and starts dislodging electrons, the charge attempting to travel through the P-N junction gets diverted to an external circuit that can then carry the power to an inverter. You may not realize that the power generated with this method is a direct current, or DC, the same type found in batteries. To use the energy in a home or building, it needs to be converted to AC, or alternating current, the type found in outlets. And this is the role of the inverter. This kind of green energy has numerous benefits. Electricity doesn’t need to be transported by a utility company to the premises, and excess can be returned right back to the grid. If you’re thinking of installing a system, however, there are some caveats. For one, the upfront cost can be significant—around $10,000 to $13,475, depending on where you live, after tax credits. While you may be able to cut those costs with state rebate incentives or financing, it may take some time to recoup that investment. On the other hand, once installed, solar panels don’t appear to require much maintenance. Without moving parts, they’re not likely to suffer from mechanical issues, although you may need to replace the inverter at some point, which can get expensive. A site like EnergySage.com can also use your specific location to calculate how much a solar panel system might save you. So how do solar panels work? It’s one part the photoelectric effect and one part economy. If Kurzweil is correct, it won’t be long before we’ll all be well-versed in both benefits.