README.md 3.41 KB
Newer Older
Jake Read's avatar
Jake Read committed
1
2
# MachineKit BLDC Driver

Jake Read's avatar
Jake Read committed
3
4
5
![board](/images/fab-front.jpg)

![board](/images/fab-back.jpg)
Jake Read's avatar
Jake Read committed
6

Jake Read's avatar
Jake Read committed
7
See: [Circuit Development](/circuit), [Code Development](/embedded), and [Education](/education)
Jake Read's avatar
Jake Read committed
8

Jake Read's avatar
Jake Read committed
9
# Next Board Notes
Jake Read's avatar
Jake Read committed
10

Jake Read's avatar
Jake Read committed
11
12
13
 - crystal
 - qfn64 footprint update!
 - power pad size
Jake Read's avatar
Jake Read committed
14
15
16
17
18
19
20
21
22
23

## Next Steps

 - stuff one board
 - re-hash code for different pinouts, with updated libraries
 - try speed control with IQ-less FOC (simple sine commutation)
  - if this is not satisfactory (field lag due to inductance), use 6-step comm
 - implement speed control network command
 - re-hash documentation
 - use to control a spindle in a machine 
Jake Read's avatar
Jake Read committed
24

Jake Read's avatar
Jake Read committed
25
26
## What

Jake Read's avatar
Jake Read committed
27
The MMKBLDC Project is my attempt at building a decent controller for Brushless Motors. BLDCs are excellent sources of mechatronic actuation: they're [power dense](https://jakeread.pages.cba.mit.edu/actuators/) and serve the motion control justice present in most state of the art robotics. However, controlling them is non-trivial, and requires the combination of some EE expertise, some control expertise, and some hardware know-how.
Jake Read's avatar
Jake Read committed
28
29
30
31
32

![board](/images/board.png)
![schematic](/images/schematic.png)

## Why
Jake Read's avatar
Jake Read committed
33
34
35
36
37
38
39
40

This project is largely a follow-on to [my Teensy-Powered Brushless Motor Controller](https://github.com/jakeread/tesc), and with this new work, may the TESC project RIP. A moment of silence.

TESC, April 2016 - August 2016  
*As the world turns,  
so did those motors.  
Once around is never enough*  

Jake Read's avatar
Jake Read committed
41
Eulagies aside, I am still motivated to do this. Brushless motors are the go-to motive force for electromechanical systems. By that I mean that just about any time you see a robot-like thing, or machine, moving about, there's a big likelihood that the thing doing-the-moving has a brushless motor in it's guts - or some variant thereof (stepper motors count as BLDCs in my books). See [this characterization of actuators](https://jakeread.pages.cba.mit.edu/actuators/) to get a sense for why.  
Jake Read's avatar
Jake Read committed
42

Jake Read's avatar
Jake Read committed
43
## How
Jake Read's avatar
Jake Read committed
44

Jake Read's avatar
Jake Read committed
45
We use an ATSAMD51 microcontroller to drive phase voltages through a gate driver, through half-bridge drivers, through motor phases. An encoder reads motor position back to the uc, and we use shunt resistors to measure current flowing through the motor coils. With this information, we can use maths to determine where the motor's magnetic field is, and control that to drive position and torque outputs.
Jake Read's avatar
Jake Read committed
46

Jake Read's avatar
Jake Read committed
47
This controller runs with the assumtion you're using the [mkxmods](https://gitlab.cba.mit.edu/jakeread/mkxmods) infrastructure for controls. Over the network (see link) you will be able<sup>1</sup> to issue commands like:
Jake Read's avatar
Jake Read committed
48

Jake Read's avatar
Jake Read committed
49
50
51
52
53
54
55
56
*Speed Control*
 - use key 129, int32_t speed in rpm
 - does closed loop PID control to set RPM for spindle control, mostly
*'Dumb' Torque Control*
 - use key 130, int32_t torque val/(2^32) pwm duty
 - applies this pwm value to the motor, under simple sinusoid control, to apply closed loop commutation to motor
*'Smart' Torque Control*
 - will require some search for FOC implementation, and should reply with available torques, bandwidths, etc... here be dragons
Jake Read's avatar
Jake Read committed
57

Jake Read's avatar
Jake Read committed
58
## Building MKBLDC
Jake Read's avatar
Jake Read committed
59

Jake Read's avatar
Jake Read committed
60
Mostly, contact me and I'll get you set and ready to programme and use the circuit to control bldc motors.
Jake Read's avatar
Jake Read committed
61

Jake Read's avatar
Jake Read committed
62
In the [circuit dev page](/circuit) you'll find doc on the BOM for the MKBLDC, and in the [embedded dev page](/embedded) you'll find documentation and source code for the firmware to run it as (along with networking code to send messages over the mkxmods network). This is all under development.
Jake Read's avatar
Jake Read committed
63

Jake Read's avatar
Jake Read committed
64
# Footnotes
Jake Read's avatar
Jake Read committed
65

Jake Read's avatar
Jake Read committed
66
1. working on it