Tag Archives: moteus

moteus servo mk2: Front housing

The front housing is the most complex machined piece in the moteus servo mk2, as it was in the mk1.  It is relatively large and mates with many other components with the associated tight tolerance surfaces.  For mk2, the front housing is even larger in diameter, but otherwise has the same basic features.

front_housing_exploded.png

Manufacturing

Building a prototype of this was a real challenge given the tools I have available to me now.  For mk1, I didn’t even try and just had Xometry build my prototypes, and was lucky enough that the first ones worked.  My only CNC currently is the Pocket NC v2-50, which is just barely big enough to deal with this part, and has no convenient workholding that can be used for the stock.  Also, it has a low material removal rate, such that starting from stock here would be prohibitively time consuming.

Manual preparation

My approach was similar to that of the outer housing, in that I prepared the materials on the Artisan’s Asylum manual machines, then did the remainder of the machining on the Pocket NC.

I started with 4″ diameter round stock cut to 1″ +0/0.125:

dsc_1790

Then, on the mill, I faced the parts to the correct 22mm height:

dsc_1744

Then I drilled a 5/8″ hole close to the center:

dsc_1745

At this point, I switched to the lathe and performed some roughing operations, removing some of the OD and ID to reduce the amount of cutting the Pocket NC needed to do.  These were done with some 3D printed spacers to help align the stock in the lathe’s 4 jaw chuck.

dsc_1767

dsc_1772

dsc_1780

CNC work

Now that the part was roughed out, I first mounted it to the Pocket NC using a machined aluminum plug bolted to a custom 3d printed plate.

dsc_1779

dsc_1785

My first attempt used a 3D printed plug, which just delaminated and failed, thus I re-drilled some more holes for this first prototype offset from the original 8.  This operation threaded the holes on the front side, which are used to secure the piece for the second operation.

In the second operation, a second custom 3d printed fixture is bolted to the newly drilled front holes, and then bolted to a plate that is mounted on the B axis.  This enables the Pocket NC to reach the full back side and around the perimeter.  The bracket needed to be slightly offset from the center of the B-plate, otherwise the mill couldn’t reach all the way around.

dsc_1788

Datron 4mm endmill

This was the first part for which I used a Datron 4mm endmill on the V2-50.  It is definitely a good tool, although it has its shortcomings.  The biggest win is that it can remove material at more than double the rate of anything else I’ve got.  Granted, this isn’t exactly fast, but it is fast for a Pocket NC and makes parts like this front housing even remotely feasible.  It also produces a nicer surface finish, and has less deflection so straight walls are straighter.  For simple geometries I used 47k rpm, 0.25mm optimal load and 4mm stepdown and then slowed those down when dealing with the more complex shapes.

There are some downsides though.  One, it uses a 4mm collet, which negates much of the value in having the convenient tool changing handle.  It takes a longish time to switch collets so I have to arrange toolpaths to do all the 4mm collet things together.  Second, it produces more chips than just about any other tool I’ve used on the Pocket NC.  So much so, that I had to schedule breaks every 45-60 minutes in the program just to clear out chips.  Otherwise the chip tray became too full to use effectively.  For some geometries, such as when clearing pockets, the chips are thrown onto the X ways and require even more frequent clearing, otherwise the mill can’t move to the full X extent as it squishes the chips against the front side of the enclosure.

Machining video

Here’s a video of the third one I made, which used finalized fixtures for all operations.

Fit test

And here’s one of the front housings with all the various things mated in place.

dsc_1835

dsc_1834-1

moteus servo mk2: Outer housing

The outer housing for the moteus servo mk2 is just a precision round tube with some mounting holes drilled peripherally.  Still, manufacturing it was slightly annoying, mostly because of my available machining resources.

outer_housing_cad.png

Manufacturing

I started off with round tube stock with some extra margin on the inside and outside:

dsc_1789

Then I went and used the manual lathe at Artisan’s Asylum to get the correct ID, OD and length:

dsc_1741dsc_1742

At this point, I loaded it into the Pocket NC with Sherline 4 jaw chuck, using a 3d printed bracket to align the assembly with the base of the chuck.

dsc_1761

Now, I could use the B axis as an indexer, and drill and countersink all the holes.

moteus servo mk2: Planet Input

As the first part of the new moteus servo mk2, and continuing in my series of learning about CNC by building parts for the quadruped, next up I machined the input to the planet gears on my Pocket NC V2-50.  This was a part, that for my quad A0 build, I used a 3d printed part in PETG as it is probably the least stringent part in the gearbox in terms of tolerances and load, although I still expect the plastic ones will likely wear and fail after some time with heavy use.

Part description

In the gearbox, this planet input interfaces to a number of different sub-assemblies:

planet_input_exploded

The planet output inserts into its studs, the planet shafts insert into recessed holes in the face, and the planet input bearing fits into its center.  Bolts fit through the back to pull the planet output towards the input.  There is also an indexing cutaway on the outside for an eventual absolute position system.

Setup

