Duet 3 to drive a servo motor with encoder
-
I have this machine equipped with an analog motor and driver with an angular encoder. The motor driver will accept an analog signal from 0 to 5Vdc for speed control. Another input is DIR (direction, 0 or 5V ). The encoder pulses 2000 counts per revolution. The encoder is not connected to the driver, rather, it is connected to the local SBC that do the positioning computation. I want to get rid of that broken SBC to replace it with a Duet 3 board. Further utilization of my machine would then become available through Gcode.
Is the Duet 3/RepRapFirmware capable of implementing the control of my Servo motor arrangement ? Is the Duet 3 board capable of reading the angular encoder pulses ?
-
I used to work on a machine similar to what you're describing.
In the end, we decided to use a standalone motor driver which could accept the encoder signals and perform the closed-loop control on its own (separate from the Duet). The Duet would then just send step/direction signals to the driver, like you mentioned. Since the Duet will be uninvolved with the close-loop control, you may be able to configure your servo drive to send an alarm signal to the Duet to pause the print if the position control has an error. Without that feedback, the Duet will not know if there has been a fault.
No Duet board can accept encoder signals for closed-loop control, but there is a forthcoming add-on board that can do this for Stepper motors (see DC42's messages).
Once that board is available, I think, in theory, you could continue with your current servo drive, send the encoder signals to the duet closed-loop board, and send the step/direction signals to the drive. You'd just need to make sure your existing encoder is compatible with the duet encoder board when the specifications become available.
-
@hebigt , So let me just expose my understanding to your post. With that coming new board Duet3 read the encoder pulses ( hence, know the absolute position )
in theory, you could continue with your current servo drive, send the encoder signals to the duet closed-loop board, and send the step/direction signals to the drive
Still, even if the Duet3 will send Pulse/Direction signal to my motor driver, I cannot do anything with that signal because my motor driver only accept an analog 0-5V signal for controlling the motor speed.
I think I would be better of to just change my motor controller against one that utilize Step/Direction and connect the angular encoder on that new driver. This way the Duet3 would only wait for Ready state to continue the program.
Am I getting this correctly ? -
@fredcailloux said in Duet 3 to drive a servo motor with encoder:
I think I would be better of to just change my motor controller against one that utilize Step/Direction and connect the angular encoder on that new driver. This way the Duet3 would only wait for Ready state to continue the program.
Am I getting this correctly ?Yes.