Get Started with OKdo Raspberry Pi 5MP Camera

Scroll down

This guide will help get Started with OKdo Raspberry Pi 5MP camera for Raspberry Pi and Pi Zero.

It will show how to easily connect the camera to your Pi and take your first digital images and video recordings using the software already built-into Raspberry Pi OS.

The camera module uses the OV5647 sensor capable of 5MP image capture at 2592 x 1944 resolution and 1080P video at 30 fps with H.264 (AVC) codec. It is fully compatible with Raspberry Pi OS and requires no special drivers.

A very compact module for its performance, the wide-angle lens has a field of view of D=148° H=118° and 2.8mm focal length. It has adjustable focus and a lens diameter of 12mm and a depth of 25mm. The PCB is 39 x 39 mm with a weight of 14g.

Camera installation

The camera module connects via a ribbon cable to the CSI connector on the Raspberry Pi or Pi Zero. Separate ribbon cables for both types are included..

Ensure the Raspberry Pi is powered off before installing the camera.

For Raspberry Pi

Raspberry Pi 4b 5MP camera attachment
  • Use the white ribbon cable with blue markers.
  • On the camera module, pull up the ends of the CSI connector tab.
  • With the blue marker facing away from the lens, slide the ribbon cable carefully into the connector.
  • Close the connector by pushing the tabs back into place.
  • Repeat the procedure with the CSI connector on the Raspberry Pi making sure the blue ribbon cable marker faces towards the USB ports.

For Raspberry Pi Zero

Raspberry Pi Zero 5MP camera attachment
  • Use the orange ribbon cable with black markers.
  • On the camera module, pull up the ends of the CSI connector tab.
  • With the black marker facing away from the lens, slide the ribbon cable carefully into the connector.
  • Close the connector by pushing the tabs back into place.
  • Repeat the procedure with the camera connector on the Pi Zero making sure the black ribbon cable marker faces upwards.

Camera setup

Raspberry Pi OS has the drivers and support for CSI cameras built-in, but it is disabled by default.

  • Power up the Pi or Pi Zero.
  • From the Main menu open Preferences> Raspberry Pi Configuration.
  • Set camera interface to enabled.
  • Click OK.
  • Reboot the device.
Raspberry Pi camera preferences

Shooting images

The camera takes 5MP images at 2592 x 1944 resolution. Use raspistill which is installed by default in Raspberry Pi OS to focus the camera and capture images in JPG format:

  • Open Terminal from the desktop icon.
  • Type the following command to see a preview on the monitor:
 raspistill -t 0 
  • Adjust the focus by turning the lens.
  • Press Ctrl + C to leave preview mode.
  • Take a shot:
raspistill -o test-shot.jpg 
  • Open File Manager and navigate to /home/pi.
  • Double click test-shot.jpg to view the image.
raspberry pi 5MP camera test shot
Test image shot with OKdo 5MP Camera – 2.8mm focal length lens has a wide field of view, D=148° H=118°

Full raspistill command documentation is here:https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md

Capturing video

Capture raw video using another built-in, raspivid which will take 1080p video at 30 fps with H.264 (AVC) codec:

  • Open Terminal from the desktop icon.
  • Type the following command to see the output on the monitor and capture 10 secs of video to file:
raspivid -o test-video.h264 
  • Open File Manager and navigate to /home/pi.
  • Double click test-video.h264 to playback the video in VLC media player.
  • You can extend the length of the video capture using the -t flag in milliseconds:
 raspivid -o test-video.h264 -t 30000 
Test video captured with OKdo 5MP Camera (raw H.264 codec converted to MP4)

Full raspivid documentation is here:https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspivid.md

Converting the video

Not all media players are capable of playing raw H264 video but you can easily convert to MP4 format using MP4Box.

  • Install MP4Box:
sudo apt install gpac 
  • Convert the video:
MP4Box -add test-video.h264 test-video.mp4 

Summary

OKdo’s 5MP camera is a low-cost, CSI compatible, compact camera module for Raspberry Pi and Pi Zero models. Featuring the OV5647 sensor, it is very easy to connect and is fully supported by Raspberry Pi OS, requiring no special driver installation.

The wide-angle lens is capable of capturing 5MP images at 2592 x 1944 resolution and 1080p video H.264 at 30 fps making it especially suitable for video streaming in robotics, AI, drones and security applications.

Privacy

Our website uses cookies and similar technologies to provide you with a better service while searching or placing an order, for analytical purposes and to personalise our advertising. You can change your cookie settings by reading our cookie policy. Otherwise, we’ll assume you’re OK with our use of cookies.

Location

Please select an option to see content specific to your location and shop online.

Browse the US site