Next Generation of Motor Controller Boards
V4 Motor Controller Board (Command board with inbuilt encoder)
Recently I’ve been busy developing the firmware for some of my V3 motor controller boards and I ran into a problem, while the STM32F103 microcontrollers I’ve been using support both CAN and USB communications, they aren’t capable of running both at the same time. Bit of an oversight by me but it turns out both of these peripherals use the SRAM memory bus making it a one or the other situation. This is annoying (thou i can still find some use for them), but as i was searching for a microcontroller which i could replace it with that does support both i began thinking more about what I wanted to do next with this project.
I’ve got a big bunch of motors pulled from various things (steppers, DC brushed, brushless etc) and i would like to start experimenting with them. As I was thinking about what the driving requirements are for each of these motor types i realized that its mostly the driving hardware which is different. They all need some kind of PWM capable input, and maybe some analog input depending on how fancy i want to get. The communications, and encoder reading side of things is mostly the same, as such I’ve decided for the next round of motor drivers to split them into two different boards. The first being the microcontroller/encoder board and the other being the driver board, in this way I’m hoping to make a range of motor driver boards which can mate to a single style of “control” board.
After much thinking I’ve decided to use the espressif esp32-mini-s3 microcontroller module as it has lots of features, is multicore and lots of pins and could even work as a wifi-to-can bus bridge. The other benefit of the this ESP32 is that most of it has a pretty good multiplexer for its various peripherals which means i don’t have to worry too much about which pins i break out. This means i could also make other types of add on boards like SPI displays, button inputs etc.