All of us use water and in the process, a lot of it goes to waste. Whether it goes down drains, sewers or toilets, much of it ends up at a wastewater treatment plant where it undergoes rigorous cleaning before it flows back to the environment. The process takes time, money and a lot of energy.

What if that wastewater could be turned into energy? It almost sounds too good to be true, but environmental engineer Bruce Logan is working on ways to make it happen.

"Right now, we use 5 percent of our electricity to run our water infrastructure," says Logan. "We can literally pour wastewater into this fuel cell and take the energy in the wastewater and make electricity. We're using bacteria to actually turn any organic matter and some inorganic matter directly into electricity. The bacteria do it themselves. That's how we're running this fan," he says with a smile and points to a small spinning fan attached to a fuel cell.

Most treatment plants already use bacteria to break down the organic waste in the water. With support from the National Science Foundation (NSF), Logan and his team at Penn State University are taking the idea a step further. They are developing microbial fuel cells to channel the bacteria's hard work into energy. Here's how it works: The bacteria in the wastewater eat the organic waste, releasing electrons as a byproduct. Those electrons collect on carbon bristles in the fuel cell, eventually flowing through a circuit that can power a small fan or light bulb.

"We can make all sorts of different kinds of energy," Logan explains. "Typically, a microbial fuel cell produces electrical power or current, but if we add a little bit of voltage into the system, we can evolve hydrogen gas, which is really nice, because that's a very environmentally friendly energy carrier. You can run cars on it; you can use it in many, many industries. And, we can link these reactors together in order to multiply the power that's produced by each of these and to capture the power."

Logan says these wastewater batteries will be useful if they can generate enough energy to be cost effective. "In the early reactors, we used very expensive graphite rods and expensive polymers and precious metals like platinum. And we've now reached the point where we don't have to use any precious metals."

The latest versions are already using cheaper more environmentally friendly materials. Logan is also testing another system that would use salt water in the fuel cell to generate even more electricity. "You're actually creating energy and desalinating the water and treating the wastewater. It's a triple play," he notes.

Logan expects in the next five to 10 years microbial fuel cells will be ready for use in the real world. The goal is to use them to generate enough electricity to power a wastewater treatment plant with energy left over to share with the nearby community. Now that's a powerful idea.

This story was originally written for Science Nation and was republished with permission here. Video: Science Nation, Miles O'Brien/Science Nation Correspondent, Ann Kellan/Science Nation Producer.