Cameras for Raspberry Pi

  1. Home
  2. Docs
  3. Cameras for Raspberry Pi
  4. Migrated Raspberry Pi Cameras
  5. OV9281 1MP Global Shutter Camera for Raspberry Pi

OV9281 1MP Global Shutter Camera for Raspberry Pi

Table Of Contents

Introduction

The Arducam OV9281 camera breakout incorporates Omnivision 1/4-inch 1 Mp  (1280×800) CMOS digital image sensor which is capable of operating at up to 60fps in 1MP ( 1280×800 ) resolution at 1-lane MIPI mode. The OV9281’s high frame rates make it an ideal solution for low-latency machine vision applications.

The global shutter technology allows you to reduce or eliminate unwanted image artifacts, which occur with traditional rolling shutter image sensors as a result of motion during image capture. The sensor’s global shutter and excellent low-light sensitivity allow it to be used for any application that needs gesture detection, head/eye tracking, and depth and motion detection.

Models in this Series

Currently, there are 4 models in Arducam OV9281 Series. The main difference between them is the sensitivity to infrared and the FOV of the lens.

SKUB0225B0224B0165B0162
Light Sensitivity850±50nm IRInfraredInfraredVisible Light Only
IR filter850±50nm Narrow Band IR FilterNo IR filterNo IR filterBuilt-in 650nm IR cut-off filter
FOV130°(D)130°(D)70°(H)166°(D)
  • If you operate only in visible light, choose B0162.
  • If IR is needed for your application, choose B0224 for a wide field of view or B0165 for a normal field of view.
  • If you only need IR, choose B0225 and prepare your 850nm light source.
Wanna a stereo camera?

Arducam 1MP stereo camera dual OV9281 monochrome global shutter camera module is ready for you here.

Common Specs

The following specs applies to all products in this series.

Image sensor

Sensor ModelOV9281
Shutter TypeGlobal Shutter
Active Pixels1280 x 800
Resolution1 MP
Image Sensor FormatType 1/4″
Pixel Size3μm×3μm
Color Filter ArrayNone(Monochrome)
OV9281 Block Diagram
OV9281 Block Diagram

Lens

SKUB0225B0224B0165B0162
InterchangeabilityNot InterchangeableInterchangeableInterchangeableNot Interchangeable
F/NO2.02.02.82.0
Focus TypeManual FocusManual FocusManual FocusManual Focus
Focusing Range30 mm~infinity30 mm~infinity30 mm~infinity30 mm~infinity
Effective Focal Length(EFL)2.4 mm2.4 mm2.80.83
Field of View(FoV)130°×110°×90°(D×H×V)130°×110°×90°(D×H×V)70°(H)166°(D)

Camera Board

Camera Board Size40×40 mm
Mechanical Drawing ov9281
Mechanical Drawing
Pin No.Pin NameTypeDescription
1VCCPower3.3V Power
2FSINInputFrame Sync Input
3GNDGroundGround
J2 Connector Pin Definition

Connector & Cable

Camera ConnectorMIPI CSI-2 15pin
Cable Length80mm (22-pin), 150mm(15-22pin)
Pin #NameDescription
1GNDGround
2CAM_D0_NMIPI Data Lane 0 Negative
3CAM_D0_PMIPI Data Lane 0 Positive
4GNDGround
5CAM_D1_NMIPI Data Lane 1 Negative
6CAM_D1_PMIPI Data Lane 1 Positive
7GNDGround
8CAM_CK_NMIPI Clock Lane Negative
9CAM_CK_PMIPI Clock Lane Positive
10GNDGround
11CAM_D2_NMIPI Data Lane 2 Negative
12CAM_D2_PMIPI Data Lane 2 Positive
13GNDGround
14CAM_D3_NMIPI Data Lane 3 Negative
15CAM_D3_PMIPI Data Lane 3 Positive
16GNDGround
17CAM_IO0Power Enable
18CAM_IO1LED Indicator
19GNDGround
20SCLI2C SCL
21SDASCCB serial Interface data IO
22VCC3.3V Power Supply