I made these from round stock, 1.75in in diameter cut to 1″.  The machining was done in two setups, each using the Sherline 4 jaw chuck mounted to the B axis of the Pocket NC.

dsc_1765
Stock

In the first setup, the back side was roughed out, the center hole was cut out, and each of the holes for the bolts was bored along with a countersunk region.

The second setup, flipped over, first roughed, then proceeded to finish each of the necessary surfaces.  There were two more interesting bits here.  First, I made an alignment fixture so that I could get the holes from the back and front half to align.  That consisted of a cylindrical shell that fit into the mounting pattern on the B table of the pocket NC and a thin plate that fit under the part.  The thin plate just stays in place during the machining operation, where the shell pulls out.

dsc_1722

The other interesting part was that I ended up clearing away a bit of the inside of each stud so that my bit could reach down to finish the bearing mounting surface.  That way I could get away with just using an 11mm flute, which already gave a terrible enough surface finish that going longer would have only made worse.

More pullout

As I’ve observed in the past, I had yet another problem with tool pullout during this part.  Here, the problem was very similar to my past incident, when Fusion left a thin wall, then tried to punch through it.  My fix from then was doing the right thing, however the wall was just too thick I believe, causing the toolholder to lose grip.  In this clip, you can see that after it breaks through the wall, the mill cuts through some stock as it repositions over.  The slip was only about 0.3mm, but that’s enough to mess things up.

However, this time I think I figured out an even better solution.  Simply lie to Fusion 360 about the diameter of the cutting tool and say it is slightly undersized.  That results in fusion leaving the adaptive passes closer together, and thus no thin walls or foils are left behind.  It would be nice if that were just an option in the adaptive settings.  I suppose you could override it in the “Compare and Edit” window, but creating a faux “tool” just for roughing makes it easier for me to see that I’ve applied the override correctly.

Result

Here’s a video showing the different tool paths for the finished part:

dsc_1762
4x “good enough” planet inputs

Future work

The stock cut of 1″ is oversized in this part and adds a bit more than an hour to the cycle time over a minimum sized piece of stock.  I need to get a setup for cutting stock smaller than an inch here soon.

Also, I’ve discovered that ekramer3 has been testing the 4mm single flute Datron endmill, which should be able to nearly double the MRR for the roughing passes.  I’ll give that a try on the next part I make.

moteus servo mk2

As described in my roadmap, making a new revision of the moteus servo is up there on my list of things to do.  The initial servos were a work of art, yes, but also pretty fragile, very labor intensive, and still not all that robust.  My goals this time around are:

  • Manufacturability: The servo mk1 took about 2 or 3 man-days of manufacturing time per servo once all the steps were factored in.  I’d like to get that down to an hour or two at most per servo.
  • Robustness: The planet input, outer housing, back housing, and controller cover of the mk1 servo were 3d printed, mostly to save cost and time.  This necessitated adding reinforcing rings on the outer housing, as it is nearly impossible to 3d print something with the required material properties in a single print.  At this point, all of these components should just be made of aluminum like the others.
  • Repairability: Once the mk1 was assembled, there was no way to disassemble it, as installing the stator interfered with the ability to remove the outer housing, and the outer housing in place interfered with the ability to remove the stator.
  • Convenience: The mk1 servo used the r3.1 moteus controller, which had RS485 connectors sticking straight out the back, and bare power wires coming out the back.  That orientation for connecting things was not terribly convenient in the full rotation leg design, and required making extension cables.  The newer moteus controller has the connectors sticking out the bottom, so the servo needs to accommodate that.

CAD explosion

moteus_mk2_side_view
CAD rendering

Changes in moteus servo mk2

The current design for the moteus servo mk2, as the exploded video above shows, has a number of changes.

First, the outer housing has been changed to be purely cylindrical.  This allows it to be machined out of round tube stock, and also assembled and removed in any order.  Thus the front housing now has a slightly larger outer diameter, and has threaded holes around the perimeter and 8 primary mounting holes instead of 6.

The rotor is custom machined, so that the sun gear holder assembly is no longer required.  A not shown in the explosing mini 3d printed adapter will hold the magnet and fit inside the rotor bearing on the back.

The planet input now has a small indexing slot to eventually register a magnet holding assembly that can be used to sense the position of the output stage, and a position sense board is installed in the front housing to sense it.

All of the gears are now custom manufactured (at shop.mjbots.com – Internal Gear, Planet Gear, Sun Gear).  This reduces the cost considerably, improves tolerances, and requires no post-machining.

The back housing has been updated to mount a newer moteus controller, provide heatsinking to it, and also be slightly slimmer due to being manufactured from aluminum.

The overall dimensions are approximately the same as the mk1, with the depth increasing by a few millimeters (largely because of the connectors on the new moteus controller), and the outer diameter decreasing by a few millimeters.  I believe I should be able to get the weight to be about the same as the mk1, around 430-450 grams.

Next steps

First, I’ll make a functional prototype to verify that all the parts fit together and work.  Then I’ll work to get the weight back down to closer to the mk1, after which I’ll start producing enough of these to make more robots.

Ramping up for moteus servo mk2

