Tesla Motors (TSLA 12.06%) is working on a $5 billion factory -- the so-called Gigafactory -- which could be a game changer that will let the company produce 500,000 electric cars in 2020 -- up from the 22,450 the company made in 2013.

But the Gigafactory won't exactly build cars. The plan for the project is to remove the biggest bottleneck in Tesla's manufacturing process by pumping out enormous volumes of lithium-ion batteries. By 2020, the Gigafactory's production should match the lithium-ion battery manufacturing level of the entire world's 2013 output.

Source: Tesla Motors (link opens a PDF)

Argonne National Laboratory's Jeff Chamberlain, who leads the lab's advanced battery research programs, is a big fan of Tesla cars. But none of the current electric vehicle boom would be happening if the Department of Energy hadn't seen the long-term value of lithium-ion research 20 years ago.

"The advent of lithium ion has truly enabled transportation uses," Chamberlain said in a phone interview with the Fool. "Because if you remember your freshman chemistry, you think of the periodic table -- lithium is in the upper left-hand corner of the periodic table. Only hydrogen and helium are lighter on an atomic basis."

This makes lithium-ion batteries incredibly light, compared to the much heavier elements used in older setups. Alkaline batteries depend on the electron storage capacities of zinc and manganese, which are many times heavier than lithium. The lead acid chemistry in standard car batteries may be efficient, but lead is also incredibly heavy.

Despite the obvious advantages of low weight and efficient energy storage, lithium wasn't always a popular battery material. The element also happens to be highly reactive, making it difficult to take advantage of its unique properties.

In the late 1980s, researchers at Argonne, the University of Texas, and Japanese chemicals giant Asahi Kasei figured out how to make lithium batteries both effective and safe. The trick was to combine the pure lithium with various host materials, creating the lithium-ion platform we use today.

Over the next 20 years, the technology was commercialized and refined. Today's lithium-ion cells are about twice as efficient as the first commercial products in the early 1990s, and they cost 50% less.

It's the combination of light weight, high efficiency, and reasonable costs that makes electric vehicles feasible today. Building a Tesla Model S simply wouldn't be possible (or economically reasonable) if you doubled the cost and the weight of its batteries.

"I have to give the Department of Energy credit," Chamberlain said. "In the early 90s, they saw that suddenly there was a battery technology with the potential and likelihood of fueling vehicles because the element being used was so light."

This Tesla Model S packs 8,000 lithium-ion battery cells. Source: Tesla.

Why better batteries matter to carmakers
Chamberlain highly recommends taking a Tesla for a test drive. "It's an unbelievable vehicle," he gushed. "It's an amazing car."

But it comes as a steep price. A stripped-down Model S without any extras will start at $71,000. Spring for a 40% larger battery, and you'll add $7,000 to the sticker price.

With the upgraded battery, which extends the Tesla Model S's driving range from 208 miles to 265 miles, the battery accounts for over half of the vehicle's total cost.

Granted, these are the street prices for the consumer, and not Tesla's manufacturing costs, but the company's gross margin was just 23% in 2013. In other words, the hardware is sold at a not totally outrageous markup on the manufacturing cost.

Chamberlain still drives an electric car -- what else would you expect from a prominent battery researcher? -- but he settled for a Chevrolet Volt. General Motors(GM -0.04%) first plug-in hybrid can go 40 miles on a single charge without engaging the gas engine, and Chamberlain lives 18 miles from work. "I'm GM's dream customer," he says, saving about $180 a month compared to his old gasoline-powered car.

In the future, electric cars won't necessarily come at a hugely premium price. In 2017, Tesla plans to introduce a Model 3 with a starting price in the low $30,000 range. There, it would compete head to head with popular premium cars from Mercedes, Lexus, and Audi -- not their top-shelf luxury wagons, which is what the Model S faces off against, but their high-volume bread-and-butter cars.

Not coincidentally at all, 2017 is also when Tesla hopes to get its first batteries off the Gigafactory production lines.

Yes, Tesla will also enjoy economies of scale as its design and manufacturing processes ramp up. But having an in-house, high-volume, battery source will account for most of the price drops. Tesla CEO Elon Musk says that battery costs should drop by at least 30% per kilowatt hour when the Gigafactory ramps up, and that's a "conservative" estimate.

30%? That's just a good start
With any luck, researchers at institutions like Argonne will help Tesla do even better.

The Joint Center for Energy Storage Research, where Argonne sits next to four other federal research labs, five major universities, and five industrial corporations, aims to make lithium-ion batteries five times more efficient in five years, starting from a 2013 baseline.

To get there, the JCESR is looking at novel materials. Many of these may be impractical in small format battery cells like the ones you'll find in smartphones and tablets. But electric vehicles can add things like cooling systems and more advanced safety measures, opening the door to entirely new research avenues.

Electric-car batteries don't have to be small, like a smartphone battery pack must. Instead, it's all about packing huge amounts of energy storage into a lightweight package.

But they can't go all-out on maximum efficiency, either. For example, consumers expect to charge their cars from a standard wall socket (or a higher-power socket like the ones used for washers and dryers, at most).

To accommodate reasonable quick recharges from a low-powered household plug, Tesla didn't order up some outlandish single-cell monstrosity. Instead, the Model S entry level battery pack uses about 6,000 industry standard Panasonic (PCRFY -3.03%) 18650 cells, manufactured to Tesla's custom specifications and wrapped in a bundle of safety, cooling, and power management systems. The larger pack simply adds another 2,000 cells to the package.

This collection of small cells can charge the thousands of component batteries in parallel, and it can also deliver a higher-powered discharge than a single megacell could.

The next generation of Tesla batteries is not likely to be dramatically different from this design, but Tesla has the option of exploring some exotic chemistry models that simply wouldn't work in a phone.

Jeff Chamberlain, Argonne National Laboratory. Source: Argonne.

What's next?
Jeff Chamberlain told me about battery chemistry going beyond the long-term goals for lithium-ion cells. One of these projects would replace the lithium-ion anode with pure lithium metal, but only when the inefficient recharge cycle has been taken to the next level.

According to recent research, a pure lithium anode electrode could deliver four times the energy storage in the same space, and at even lighter weights. Perfect for an electric car, except the state of the art can only recharge to 99% of the original power in every cycle.

"This sounds really great, and it is... but when you look at a battery like lithium ion, there's 99.99% efficiency," Chamberlain said. "What I mean by that is, 99% efficiency, in 100 cycles you'll be roughly left with 37% of the original capacity. That 1% kills you."

And so it does. The 99% battery would drop down to less than 1% of the original capacity in less than 500 charge cycles, assuming you even bothered trying after the first few dozen charges.

A 99.99% efficient battery, like modern lithium-ion cells, would still hold 95% of the original charge after 500 full drain-and-charge cycles. That cell would still be worth 83% of the first-day power after five years of daily drains and full recharges. That's more like what you'd expect from a vehicle you might own for many years. By that point, the 99% battery would be down to a minuscule 0.00001% (that's 10 one-billionths) of the starting power.

That's the big payoff for Tesla, folks
So, there's research to be done, and carmakers like Tesla will benefit as Argonne and friends figure it all out. In Chamberlain's words, it would "dramatically change the world" if the quadruple-efficiency pure lithium electrode could replace the best lithium-ion chemistry of today.

"We're still some years away from using this technique in a commercial way," Chamberlain cautioned, but then the Gigafactory is "some years away" from full-scale production. I wouldn't be surprised to see the costs of Tesla's batteries dropping dramatically on the back of next-generation research, even as the power packs themselves start packing an unheard-of punch.