When it comes to future challenges, one of the biggest will be water scarcity - on a warming planet we're going to have plenty of seawater, but not enough fresh, clean water in the right places for everybody to drink.

And while a lot of research has focussed on desalination, a team of scientists have now come up with another possible solution - a device that pulls fresh water out of thin air, even in places with humidity as low as 20 percent. All it needs is sunlight.

It might sound too good to be true, but so far the research is solid. Called the 'solar-powered harvester', the device was created by teams from MIT and the University of California, Berkeley, using a special type of material known as a metal-organic framework (MOF).

To be clear, it's only in the prototype phase right now and has been tested in pretty limited situations, but the results so far have just been published in Science.

"This is a major breakthrough in the long-standing challenge of harvesting water from the air at low humidity," said one of the researchers, Omar Yaghi from UC Berkeley.

"There is no other way to do that right now, except by using extra energy. Your electric dehumidifier at home 'produces' very expensive water."

Two-thirds of the world's population is currently experiencing a shortage of clean water, but it's estimated that there's about 13,000 trillion litres of water worldwide present in the air all around us.

So far the prototype device has been tested under conditions of 20 to 30 percent humidity, and was able to pull 2.8 litres (3 quarts) of water from the air over a 12- hour period, using 1 kilogram (2.2 pounds) of MOF.

Successful tests have also been conducted on the rooftop at MIT, showing that it works in real-world conditions.

The team says that the device could easily be scaled up to provide a family with their freshwater needs for the day.

"One vision for the future is to have water off-grid, where you have a device at home running on ambient solar for delivering water that satisfies the needs of a household," said Yaghi.

"To me, that will be made possible because of this experiment. I call it personalised water."

Yaghi worked on the first MOF more than 20 years ago. Unlike regular sheets of metals, MOFs are structures where metals such as magnesium or aluminium are combined with organic molecules in an arrangement that creates rigid, porous structures ideal for storing gases or liquids.

Since then, more than 20,000 different kinds of MOFs have been created by researchers around the world, and are already being used to capture CO2, and efficiently store chemicals such as hydrogen or methane.

137946 webUC Berkeley and Berkeley Lab

The MOF used in the solar-powered harvester, shown above, was synthesised in 2014, and contains a combination of zirconium metal and adipic acid, which binds water vapour. 

The MIT team then took dust-sized crystals of this MOF and compressed them between a solar absorber and a condenser plate, and placed the whole thing inside a chamber that was exposed to the outside air.

You can see the device below:

137945 webMIT

As ambient air diffuses through the MOF crystals, water molecules attach to the interior surfaces. X-ray diffraction studies of the system have shown that the water vapour molecules often gather in groups of eight, forming cubes.

Sunlight then heats the MOF up and pushes the bound water towards the condenser, which is the same temperature as the outside air. This vapour condenses as liquid water, and drips into a collector to provide clean drinking water.

"This work offers a new way to harvest water from air that does not require high relative humidity conditions and is much more energy efficient than other existing technologies," said MIT team leader, Evelyn Wang.

While it sounds pretty awesome already, the team admits there's a lot of room for improvement and fine-tuning, to make the device even more efficient.

Right now, the MOF can only absorb 20 percent of its weight in water, but other MOF materials could potentially absorb more than 40 percent.

The material can also be tweaked to be more effective at higher or lower humidity levels.

"It's not just that we made a passive device that sits there collecting water; we have now laid both the experimental and theoretical foundations so that we can screen other MOFs, thousands of which could be made, to find even better materials," said Yaghi.

"There is a lot of potential for scaling up the amount of water that is being harvested. It is just a matter of further engineering now."

"To have water running all the time, you could design a system that absorbs the humidity during the night and evolves it during the day," he added.

"Or design the solar collector to allow for this at a much faster rate, where more air is pushed in. We wanted to demonstrate that if you are cut off somewhere in the desert, you could survive because of this device."

"A person needs about a Coke can of water per day. That is something one could collect in less than an hour with this system."

The research has been published in Science.