There are a lot of things about running an electric race car that a team has to contend with, but one of the big ones, at least at Pikes Peak, is charging time.

It may seem like, since it’s just an 8-minute run that has to be completed but once, the team shouldn’t have to be in too big a rush to charge the car, but at Pikes Peak conditions are uncertain and Germans are never satisfied with uncertainty.

In the rules, Pikes Peak runners have 20 minutes to find their way back to the start line and start all over again if their run is ruined for safety reasons (hail or a crashed car on the track, for instance). If the I.D. R is halfway up the mountain, that could be a big issue.

“We had to bear in mind a possible re-start,” says Marc-Christian Bertram, Head of Electrics and Electronics at VW Motorsport. “With that in mind, there were two main challenges that had to be overcome: To avoid overheating the battery during the charging process, and to ensure that all the battery cells are charged equally.”

The team started small, testing out all kinds of chemical compositions for the individual battery cells before starting tests on modules. The tests, run out of VW’s Wolfsburg E-mobility lab, found that a lithium-ion battery, split in two and located next to and behind the cockpit was the best setup for high output motorsports applications.

To actually charge the batteries, VW uses two rapid-charging systems at once, but only at 90 kW to prevent it from getting too hot. Together with the relatively small size of the battery—it only stores enough energy to get 80% of the way up Pikes Peak Hillclimb course—the I.D. R can be ready to go if the unexpected happens.

And how do you charge a race car at 9,000 feet above sea level where there is no infrastructure? Why, a generator, of course. And while it may look regular from the outside, the VW team uses glycerol, not diesel to power it.

We’ll get to see if VW has prepared itself for every eventuality when it races for the electric Pikes Peak record on June 24.