Mounting encoder on 8318 motor

I have a couple of 8318 motors and the AMT102 motors from the oDrive shop. The motors are similar to the Turnigy 9235 with an optional small center shaft and 4 mounting points on the rotor.

I’m curious what the best practices are for pairing this motor with an AMT102 encoder from a mechanical design point of view? It appears I need to fabricate a rotor mount with a false shaft for the 102 to rotate on. Optionally the backside rotates, but there isn’t a good place to attach a new fabricated shaft.

Are the magnetic encoder preferable, or is there a good design for the AMT102?

If it helps, I have an OpenSCAD model of the internal spline of the AMT102, which can be 3D printed and used instead of a stub shaft. You can then use a blob of superglue to stick it in the hollow shaft at the back of the motor, or modify it to fit your own motor.

include <common.scad>

$fn=128;
cylinder(d=8, h=20); // shaft
cylinder(d=10.5, h=10); // head

pcd(n=8, pcd=10) translate([-1,-1,0]) cube([2, 2, 10]); 

where my pcd function is this: (paste it in place of <include common.scad> or put it in your own common.scad)

module pcd(pcd, n)
{
       alpha = 360 / n;
      for (i = [0:alpha:(360-alpha)]){
        rotate([0,0,i])translate([0,pcd/2,0])    
        children();
         }
}

image