README.md 3.68 KB
Newer Older
Jake Read's avatar
Jake Read committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# MachineKit BLDC Driver

See: [Circuit Development](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/tree/master/circuit), and [Code Development](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/tree/master/embedded)

## Background, Motivation

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*  

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).  

Jake Read's avatar
v0.3  
Jake Read committed
16 17
## Others 

Jake Read's avatar
Jake Read committed
18 19
I'm not intending to put myself in league with these people - these links are here because they are motivated by (similar) things.

Jake Read's avatar
v0.3  
Jake Read committed
20
[ODrive](https://odriverobotics.com/shop)
Jake Read's avatar
Jake Read committed
21 22
[VESC](http://vedder.se/2015/01/vesc-open-source-esc/)
[Ben Katz](http://build-its-inprogress.blogspot.com/search/label/Motor%20Control)
Jake Read's avatar
v0.3  
Jake Read committed
23

Jake Read's avatar
Jake Read committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
#### A few things to understand: 

**(1) Electric Motors move by rotating a magnetic field** - we have something with magnets, and something else with electromagnets, we use the electromagnets to rotate the field, we pull the magnets along. Rotating the field is called *Commutating* or *Commutation*.

**(2) Brushed Motors rotate the magnetic field using 'brushes'** - these are mechanical switches that use the motor's own rotation to change the magnetic field. Super neat. [Here's a link to Sparkfun's explanation](https://learn.sparkfun.com/tutorials/motors-and-selecting-the-right-one/dc-brush-motors---the-classic)

And a GIF. While the rotor rotates, different switches are connected to current, and the coils - to - pads relationship is set up such that the current will cause the motor to rotate. Pardon my abbreviated explanation.

![brushed-dc](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/brushed-dc.gif)

Brushes are awesome - and make motors very simple. You just pump voltage (so current) through the rotor, and things happen. However, there are resistive losses at the brushes, as well as friction losses.

With the advent of transistor technology (for switching logic AND for switching big power) we can do this electronically - use a computer (or simple timer) to switch the phases. 

**(3) Brushless Motors rotate the magnetic field with switches** - so we can make the coils stationary, and 'artificially' switch the direction and timing of current flowing through them. Here's a nice GIF of sinusoidal commutation (where phase currents follow a nice, smooth wave).

![bldc-animation](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/bldc-motor-vectors.gif)

We can see the three current vectors (that translate into a combined magnetic field vector). We also have a simpler type of switching, where we only turn two of the three phases on at a time. You can see an example of that [here](https://www.youtube.com/watch?v=oFI7VW6WGR4) - including a nice diagram of the switch setup.

#### Where it gets complicated:

- Circuit design to switch big voltages / currents
- Closed loop control on current in motor
- Sensing: rotor position, electrical phase, offsets, shunt amplifiers oh my!

#### Towards accessible robotics

Mostly the motivation for me to go through this is (1) to train myself in the field, and (2) to help others along a similar journey, not just cobbling bits together, but understanding how and why they work. This is ongoing work!