PMW3901 Optical Flow for ground based robot?

Hi, I’m writing to ask about the feasibility of the following idea…

I have a wheeled robot that has a 3mm delrin plastic platform whose underside is 95mm from the ground. I’m considering mounting a PMW9301 Optical Flow Sensor on some short standoffs underneath the platform, aiming at the ground. I’d likely include a few white LEDs to illuminate the floor.

The PMW9301 claims a minimum distance of ~88mm, so with the sensor about 90-93mm from the ground we’d be close to the minimum distance. The robot will be running over typical home floor surfaces, rugs, wood, etc. so there should be enough detail to capture movement.

I looked into the Python library and there doesn’t seem to be any way to set distance, so I’m guessing one just calibrates x and y to distance within our own software. No problem there.

Some questions:

  1. how much of the camera needs to be able to see the ground? Because it would be mounted under the robot, the camera’s view of the ground would partially be occluded by the robot’s frame, maybe 1/3 of the view would see a fixed aluminium chassis. Does the camera have to entirely see moving image? Would this be an issue?
  2. with the camera at about 90-92mm from the ground, will it still operate very well, or are we really at the limit of its function?
  3. overall, is this idea feasible?

Thanks very much for your help!

Hi, I did something similar, do you still need help?

Hi Ash,

I’ve just posted a blog entry about my own tests, which were largely successful (with some quirks):

Odometry on a Mecanum Robot Using an Optical Flow Sensor

…but I’d certainly be interested in what you’ve found out, as it may help me iron out some of the anomalies I’m getting (like very large random x,y values, etc.).



Hi Murray,

The PWM3901 is reliable but does give me quite a wide error of about 10%, and I think this varies depending on the surface.
My plan is to implement a Filter and sample more frequently, based on this.
Another option I considered is to use two PWM3901 sensors space apart by several cm, and this can be used to average the result, but this increases cost.
I’m using the sensor at 35mm above surface, I did try 80mm but I didn’t notice much improvement in accuracy and repeatability.
In my application, the distance to surface varies from 35mm min to 100mm, so I use small TOF distance sensor, to sense Height, which is used in the equation for x,y distance.
Pixart make a similar sensor which is much better suited to shorter distance floor tracking:
I asked pimoroni to make another breakout board but so far no response. I may try to make my own board, but the difficult part is sourcing the PAA5100JE-Q sensor.
Best regards