Glass that darkens when exposed to sunlight is nothing new, but scientists at the National Renewable Energy Laboratory in Golden have developed a product that not only darkens but can generate electricity.

Scientist Lance Wheeler was experimenting using gas molecules that move through an absorbent layer of glass that acts as a solar power cell when he placed the glass on a hot plate to dry after treating it with methylamine gas.

As the glass heated, it turned brown. When he removed it from the heat source, it became transparent.

“He was just making a solar cell, but he didn’t expect it to act the way it did. That was really a ‘What was that?’ moment,” said Robert Tenent, NREL senior scientist for window technology who worked with Wheeler. “He played with it for a bit and came to us and said, ‘Wouldn’t this be great in a window?’ ”

Wheeler said that within days he came up with the idea of “switchable photovoltaic windows.” But it took another year and a half to develop a functioning solar device.

Ultimately the windows will collect power that can be used to offset electricity costs or be sold back to the electric grid much the way solar panels do.

“You can also have a bank of batteries to store energy,” Wheeler said. “It doesn’t have to be given back to the grid; it can be stored on site immediately or used on site immediately.”

By darkening in the sun, the windows will reduce cooling costs. The tinting effect can be as dark as wanted. Since the tint can range from very dark to semi-transparent, window shades won’t be needed. The tint can also save the same amount of energy as a shade does while the window continues to create electricity.

Building materials that can generate electricity are under development throughout the solar industry, but so far there are few commercially viable products available, said Steven Lawrence, associate professor of operations management at the University of Colorado at Boulder.

“I think if somebody could really pull this off at an economic cost, it would be really valuable. All buildings use windows,” Lawrence said.

“It is going to be costly in the early days,” Lawrence said of the new technology. “But with experience and learning, the cost will invariably come down. Solar panels have come down much faster than anyone could imagine.”

The cost per kilowatt hour of utility-scale solar — power from large-scale utility generation — dropped from 28 cents in 2010 to 6 cents in 2017, according to an NREL report released in September. Residential and commercial solar costs fell from 52 cents and 40 cents per kilowatt-hour in 2010 to 16 and 11 cents, respectively, in 2017.

Solar energy has increased its share of total U.S. electrical generation from just 0.1 percent in 2010 to 1.4 percent in 2016, according to the Solar Energy Industries Association. Solar is expected to top 3 percent of total generation by 2020 and hit 5 percent by 2022.

The glass that Wheeler is working on contains five layers, one of which absorbs and releases methylamine molecules from the gas. As sunshine heats the window, the layer releases the molecules and the glass darkens and generates electricity. As the sun disappears, the molecules are reabsorbed and the window becomes transparent.

When the glass is clear, it allows an average of 68 percent of the sunlight through. When the window changes color — a process that took about 3 minutes during testing — only 3 percent of sunlight shines through.

Plans call for trapping the gas between double- or triple-pane windows.

Existing solar window technologies are designed to harness a fraction of the amount of sunlight utilized by the new windows without sacrificing too much visible light. As a result, a good window doesn’t make a good solar cell, nor does a good solar cell act as a good window. The new technology avoids that trade-off.

“We have a good solar cell when there’s lots of sunshine, and we have a good window when there’s not,” Wheeler said.

Last year, researchers involved in development of the glass paired with industry mentors to learn what customers want from the technology and develop paths to market, Tenent said.

“We went to a lot of window companies that we work with,” he said.

The strongest potential market appears to be commercial construction of high-rise buildings, many of which are sheathed in glass. Automotive and residential windows may also prove a lucrative market, Tenent said.

It will take more than a year before the windows are perfected, Tenent said. But, he added, “there is no question that there is market interest.”