Tag Archives: actuator

Internal gear lathe mandrel

One of the post-machining operations required for the BE8108 gearbox was reducing the outer diameter of the internal gear.  Stock internal gears seem to come with a large amount of outer material, likely because they are intended for stationary process control applications.  For a mobile environment, a 100 tooth gear with a 50 mm pitch diameter is somewhat useless when it has 70 mm outer diameter.

I ended up turning this down on a lathe using a custom 3D printed mandrel.

Internal gear mandrel
Internal gear mandrel

The mandrel is just a 3 inch cylinder intended to be gripped in the lathe 4 jaw chuck, followed by a spur gear that mates with the internal gear.  Given it was in plastic, I just printed a regular spur gear, which would nominally have some slop and backlash.  However, because of printing tolerances, it actually required a press to install the gear onto.  Given that, I made a separate removal fixture, which is just a hollow cylinder that can be used to press the result back off the mandrel.

This was my very first unsupervised lathe operation, and so as to not melt my plastic fixture, I ended up settling on 50um cut depths at 800RPM as a decently optimal speed.  That still took about 40 minutes of turning per gear, although I was getting better and faster near the end.

Finally, a video and some pictures of the result:

Chip pile
Small gears can make a lot of chips
Final gear
I aimed for a hair under 55mm

Rotor machining fixture

After getting the stator out of its housing, the next step is to do the post-machining on the rotor.  Here, I didn’t want any of the original bearing housing, and just needed to drill out a hole in the middle big enough to put my sun gear holder through.  I figured I would experiment with some custom fixturing, so broke out Fusion 360 and drew up a set of “soft jaws”… i.e. *really* soft jaws, since they would be 3D printed.

Rendering of rotor fixture
Rendering of rotor fixture

I printed these on my Prusa MK3s, at 60% infill in PETG, then mounted it up on a vise in the drill press.

Rotor mounted in fixture
Rotor mounted in fixture

I ended up needing to get an even bigger drill bit than the biggest I had, and took a few passes with progressively larger bits, and it was still slow going.

Beginning of 5/8" bit pass
Beginning of 5/8″ bit pass

Despite that, I managed to mess up my English / Metric conversions and the hole still wasn’t big enough, so I had to go at it with a dremel to finish it off.  However, now the sun gear holder does fit in nicely!

Rotor with sun gear, inside view
Rotor with sun gear, inside view
Rotor with sun gear, back view
Rotor with sun gear, back view

Removing BE8108 stator

After separating the rotor from the stator, next I needed to remove the stator from the aluminum backplate that holds it into place on the rotor assembly.  It looked like the assembly was at least pressed in, but given that there were no fasteners, it wasn’t clear if it had adhesive, or if perhaps it was a shrink fit.

First, I tried heating up the assembly with a hot air gun, hoping that any adhesive would loosen up and possibly the stator itself would expand or break free.  No dice.

Next, I tried using some PB blast off, followed by letting it sit overnight in the freezer, hoping that the aluminum would shrink more than the steel stator.  Some hobby RC motor rewinders had used that technique on various motors successfully before.  No dice.

Finally, I broke down and at Ben’s suggestion used a hack saw to just cut through the back housing, being careful not to go more than a scrape into the stator.  Then with liberal application of force from a pair of heavy duty pliers, I was able to rip the back housing free of the stator.

Stator hack sawed most of the way
Stator hack sawed most of the way
Beginning to pry the back off
Beginning to pry the back off
Most of the backing liberated
Most of the backing liberated
All free!
All free!

 

BE8108 motor disassembly

To build the 8108 class gearbox with the geartrain inside, first I need to get the motor apart and separate out the individual pieces that I needed.  Here’s the first in a few posts about the modifications.

The original unmodified 8108 motor looks like:

Unmodified BE8108 Motor
Unmodified BE8108 Motor

To begin with, I needed to separate the rotor from the stator.  First, there is a small screwed on plate which needs to be removed — it just has normal Phillips head screws.

Front plate removed
Front plate removed

