I've been saying I'll post my design files and such online for a while now, so here it is. Use anything at your own risk.
I've been using mbed to store and compile my code. Here's the version of the code that's running the jumping leg. I'm not a software person, so please don't judge me too hard on my code. I went into this project thinking it would be a good idea to make all the code modular, but I think I went a little too far with that. At some point I'll condense it all down into something a bit more manageable, and just keep things like position sensor code modular. The current loops should have enough stability margin to work for a fairly wide range of small motors without any tweaking of constants.
Here are the python scripts that send serial commands to the motor controllers.
Here are the eagle files, gerbers, and BOM for the motor controllers and sensor boards. When I sent the boards to 3PCB, the text the motor controllers got all scrambled so keep that in mind. At this point I've built up three of each board, and they all work. I haven't even blown up a single FET yet, in all of my motor control derping so far.
Here are my CAD files for the motor, gearbox, motor module, and leg. Requires Solidworks 2015-2016 to open. Many of the gearbox files have HSMWorks CAM in them, so you'll need the full version of HSMWorks to view the CAM. There's also a list of the gears I got from KHK and the post-machining I did on them.
What's Next
I'm taking a break from this for the summer, but don't worry, it's not getting abandoned.
Things I might do eventually:
Scramble the physical layout of everything to make it more robust. No more sensors dangling off 3D-printed mounts, and I don't want to have to modify the motors in any way for the gearbox. Probably move to a single-board design with both motor controller and position sensor on it. Maybe get quotes for how much it would cost to get a bunch of the gearboxes made in China? We'll see.
More motor stuff! I'm in the process of building a motor dynamometer, so I'll be able to quantify dynamic motor performance. This is something the MITERS circle of motor enthusiasts hasn't ever done. Woo, science!
Thoughts on selling motor modules: I've been asked a surprising number of times if I plan on selling these motor/gearbox/controller modules. I definitely do not plan on it any time in the near future. Maybe I'll give it more thought later, but right now I'm not interested. Also, there's a lot more engineering that needs to be done to make this product-grade.
Oh, hey, I wrote a thing. It's basically this blog half-assedly copy-pasta'd into Latex, and re-written in a slightly more formal tone. There's fairly little that's not also somewhere in this series of blog posts, but hey, it exists.
Until next time,
How did you measure your q axis current on the scope when you were looking at the step response?
ReplyDeleteWrite the computed q current to the D/A converter, scope the output.
DeleteThanks - that makes sense. Having a analog outputs seems very useful.
DeleteNice work!