Image caption The prototype uses two separate technologies to generate electricity

Researchers in the US have built a prototype device which they say can generate electricity from waste water.

The team at Pennsylvania State University says the technology would simultaneously treat the water.

They suggest the process could be adopted in developing countries, providing clean water and power for homes.

Instead of having a net drain, we have a net gain Professor Bruce Logan, Pennsylvania State University

Detailsare published in the journal Science.

Scientists in the Netherlandshave for some years been exploring the idea of generating renewable power along the country's coastline, where fresh water from rivers meets the salt water of the sea.

Using a process called reverse electrodialysis (RED), fresh water and seawater are placed in intermittent chambers separated by membranes, and an electrochemical charge is created.

A Norwegian companyis developing a similar technology using saline and fresh water.

The Penn State team says RED technology is problematic because of the large number of membranes required, and because power plants have to be located by the sea.

They claim the number of membranes can be reduced and the power output boosted by combining the technology with what are called microbial fuel cells (MFCs). These use organic matter in solution to create an electric current - in this instance waste water.

The prototype technology also bypasses the need for salt water by using ammonium bicarbonate solution as a substitute, meaning the system could work in communities far from the sea.

The ammonium bicarbonate solution would be constantly recycled, using waste heat from local industry.

"If we treat waste water in just a microbial fuel cell, we don't create much power and it takes a long time," lead researcher Professor Bruce Logan told BBC News.

"In our process, we have the MFC part which is treating waste water and creating energy, and we have the RED stack which is just boosting that process, it's making it happen more efficiently."

He says the process could potentially be used anywhere, but could provide both clean water and power to communities in developing countries.

"The main application right now is in waste water treatment where you could effectively treat the water, but also gain some extra energy from waste heat.

"Instead of having a net drain, we have a net gain."

Professor Logan and colleagues havepreviously reportedon how the combination of microbial fuel cells and electrodialysis could generate hydrogen supplies.