A key obstacle to getting more electric cars on the road at the moment may be building up a big enough supply of batteries to power them. 

So far, the only automaker with a large enough supply of batteries to produce electric cars in large volumes is Tesla. Volkswagen has also announced a $10 billion investment in electric-car batteries, but those factories have not yet borne full fruit. 

On Tuesday, Polish Prime Minister Mateusz Morawiecki announced that Mercedes-Benz will invest $230 million (200 million Euros) in the Polish town of Jawor. That factory will contribute to Mercedes-Benz's plans to eventually purchase $23 billion worth of batteries for its new lineup of electric cars. Mercedes already operates an engine factory in the town.

READ THIS: Mercedes breaks ground on US battery factory (Updated)

"We are very happy that an investor that has been with us for a few years has entrusted us again and in the same place in Jawor,” Morawiecki said.

Mercedes plans to introduce the first of its new EQ line of electric cars, the EQC, this summer in Europe. It will be followed next year by a smaller EQB electric SUV as well as an EQC, made at the company's U.S. factory in Alabama alongside dedicated battery production facility for its U.S. models. Mercedes' parent company, Daimler, is also planning to produce a line of electric heavy trucks that will require additional battery investments.

Other automakers are also ramping up production of lithium-ion batteries for electric cars. BMW announced it will spend "somewhere in the mid-double-digit millions of euros" to build a battery production facility at its car factory in Dingolfing, Germany. At the same time, the brand is setting up a longer-term battery supply chain using recycled cells from Belgium to supply what is expected to be the world's second-largest battery factory in Stockholm.

CHECK OUT: BMW sets up end-to-end battery recycling in Europe

LG Chem has set up battery factories in Korea, China, Poland, the U.S., and elsewhere to build electric-car batteries for General Motors and most recently Nissan.

Battery manufacturers in China have also been building production, primarily for that country's wave of electric cars already on sale.

Many of these production facilities, however, have yet to come online, and automakers such as GM (and even Tesla) have struggled to buy (or make) enough batteries in order to build more electric cars.

With these investments, that may soon change.