
Knuckle
HeyPCB/knuckle
35 mm round FOC driver for a GBM2804 gimbal motor that answers on the Open Duck Mini's servo bus as an STS3215. 6-layer KiCad 10 board plus printed standoff, cover and horn adapter.

Tiny drone motors with a high reduction gearbox, a precise mangetic encoder, and a FOC controller
DRV8311 on motor driver is an open-source printed circuit board by techy-robot, from the techy-robot/Mighty-Micro-Motors repository on GitHub, published under the CERN-OHL-S-2.0 licence. It is a 4-layer board of 8.3 × 5 mm with 22 parts on 17 nets, routed with 203 tracks and 27 vias.
It is built around the DRV8311HRRWR. Its parts include 7 capacitors, 3 resistors, 3 connectors and 1 IC. It belongs with the robots and motor control boards of this library.
My goal with this project is to recreate the expensive and highly advanced motors typically found in big robots, such as in Boston Dynamics or MIT's robots, but at a much smaller scale. These are essentially tiny drone motors with a high reduction gearbox, a magnetic encoder, and a FOC controller board.
You can check out my project log here.
This project is sponsored by PCBWay
This has to be a resin printed or precision machined gearbox, just from the sheer smallness of everything. The brushless drone motors (HappyModel SE0802) are 10mm in diameter, so the gearbox ideally should be a similar size.
I'm currently thinking about having a cycloidal or split-ring planetary gearbox, due to the compact size and high reduction ratios
Preliminary CAD designs are on onshape, you can watch my progress here: Mighty Micro Motors - Onshape. Step files and STL files will also be uploaded to this repo.
Currently the design is twice as big as my ideal, with a 19mm diameter. I can not reduce the diameter without removing the bearings, possible reducing the lifespan. This really needs to be smaller, so I may do some testing and just remove some bearings. I'm not actually sure how well the 1x3x1mm bearings roll compared to just a smooth shaft. I could also cut the hole count down if the screws were also the shafts.
In real life:

This goes by a variety of names, but basically this is a two-stage planetary gearbox, with the planets merged together. Due to some interesting mechanics, this type of gearbox can have an extreme reduction ratio in a relatively small size. The reduction ratio is the first stage ratio(ring teeth / sun teeth) multiplied by 2nd stage ring teeth, divided by the number of planets (simplified, this only works if both planet gear sets have the same number of teeth). The 2nd stage is advanced by a few teeth every revolution of the first. This operates on the same principle as a cycloidal drive and a harmonic drive, but with the added reduction ratio of the planetary gears, and without the vibration.
One thing to note with this type of gearbox is that the output encoder wires cannot fit through the center like my other gearbox, which limits the usable motion range to 270 degrees.
My particular version is a 74.66:1, in a much smaller form-factor than my cycloidal drive!

My first version of the control board is designed to test all functions that may exist on a robot. I have the motor driver, a MCU for the algorithms, connectors for sensors (I2c and SPI), and a power management system.
A lot of care has been taken to design for EMI, which is why I have separate ground planes and have plotted current return paths for most traces. When I design a controller that supports 3+ motors I'm going to deal with length matching too on the low speed signals (Currently I'm testing all possible pin combinations, which doesn't lend itself to length matching). I'm still learning about good EMI design practices though, so there may be a big flaw in the design I don't see.
At it's current state the control PCB has been assembled and power tested. Nothing blew up or heated up, though I have discovered that the battery protection chip is not working. I will probably just bypass that circuit and move on.
Specs:
The motor driver section is 16x11mm, which hopefully is small enough and easily tileable for a small robot controller with lots of motors. The biggest part of the board is the power management, followed by the stm32.
Ordering info The pcb is a 4 layer board, with 1 oz copper. Also, it is strongly recommended to order a stencil for both PCBs and to do a good job pasting the board. I fortunately ordered a stencil for the controller, but I put too much solder paste on and had to fix a lot of bridges after the fact. For the encoder board I manually pasted it, and that was a real pain to do a tiny QFN chip.
Assembled:

(Note that I messed up on the mosfets I ordered which were too tiny. I have the correct mosfet specified now)
My second test control board has had a lot of the components switched, and actually split the DRV8311 onto a separate board.
I am testing a lot of the same functionality as last time, and its still a single motor system.
Specs:


