AS5600 absolute zero issues for grippper

Hi everyone,

I am making an gripper with an esp32, as5600 for reading position value and other necessary parts.I am using angle control mode for control gripper motions and fully closing gripper from open stage takes like 20 turns for motor and sometimes I have to use half open stages. The problem is every time I power up the gripper my zero point for angle changes. Sometimes I have to target 60 for fully closed stage and sometimes 30,40,35,24 and each time changes with the position of the gripper when I power up.

So, how can I make my fully open stage absolute zero for all the turns. I want to use that spesific position as target angle 0 without looking how many turn that the position of motor is away. Is there a way to save that position.

Thanks.

Hi and welcome to the SimpleFOC Community!

Would you be able to share a bit of the code you’re working on with us?
This would help us evaluate/asses potential issue.

Hi @YigitArda ,

The magnetic sensors are absolute, but when you start up, then the current position becomes the zero position…

To fix this, you have two options:

You can write the zero position to the hardware eeprom of the sensor using the I2C protocol. We don’t have code to support this, but I am sure you can find some examples online. After this, the zero position will be constant…
I’m not sure I recommend this because the programming procedure is complicated, and can only be done once… if you disassemble the sensor setup, or change the magnet, the written zero position will be wrong, and can’t be changed again…

So instead I would solve it in software - introduce a setup/calibration step in your software, where you read the the sensor and align the gripper as needed. Then remember the raw sensor value for this calibrated position, either by changing the code, or by using the non-volatile memory in your MCU (if available).
After startup, you can then use the motor.sensor_offset parameter to adjust the zero position to the correct one.
This has the advantage of more flexibility, and also allows you to change the calibration after making modifications to the physical setup…

@YigitArda

In use cases where such grippers are involved, an on/off end-of-range switches are used. Each time you power on the gripper, you need to low-torque open the gripper first (don’t close it first, in case you have an obstacle such as you were in the middle of a gripping action especially when machine-to-human interactions are involved) and when the switch clicks that’s your open position. Remember it in a variable, then start low-torque close until the close-switch triggers. If the current for the torque exceeds a value and the angle doesn’t move but you have not activated the switch on either side or both, you have a gripper obstacle you need to handle extraneously.

Which means you need to add two range switches to your design and read them with the MCU.

The zero angular sensor position for a gripper is meaningless unless you are designing a very specialized hard wired mechanical system in which case you go the EPROM route or the register setup. You need to remember the fully-open and fully-closed positions and work the angles between them.

You are attempting something very challenging. Please report your progress, this is very educational.

Best of luck with your project.

Cheers,
Valentine