The Duet 3 Motor 23CL (M23CL) is a family of Closed loop, FAN-FD connected Nema23 motors, fully integrated in to the Duet 3 ecosystem. They optionally integrate a brake to hold the motor in position when power is off. Connection to the Duet 3 CAN-FD bus and power use industrial M8 connectors. Multiple M23CLs can be connected to the bus, either via an M8 Y splitter or a distribution board/box.
Note the M23CL series are in active development and this documentation will be expanded as we confirm specifics of each motor variant, along with bus distribution options.
M23CL-56-2800B | M23CL-56-2800 | M23CL-76-2800B | M23CL-76-2800 | |
---|---|---|---|---|
Holding Torque | 12.6 Kg.cm | 18.9 Kg.cm | ||
Detent Torque | 0.4 Kg.cm | 0.86 Kg.cm | ||
Full Step Angle1 | 1.8deg | |||
Max current/phase | 2.8A | 2.8A | ||
Rotor Inertia | 0.3Kg/cm^2 | 0.48Kg/cm^2 | ||
Motor Section Length | 56mm | 76mm | ||
Total Length | TBC2 | TBC | ||
Brake | 24V, 1.5Nm | No Brake fitted | 24V, 1.5Nm | No Brake fitted |
Ambient Temperature | -20C - +50C | |||
Max Motor & Controller Temperature | 85C | |||
Input voltage | 12V to 48V | |||
Processor | Microchip ATSAME51G19A | |||
Processor features | 32-bit, 120MHz ARM Cortex-M4F, 512Kb flash, 192Kb RAM, hardware single precision floating point unit | |||
Networking/Comms | CAN-FD BUS for connection to the Duet 3 Mainboard. Optional on-board CAN bus termination. | |||
On-board stepper driver | 1 x TMC2160A | |||
Stepper driver features | SPI controlled, can be run in open loop or closed loop mode. | |||
Encoder Inputs | Hall effect 14 bit resolution | |||
Temperature monitoring | 1 on board thermistor and processor temperature available for temperature monitoring. |
1 In open loop mode up to 256 microstepping can be configured
2 See the prototype dimensions below for the prototype M23CL-56-2800B
to follow
The M23CL incorporates a hall effect position sensor sensing a magnet on the motor shaft. The motor and the encoder need to be calibrated together as part of commissioning, see the section on doing this below.
All boards in the system must have different CAN addresses. Duet 3 Mootor 23CLs are shipped set to a default CAN address of 123. They will also revert to 123 if you use the can reset button (not exposed on prototypes). Therefore, if you have more than one new M23CL or other Duet3d CAN-FD connected expansion board, only one of them must be powered up and connected to the CAN bus at a time so the address can be changed from the default. So disconnect power to all but one of them (you can leave the CAN bus connected if it's easier). When you have changed the CAN address of that M23CL, you can connect the next one; and so on. See the section: Set the CAN address below for how to change the default address.
It is recommended to add the following to config.g, before any commands that reference any CAN bus connected expansion boards
G4 S2 ;wait for expansion boards to start
The first time the M23CL starts up it may request firmware from the Duet3d mainboards. ensure you have the correct version (compatible with your mainboard firmware) in the /firmware directory on the mainboard. see the Firmware section below for more details.
Before the M23CL is connected to the CAN-FD bus, if it is powered, the STATUS (red) LED will be blinking rapidly. once it is connected (after any initial firmware update happens), it should settle down to a ~1Hz blink rate. If there are other blink patterns displayed see the [LED behaviour and error codes section of the CAN connection basics documentation] (/User_manual/Machine_configuration/CAN_connection#led-behaviour-and-error-codes}
Check that you can communicate with the M23CL, by sending:
M115 B123
If that fails try depressing the CAN_RST switch and powering up, then down again, this will reset the CAN-FD bus settings to the default (address 123, bus speed 1Mbps)
Duet 3 expansion boards, tool boards and Motors have a bootstrap loader written to the start of flash so that they can load firmware from the main board via CAN. This bootloader may occasionally need to be updated in order to support new features. See Updating the bootloader on Duet 3 expansion and tool boards.
The M23CL will be shipped with firmware loaded during production. You can check the version loaded by sending
M115 B123
(or B## where ## is the new CAN address of the board if you have changed it already)
To update the firmware get the latest version from the RepRapFirmware github. It is highly recommended to upgrade all the firmware in your Duet 3 system together so that the versions do not get out of sync.
Send M997 B## to carry out a firmware update, the bootloader will request the Duet3Firmware_M23CL.bin from the Duet 3 main board, it needs to be in the /firmware folder.
For more details on this please see the section on calibrating the magnetic encoder on the closed loop tuning page, it's written for the magnetic encoder on the 1HCL but the same theory applies.
The calibration procedure measures magnet offsets and attempts to corrects for this in software. Since the magnet's position is not affected by cycling the printer's power, this data is stored in non-volatile storage such that it only has to be run once. Of course, if you change or remove and reattach the M23CL internal control board, you must re-run this tuning move.
A little more than one full rotation of the motor is performed in each direction. Unlike other tuning moves it is recommended the motor is not connected to any axis or other load for this calibration routine.
Once you are satisfied that the motor can freely make up to 1.5 rotations in either direction, run the following command:
M569.6 P##.# V2 ; Where P##.# is the driver address to tune
Once this has been performed successfully, the values will be written to non-volatile memory and remembered each time the power is cycled. The tuning can be re-run by simply running the M569.6 ... V2 command again, or checked by running the M569.6 ... V3 command.
The firmware will output the highest deviation of expected position vs encoder position recorded.
To follow, acceptable ranges for deviation of position
Duet 3 Motor 23CL are supported in RRF 3.5 and later.
Please see the current RepRapFirmware limitations at Duet 3 firmware with CAN expansion configuration limitations.
While in closed loop mode step pulses are not sent to the stepper motor driver in the same manner as an open loop driver, however the firmware still uses microsteps internally to represent moves.
The M23CL will autoset the correct settings for closed loop mode. In open loop mode microstepping can be set as normal using M350 and M92 should be set to match that microstepping as normal.
M569.1 is used to configure the closed loop driver.
Here's a sample excerpt from a config.g file for RRF 3.5 to drive the X and Y motors from M23CLs configured at CAN addresses 70 and 71.
M569.1 P70.0 T3 E2:4 R100 I0 D0 ; Configure the M23CL at CAN address 70
M569.1 P71.0 T3 E2:4 R100 I0 D0 ; Configure the M23CL at CAN address 71
M569 P70.0 D4 S1 ; Set into closed-loop drive mode (D4) and not reversed (S1)
M569 P71.0 D4 S1 ; Set into closed-loop drive mode (D4) and not reversed (S1)
M584 X70.0 Y71.0 ; set X and Y drivers
M350 X32 Y32 ; set steps/mm to 32 for open loop mode operation
M92 X160 Y160 ; steps/mm for a 20 tooth gt2 pulley for open loop operation
Note the initial PID values will need to be tuned to the particular motion system.
In contrast to usual drivers, the closed loop axes can have their holding current set to zero using M917, with negligible detrimental effect. Whilst a normal driver may slip if it's holding current is set to zero, a closed loop driver will notice that it has slipped an apply a current to return the drive to it's intended position. Setting a holding current of zero will also mean less current is used, so the motor runs cooler. However, a holding current can still be set using M917 if desired.
See Tuning the Duet 3 Expansion 1HCL for details on tuning the M23CL. the section on PID tuning applies to both the 1HCL and the M23CL
The following code can be used in config.g to monitor the internal control board temperature.
M308 S3 P"70.temp0" Y"thermistor"
M308 S4 P"71.temp0" Y"thermistor"
These sensors would be displayed in the "extras" tab in DWC and available in the object model to query and potentially take action on for example the following could be inserted into daemon.g to check the internal temperature every second and raise the alarm if they are higher than a set value of 70C
if sensors.analog[3].lastReading >70
echo "X MOTOR Temp Alarm: ", sensors.analog[3].lastReading
M98 P"motorovertemp.g"
if sensors.analog[4].lastReading >70
echo "Y MOTOR Temp Alarm: ", sensors.analog[4].lastReading
M98 P"motorovertemp.g"
G4 P1000
Where the "motorovertemp.g" macro can have whatever actions are appropriate. This logic can be extended to take different actions at different temperatures ( e.g. log at 60, sound alarm at 70, pause print at 80)
Some versions of the M23CL have a motor holding brake solenoid fitted (all prototypes, and model numbers ending in "B")
If a brake is present the M23CL will disable it when the motors are enabled (M17 and enable it when the motors are disabled (M18).