README.md 2.46 KB
Newer Older
Jake Read's avatar
new doc    
Jake Read committed
1
# AutomataKit BLDC Driver
Jake Read's avatar
Jake Read committed
2

Jake Read's avatar
Jake Read committed
3
4
## What

Jake Read's avatar
Jake Read committed
5
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
6
7

![board](/images/board.png)
Jake Read's avatar
new doc    
Jake Read committed
8

Jake Read's avatar
Jake Read committed
9
10
11
![schematic](/images/schematic.png)

## Why
Jake Read's avatar
Jake Read committed
12
13
14
15
16
17
18
19

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
20
## How
Jake Read's avatar
Jake Read committed
21

Jake Read's avatar
new doc    
Jake Read committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
The driver uses an ATxmega microcontroller to drive phase voltages through a gate driver, through half-bridges, through motor windings. An encoder reads motor position back to the microcontrolelr, and shunt resistors measure current flowing through the motor coils. With this information, we can use some maths to determine where the motor's magnetic field is, and control that to drive position and torque outputs.

## Development Notes

See [circuit chatter](/circuit), [firmware chatter](/embedded)

## Learning About Brushless Motors and their Control

[See the (ongoing) notes I put together to explain the wizardry of BLDC driving under / eductation.](/education)

# Viable Commands

*none yet - firmware in development*

### Test

Keycode: **127**
 - to test networking, this will reply with a payload packet containing ```127, 12, 24, 48``` and will toggle an LED on the board

### Reset

Keycode: **128**
 - issues a software microcontroller reset
 - if the microcontroller is already hung up, this will not work
Jake Read's avatar
Jake Read committed
46

Jake Read's avatar
new doc    
Jake Read committed
47
### eRPM Target
Jake Read's avatar
Jake Read committed
48

Jake Read's avatar
new doc    
Jake Read committed
49
50
51
52
Keycode: **141**
Argments: Electrical RPM, int32_t, in electric phase periods / minute
Returns: Ack, uint8_t, 141
 - sets motor spinning at the set electrical rpm.
Jake Read's avatar
Jake Read committed
53

Jake Read's avatar
new doc    
Jake Read committed
54
### Read Current RPM
Jake Read's avatar
Jake Read committed
55

Jake Read's avatar
new doc    
Jake Read committed
56
57
58
Keycode: **142**
Arguments: none
Returns: Electrical RPM at time of read, in electric phase periods / minute
Jake Read's avatar
Jake Read committed
59

Jake Read's avatar
new doc    
Jake Read committed
60
# Reproducing This Work
Jake Read's avatar
Jake Read committed
61

Jake Read's avatar
new doc    
Jake Read committed
62
All automatakit works are open source, and while we cannot sell you boards, if you have an interesting application, get in touch to ask about collaborating.
Jake Read's avatar
Jake Read committed
63

Jake Read's avatar
new doc    
Jake Read committed
64
To reproduce boards and load code, see the document ['Reproducing Automatakit Work'](https://gitlab.cba.mit.edu/jakeread/automatakit/reproducing)