Some time ago I put in orders for all the long lead time items on a second version of the moteus servo.  This is primarily aimed at improving the manufacturability and reliability, along with some minor performance improvements.  I’ve now got at least samples of all the long lead time parts in house!

dsc_1546
Loads of bearings
dsc_1635.jpg
A lot of custom gears
dsc_1752
A sample batch of custom rotors and stators

Coming up soon I’ll post a more detailed design update on the servo.

 

Flux braking with the moteus controller

When I was trying my first pronking, I kept having over-voltage issues when the servos were trying to dump power back onto the DC bus, no matter how high I set the voltage limit.  During that test, I was running with a nearly full battery, so my working theory is that the battery protection circuit was disconnecting the battery either because of too high a charging current, or too high a system voltage.  When the battery was disconnected, and the servos were still putting power onto the bus, that resulted in the voltage spiking arbitrarily high, followed by a total loss of power when they all faulted and then nothing was powering the bus at all.

Clearly I needed somewhere to dump the power during those transient events.  One option would be to build a brake chopper, sticking a power resistor somewhere and using that to burn off the extra.  But, why bother with that when I already have 12 big power resistors attached to the robot!  Errr… motors that is.

Anyways, my solution for now is to create a “virtual resistor” in the moteus firmware  i.e. “flux braking” that just dumps current into the D-axis of each motor proportional to the magnitude of the DC bus voltage above some configurable threshold.  That results in each servo working independently to keep the overall system voltage from getting too high in a hopefully stable manner.

20191028-current_vs_voltage.png

I ran the programmable power supply through a voltage sweep while commanding zero velocity on all 12 joints to verify this was working as expected.  It did get pretty audibly noisy at the higher voltages, probably because of some feedback with the voltage sensing so I added a little filtering after which the noise was manageable.

shop.mjbots.com

In my quest to create a more dynamic quadruped, I’ve started accumulating a lot of parts from bulk buys that could be reasonably useful to other hobbyists and experimenters.  To maybe make life easier for everyone, I’ve started up what may be the worlds ugliest online shop where you can buy some of these components.  For now, I have some bearings and custom gears that are useful when building servos for dynamic robots.

Check it out! https://shop.mjbots.com

Unfortunately US shipping only for now, email me or DM on discord to arrange something internationally.

Some samples of what I have online now:

M0.5 100 Tooth Steel Ring Gear

m05_100tooth_internal_right

55mm +0/-0.02 mm outer diameter and 5mm width, only $17 each.

M0.5 20 Tooth Sun Gear

m05_20tooth_sun_front

5mm tooth width, 4mm ID bore, 8mm OD hub, only $6

6708-2RS ABEC-1 Bearing 40x50x6mm

6708-2RS-bearing-right

50mm OD, 40mm ID, 6mm width, only $8

 

 

quad A0 – Controlled jump

Now that I have a full rate inverse kinematics and dynamics solution, I can begin to do more interesting things.  A while ago I did the first jump on the quad A0 — in that video I used a limited technique just to verify that the platform was indeed capable of jumping.  The joints were commanded in an open loop fashion, and really only at the transition points of the jump sequence, relying on the control loops in the servo to actually achieve each stage of the jump cycle.  That resulted in the jump only being minimally controlled… tracking errors would result in the robot taking off from a not-level position and the timing was not super reliable to boot.

Now I’ve taken that demonstration to the next level by controlling the full position, velocity, and force profile of each of the 4 legs at 150Hz during the jump maneuver.  In the launch phase, all four legs follow a constant acceleration trajectory while maintaining a level body.  During the flight phase, the force is cut to the legs and the velocity of each leg is monitored.  A few milliseconds after the legs have been detected as moving, the velocity is sampled and a controlled constant acceleration profile is selected which results in zero velocity when the robot reaches its initial takeoff point.  After that, it just moves at a constant velocity back to the starting height.

Next up is chaining these together into a pronking gait.

 

Full rate inverse dynamics on the quad A0

Last time I updated my inverse kinematics solution to also include dynamics, velocities and forces.  Now I’m in the process of integrating this onto the robot.

The old SMMB / HerkuleX control software commanded the servo positions in an open loop, which did not take into account the actual position of the joints in any way.  What I’ve done now is implemented a control flow where at each cycle the state of all 12 servos is sampled, then the control laws are applied based on that state, then the resulting commands are sent out.

So far, the only control laws I have ported are a simple one which just sends raw commands to each joint, and a somewhat more useful one which commands the end effector of each joint in terms of position, velocity, and force.  Here’s a quick video showing it commanding various constant forces with no position constraints.  The scale isn’t super accurate, nor is the actual force coming out of the device, but I think it should be good enough.

mjbots discord server

Over the last couple of months, I’ve had an increasing number of people looking for help with self-built moteus controllers which is great!  However, until today there hasn’t been a great way to get help.  Blog comments fall off the front page quickly, and there is no real other mechanism.

Thus, I’ve created a discord server:

There you can chat about the moteus controller, servo, or the quada0 and get feedback and help in closer to real time.  Thanks for collaborating!