Off board controller
This is a little magnetic board I designed to be attached to the end of the motor. It has a MA735 chip, which is low cost and seemed perfect for my needs. The resolution is inversely proportional to rotational reading speeds, so I will be fine no matter which end of the gearbox I stick it on. Low resolution on the high-speed end will mean I still have high resolution positioning on the output, and high resolution on the output side is fine because the output is slower.
The board is barely bigger than the jst sh connector on top for SPI communication! V2 of the board is mounted on a flex cable so it doesn't need wires.
The encoder chips datasheet recommends a diametrically magnetized 5x3mm neodymium magnet to operate. I used a 6x3mm from K&J magnetics: D42DIA.

Thanks to PCBWay for reaching out to sponsor my project. They kindly offered to allow me to test their pcb manufacturing capabilites with this project.
I liked the quality of the pcbs I received for the V2 boards, everything was soldered correctly with only minor burn marks on the through-hole components. The assembly service they offered was also top-notch, much easier than hand assembling at home. When I made a mistake on one of the PCB assemblies I ordered, they were quick to ask what should be done, and were willing to let me have the misplaced parts (sot-23 transitors instead of sot23-5) so I could fix it myself with some bodge wires. The one downside to PCBway is the cost of the boards, I would not normally pay for prototype pcbs at their prices.
Try them out if you haven't https://www.pcbway.com/.
See the section Version 2/Photos above for pictures.
There is not that much code currently, just some tests to verify the board and motors work, and a programmer definition for my Flipper Zero. I am planning on using the wonderful SimpleFOC library as a starting point for the motor control, building out my own communication protocol or going with ROS 2 style communication. I may also add some motor control algorithms as I discover more.
I have tuned the PID algorithms for my particular HappyModel SE0802 brushless drone motors.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 0.1uF, 16v | Capacitor_SMD:C_0402_1005Metric | C2, C3, C6 |
| 2 | 22uF | Capacitor_SMD:C_0402_1005Metric | C4, C5 |
| 1 | 0.1uF | Capacitor_SMD:C_0402_1005Metric | C7 |
| 1 | 100k | Resistor_SMD:R_0402_1005Metric | R2 |
| 1 | 300k | Resistor_SMD:R_0402_1005Metric | R1 |
| 1 | 4.7uF | Capacitor_SMD:C_0402_1005Metric | C1 |
| 1 | 47k | Resistor_SMD:R_0402_1005Metric | R3 |
| 1 | A | TestPoint:TestPoint_Pad_D1.0mm | TP5 |
| 1 | A | custom_testpoints:PinHeader_1x01_P1.27mm_Round | J2 |
| 1 | B | TestPoint:TestPoint_Pad_D1.0mm | TP7 |
| 1 | B | custom_testpoints:PinHeader_1x01_P1.27mm_Round | J1 |
| 1 | C | custom_testpoints:PinHeader_1x01_P1.27mm_Round | J3 |
| 1 | C | TestPoint:TestPoint_Pad_D1.0mm | TP8 |
| 1 | CSA-A | TestPoint:TestPoint_Pad_D1.0mm | TP3 |
| 1 | CSA-B | TestPoint:TestPoint_Pad_D1.0mm | TP4 |
| 1 | CSA-C | TestPoint:TestPoint_Pad_D1.0mm | TP6 |
| 1 | DRV8311HRRWR | custom_Driver_Motor:DRV8311_0.3mmVias | U1 |
| 1 | GND | TestPoint:TestPoint_Pad_D2.0mm | TP2 |
| 1 | Power | TestPoint:TestPoint_Pad_D2.0mm | TP1 |

HeyPCB/knuckle
35 mm round FOC driver for a GBM2804 gimbal motor that answers on the Open Duck Mini's servo bus as an STS3215. 6-layer KiCad 10 board plus printed standoff, cover and horn adapter.

JacobBanghart/clickdeck
Custom Stream Deck-style USB controller: per-key images, micro switches, haptic knobs




sedlak477/owl-hardware
Hardware design files and build instructions for the OWL platform

techy-robot/CACKLE-Driver-DRV8311_Motor_Driver
This is a single brushless motor driver based on the DRV8311 Texas Instruments chip. It is capable of 5 amps current in a voltage range of 3 to 24 volts. It has integrated current sense amplifiers and protection logic.

punkfab/pcb-corpus
235 real KiCad boards from open-source hardware repositories, prepared as a placement and routing benchmark
It measures 8.3 × 5 mm and has 4 copper layers, 1.6 mm thick.
22 parts, built around the DRV8311HRRWR. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the techy-robot/Mighty-Micro-Motors repository on GitHub, at the commit this page was made from: the board is Kicad/DRV8311 on motor driver/DRV8311 on motor driver.kicad_pcb and its schematic Kicad/DRV8311 on motor driver/DRV8311 on motor driver.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the CERN-OHL-S-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).