Driver Performance (With Official V4L2 Driver)

Picture FormatRAW/JPEG/H.264
Video Format
Output Interface2-lane MIPI serial output
Output Formats8/10-bit BW RAW
Maximum Frame Rates120fps

Hardware Setup

NOTE

Please shut your Pi down and disconnect it from the power supply before connecting the camera module.

b0165 3

For Standard Raspberry Pi Models with 15-pin connector

  1. Locate the camera port (CSI). It’s between the HDMI and audio port of the Raspberry Pi board.
  2. Pull up on the plastic edges. Do it gently to avoid pulling it off.
  3. Push in the camera ribbon. Make sure the silver contacts are facing the HDMI port. Do not bend the flex cable, and make sure it’s firmly inserted.
  4. Push the plastic connector down. Do it while holding the flex cable until the connector is back in place.

For Raspberry Pi Zero and Compute Module with 22-pin connector

  1. Remove the default gold ribbon cable
  2. Push in the white ribbon cable to the camera board’s connector
  3. Connect the Module to the Raspberry Pi Zero/Compute Module

Software Setup

Check your firmware support

OV9281 is not native to the Raspberry Pi kernel, so it is not supported in the older firmware. Please first confirm whether you are on a proper firmware.

  • Open your Terminal with CTRL+ALT+T
  • In your Terminal, type the following command then hit Enter:
ls /boot/overlays/ov9281.dtbo

If you get a successful result like the following picture, then you are good to go.

ls ov9281 1

I get error no such file or directory?

If you get no such file or directory, please first double check whether you’ve typed the wrong command.

If not, then update your firmware with the following commands.

  • In your Terminal, type the following command then hit Enter line by line:
sudo apt update
sudo apt full-upgrade
sudo reboot

Enable OV9281 overlay for your Raspberry Pi

We will edit the config.txt to enable the OV9281 overlay.

  • In your Terminal, type the following command then hit Enter:
sudo nano /boot/config.txt

Edit config.txt to add OV9281 overlay.

  • Use to navigate to the bottom of the config.txt file, and
  • Add the following line to it as the picture shows.
dtoverlay=ov9281
1 1

Save the change and exit.

  • Press Ctrl+o to save the changes, then hit Enter
  • Press Ctrl+x to exit.

After you exit Nano, go back to the Terminal and reboot so the changes can take effect.

  • In your Terminal, type the following command then hit Enter:
sudo reboot

Check your camera device

You can list the video device node to test whether your Raspberry Pi sees this camera module.

  • Open your Terminal with CTRL+ALT+T
  • In your Terminal, type the following command then hit Enter:
ls /dev/video0

My RPi does not list the device?

If your Raspberry Pi does not list the device, make sure you have:

  • Gone through the steps above, and then
  • Double-check the cable connection, especially the orientation of the contacts on the cable and connector.

If the problems still exist after your troubleshooting, please:

  • Contact Arducam with your order number included.

To take a step further, you can use the following command to know the camera runs well.

  • In your Terminal, type the following command then hit Enter:
  • If you get successful results, press Ctrl+C to stop the program.
v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null
120fps

Preview the Camera Feed

We will use yavta to preview the camera feed. yavta stands for “Yet Another V4L2 Test Application”.

We need to clone yavta and then compile it.

  • In your Terminal, type the following command then hit Enter line by line:
git clone https://github.com/6by9/yavta.git
cd yavta
make

Preview the video feed in UYUV format.

  • In your Terminal, type the following command then hit Enter:
  • After you’ve done with the preview, hit Ctrl+C to exit.
./yavta --capture=1000 -n 3 --encode-to=file.h264 -f UYVY -m -T /dev/video0

Use OV9281 with Arducam Userland MIPI Camera Driver

Downloading the latest library here https://github.com/ArduCAM/MIPI_Camera.git

Then follow the user guide https://www.arducam.com/docs/cameras-for-raspberry-pi/mipi-camera-modules/camera-userland-driver-sdk-and-examples/

Was this article helpful to you? Yes 2 No 2