Commit f35fb9a1 authored by Jake Read's avatar Jake Read
Browse files

hello stepper

parents
jake/
**.elf
**.hex
**.bin
**.lss
**.map
**.srec
**.o
**.d
**.DS_Store
**.b#*
**.s#*
**.l#*
**.atsuo
**/ASF/
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
[Eagle]
Version="09 06 02"
Platform="Windows"
Globals="Globals"
Desktop="Desktop"
[Globals]
AutoSaveProject=1
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/comm.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/connector.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/lights.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/microcontrollers.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/passives.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/power.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/sensor.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/supply1.lbr"
UsedLibrary="D:/Dropbox/cba/circuits/eagle/parts/SparkFun-Eagle-Libraries/SparkFun-Connectors.lbr"
[Win_1]
Type="Board Editor"
Number=2
File="2020-06_ucbus-stepper.brd"
View="3.0588 -16.5677 58.2651 48.4813"
WireWidths=" 0.127 0.15 0.2 2.54 1.016 0.2032 0.254 0.6096 0 2.032 0.508 0.4064 0.3048 1.27 0.8128 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.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 1 0.35 0.4 0.3"
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"
PolygonIsolates=" 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"
MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
DimensionWidths=" 0 0.127 0.254 0.1 0.26 0.13"
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
WireCap=1
MiterStyle=1
PadShape=0
ViaShape=1
PolygonPour=0
PolygonRank=1
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
DimensionUnit=1
DimensionPrecision=2
DimensionShowUnit=0
PinDirection=3
PinFunction=0
PinLength=2
PinVisible=3
SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=22
[Win_2]
Type="Schematic Editor"
Number=1
File="2020-06_ucbus-stepper.sch"
View="-23.9574 -66.8278 436.162 228.963"
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"
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"
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"
PolygonIsolates=" 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"
MiterRadiuss=" 0.254 0.3175 0.635 1.27 2.54 1 2 2.5 5 7.5 10 0"
DimensionWidths=" 0 0.127 0.254 0.1 0.26 0.13"
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=4
WireBendSet=31
WireCap=1
MiterStyle=1
PadShape=0
ViaShape=1
PolygonPour=0
PolygonRank=0
PolygonThermals=1
PolygonOrphans=0
TextRatio=8
DimensionUnit=1
DimensionPrecision=2
DimensionShowUnit=0
PinDirection=3
PinFunction=0
PinLength=2
PinVisible=3
SwapLevel=0
ArcDirection=0
AddLevel=2
PadsSameType=0
Layer=91
Views=" 1: -23.9574 -66.8278 436.162 228.963"
Sheet="1"
[Win_3]
Type="Control Panel"
Number=0
[Desktop]
Screen="2560 1440"
Window="Win_1"
Window="Win_2"
Window="Win_3"
## Stepper Module
Beneath [the module](https://gitlab.cba.mit.edu/jakeread/ucbus-module) lives this stepper.
- Two A4950's with D51 DAC's attached to VREF, for current scaling / microstepping / servo control / general purpose H-Bridging
- One AS5047 beneath for position sensing (optional).
- Capacitance
- TVS Diode
- 10-pin IDC Connector to the bus.
![routed](2020-06-29_routed.png)
![schematic](2020-06-29_schematic.png)
\ No newline at end of file
## UCBus Stepper Driver
Simpler networked stepper driver. Potentially two A4950s, maybe TMC2130.
### Parts Availability
For fast turnaround assembly orders, I'm going to try to stick to this library of parts:
https://jlcpcb.com/parts
- Single Sided placement
- 2/4 Layer Green Mask, 1.0, 1.2 or 1.6mm Thickness, 1oz Copper
- 2 Layer board: Min 20mm×20mm Max 480mm×320mm
- 4 Layer board: Min 20mm×20mm Max 350mm×320mm
https://dubiouscreations.com/2019/10/21/using-kicad-with-jlcpcb-assembly-service/
There are no connectors, so I'd have to thru-hole the IDC. What of the program header... USB connector as well.
## Components
| Part | PN |
| 2x5 Shrouded | ED1543-ND |
| A4950 | 620-1400-1-ND |
| Cap 150uF 35v SMD 6.6mm | 565-5148-1-ND |
| TVS Diode | SMAJ30ALFDKR-ND |
| 2010 Current Sense Resistor, 0.2Ohm 1W | CSRN2010FKR200CT-ND |
| 1206 10uF 35v Ceramic Cap | GMK316BJ106KL-T |
| 0805 0.1uF 35v Ceramic Cap | C0805C104Z5VACTU |
| 0805 120R | CRGCQ0805F120R |
| 0805 1k | RC0805JR-071KL |
| 0805 10k | RC0805FR-0710KL |
| Screw Terminal 3.5mm Pitch | 277-1860-ND |
| Side Headers (Debug) | 1849-PM20206HBNN-ND |
## 2020 06 27
OK, mostly done with this. Went to 0805 for hand solder ease. Done.
![module-routed](2020-06-27_module-routed.png)
## 2020 06 26
I designed out the module today, separating for this. Here's where it's at w/ module abstracting out the micro / RS485 / DIP switch bs:
![module](2020-06-26_module.png)
So a bit of rework but it'll be mostly the same. Figure I'll solder by-hand most of these components, but getting a home lab reflow oven or skillet would be rad in the future.
## 2020 06 25
I'm hoping to get through this today. Thing seem reasonably OK in the layout,
![begin](2020-06-25_layout-01.png)
I'm not sure if I'll need / want 4 layers on this. Do want a good monlithic ground, not sure that I can kick it given this DIP switch causing all kinds of routing desires. Of course the power routing is also going to be an issue. I do still need debug pins and lights as well.
Yeeeah dang, 4 layer is looking like a strong likelihood. To de-escalate, I could take the encoder off. Or the DIP switch. I can't really see how I might have a decent gnd plane otherwise, and based on past experience that seems important in the corner cases. OK, going for that. Sweet lord it's 5D chess and I love it. I've just one via spacing issue in the top left.
I'm most of the way there now, have all the pins worked out and routing is coming along.
![02](2020-06-25_layout-02.png)
I think I might just try to be done with it before I get to MacroFab, but that's kind of assuming success. I'll just give it a go now.
For MacroFab, you'll want to clean up parts: value / package names, and you also need *something* on the inner 3 layer. This might be wicked expensive though! Looking at 100 / unit w/ no parts?? Looks like parts cost just what they cost though. Lead time is 19 days.
Damn. I wish JLCPCB would put connectors on, this would be a different game. Maybe I need to boot the PNP again, but goddamn that's sad as well.
Seeed Studio has a turnkey service as well. They have the D21 but not D51. Goddang.
Ok, per-unit cost drops when I add units in macrofab... 1: 800, 2: 950, 10: 952, 100: 1800. This is totally reasonable. I'll finish assigning components here and go through the MacroFab process once-ish to see about that, then report back.
OK, have this laid out I think.
![03](2020-06-30_layout-03.png)
The DIP Switch right dead center is kind of funny. I'm quite confident on the RS485 pinout / mirror as well. Y-A and Z-B.
So now I need to get part numbering checked of, and scroll through footprint names etc to try to have more success at MacroFab.
Back to MacroFab, with parts in, this is closer to $60 per board. That means that if a machine has 6, it's $360 just in motor controller. However, quantity really matters here - when we get 100, they're $30. In their lowest with MacroFab at 1000 units they're $23. 24 days for 100.
This is feasable though, if only just.
I think I should try to check with SeeedStudio to do assembly as well. Might be a bit more of a PITA to walk through setup, but it might be less dollars as well, and might scale better into 1000s of units.
So, for SeeedStudio I need a *good* BOM, probably best way is to experiment and adjust. I also need to make sure that I double / triple check these things. One halting error would be DACs that don't work, I should double / triple check those... I could also do to check through the micro datasheet again and make sure I have pinouts correct, especially program etc, and the SERCOMs I'm planning on using.
Done with this today. Tomorrow I'll do the SeeedStudio pain first thing. I should also push this to a git somewhere.
## 2020 06 24
I'm into design of a new stepper, to be assembled en masse by JLCPCB.
**Stepper**
- vsense pin to spy power lines,
- careful with voltage generated with motor diodes, include bleed?
- if A4950 / hbridges, what do about PWM/RC filter -> current sense?
- debug pins for this
- not sure if I want to write all new stepper code,
- at the same time, a driver is cumbersome SPI setup, h-bridges are ground truth
- do ground plane properly this time
**Module**
- 2x5 jtag programming header, obv
- can we find an i2c display that can be auto-assembled on board for us?
**Modular Phy or Built On**
This is the big question: do I try to do this 'modular phy' thing, or give up and stick a 10-pin IDC / RS485 UART plug on here and dance away. I think my biggest meta here is this:
- need lots of other pins to properly drive a phy: besides TX and RX, I want TE, RE, DE, and might additionally want CLK, CS, MISO, and MOSI, and maybe even want *two* sercoms total for really fancy high speed spi-both-ways.
- the two phys I am imagining at this point are UCBus and CAN, and the D21 doesn't even have a CAN peripheral, so that's kind of dead in the water.
Probably the modular phy is more of a trap than it is an enabler. I can poke around once more for parts that might let me do it, but it's going to add space, complexity, etc, to a system that doesn't need it. Recall that the big goal here is to educate. Go simple.
### Design Beginnings
I guess the first order is collecting a library of parts, etc, for the JLCPCB process. Early in, I should check how that works.
Libraries are for EasyEDA only, those bastards. Might instead go with MacroFab. I guess the real move is to try this soon, but also it's just a few extra days to try it with a board that I actually want. I can give their UI a go with the module though... or I'll just try it early in, when I get the micro and connectors roughed out.
I've this kind of roughed out, the I2C display is tough but it occurs to me now that I can hang it off the side, bueno. Getting close with the power side as well, but I need to make sure I handle the RS485 driver now. This is why we are here, haha...
I think this PN might be MAX13450E, digikey MAX13450EAUD+-ND - 5v drive, 3v3 logic, looks appropriately beefy. Has TE, DE, RE pins to swap termination, and turn drivers on/off at transmit. It's 3.30 per at 1 unit, previous driver was 5.60. TSSOP14, so it is a bit bigger.
OK, have everything here on the board, save for status LEDs which can arrive later, debug pins, and the actual DIP footprint. OK, have that on now. I'll do another session later tonight to get everything in a place I'd like, and finalize the schematic.
I've done that, less DIP switch and indicator lights. I deleted the I2C display. I also want debug pins.
The rough plan for a ground star is to treat the bottom as power gnd and the top as signal gnd, and not tie them together save for at the connector gnd. This might proove a challenge, as I'm so accustomed to grabbing gnd on a via.
Damn. I need XTALS. OK, made good enough headway on this, going to bed. Here's to recalling why the moduleboard w/ four layers of this nonsense is a good idea to break it apart from the application layer circuit. And hoping the DIP switch doesn't live forever. Ay, yeah, really needed to mod this so that my power gnd plane wasn't running under the micro.
\ No newline at end of file
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