Hello!
I have been trying to setup the PRO with dual encoder, using the motor internal HALL encoders for commutation and utilizing the on-board magnetic absolute encoder for position. I need your input to properly set it up as in the documentation this function is marked as “Experimental”. There is a 1:20 gear box between the motor and the 2nd encoder to have more fun. The sampling window shows the raw data from the magnetic encoder during ENCODER_HALL_PHASE_CALIBRATION run.
Thanks,
Tamás
Hello!
This is an interesting setup, you very well might be the first person trying this. I assume the “Experimental” marker you are referring to is at use_commutation_vel?
I’m curious, before changing these settings does this HALL->commutation + onboard->position encoder setup work for you with the 1:20 gearbox? This is expected to work, (and I hope it does) I just want to make sure there are no other issues first.
Hi Nicholas,
Before this setup I calibrated and tuned my motor-controller combo with the internal HALL sensors and tuned it properly. I enjoyed the new GUI configuration tool, congrat to this great improvement.
After that I changed setup and tried to work with the dual encoder setup, but have a faced couple of problems. I do not see which encoder calibration is being executed, probably the HALL. I do not think that the load (position) encoder can be calibrated at all. I also expect it to return angle in radians and also an option to set zero angle (as the MA702 accepts it). The GUI shows strange position value (+10 to -45) while velocity is the derivative of the position (cos vs. sin) values, while the Inspector window shows the raw encoder output as small values between 0.395 and 0.335. So I do not know if it is my mistake or this setup is no supported, but I need your assistance for this to use PRO or S1 for steering a robot.
Best,
Tamás
Both encoders will need some calibration:
- The
commutation_encoder
should be calibrated first, in the case of HALL this means running ENCODER_HALL_POLARITY_CALIBRATION and ENCODER_HALL_PHASE_CALIBRATION. - Next the
load_encoder
needs calibrated (assuming another encoder is used). For the onboard encoder this means running ENCODER_OFFSET_CALIBRATION.
If you are using the GUI step 4 calibrate: Run Calibration Sequence
then this is all handled in the background.
The angle (position) is not given in radians, it is normalized to [0.0, 1.0] for one rotation.
You can set the absolution position using the <odrv>.axis0.set_abs_pos
function. This takes the desired zero position as an argument and returns the offset.
Could you please clarify which endpoints are showing strange values in the GUI? Small values between 0.395 and 0.335 on the load (position) encoder corresponds to ~1.2 rotations of the motor, assuming a 1:20 reduction.
In the original image you posted I see that both use_commutation_vel
and circular_setpoints
are True
. It may be easier to get everything set up and debugged if these are left as False
until everything is working as expected.