Solar panels are getting cheaper by the day and more and more people are installing them on their rooftops. Until now, the owner of the panels was the only person who could take advantage of the electricity generated.

But a new mini power grid starting up in New York is making it possible for residents to buy and sell energy from alternative power sources over a peer-to-peer network. The Brooklyn Microgrid network increases the amount of clean energy in a community, boosts the local economy and improves the electrical grid's resilience and efficiency.

11 Bizarre Sources for Alternative Energy

“This whole concept benefits the area you live in," said co‐founder Joseph Lubin in a press release. “By buying energy locally, rather than from a national entity, the money goes back into the pockets of people in the community."

And the city is on track to become the first solar city in the United States, fully independent from the grid, reported Ian Crossland in Minds.

The New York startup TransActive Grid, TAG for short, created the micogrid proof-of-concept as a way to transform how energy is bought and sold. For anyone unfamiliar with them, microgrids are small energy systems independent of the larger power grid. Typically, they shift control from big energy companies to local energy generators.

TAG's grid includes homes with solar panels as well as neighbors set to purchase the energy generated — in some cases from right across the street.

A map shows who's selling.Brooklyn Microgrid

A community microgrid like the new one in Brooklyn isn't about ditching public utilities like Consolidated Edison completely. It's essentially a sub-grid that still connects to the traditional grid. However, microgrids add resilience because they have the ability to disconnect in times of an emergency and still deliver power.

8 Cray Cray Ways To Harness Solar Energy

In recent years, New Yorkers have had their share of big outages caused by tropical storms and hurricanes. As Crossland pointed out on, residents who had solar panels were surprised when they stopped working during Hurricane Sandy. It's actually a safety measure so utility workers don't get zapped.

But a local microgrid would keep running, providing power in a pinch. That sure beats waiting what could be a long time for Con Ed to restore power or even getting in line at Greenpeace's mobile solar truck.

The Brooklyn Microgrid also allows residents to buy and sell energy securely using a peer-to-peer network based on technology called Ethereum that was originally created for Bitcoin transactions, according to TAG. It monitors energy coming in and out of the system, including from batteries or solar and wind power. Residents get to buy power from the sources they want.

Billionaire Branson Testing an Island Microgrid

Although Brooklyn is still generally regarded as being fairly trendy, microgrids aren't just some passing phase. They make sense, especially in areas prone to hurricanes and other natural disasters.

Getting one up and running is no easy task. There are regulations, network designs, contracts, financing, and system integration to consider. Despite the challenges, I expect we'll be seeing more communities create microgrids in the future, come hell or high water.