Commit ad324834 authored by Jake Read's avatar Jake Read

v0.3

parent beabe09a
......@@ -13,6 +13,12 @@ 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).
## Others
[ODrive](https://odriverobotics.com/shop)
[VESC]
[Ben Katz]
#### 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*.
......
......@@ -152,22 +152,68 @@ I sped this up some and it looks more like a chopped sinusoid - this means I sho
That's it for now.
# Version 0.2
I have a laundry list of notes - below - for the next version of this. Overall, I'm interested in generally 'tightening it up' as well as fixing some circuit errors. I'm also moving away from the 'header / hardware' interface, and dropping an ATSAMD52 (the new hot chip on the block) and I'm going to treat it like a network endpoint.
I fixed some stray, messy errors (i.e. I had some done some senseless things with the buck converter that caused it to not function) and added some filtering to my phase voltage sensing. I also added a voltage sense circuit for th VCC line so that I can figure out in software what the supply voltage is. This is useful when (later) I might end up trying to measure things like phase inductance !
I did a few little things (like trying to minimize the number of different capacitor sizes I had - simplicities like this are nice when I am placing components) and then was re-labelling pins for the ATSAMD51, and picking the peripherals I figured I will use.
## New Schematicking
This is my PWM module - Timer / Counter for Control. 'waveform extensions are featured for motor control ... deatime insertion' bam.
I *think* I read the datasheet correctly on how hi/lo channels are multiplexed here. Or, at least, here's hoping that I did. Sorted that out in the schematic.
I also added microcontroller input to a few lines: the gain selection on the drv8302 (controls current sense amp gain) and the fault line, and the pwm mode line (so that in worst case I can just send hi-side signals, the drv will do lo/hi deadtime insertion and complimenting for me).
## New Routing
But *holy shit* did I ever open up the ratsnest :|
![the-ratsnest](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/routing-ratsnest.png)
Time for some serious annealing.
OK, I'm starting to feel satisfied with this. I've made a few big improvements - or at least they feel like nice changes. I suppose calling them big is a bit much. Besides, it was already working. *BUT* my groundplane now looks *much* better. Dang, look at that sheet of copper!
![the-ratsnest](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/routing-groundplane.png)
Specifically, the DRV8302 used to be a bit choked out on the ground plane, and when I turned the gates on I would see that area quickly jump from 30c to 50 or 60c, still cold by power electronics standards but I was barely running any current. So this feels nice.
I also got rid of the thermal relief on the directfet packages, so they'll sink more heat into the copper (which is now 2oz instead of 1oz) as well. AND I set up proper mounting holes right across the FETS so that I can wrap them with a big shiny piece of aluminum for when I go for the kilowatt of juice *sunglasses dude emoji*
I left a big lineup of .1" pitch pins that will save me lots of time and pain when I'm debugging this as well, those take up a bunch of space, but I know I'll be thanking myself in a week's time.
The last thing, routing all of the voltage sense lines, was a bit of a pain. I have to reach four traces all the way from the business end of the board back to the microcontroller...
In any case, here it is
![the-ratsnest](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/routing-bothsides.png)
And the full schematic
![schematic](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/images/schematic.png)
## Incremental Notes
- non-incrementally, do this as an endpoint, not a switch. try ATSAMD51. do 2oz copper layer.
- 2.2uF @ 100v -> 1206 smallest available package. Can replace with 1uF or up package.
- Would via to heat-pad underneath fets, next time. could also go to 2oz copper but have to push out to 0.2mm spacing.
- if new chip who dis, do thermistor at gates
shematic:
- labels, pick pwm pins on atsam, and more logic:
- do VBUS voltage divider as well
- do 63V BFC
- software-selectable gain, pwm mode, etc
- dipswitch for manual gate enable ! no more tiny-outs ! ?
- get your gates into happy-heatsinking land! This is satisfying, awesome, and helpful.
- VCC Net could be happier - see pinch pts... in many places.
- Tented Vias, or move away from FET
- No Thermal Relief on Power In / Big Fet Pads
- Go to fully sik 6 pin plugs for 'other stuff' ?
- One chip is both BLDC driver and Stepper driver ?
- software-selectable gain, pwm mode, etc
- pads for heatsink holddown - better yet find heatsink you can purchase, use those
- do sweep for values / sizes - make placing less of a PITA
- notes in code for shunt calculation
- dipswitch for manual gate enable ! no more tiny-outs ! ?
# Footnotes
1. Part Number. Searching Digikey (or octopart, or what have you) for bits is an art, kind of. It's intimidating, but offers much gold at the end of the rainbow.
......
......@@ -8,10 +8,15 @@ Desktop="Desktop"
AutoSaveProject=1
UsedLibraryUrn="urn:adsk.eagle:library:217"
UsedLibraryUrn="urn:adsk.eagle:library:325"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/atsam.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/fab.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/jake/tag-connect-2030.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/jake/tag-connect-2050.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/motors.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/power.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/sensor.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries/eagle/tag-connect-2030.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/sparkfun/SparkFun-Connectors.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/marekr/borkedlabs-passives.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/jake/tag-connect-2050.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/Comparators.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/Digital.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/FilterProducts.lbr"
......@@ -28,20 +33,20 @@ UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/lt-spice-simulation.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/lt-supply.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/rload.lbr"
UsedLibrary="C:/EAGLE 8.3.2/lbr/ltspice/sym.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/marekr/borkedlabs-passives.lbr"
UsedLibrary="D:/Dropbox (Personal)/CBA/doc/libraries_jake/eagle/sparkfun/SparkFun-DiscreteSemi.lbr"
[Win_1]
Type="Schematic Editor"
Loc="0 0 1919 1039"
State=3
Number=2
File="mkbldcdriver.sch"
View="57.8709 -13.4537 277.09 62.2366"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524"
Type="Board Editor"
Loc="0 0 1919 1016"
State=1
Number=1
File="mkbldcdriver.brd"
View="25.0151 -0.180466 136.183 94.4772"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.254 0.508 0.6096 0.8128 1.016 1.27 2.54 0.4064 0.3048 0.2032 0.1524"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6"
ViaDiameters=" 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.3 0"
ViaDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
ViaDrills=" 0.2 0.3 0.4 0.45 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.5 0.35 0.25"
HoleDrills=" 0.2 0.25 0.3 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35"
TextSizes=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.778"
PolygonSpacings=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 5.08 6.4516 1.27"
......@@ -52,14 +57,14 @@ DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0"
DimensionExtLengths=" 1.27 2.54 1 2 3 0"
DimensionExtOffsets=" 1.27 2.54 1 2 3 0"
SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
WireBend=0
WireBendSet=31
WireBend=1
WireBendSet=0
WireCap=1
MiterStyle=0
PadShape=0
ViaShape=1
PolygonPour=0
PolygonRank=0
PolygonRank=1
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
......@@ -74,17 +79,15 @@ SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=91
Views=" 1: 57.8709 -13.4537 277.09 62.2366"
Sheet="1"
Layer=16
[Win_2]
Type="Board Editor"
Loc="0 0 1919 1039"
State=3
Number=1
File="mkbldcdriver.brd"
View="18.3898 11.659 106.444 67.6099"
Type="Schematic Editor"
Loc="-8 -8 1911 1008"
State=1
Number=2
File="mkbldcdriver.sch"
View="-83.2107 34.1447 267.623 166.821"
WireWidths=" 0.0762 0.1016 0.127 0.15 0.2 0.2032 0.254 0.3048 0.4064 0.508 0.6096 0.8128 1.016 1.27 2.54 0.1524"
PadDiameters=" 0.254 0.3048 0.4064 0.6096 0.8128 1.016 1.27 1.4224 1.6764 1.778 1.9304 2.1844 2.54 3.81 6.4516 0"
PadDrills=" 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.65 0.7 0.75 0.8 0.85 0.9 1 0.6"
......@@ -100,14 +103,14 @@ DimensionExtWidths=" 0.127 0.254 0.1 0.13 0.26 0"
DimensionExtLengths=" 1.27 2.54 1 2 3 0"
DimensionExtOffsets=" 1.27 2.54 1 2 3 0"
SmdSizes=" 0.3048 0.1524 0.4064 0.2032 0.6096 0.3048 0.8128 0.4064 1.016 0.508 1.27 0.6604 1.4224 0.7112 1.6764 0.8128 1.778 0.9144 1.9304 0.9652 2.1844 1.0668 2.54 1.27 3.81 1.9304 5.08 2.54 6.4516 3.2512 1.27 0.635"
WireBend=1
WireBendSet=0
WireBend=0
WireBendSet=31
WireCap=1
MiterStyle=0
PadShape=0
ViaShape=1
PolygonPour=0
PolygonRank=1
PolygonRank=0
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
......@@ -122,16 +125,18 @@ SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=1
Layer=91
Views=" 1: -83.2107 34.1447 267.623 166.821"
Sheet="1"
[Win_3]
Type="Control Panel"
Loc="0 0 1919 1039"
Loc="0 0 1919 1016"
State=1
Number=0
[Desktop]
Screen="3840 1080"
Screen="1920 1080"
Window="Win_1"
Window="Win_2"
Window="Win_3"
This diff is collapsed.
This diff is collapsed.
......@@ -304,6 +304,8 @@ Pretty slick, the key is adjusting the offset.
[Here](https://gitlab.cba.mit.edu/jakeread/mkbldcdriver/raw/master/video/clcomm.m4v) is a video of the motor turning *nicely* using closed-loop commutation. Not sure why this is upside-down, but that doesn't seem important. Also - you'll hear the 10KHz pwm buzz - this is something I plan on eliminating (it's simple - I just push the PWM frequency out of the audible range) but I have left it just in the audible range so that I can be sure when the gate-drivers are on (I don't want to fry anything!).
And that's right. Those are some BFC's.
# The EMI Problem
Below, a log of me writing notes when I find this intermittent, horrible, reset condition.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment