This magic box is called a Vanadium redox flow battery. The heart of a flow battery are two electrolyte solutions – one positive, one negative – contained in separate tanks. When the solutions are pumped through a power cell containing a membrane, a chemical reaction takes place that generates electricity. When the process is reversed, the electrolyte stores energy.

The key component is Vanadium, a naturally occurring element that can exist in positive and negative states, eliminating the contamination and degradation that occurs when two different elements are used to create a chemical reaction. Flow batteries are not as efficient as solid-state lithium-ion batteries. But unlike lithium-ion batteries that lose their capacity over time as they charge and discharge, the non-toxic electrolyte in a vanadium flow battery is endlessly reusable and never loses its efficiency.

“Basically, our battery lasts forever,” says Bill Watkins, Imergy’s chief executive and a Valley veteran who served as the CEO of LED lighting startup Bridgelux and before that Seagate, a manufacturer of hard drives (remember those?).

And while adding storage capacity to lithium-ion batteries increases the price exponentially – hence the near six-figure sticker of the 265-mile range Tesla Motors Model S – increasing the capacity of flow batteries just means adding bigger tanks.

Imergy is one of a growing number of companies, from automaker Honda to solar installer SolarCity and Tesla, that see a big market in taking homes and businesses off the grid.

“As more people go solar, they’re going to tell their utility, ‘I’m not going to sell you my electricity. I’m going to get a battery at low cost to run my home and I don’t need the grid,’ ” says Watkins.

Vanadium flow batteries are not new – an Australian scientist named Maria Skyllas-Kazacos invented the technology in 1985. But there was a catch. Two, actually. The battery needed pure and pricey Vanadium to work. And the fact that the electrolyte became unstable at 35 degrees Celsius (95 Fahrenheit) limited the usefulness of the batteries.

“The electrolyte was always the one cost you couldn’t squeeze because you needed pure Vanadium,” says Tim Hennessy, Imergy’s president, who previously ran a Vanadium battery company in China. “So the batteries ended up being about 50 percent more expensive.”

But Imergy claims it has made a big breakthrough. First, chief technology officer Majid Keshavarz developed a novel electrolyte chemistry that allows Imergy to use a lower-grade of Vanadium that can be extracted from iron ore waste, oil sludge or fly ash generated by coal-powered power plants.

That lets Imergy cut its Vanadium costs by a third, according to Watkins, and ensure a supply of the metal. (A competitor, American Vanadium, plans to operate its own Vanadium mine in Nevada.)