PMW3901 Optical Flow Sensor Breakout

by Pimoroni

This fancy optical flow sensor detects motion of surfaces in front of it, from ~80mm to infinity! It's great for DIY drone builds, and it's compatible with our new Breakout Garden HAT with SPI.

The PMW3901 is a crafty little sensor that uses a low-resolution camera and some clever algorithms to detect motion of surfaces. A great use for it is detecting and correcting for drift of a drone by looking for x/y motion of the ground below.

You can use this breakout completely solder-free with our new Breakout Garden HAT with SPI!

Features

  • PMW3901 optical flow sensor
  • Two white LEDs on-board for illumination
  • Frame rate: 121 FPS (frames per second)
  • Speed: 7.4 rad/s (radians per second)
  • Field of view: 42°
  • Range: ~80mm to infinity 
  • 6mA typical current draw
  • SPI interface
  • 3.3V or 5V compatible
  • Reverse polarity protection
  • Compatible with all models of Raspberry Pi and Arduino
  • Python library

    Software

    We've put together a Python library to use with your Optical Flow Sensor Breakout. It makes reading the x/y motion values and their magnitude really straightforward.

    Connecting to your Raspberry Pi

    If you're not using our Breakout Garden HAT with SPI, then this is how to connect your Optical Flow Sensor Breakout up to your Raspberry Pi.

    Our library is set up to use the front SPI slot by default: BCM 7 for CS, BCM 11 for SCK, BCM 10 for MOSI, BCM 9 for MISO, and BCM 19 for the INT pin.

    Here's which pins to connect between your Optical Flow Sensor Breakout and your Pi's GPIO (note that it's BCM pin numbering):

    • 3-5V to any 5V or 3V pin
    • CS to BCM 7
    • SCK to BCM 11
    • MOSI to BCM 10
    • MISO to BCM 9
    • INT to BCM 19
    • GND to any ground pin

    You can of course use other pins but you'll have to change them accordingly when you instantiate the sensor in your code.

    Notes

    Dimensions: 24x24x5mm

    7 customer reviews

    4 years ago
    Gives you a reading of when an object is moving and the direction it is moving in. Would be useful to have a library for usage in .Net core. The instructions for setup aren't that clear and if something went wrong, as it did for me, the error messages don't give you enough information to resolve the issue yourself
    by john about PMW3901 Optical Flow Sensor Breakout via REVIEWS.io
    4 years ago
    Good for speed measurement with adequate lighting. Had trouble using the Optical Flow sensor with other peripherals on the same SPI bus. Pimoroni support confirmed there is a hardware design error on the version I had that prevents the board releasing the SPI bus when the chip is not selected, so beware if you need to use with other SPI devices.
    by Paul about PMW3901 Optical Flow Sensor Breakout via REVIEWS.io
    4 years ago
    a wonderful breakout. I use it to measure the displacement of my robot in x, y. I use a compass (cmps03) for the turns because the PMW3901 only measures the x, y displacement. the PMW3901 faces the ceiling.
    by henk about PMW3901 Optical Flow Sensor Breakout via REVIEWS.io