After that, the rotor is pressed onto bearings.  The magnets exert quite a lot of force on the stator, which makes removing them challenging by hand.  I wasn’t able pull it off with all the force available just from my arms.  For my first experiment, I built a simple fixture from two plates of aluminum and some bolts.

Motor in Removal Fixture
Motor in Removal Fixture

I bolted each half of the motor to one plate, and gradually tightened the bolts.  This eventually liberated the rotor from the stator.  Clearly something more robust and repeatable would be necessary to do this more than a couple of times, but this worked for a first iteration.

BE8108 gearbox

As mentioned last time, I’m working on a parallel track to accelerate my quadruped development efforts.  The current plan is to try and use a BE8108 class brushless motor, with a planetary geartrain mounted mostly inside the existing bounds of the motor.

Here’s a rough exploded view of the CAD model:

Key takeaways are:

  • The rotor and stator of the existing motor are disassembled, with the original back half of the stator discarded.
  • The rotor has its center drilled out.
  • All the non-gear/shaft/bearing parts are currently designed to be printed in plastic as a fit and function test.  That means things are thick and most holes that would be threaded instead have a big hole for a heat-set insert.  I’ll switch them over to aluminum once I get things basically working.
  • Metric modulus 0.5 gears are used; everything is stock with the exception of the 100 tooth internal gear which has a reduced outer diameter.
  • Bearings are used to interface all the rotating components.
  • The front plate mounts to the original stator and the internal gear, and acts as the primary outer housing.
  • Absolute position is measured via magnets attached to the planet input and a ring shaped PCB.
  • The back plate supports the back of the rotor.

If this looks an awful lot like Ben Katz’s model, that’s because it is!  The basic mechanism is the same, and a lot of the features are similar-ish just because it was easier to make something that looked roughly the same where it didn’t matter.

More details to come…

 

Quadruped lateral control challenges

So, after applying power to the robot for the first time, I coded up some simple scripted maneuvers I was going to use to work up to a gimmick jump video.  Unfortunately, I discovered that one of my assumptions was not well founded, and some more work will be necessary.

Background

I started in on this project intending to create a semi-standard servo motor with integrated gearbox which could be used for all the joints.  The brushless motors I am dealing with are only just barely capable of their task without additional gearing.  Along that development path, I built some prototype integrated gearboxes for a 50 sized brushless motor, and even took some videos of it jumping.

However, the gearboxes I have built so far were not terribly ideal from a mechanical perspective.  Primarily, they were too wide, and also too heavy, for the amount of torque and power they used.  In trying to get a quadruped up and running as quickly as possible, I decided to try a parallel effort with nearly direct drive motors.  My experiments at the time indicated that it should be just on the edge of possible.  I had a full 3 degree of freedom leg jumping for several hours nonstop in that configuration (albeit with forced air cooling).  The plan was to use an 81 sized motor for the upper leg purely in a direct drive configuration, a 60 sized motor for the lower leg with a belt gear reduction, and a 60 sized motor for the lateral movement in a direct drive configuration.  I figured that the lateral axis didn’t matter that much for a first effort, as I wouldn’t be doing anything much dynamic, and if the machine is standing upright, no steady state torque is required at all from the lateral motors.

The problem(s)

When I powered up the whole machine for the first time, I quickly realized that there were problems with my assumptions.  While yes, the lateral servos were capable if the machine was perfectly upright, even small disturbances required significant amounts of torque.  Due to the geometry, as the disturbance grows, the torque required grows very rapidly.  It doesn’t have to be more than a few degrees off before the torque capability of the 60 sized motor is exhausted.

Here’s a quick video demonstrating the problems.  First, you can see the chassis oscillating about the yaw axis.  The actual position oscillation in the lateral servos is very small in that video, on the order of 0.3 degrees, yet it still results in noticeable chassis movement.  At the end, I push a little bit too much laterally, and one of the lateral servos faults for over-temperature.  They have to work really hard to compensate for what are relatively minor disturbances.

