DIY Electric Car Forums banner

My STM32 controller software

2247 3
For the last couple of years I've been intermittently learning about induction motors and designing my own controller. It it my hope to eventually build an electric vehicle, but my lack of mechanical ability has so far left me focusing purely on the electronics and software side of things.

Anyway, I wanted to post for a couple of reasons, firstly to thank Mr MPaulHolmes whose similar software provided me with some much needed pointers!

Also to post my progress and designs in case anyone else is working on anything similar and is interested.

My design is based around the following devices:
* STM32 microcontroller
* UCC21520 isolated drivers
* Infineon discreet or hex IGBTs
* ACS hall effect current sensors

Hardware schematic: https://nutty.tk/inverter3.pdf
Software: https://github.com/catphish/stm32_vfd/blob/master/main.c
My very low power test setup: https://imgur.com/a/IR173Ng

I have found the STM32 to be of particular interest in doing this as its powerful ADC, PWM, and floating point math capabilities have been an enourmous improvement compared to my previous implementations.

So far I've only tested this setup with extremely low power (250W) motors, however it is my hope that the design will scale nicely.

I don't know if this work will be useful to anyone, but it's been a fun project, and I do hope at some point I can take on a simple mechanical project like a buggy or go-kart to try out my design on a larger scale.
Top