A device that can produce electricity from sunlight while simultaneously purifying water has been produced by researchers, an invention they say could solve two problems in one stroke.

The researchers say the device is not only a source of green energy but also offers an alternative to current technologies for purifying water. These, they add, often consume large amounts of electricity and require infrastructure beyond the reach of many communities that lack basic access to safe drinking water – a situation thought to affect more than 780 million people worldwide.

“These people spend a collective 200m hours a day fetching water from distant sources,” said Prof Peng Wang, a co-author of the research from King Abdullah University of Science and Technology in Saudi Arabia.

With solar farms often located in arid regions, the device could provide clean water where it is needed most. What is more, the team say it could be used in a backyard or on an industrial scale.

“Having a significant amount of freshwater produced continuously on a daily basis [means] many challenging tasks can then be easily achievable,” said Wang. “The generated clean water can be used [for] cleaning solar panels to remove dust particles; it can be use to irrigate plants and crops, making desert agriculture possible.”

Writing in the journal Nature Communications, Wang and colleagues reveal how they constructed the device.

On the top is a horizontal commercial silicon solar cell and beneath this are several tiers through which saline, brackish or contaminated surface water is run. Waste heat from the solar cell warms the saline water passing immediately beneath it – the water evaporates, passes through a membrane and condenses to yield clean water, releasing heat in the process that warms the saline water in the tier below that – the process is then repeated for the next tier. The purified water flows out of the device and is collected.

The team found the device can be used to purify saltwater as well as seawater contaminated with heavy metals, with the water collected containing levels of lead, copper, sodium, calcium and magnesium all below the levels deemed safe for drinking water by the World Health Organization.

While the team outline various versions of the device, they reveal that under conditions on a par with a bright, cloudless day the energy efficiency of the solar cell was about 11% – a figure they say is on a par with what would be expected without the distillation section attached, and higher than previously reported by others working on such devices.

The device was also able to produce clean water from seawater at a rate they say is higher than conventional solar stills.

The device, while not the first to make use of solar distillation, has a particular advantage: by combining two types of device that typically each require a large land area, and mounting systems, the approach is relatively compact.

Wang said the device turned the traditional link between water and electricity on its head: conventionally, electricity is produced by heating water to produce steam that is then used to turn turbines. While he said the team was still working on scaling up the device and reducing costs, they are optimistic.

“It is our hope that we move quickly to push this technology towards its large-scale adoption,” he said.