Secondly, the noise on the position encoder limits the amount of damping that can be configured in the position control loop.  With the initial gearbox experiments, I noticed no problems in this area at all.  However, in the direct drive version, with 5x less gearing, the position control stiffness and damping both got worse by an equivalent amount.  It was not possible to both have stiffness sufficient to keep the machine upright, while still damping out yaw oscillations.  Compounding the problem, turning up the damping to the maximum results in a large amount of audible noise as the position noise manifests as velocity noise, which manifests as commanded torque noise.

Possible solutions

I’m currently going down two parallel solution paths to attempt to get something that works.  The first, is just to swap the 60 size lateral motors in for 81 sized lateral motors.  This will give roughly twice the torque capability, although it doesn’t really improve the damping ability at all.  However, it is relatively easy.

The second is to accelerate my development efforts on a geared mechanism.  Since Mini-Cheetah was released, I was quite impressed by the idea to stash the gear train on the inside of an 81 sized motor, and I’m working towards adjusting my gearbox design in that direction.

While I’m doing both in parallel, they unfortunately both require waiting for more stuff to ship and arrive, as well as more process development.  Coming up, more details on the gearbox work.

moteus RS485 bootloader

After getting the whole robot assembled, I quickly realized that changing the firmware on each of the 12 servos was going to be a big annoyance.  Doubly so, because the lateral servo programming ports were unreachable with this chassis design without disassembly.  Thus, I bumped up a deferred piece of work to implement a bootloader that would allow for reflashing the primary application over the RS485 communication bus.

Pre-bootloader state

The moteus controller currently uses an STM32F446 controller, which has 512kb of flash memory.  The memory map pre-bootloader looked like:

Sector Size Purpose
0 16kb ISR
1 16kb PersistentConfig
2 16kb unused
3 16kb unused
4 64kb application
5 128kb application
6 128kb application
7 128kb application

The ISR section currently just contains the ISR table.  It really isn’t even used beyond the reset vector, as the application moves the ISR table into RAM during initialization.  The PersistentConfig section stores application settings and can be rewritten by the application.  The application binary itself is stored in sectors 4-7.

Bootloader design

Rather than have a standalone bootloader, I decided to just implement something that assumed the controller was already configured properly and would be invoked directly from the application code.  This has some advantages and disadvantages.  The ups are that it means the bootloader can be much smaller.  I don’t have to duplicate the setup code, or manage how to share settings like what the current baud rate or multiplex ID are.  The downsides are that if the application code is bricked, then there will be no way to flash new firmware aside from the SWD port.  Given that using the SWD port on rare occasions isn’t that big of a deal, I figured this was a fair trade.

As far as placement goes, I figured that sector 3 was a fair place to stick the bootloader for now.  In the future, you could imagine saving a sector by putting it in sector 1, and actually hard-coding the ISR table to just include a reset vector.  Currently, some of the ISR vectors are defined in flash, and others by the application in RAM.  By forcing the application to define all of them in RAM, it means that there is no need to ever update the ISR table as part of updating the application.  For now however, it was easiest to leave the status quo alone and continue to consider the ISR table as part of the application.

Since the bootloader can assume the part is already configured correctly, it is implemented as just a regular C linkage function with a linker script that includes none of the normal pre-main or main initialization logic.  The application linker script forces that symbol to be defined at the start of sector 3, so that it can be just called as a regular function, albeit one that never returns.

The result

The resulting source is in a single translation unit (bootloader.cc / bootloader.h), although it does use some of the common libraries to help interoperate with the RS485 based protocol that moteus uses.  I haven’t really tried to optimize the size at all, but it clocks in at 3900 bytes, which is well within the 16kb for sector 3.

2019-03-22-092941_574x362_scrot

moteus_tool has been enhanced to drive the flashing operation and doing all 12 servos currently takes around 5 minutes with no cable plugging or disassembly required.  I could speed that up in a number of ways, but it is good enough for now.

First time powering all the motors!

After getting everything wired up and mechanically assembled, next was zeroing all the encoders and doing the first position control.  I discovered a number of problems that turned up by having a full 12 servos on the bus at the same time, which were resolved pretty easily, as well as many more pain points which I’ll need to address.

But, here is the pretty video (it ends when I push down enough to over-current my lab supply):

 

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.