servo support question and AC/brushed motors #828
Replies: 1 comment 2 replies
-
Hi there. About servos:
About that, the awnser is actually in the readme file in https://github.com/Paciente8159/uCNC?tab=readme-ov-file#current-%C2%B5cnc-status under changes of version 1.4. It's 50Hz 1ms to 2ms pulse width.
About M10 the info is in the wiki here https://github.com/Paciente8159/uCNC/wiki/Basic-user-guide#%C2%B5cnc-gcode-commands To make SERVO0 go to 50% of it's maximum position you need to to M10 P0 S127 (range is from 0 to 255) About encoders:
They are meant to be general purpose encoders and are assignable.
Yes I would like to have that available. It has been left behind for other stuff. I would need some good and very cheap hardware to start laying the stones to do that. Do you have any recommendations?
Hopefully not that hard. All the fundamental building blocks are there..including PID controller, separate counters for the desired position and encoders position..etc.. It's a matter of combining the building blocks and tune it (I believe) |
Beta Was this translation helpful? Give feedback.
-
Hi all,
In various parts of the documentation I have seen that "servo motors" are supported through M10 codes
I see quadrature encoders are supported also
How hard would it be to implement 2) ? I imagine there is some point in the code where uCNC keeps the desired (and probably real) position for each stepper, before toggling the step pin. This could be decoupled from the step pin toggling and instead used periodically as input to a PID controller that configures a PWM to modulate the power output to the brushed motor according to the error between the desired position and the current encoder position.
All answers and feedback welcome, cheers !
Beta Was this translation helpful? Give feedback.
All reactions