Velocity Mode Not Constant speed

Hello guys. I am trying to build a 2 axis turret for a uni project. I got a Odrive 3.6 from a friend to use with hoverboard motors and I’ve been playing around with them for a week. Since built in hall effect sensors dont have good resolution, I decided to use a MT6701 with it. I will be using the top side of motors for connecting the chassis so I designed a ring gear system on the bottom. (System looks like the image but had some mechanichal problems, so I modifed it but its basically this.)

I made the configurations and got it moving. The problem is when I am on velocity control mode, the motor is not turning with a constant speed. I want it to move like when it is calibrating but its accelerating and slowing down while turning. When I switch to position control, same as velocity control, it is going to the correct position but not with a smooth motion.
MT6701 has a cpr of 4096 but I changed it according to the gear ratio. I tried to modify the gains but nothing seems to change. I appriciate the help. (Sorry for my spelling mistakes if I did, Im not native english speaker)

Hi! This is likely caused by offset between your encoder magnet and the magnetic angle sensor – usually you need very good precision and rigidity in order to get accurate results, and there’s visible offset here.
image

I’d also note that it’s very important your encoder is directly coupled with the motor angle. The ODrive v3.6 doesn’t have support for multiple encoder feedback, but the ODrive S1 and Pro do – so you could use the hall sensors in conjunction with the MT6701, if switching ODrives is an option. If not, I would recommend reducing any sort of slop or backlash as much as possible, and making sure that your magnet is aligned much better with the encoder itself, I’d recommend a machined mount if possible. You ideally want +/- 0.5mm offset between the magnet and the encoder.

Thanks for your answer. As I mentioned I modifed those mechanichal issues there is no more offset with the magnet but I will take a look again.
For other axis I will directly couple the encoder but this one has no way to do that. I thought using a belt driven mechanism instead of gears would that be any better?
Newer ODrive models are not our option because of budget issues, and there are only clone ones in my country.

For other axis I will directly couple the encoder but this one has no way to do that. I thought using a belt driven mechanism instead of gears would that be any better?

Belt drive will definitely be a bit better! The important thing is to remove any backlash or slop in the system.