Custom motor controller V1

So far, I have been using modified vex 29 motor controllers for the drive motors on all of my robots. These are fine for small, lower power drive setups in 1lb and 3lb robots; but I want my newer robot, BDE, to move faster to maximize weapon bite on opponents. BDE's weapon already runs at 6s so if I can build a 2 in 1 motor controller that can run at that voltage, I can increase the speed of BDE while decreasing the size of the drive electronics by integrating two motor controllers into one.

Additionally, I found that spektrum has documentation of their satellite receiver protocol for toy manufacturers. If the board I design can use the satellite receiver instead of accepting two PWM inputs, I can reduce the amount of wiring needed and decrease the size of the receiver. The receiver I have been using, the orangerx R610 is far larger than satellite receivers I have found.

I started off browsing electronics vendor websites, looking for suitable hardware to run 2 motors at 30V and a small microcontroller that run with a small footprint (integrated clock etc.). I ended up selecting:
STM32F041 (small and easy to program microcontroller)
DRV8870 (30V, 1.5A H-bridge driver)
IFX91041 (3.3v switching regulator)

All of these components are pretty small, so laying them out in a small package wasn't too difficult. I actually ended up with a board smaller than a single vex 29 controller, so I think I did pretty good.



I sent the boards out and two weeks later I had all of the components to assemble a few.

I procrastinated a little on the programming, so naturally I had to make all of it after assembling a board. Luckily it wasn't too difficult. The main problems I encountered while programming was from the built-in HAL drivers. I had some issues with the microcontroller functioning correctly for a small amount of time, then getting stuck in loops that weren't in my code and not going into a failsafe correctly. I had to make my own startup assembly code and completely cut out all of the HAL drivers, but after I had code that did exactly what I wanted it to.

Here is the board next to a Vex 29:

And here is a comparison between my old and new drive motor controller and receiver combo:


I'm happy with this motor controller so far, It can handle my stupid 6s botkits drive pretty well. In the process of finding documentation for the satellite receiver, I also found some information about how somebody reverse engineered the DSMX protocol and made their own telemetry receiver using only a CYRF6936 chip. A future board will probably have an integrated receiver.

Comments