PAA5160E1 (Qwiic) tracking algorithm help

Hey there!

I’ve been using the PAA5160E1 sensor to track a surface moving on a track, with the goal of preventing us from going off track. The device simply moves forward and backwards and we are trying to detect any sideways movement.

I mounted the device at a ~30 degree angle and initialized the heading to reflect this (i.e. I want the sensor to reflect the global frame of reference as opposed to the local frame). However, I’m still seeing an unexpected error ~16in in y and ~1.5in in x as it can be seen in the following plot:

The left hand y axis is the y position (I expect the blue line to return to 0 but end up ~16in) and the right hand y axis is the x position (I expect the orange line to remain at 0 but I end up at ~1.5in).

It seems like my calibration is incorrect but I don’t know that I fully understand how.

Let me know if there are any more details I can provide to help you help me.

Thank you

Are you using any offset? How far from center is the sensor mounted? Is mounting it perpendicular instead of at an angle an option?

Hey Russell,

Thanks for the reply! I tried mounting it perpendicular, but we noticed that there was a higher variance in the data we were interested in (the x orientation). Pixart mentioned that it’d be better to have to angle it so that the flow estimation would be more accurate.

We tried mounting the sensor as close to the center of the moving component, but I think we may have an error of 1-2” from the exact center since this is still a prototype. Do you have any recommendation on how to correctly calibrate the sensor?

Thanks

I don’t have much other than what’s in our guide Arduino Examples - SparkFun Optical Tracking Odometry Sensor - PAA5160E1 (Qwiic) Hookup Guide

One thing to check is ensure the scaling for the angled-mounting is performed after implementing the offset (you just want to order the math correctly for your situation)