I’m working on a similar problem that requires precise and smooth control of slow motion.
In my experience, tuning PID for bigger changes (eg manually entering 1rad or 2 rads and watching it go to that angle), the same set of PIDs did not generate enough torque from small changes.
Now, when I tried to tune specifically for slow motion, I quickly realized that on a small scale torque of the motor is not linear, but has bumps often referred to as torque cogging or ripple.
So I went on to boost P gain to get over that torque bump, then increased D gain to compensate for oscillations caused by high P on the other side of the slope. I also increased I to compensate for high initial friction in my system, which may not be applicable to yours though.
Having high gain parameters has ended up amplifying the background noise from magnetic sensors, and applying heavy filtering to angle/velocity data just makes it sluggish again, while causing violent oscillations from larger disturbances.
I’m also a bit disappointed to see that better position sensors haven’t helped you much.
I was about to try replacing my as5600 with 5048b hoping for help from 4x angular resolution, and your experience has lowered my expectations.
Working with sensors requires a lot of patience, and the results are very rewarding when you get it right. I have 5600 and it’s been fine as long as you take all the precautions. Don’t give up, keep experimenting and it also helps talking with someone with hard science lab experience, I mean, face to face, to examine your setup, especially if you live near a major university. I know many people work alone, in isolation, and get easily frustrated and abandon their projects. The fact that you can buy a complete 3-axis gimbal for less than $100 means all these sensors and hardware work just fine. Don’t give up, keep walking.
I’m used to frustration being a large part of any engineering or scientific project, but a little encouragement still helps, thank you
I’ll report back when I make some progress.
If you’re thinking of changing your sensor, moving to SPI devices will be much faster. I like the simplicity of the I2C sensors, but in the end you want the speed of the SPI devices…
I’d recommend an AS5048A or AS5047 sensor, they work well.
In terms of the sensor accuracy, I think the thing to worry about is your magnet and your grounding.
Moving the sensor further/closer to the magnet can change the magnitude of the magnetic field registered, and change the accuracy. Using better magnets with clearly defined fields will also make a difference, I suppose.
And electrically, the sensor wants a nice stable supply and ground. The output is digital and has parity bits, so things would have to go quite badly wrong to get errors once the signal is digital. But when measuring the magnetic field, bad grounding/power supply can influence the accuracy.
I’m in the exact same situation. Tuning my PIDs for large changes has been relatively easy, but I’ve failed to achieve good results (I mean fast and unbouncing corrections) for small disruptions. I’ve tried more aggressive current PIDs tuning, but then the motor vibrates and gets hot. I’m using a SimpleFOCShield and a AS5048A.
I was actually looking to accomplish something very similar but, with OEM cheap micro gimbals such as what you can usually buy off of AliExpress as a replacement for a DJI Mavic1 or 2, Mavic Mini or Mavic Air…
I was heavily involved with the development testing of project called OpenHD… One of the goals was to create an open source solution to have the same functionality and greater range on an open source platform using readily available components…
One of the biggest disadvantages of DIY drones is the extreme miniaturization and camera stability of consumer drones like DJI…
I spent a lot of time researching and tearing down some of the inner workings of DJI gimbals and, engaged on another simpleFOC thread below with regards to the integrated DUAL linear HALL sensors the gimbals have…
Because they have mechanical stops limiting the rotation to 45°-90° or so, it sounds like they use a RATIOMETRIC difference between two Hall sensors to determine angle…
Someone on this thread said that the setup should be fairly simple to implement and use…
The primary objective would be to retrofit something like a GoPro sensor or Raspberry pi MIPI CSI-2 image sensor utilizing the stock micro coaxial signal and power wires…
I have a ton of links pictures and information to anyone who might be interested…
*Unfortunately I don’t know how to program and still learning about simple FOC as well as the Storm32 open source gimbal project but, I’m really good with hardware and, thorough testing…
I I would love to hear any thoughts or feedback related to this idea and application
Cheers…
Also, Here is a YouTube video I put together of some of the components and, a video of another person in China who was able to get a mavic mini gimbal operational but without the integrated Hall sensors…