The Duet3D magnetic encoder senses motor position and rotation using a hall effect sensor to detect the rotation of a diametrically-magnetised disc magnet attached to the motor shaft at the rear of the motor.
1 Max system RPM possible depends on the Duet 3 Expansion 1HCL controller closed loop speed and the maximum motor RPM
The Duet 3 Magnetic Encoder is designed to be paired with a Duet 3 Expansion 1HCL controller.
NEMA17: All NEMA17 motors with an exposed rear shaft no more than 3.5mm below the back of the motor should be compatible. If the exposed rear shaft projects from the back of the motor then a mounting solution that holds the sensor ~1mm from the magnet mounted on the shaft will be required.
NEMA23 and other sizes: An adaptor plate/mounting system would be required to use the Duet 3 Magnetic Encoder with other motors.
The STEP file is hosted here.
Qty | Item | Remarks |
---|---|---|
1 | Magnetic Encoder PCB | Included |
1 | 6mm diameter x 4mm long diametrically-magnetised magnet | Included |
4 | 0.5mm M3 nylon washer | Included |
4 | 1mm M3 nylon washer | Included |
4 | 2mm M3 nylon washer | Included |
4 | 3mm M3 nylon washer | Included |
1 | 150mm ribbon cable 10 way | Included |
1 | LOCTITE 648, 435, a cyanoacrylate adhesive or equivalent | Not provided. Select an adhesive that is tolerant of slight oil contamination potentially present at the back of the motor and is heat tolerant enough for your application. The magnet is not under significant load, but is exposed to the motor vibrations. |
1 | Printed jig for centring the magnet | Not provided, see below |
2 | M3 screws to mount PCB on rear of motor | Not provided. The length of bolt required depends on motor length, see step 3 below |
In order to ensure the magnet is centered on the motor shaft, a printed jig can assist with the magnet installation.
The STL and OpenSCAD design for the jig are available here
The jig can be printed using a reasonably tuned FDM 3d printer with a 0.4mm nozzle.
This should be read in conjunction with the Duet 3 Expansion 1HCL documentation
M569.1 is used to configure the closed loop driver.
The T parameter specifies that the encoder used is the Duet 3 Magnetic encoder
Here's an sample excerpt from a config.g file for RRF 3.5 to drive the X motors from 1HCL board configured at CAN addresses 50, with a Duet 3 Magnetic encoder.
M569.1 P50.0 T3 E1:2 R100 I0 D0 ; Configure the Duet 3 Expansion 1HCL board at CAN address 50 with a Duet 3 magnetic encoder, warn if 1 fullstep threshold exceeded, error if 2 full steps threshold exceeded.
M569 P50.0 D4 S1 ; Configure the motor on the Duet 3 Expansion 1HCL controller at can address 50 as being in closed-loop drive mode (D4) and not reversed (S1)
M584 X50.0; set X drivers
Note the initial PID values shown will need to be tuned to the particular motor.
The M569.6 command is used to tune the motor and encoder pair, e.g.
M569.6 P51.0 V2 ; conduct magnetic encoder calibration on move on closed loop driver on Duet 3 Expansion 1HCL board with magnetic encoder at address 50.
This can be checked with V3 and cleared with V4, see Runtime Tuning.
It must be run once for a new 1HCL, motor, magnet or magnetic encoder board. The values are stored in flash memory, so it does not need to be run again unless the system changes (i.e. you replace the Duet 3 Expansion 1HCL controller, motor, magnet or magnet encoder board, or you remove and re-fit the magnetic encoder board or the magnet).
Note: this initial tuning must be run with the motor unloaded for best results
Initial prototype