Researchers have developed a cheap technology that could become a major source of renewable energy in the future.

Stanford University scientists have tested a prototype of a battery that could tap into the mix of salty seawater and freshwater — known as “blue energy” — at wastewater treatments plants. Globally, according to the scholars, the recoverable energy from coastal wastewater treatment plants is about 18 gigawatts, which would be enough to power 1,700 homes for a full year.

“Blue energy is an immense and untapped source of renewable energy,” said study coauthor Kristian Dubrawski, a postdoctoral scholar in civil and environmental engineering at Stanford, in a statement. “Our battery is a major step toward practically capturing that energy without membranes, moving parts or energy input.”

As the researchers explain in their paper, they monitored the battery prototype’s energy production while flushing it with wastewater effluent from the Palo Alto Regional Water Quality Control Plant and seawater collected nearby from Half Moon Bay. The battery materials maintained 97% effectiveness in capturing the salinity gradient energy, according to Stanford University.

Wastewater treatment plants are known to be energy-intensive and vulnerable to power grid shutdowns which have happened in California amid its wildfire crisis; however, as the researchers note, making them energy independent would cut down on emissions and free them from potential blackouts.

According to the researchers, the process of capturing “blue energy” releases sodium and chloride ions from the battery’s electrodes into the solution, making a current flow from one electrode to another; after that, a quick exchange of wastewater effluent with seawater leads the electrode to reincorporate sodium and chloride ions and reverse the current flow.

Energy gets recovered during the freshwater and seawater flushes, with no upfront investment or charging required. However, the researchers cautioned that the concept needs to be tested more.

“It is a scientifically elegant solution to a complex problem,” Dubrawski said. “It needs to be tested at scale and it doesn’t address the challenge of tapping blue energy at the global scale — rivers running into the ocean — but it is a good starting point that could spur these advances.”