To switch to the full rotation gear design, I needed to get all my gearbox motors, some bearings, and a lot of other bits and pieces disassembled and ready for re-use.
The remaining 3 non-broken legs from Maker Faire
Taking everything apart took a surprising amount of time, nearly a full day. Each leg resulted in quite a collection of fasteners. Seeing them all in one place made me realize how complex this has become!
One leg’s worth of parts
I’ve also got the full set of parts printed for the full rotation legs:
Now I just need to get to assembling and reworking to get them all installed!
First, after doing some analysis, it appeared that the 3mm pitch 6mm wide belt was unlikely to be able to carry the full torque from the motors. So I’ve switched to a 5mm pitch 15mm wide belt, which while still unable to carry the full torque indefinitely is only a factor of 2 or 3 off instead of a factor of 20 off. Secondly, I added a bearing opposite the upper pulley so that it is supported from both sides. The recommended belt tension for this belt works out to something like 120lb, which is a fair amount of cantilevering, even over the 16mm wide pulley. The updated CAD looks like:
And the newly added bearing can be seen in this section view:
I did a first test print of all these parts and put them together. While there were a few tweaks necessary for the second revision, it looks like this leg is probably usable.
The shoulder and upper leg adapter installed, all the leg pieces splayed outLower leg all assembled with belt and upper pulley installedAll assembled!
Another of the failure modes observed during the 2019 Maker Faire was in my quickly slapped together leg design. The shoulder joint was required to squeeze two motors together against a strongly tensioned belt, using nothing but a relatively thin section of printed plastic. This caused it to deform, leading to belt tooth skipping, and then eventually to fail, leading to delamination of the shoulder joint.
My plan to resolve this is to switch to a leg design where the upper and lower leg are in series rather than opposing one another. This is more like the Mini-Cheetah design from Ben Katz. This has the benefit of getting the leg out to the side, so the upper leg is free to rotate 360 degrees, only limited by cable harnessing. As seems to be my pattern, I’ll try making something out of 3d printed PETG first, optimize it some, and if I fail there, switch to metal. Here’s a render of the current CAD:
Eric from CireRobotics helpfully pointed out that I’m way over the design limit for the 6mm Gates belt I was using, so I’ll also be trying to bump up to a beefier belt in this iteration.
As seen at Mech Warfare 2019, the existing gearbox motor shroud isn’t really up to the task of supporting the weight of a 20lb robot. While I work on a more comprehensive redesign, I’ve got a short term fix in the form of another 3D print. This is just a simple reinforcing ring, printed at 3mm thick, with the layer lines oriented so that layer separation will not be the primary failure mode. It is attached to the outer housing via a thin layer of epoxy.
The two halves of the reinforcing ring
Due to the unconventional orientation, removing support was a pain, but doable.
After a concerted push, I managed to get Super Mega Microbot “Junior” walking, for all of 15 minutes, then packed it up and went off to compete in Maker Faire. Needless to say, with that much testing, I wasn’t expecting stellar results, and I wasn’t disappointed. However, I did learn a lot. Here’s some of the things that went wrong:
Gimbal and Turret EMI
For this new revision of SMMB, I updated the gimbal board to use RS485 and support the 5S system voltage. I tested it some, but apparently not enough. While I observed no problems during Thursday or Friday’s testing at the site, during the first Saturday match, after firing the gun a few times, the gimbal went into a fault state and stopped applying power. The control scheme for SMMB relies on the turret being operational, so this not only made it impossible to aim, but also made it nearly impossible to drive.
I did manage to connect to the turret manually after the match to diagnose the problem, and discovered that the IMU had stopped communicating over I2C. I had some half-baked logic to try and recover from that, but it was broken, and the only effective way to recover was to power cycle the whole unit.
Unfortunately, my matches on Saturday were all close together, so I didn’t have enough time to prepare a fix in between. Thus, each match I got one or two shots off, and then the machine as a whole became effectively inoperable.
Likely, something in the new board, either in the layout or the decoupling capacitors, results in worse electrical noise than the old one when the AEG is fired. This shouldn’t be too hard to resolve, either through tweaking the layout, or perhaps moving the AEG control to an entirely separate board.
Walking and Leg Robustness
When I got the gearbox system walking for the first time, I quickly noticed that one or more of the timing belts connecting the lower legs to their motor had a propensity to skip a tooth. Since there is no position sensing directly on the lower leg, when that occurs the gait logic just has the incorrect position, causing the robot to fall over pretty soon afterwards. I had never observed any tooth skipping in my previous direct drive leg, even when jumping for over an hour. The first difference I thought which might be causing the problem was the lower pulley print, which I had initially done at 0.15mm but in the gearbox revision it was at 0.2mm. So I printed a full set at 0.15mm, and swapped them in. However, that didn’t fix it and I didn’t have any more time for mechanical solutions, so I tried to work around it by tuning the gait to be as gentle as possible.
Unfortunately, I wasn’t really able to come up with a gait that both could effectively move on the foam mat in the arena, and not occasionally result in belt skips. Also, as I went along, the skips got worse and worse. I tried upping the tension on the belt, lowering the tension on the belt, walking with a straighter leg and more bent leg, nothing much made a difference.
Finally, before my third match, I did more examining and realized that the shoulder joint was deforming significantly under the tension of the belt, resulting in the timing belt only contacting maybe half the pulley or less, and the rest dangling off. Also, the pulley was out of alignment, so the belt was probably only effectively making contact in an even smaller patch. Unfortunately, there was very little I could do about that aside from hope for the best. As it turns out, that problem, while limiting the gaits I could use significantly, didn’t result in ending my run.
Shoulder failure
Gearbox Outer Housing Strength
The entire gearbox effort was undertaken somewhat at the last minute, and with little thought to analysis or design for structural integrity. At best, I made a gut check of “that’ll probably work”, and at worst, I gave it no thought at all.
It was an instance of the latter that caused the final and fatal failure in SMMBJ at Maker Faire. In the gearbox chassis design, the lateral servos themselves support the entire weight of the robot. Those gearbox servos transmit the entire load from the front plate of the servo, through the outer housing, then to the back plate, and finally to the chassis itself. The problem in this case is that the outer housing is a 1.5mm thick (or rather thin) PETG shroud printed with layer lines perpendicular to the primary load.
On reflection then it was not too surprising that a 20lb robot walking around was enough to cause a motor’s shroud to separate at the layer lines, which is what ended SMMBJs run. I had a spare motor and could have replaced it, however, it would likely have failed shortly afterwards too, and the shoulder was about to rip itself apart due to the leg tension problems mentioned above. Thus I turned it into a “static display” and switched to a “show and tell” mode for the rest of the event.
Crippled SMMBJ
Award
Despite those problems, the kind organizers at RTeam awarded me the “Most Innovative” award for trying to push the limits!
Fixing the problems
Clearly, all of these issues can be fixed in a variety of ways, both easy and hard. Keep coming to see my attempts!
Well, Mech Warfare at Maker Faire 2019 has come and gone. Maker Faire was a really awe inspiring event, and RTeam did an excellent job organizing the Mech Warfare competition. There were something like 13 teams with moderately functioning mechs who competed across the 3 days.
Super Mega Microbot “Junior”
My entry, Super Mega Microbot Junior, did manage to walk a bit in 3 matches, but had a previously unseen failure in the turret system that rendered it inoperable a short while into each match. At the end of the 3rd match, one of the leg joints sheared off, and some other of the 3D printed parts were about to fail as well, so I declared it unrepairable at that point.
In the arena pre-failure
I’ll write up a more detailed lessons learned and link to the videos of my matches when they get posted. The videos aren’t all that interesting, given that I only scored perhaps 2 hits across all 3 matches. 😉
Alert! I’m at Maker Faire Bay Area all weekend in the Mech Warfare area in Zone 2 (May 17-19, 2019 for you time travelers from the future). Drop by and say hi!
If you were left in suspense last time, yes, the robot can walk! Getting it to do so in a minimal way was relatively painless. What I found, which hadn’t happened in earlier iterations, is that many types of dynamic motions would cause the lower leg belts to jump a tooth. Needless to say, this was nearly universally fatal, as there is no direct position sensing of the lower leg. This robot is heavy enough that my simulacrum 3d-printed timing belt pulleys just don’t cut it.
Well, there wasn’t enough time to actually get better pulleys now, so I just tuned the walking to be slow and gentle enough that nothing went awry. Here’s the first bit of a 13 minute video I took of it walking around and shooting targets.
Now, that that was over with, I had a few minor things to finish up before heading out to Maker Faire. I made some covers for the motors to keep BBs out.
And I made a bracket so that I could attach the front and rear target panels to shoulder joints:
And here’s a glamour shot of the whole thing in fighting form!
Now that it was all ready, time to take it all back apart and pack it for shipping.
As mentioned last time, I needed to build a lot of gearboxes and new leg assemblies in a very short amount of time. So, I got to work.
Machining operations
I made a new fixture for holding stators to be extracted:
Stock in the viseCountersinks milledStator mounted and fractionally machined
I turned down 8 more internal gears. To begin with, my mandrel had warped enough from the first gears that I had to add some heat set inserts to hold a cap to keep the gears on. Then on the last 2 gears, I got greedy, went too fast, and my lathe mandrel melted entirely.
This won’t hold a gear very well 😦
So, I had to spend 12 hours printing another one to finish up the last two internal gears, although their roundness was debatable after their encounter with the mangled mandrel.
I also at this point machined out a bunch more rotors, but didn’t manage to capture any photos.
Gearbox assembly
Now for some assembly:
A friendly bunch of front housingsOutput bearing installed, internal gears all readyInternal gears all in placePlanet outputs and output bearingsThe first seven with outer housings installed
At this point I was 3d printer limited, and when I got to starting assembly, I only had 7 sets printed. Thanks to some very generous help from Beat and Roxi (thank you triply in advance!) I had a second Prusa MK3 that was also working 24/7 on the problem.
A bunch of sun gear holders and rotorsPlanets installedPlanet inputs installedStators installed
Notice how now I’m up to 8!
Rotors installed
When I went to put on the backplates, I discovered that due to tolerance stackup, some of the units were having trouble fitting. To move on quickly, I post-machined all the backplates to move the rotor bearing back a bit with a dremel, and then made a little bit of clearance for the sun gear holder screws.
And then, TADA!
The legs
Now, in parallel to all that, I also designed a new leg which would mount to the gearbox output. I wouldn’t have time to get a shoulder bracket made out of metal like I had before either, so I needed to design that for 3d printing too.
F360 rendering of leg
I made a few improvements this iteration. The biggest was that I added a tensioning mechanism inside the upper leg, so that tension could be increased after installing the lower leg. The old leg was nearly impossible to assemble without breaking it, and was just as difficult to disassemble. Also, I managed to have an actual order of assembly that was feasible and that an appropriate tool could fit in at all places at each stage of the process.
What I didn’t try to do was to try a more mini-Cheetah like geometry, or really optimize for mass or looks or anything. I was trying to get something which would likely work for the length of a Mech Warfare match in as few drafts as possible.
Of course, the first iteration wasn’t necessarily functional. It came off the press at something like 3am Friday morning. I spent the next 4 hours machining, debugging and squeezing until I found about a dozen problems or things that needed to be fixed. Then, straight back to the printer for a second try, and voila, two was all I needed this go around!
Here is the final part-set with all metal bits installed:
I drew and printed up the shoulder in a separate effort, but managed to capture no pictures of it whatsoever until I went to put it all together.
Leg assembly
Now, here is a shoulder attached, with the upper leg motor and upper leg installed.
And from the other side:
And, the entire first leg:
Done?
After carefully managing my 3d printing queue 24/7 to get all the legs, shoulders, and gearboxes printed, here’s a picture of all the legs on at the same time!
Now that I could stand up and sit down, I needed to be able to walk reliably for the length of a match. This wasn’t going to be easy because the direct drive motors were always a bit marginal in their power output to support the full robot, so I had my work cut out for me.
The short story is, I tried many things, spent about a day examining high speed video of walking, and made some improvements:
Inverse Kinematics: I discovered that my inverse kinematics were broken when the coaxial lower leg had a non-unity belt drive ratio, which I switched to partway through my mammal leg experiments.
Less bounce: I updated the leg to stay in the world frame until it was fully lifted and to enter the world frame before lowering. This would ensure it had zero lateral velocity relative to the ground when starting and stopping the swing phase.
More less bounce: I added a separate slew time for the lowering part of the phase, this allowed it to lower more slowly for a more gentle landing.
Event more less bounce: I used the moteus servo’s advanced features to lower the P controller term while the leg was lowering, so that it would hit more softly.
Despite all these improvements, the walking was still barely functional. Also, the robot was just too tippy. The servos didn’t have enough control authority for the mass of the machine, and it was likely going to tip over if another mech did so much as graze it. Also servos that were hot for long periods of time kept having their encoder calibration drift. This seemed to occur in a positive feedback cycle… if a motor was a little bit out of calibration, it might be a bit saggy, and thus would need more torque, which would make it hotter, which would make it more out of calibration.
Here’s a quick slow motion video of about the best walking gait I had achieved:
At this point, I was certainly somewhat dispirited. It was pretty clear that this machine could not reliably walk around the arena for the length of a match. But, there was still some time left and I figured I would not give up just quite yet.
In the spirit of failing upward, I decided to try and make a sprint towards a fully gearbox driven machine. Granted, I didn’t really have enough time to pull this off. The first 4 gearboxes I built each required about a day of 3d printing time and took me about 1.5 days of machining and assembly. When I made this call, there were about 8 days before my plane flight to Maker Faire. I would need to make at least 8 more gearboxes, as well as entirely new legs and shoulders, along with spares and then make it all work in an incredibly short period of time.
Before SMMB could function in the Mech Warfare event it needed to be able to start and stop unattended. That meant standing up and sitting down on its own. Being that hack that this was, I went for a two pronged approach.
The direct direct servos I have for the upper and lower legs are somewhat underpowered for this size of robot. Especially so when the machine is fully squatting down. Also, the servos aren’t really encapsulated at all, and there are plenty of leg configurations that can self-intersect resulting in robot harm.
To avoid all of that, I 1) installed a second pair of permanently affixed “resting legs”, that mean the robot never has to squat down all the way. These are just some PVC pipe with squash balls glued on to the bottom. I printed bottom plates for the chassis with small cutouts to hold the top of the PVC pipe.
Next, I added a short startup and shutdown sequence. The startup sequence first moves the motors from wherever they happen to be to some fixed distance above their intended idle position, purely on a servo-by-servo basis. I don’t yet have position feedback making it into the C++ application, but the servos themselves can interpolate form their current position, so this was a fair way to get the whole thing into a known state. The only trick was that I had to linearly ramp up the power applied to the lower leg so that it didn’t get stuck dragging along the ground. A future solution that used position feedback, and thus IK, wouldn’t have that problem. The next part of the startup sequence just smoothly lowers the legs until the full robot weight is resting on them. At this point, the robot is freestanding.
The shutdown sequence only does half of the inverse. It smoothly raises the legs until there is no weight on the robot, then cuts power.
Once I get a robot made fully with gearbox servos instead of direct drives, and positioning sensing working at full rate back into C++, I should be able to undo some of these hacks and get it starting from arbitrary configurations without the help of the resting feet. However, this is good enough for now.