Tag Archives: smmb

Assembling all the legs

Last time we had a dozen motors, controllers, and brackets assembled.  In this installment we’ll build up the mammal legs.

First is mounting the upper leg and upper pulley on each motor and assembling the lower leg:

Partially assembled legs
Upper leg, pulley, and lower leg assembled
Lower leg close-up
Lower leg close-up
Upper leg close-up
Upper leg close-up
Upper pulley close-up
Upper pulley close-up

Then we stick the upper leg, pulley, and lateral motor together, leaving the lower leg loose:

Four mostly assembled legs
Four mostly assembled legs

Next I created wiring harnesses to connect all the pieces together:

Leg wiring harnesses

And finally, put them all together!

Next time, we’ll mount everything up on the chassis.

Assembling individual actuators

Now that I have all the parts in hand, and all the controllers populated, it is time to start the big build!

First up was installing magnets on all the motors:

Motors with magnets attached

Next up is mounting the motors into the brackets:

Motors mounted in brackets
Motors mounted in brackets

Then I soldered the phase wires onto each of the motors, including shortening the BE8108 wires:

Controllers soldered to motors
Half the controllers soldered to motors

After that was thermal pasting and bolting the controllers to the brackets.  The BE8108’s I got for this run were slightly different, and required more spacing of the sensing magnet.  Thus I ended up using two heatsink plates back to back.  At this point I powered, flashed, and calibrated each of the motors.


Next up, the remainder of the leg hardware!


All parts received!

I’ve now managed to get all the custom and long lead time parts in house for the first version of a quadruped based on the new actuators I’ve been designing.

All The Parts!
All The Parts!

That includes all the motors, custom brackets, and at least moderately working versions of all the custom PCBs.  Now I just have to get the local rework done, get the software into a semi-reasonable state, and put it all together!

Quadruped chassis

Now that I have a semi-reliable actuator, I need to connect 4 of them together into a single quadruped robot.  Additionally, it needs to be able to mount a battery, the turret, and all the other miscellaneous pieces of a walking robot.

My draft design looks like this in CAD:


The four corners each are set to mount one leg to.  The central cavity will eventually house a battery compartment.  On the top is a mounting location for the turret, and the front has mounting studs for a power distribution PCB.  Each of the screw holes is designed to take a thermoplastic insert heat fit into place.

This, printed on the Prusa MK3s looks like:

Quadruped Chassis
Quadruped Chassis printed on Prusa MK3s

This is in Prusament PETG Jet Black at 0.15m layer height, 3 width perimeters, and custom supports.  With one leg, a battery resting in its cavity, and the junction board mounted, it looks like:

Quadruped Chassis Test Fit
Quadruped Chassis Test Fit

Next, I need to get an actual battery tray installed and build enough legs to attach all four of them.

Quadruped Junction Board

The full quadruped robot needs to both distribute power from the primary battery and RS485 serial network to all 12 servos.  To make the wiring of that easier, I’ve made up a junction board to provide power connectors, distribute the data network, and act as the IMU for when that is necessary.


The RS485 network is bridged between two halves of the robot.  One connection comes in from the controlling PC and two separate links go out, one for the left side and one for the right side.  This could eventually allow the controller on the junction board to take intelligent actions itself, such as querying the force applied on all 12 servos.  It could then return the result in a single RS485 transaction to the host computer.  I am expecting that will be necessary to achieve closed loop control approaching 1kHz.

It also includes a Bosch MEMS IMU.  The junction board will be rigidly mounted to the quadruped chassis, which means it is an ideal location for an attitude reference.  I haven’t integrated the IMU software from the gimbal yet, but have verified that the IMU is operational.

Finally, it has a 3.3V regulator on board to power all the logic level chips from the primary 18V supply.  I managed to toast two of these by not having sufficient input capacitance, and hot-plugging a lab supply to the power lead.  The inductive transient caused the regulators to over-voltage, resulting in a short from power to ground.  This is apparently a relatively common design mistake with this part according to TI’s E2E.  I attempted to rework replacement parts on the board, but due to a cascade of failures from USPS to my soldering, I gave up and just spun another revision.

In the meantime, I took one board and manually powered its 3.3v supply to bring up the firmware, and I’ve converted the other to a “dumb” mode, where it has no 3.3v supply and all the RS485 ports are just hard-wired together.  (Note the very tidy blue-wiring and hot glue.)

"Dumb" IMU Junction Board
“Dumb” IMU Junction Board

That should be enough to make progress with getting the full mech working, even if the control frequency is limited.

Prusa MK3s printed legs

All my testing to date on the improved actuators for SMMB have used 3d printed parts from Shapeways.  Both to have a faster iteration time, and to reduce costs, I’ve optimized all the parts to be printed on my Prusa MK3s.

Here’s all of the individual parts:

Leg parts laid out in Slic3r Prusa Edition
Leg parts laid out in Slic3r Prusa Edition

Them assembled into a leg with the other necessary hardware:

Prusa MK3s Printed Leg
Prusa MK3s Printed Leg

And some jumping on that leg (caveat, this video is from the previous endurance testing post):

A full set of leg parts can be printed in PETG in about 12 hours and uses a little less than 90 grams of plastic.


My simplest ever PCB

