HAYWARD — Rather than designing an electric truck from the ground up, a startup company has developed a modular powertrain kit that can be dropped in existing chassis made by diesel-truck manufacturers.

Motiv Power Systems is assembling the all-electric powertrain control systems at its Hayward plant.

“We don’t build the final vehicles. We rely on our partners who are already building vehicles that use fossil fuels. They can build an electric version of the same vehicle on their assembly lines,” said Jim Castelaz, Motiv CEO.

Motiv received attention earlier this year when its powertrains were used in electric shuttle buses that loop around Mountain View. The shuttle buses were funded by Google and a state grant.

The company has built powertrains that can be used in delivery trucks, school buses and even the nation’s first all-electric garbage truck. The flexible system can be scaled up and down to add or reduce the number of batteries and the kind of motor needed. They are designed to be used in standard commercial truck and bus chassis. Except for under the hood, the vehicle looks similar to a diesel-powered one.

Castelaz got interested in the idea of making electric heavy vehicles such as trucks and buses not long after attending Stanford University graduate school, where the engineer got the entrepreneurial bug.

“I realized that when it comes to heavy vehicles, there are not a lot of good options to get away from fossil fuel,” he said.

Castelaz began Motiv in his Mountain View living room in 2009. (He has since moved to the East Bay.)

“Jim is a classic Silicon Valley startup kind of guy,” said Jim McKinney, project manager of the California Energy Commission’s Alternative and Renewable Fuel and Vehicle Technology Program. “His company is really focused on having a product line that we need for electric trucks. These powertrains take a lot of engineering talent, which these guys have.”

The energy commission has given Motiv five grants totaling $12.3 million for the company to develop, test and now produce the powertrains. The grants are part of the state’s commitment to cutting emissions, McKinney said.

Medium and heavy trucks produce 37 percent of California’s greenhouse gas emissions, he said. The state’s goal is to reduce emissions to 1990 levels by 2020 and 80 percent below 1990 levels by 2050.

Gov. Jerry Brown also has set a goal of cutting petroleum use in half by 2030.

The powertrains also run some Kings Canyon Unified electric school buses.

“School buses and delivery trucks often start life with same chassis,” Castelaz said.

In 2013, the Motiv powertrain was used in the nation’s first all-electric garbage truck in Chicago.

“We were incredulous at first when Chicago approached us. Can an electric system really handle that load? But the nice thing about garbage trucks is there’s a lot of frequent braking with the stop and go,” Castelaz said. That regenerative braking feeds energy back into the battery to preserve the vehicle’s charge.

“The drivers like driving it, too,” he said. “They are used to sitting a few feet from a smelly diesel engine.”

Motiv next will be outfitting electric garbage trucks for Sacramento.

The upfront cost of an electric garbage truck is about $500,000, compared with $200,000 for a diesel one, he said. But the fuel cost of the zero-emissions electric truck is about one-eighth, and maintenance costs are lower.

“A fleet will spend quite a bit more on fuel than they do on purchasing the truck over its lifetime, which makes an electric truck much more economical,” he said.

Many companies are cautious about electric trucks, which are still in the demonstration phase, McKinney said.

The company chose to locate to Hayward because its site is just across the San Mateo Bridge from its Foster City headquarters and it was more affordable than some other locations.

Also, as part of its state grant, the company sought out lower income areas.

“We wanted to demonstrate we can bring good high-tech jobs to an economically disadvantaged area,” Castelaz said.

The jobs require a variety of skill levels, he said. Some are engineering, others require technical expertise, but some are assembly. “We provide the training for those employees,” he said.

Popular Science magazine included Motiv’s powertrain control system to its 100 Best of What’s New list in 2014.

It wrote: “With its plug-and-play technology, Motiv Power Systems is turning the nation’s most polluting vehicles into some of its cleanest.”

Contact Rebecca Parr at 510-293-2473 or follow her at Twitter.com/rdparr1.