Archives: Posts

fdcanusb

One of the necessary pieces for bringing up the moteus brushless controller and for ongoing development with it is being able to communicate with the device on the desk.  There aren’t many options for desktop FDCAN communication currently, and certainly none that are in the affordable range occupied by the [CANUSB family of devices](http://CANUSB family of devices) which I’ve used before and was very happy with.  Thus I created “fdcanusb”, a USB to FDCAN converter that allows one to communicate with FDCAN devices via a USB interface using a documented protocol, no drivers necessary.

More adventures in STM32G4 bringup

Last time I had an actually hard problem…, a mis-aligned stack which caused randomly misbehaving software.  This time, I had a more prosaic problem.  One that while not necessarily as interesting, was even more time consuming and frustrating.

The serial port wouldn’t work.  I had copied the module I used for DMA based receive and transmit from the STM32F4 and it just wasn’t working.  Nothing was written and nothing was received.  I carefully inspected the software many times.  I looked at the registers in the debugger and nothing seemed obviously amiss.  I read the datasheet to look for subtle differences in the theory of operation between the STM32F4 and STM32G4 but came up empty.

moteus servo mk2: Reducing weight

After having produced the first functional demonstration of the moteus servo mk2, my next step was to decrease the weight.  While I was at it, I made two other changes:

  • Axial connections: I switched to a design with entirely axial connectors, which removes the need for 4th axis machining when producing the parts.
  • Planet Input Bearing: I switched the planet input bearing to be inserted from the rotor side.  This way, the bearing is captured between the planet input and the rotor, rather than between the planet input and the gears.  That also improves the ability to assemble and disassemble the unit.

moteus_mk2_reduced_weight_2

moteus controller r4.1

Another step in my plan for the next revision of the moteus servo mk2, is an updated controller board.  As mentioned in my roadmap, I wanted to revise this board to make improvements in a number of domains:

  • Communications: Now instead of RS485, the primary communications interface is FD-CAN.  This supports data rates of up to 8 Mbit and packet lengths up to 64 bytes.  The header is nominally at the original CAN bit rate, but I have no need to be standards compliant and am running very short busses so I may run everything at the higher rate.
  • Connectors: Now there exist power connectors, in the form of XT30 right angle connectors and they are also daisy chainable like the data connectors.  Additionally, all the connectors exit from the bottom of the board to make routing easier in configurations like the full rotation leg.
  • Controller: This uses the relatively new STM32G4 controller series.  It is lower power than the STM32F4, supports FD-CAN, and also supports closely coupled memory, which may allow me to improve the speed of the primary control loop execution by 3 times.
  • Voltage range: This board now has 40V main FETS, with all other components at 50V rating or higher.  Thus it should be safe with inputs up to 8S (34V or so).
moteus r4.1 rendering

moteus r4.1 rendering

Update on Pocket NC v2-50 Threadmilling

After machining a fair number of parts with threads, I’ve tweaked my thread milling feeds and speeds to both go a little bit faster, give a more reasonable fit, and remove the last bit of niggling interference with the M2.5 recipe.

I’ll list the changes here, and have updated the original recipe

Old New
Chamfer Width 0.10mm 0.05mm
M3 Pitch Diameter Offset 0.538mm 0.568mm
M3 Stepovers 10 6
M3 Repeat Passes NO YES
M3 Lead To Center NO YES
M2.5 Pitch Diameter Offset 0.430mm 0.480mm
M2.5 Stock to Leave 0.0mm -0.02mm
M2.5 Stepovers 7 4
M2.5 Repeat Passes NO YES
M2.5 Lead To Center NO YES

Notably, the “Lead To Center” option found on the linking tab is what prevents the M2.5 threads from rubbing when inserting in later passes.  Thanks to Quincy Jones from Implemented Robotics for that tip over in the mjbots discord!

moteus servo mk2: Back housing

The back housing is the final piece of the moteus mk2 servo that I wanted to prototype.  (The planet output is identical to the mk1, so I could use extra stock I had of it for the prototypes).  It is large, and only mates directly to 4 other things, which makes it a little less complex than the front housing.

back_housing_exploded1.png

back_housing_exploded2.png

Design

I had initially designed the back housing to mate to the as-yet-unannounced new version of the moteus controller, the r4.x series.  Unfortunately, I don’t have any of those working yet, so I tweaked the design to temporarily fit a r3.1 controller, which looks like this:

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.