While wiring up the first 3 degree of freedom mammal actuator, I knew I was going to have a need to distribute power to each of the three motor controllers.  Thus, enter my simplest ever PCB.  It is just 4 holes for each of power and ground with traces connecting them.

moteus busbar PCB
moteus busbar PCB

It took an annoying amount of time to actually solder in all the necessary wires, but it was still better than the alternative of a bunch of ring terminals bolted together.

busbar installed in actuator
busbar installed in actuator

moteus brushless servo open source release

moteus is an open source brushless servo actuator designed for use in highly dynamic robots.  It consists of PCB designs, software, and mechanical designs necessary to construct powerful brushless servos, and link them together into legged robots.  Today I’ve published the full source and designs for all of this work on github under an Apache 2.0 License – https://github.com/mjbots/moteus

moteus r3 controller installed on leg
moteus r3 controller installed on leg

These are the software and designs I have been developing in order to replace the actuators on Super Mega Microbot (which will probably get a new name shortly as well).  It isn’t done, but at least the controller is working well enough now that I have a pre-production verification run of ~30 controllers in flight.  Even still, I expect that further evolution, both on the controller board and in the mechanical systems is inevitable.

The software is largely C++ and python, compiled with bazel and designed to run on an STM32F4.  The PCBs are all designed with Eagle, and the mechanical systems are all designed with FreeCAD.

I definitely want to acknowledge Ben Katz, who was a big inspiration for this effort.  While this isn’t a direct derivative of any of his work, I really appreciate the open source releases he did make.

CAVEATS: As with any actual hardware project, especially one that can apply large amounts of power to small brushless motors, actually using these designs risks burning down your house, injuring your body, and all sorts of other bad things.  If you choose to try these out, you are on your own!

Controller r3 and endurance testing

After my self-education on MLCC derating I spun yet another low-volume prototype run of the servo controller.  This one has more than double the effective capacitance by doubling the number of capacitors and by selecting capacitors that have less derating.  I also fixed an incorrect pad geometry for the 6 pin ZH connector, optimized the BOM count a bit and reselected parts that were no longer available.

controller r3
2x fully assembled controller r3

Endurance Testing

To validate that this controller revision was robust enough to get a full mech’s worth of them made, I wrote up a simple test tool which ran the leg through a continuous jump cycle.  The goal was to validate the thermal design of the controller and motor, and while I’m at it, test the robustness of the 3d printed mechanical leg parts.

I knew endurance testing would be a process.  That said, this was a pretty interesting one.

First up: The RS485 cable joined into a screw terminal in part of the cable that moved up and down during a jump.  This had been coming loose on and off for me previously, and now was a limiting factor.  The fix was simple, move the terminal block further down the cable harness so that it didn’t move during a jump.

RS485 USB adapter
Inline RS485 USB adapter

Next, an even simpler problem.  The leg wore through some gaffer tape I had on my sheet of jumping foam and it became stuck to the adhesive.  I just moved the leg so that it didn’t jump on tape.

Now, an exercise in thermal management.  I gradually decreased the current used during the jump and landing phase until the steady state temperature of the controllers didn’t exceed my somewhat arbitrary 60C.  At that point, the 3d printed parts were starting to outgas a bit, so I figured that was a decent upper limit.

With those changes, I was able to get it pogo-sticking pretty reliably for 6 or 7 minutes at a time.  Here’s a video of the end of one of those runs, at which point you can see the next problem.

A more vexing problem

As seen above, after jumping for approximately 6 or 7 minutes, eventually the yaw axis would fail in a way that resulted in the electrical phase detection becoming offset.  The offset appeared to grow over time.  Eventually, this resulted in a loss of control in the lateral axis servo, when the D and Q currents became swapped.

This problem was most mysterious.  The lateral motor is basically doing nothing in these tests, the overall torque applied is maybe 1/50th of that which the upper and lower leg motors are generating.  My first thought was that perhaps the magnet which was attached to the shaft was faulty or had become demagnetized.  So I swapped it out, and while I was at it, added a spacer so that the magnet was closer to the magnetic encoder.

BLDC motor with magnet on axle
New magnet installed on axle

No dice.  Same failure, although this time I got 15 minutes of jumping in before it failed.

Another thought was that the rotor was somehow slipping on the axle.  However, the set screw was definitely still firmly in place, and this seemed pretty unlikely anyhow, since there was almost no torque on it.  The upper and lower leg motor with 100x the torque were not slipping.

Finally, I concluded that the bracket itself was deforming, resulting in the magnet changing alignment with the magnetic sensor.  In this configuration, the entire leg is cantilevered out.  Additionally, the linear rail fixture results in a large amount of torque being applied to the yaw bracket.


I already had beefier brackets coming in for other reasons.  I swapped them in, along with some new leg hardware to be described later.  Now with some forced air cooling I was able to even jump a reasonable height without stopping.  Here’s an endurance run showing the most aggressive jumping it could do indefinitely.

And here’s another video showing the max height I could get on this jumping fixture, which it could do for about 2 minutes before exceeding my safe temperature limit.

And for fun, a snapshot of my desk while recording one of the endurance videos.  It is quite tedious to let the leg jump for hours at a time while hoping nothing goes wrong!