Earlier this year, Bill Gates posted a video of himself drinking water that was made from human feces. (It went viral, unsurprisingly.)

The water was processed by a machine that collects human waste and converts it into safe, reusable byproducts -- water, electricity and ash. This week, Gates said in a blog post that the "Omni Processor" machine is getting its first test run in Dakar, Senegal, with the aim of reducing disease and saving lives in the city.

Dakar is a West African city of 3.4 million, about a third of whom have no access to the city's sewer system. Instead, they store their waste in pits or septic tanks.

Many people in Dakar can't afford to hire trucks to safely remove the waste from their homes -- so they remove it by hand. That's a dangerous process, exposing themselves and the groundwater to contamination.

In an effort to make the sanitation trucks more affordable, the Bill & Melinda Gates Foundation has invested in a company called Janicki. The Seattle-based company built the Omni Processor and recently installed one in Dakar.

The Omni Processor makes much of the current waste management process obsolete, potentially making sanitation much cheaper for Dakar. And the next version of the Omni Processor will make waste management even cheaper: Garbage will be removed by magnets instead of by hand, and wet waste will not need to be separated from dry waste.

The machine also saves the city money by powering the rest of the sanitation facility with electricity converted from the waste it processed. Treated water can be drunk or used for irrigation, and ash can be made into bricks.

Gates said the Omni Processor is succeeding in its test run, and the results have been promising. Gates and Janicki aim to bring more Omni Processors to other cities in need

Dakar isn't alone. More than 2 billion people around the world -- nearly a third of humanity -- use toilets that aren't connected to a sewer system. Poor sanitation kills 700,000 children every year, according to Gates.