Component guide · Beginner · 6 min read
OV5647 5MP Raspberry Pi Camera

Wiring, Setup and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The OV5647 is the 5 MP sensor used in the original Raspberry Pi Camera v1 and many low-cost Pi cameras, including fisheye, NoIR night-vision and IR-cut versions. It connects with a CSI ribbon, records 1080p at 30 fps and works with rpicam-apps and Picamera2 on every Raspberry Pi with a camera connector. It is the cheapest way to add a camera to a Pi project.
Key specs at a glance
- Sensor
- OmniVision OV5647, 5 MP (2592 × 1944)
- Video
- 1080p30, 720p60, 640 × 480 at 90 fps
- Interface
- MIPI CSI-2, 2 lanes, 15-pin ribbon
- Pixel size
- 1.4 µm, 1/4 inch optical format
- Versions
- Standard, NoIR (no IR filter), motorised IR-cut, fisheye, M12 and CS lenses
- Focus
- Fixed on most; motorised on autofocus versions
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 15MP OV5647 Fisheye Lens Camera Module for Raspberry Pi₹889
Option 2Arducam 5MP OV5647 160° Wide Angle Camera Module₹2,799
Option 3Arducam 5MP OV5647 Camera Board with LS-40180 Fisheye Lens₹2,699
Option 4Arducam 5MP OV5647 Camera Module w/ M12x0.5 Lens for Raspberry Pi₹2,209
Option 5Arducam 5MP OV5647 Fisheye Camera w/ M8 Lens for Raspberry Pi₹2,769
Option 6Arducam 5MP OV5647 NoIR Camera Module for Raspberry Pi₹1,339
What the OV5647 camera is
The OV5647 is the first sensor Raspberry Pi used, so every Pi model and the software support it out of the box. Image quality is fine in good light, but low-light noise is higher than on the IMX219 or IMX708.
NoIR versions have no infrared filter: with IR LEDs they see in the dark, but daylight colours look pink. IR-cut versions switch a filter in by day and out at night, often with built-in IR LEDs and a light sensor.
OV5647 camera pinout
The pins on the OV5647 camera and what each one does.
| Pin | Function |
|---|---|
| CSI ribbon (15-pin, 1 mm pitch) | Camera data lanes, clock, I2C control and power in one flat cable |
| Blue stiffener side | Faces the Ethernet/USB ports on a Pi 4; on a Pi 5 the 22-pin end faces away from the board edge as printed |
| Metal contacts | Face the connector contacts; a reversed cable gives 'no cameras available' |
| Lens mount | Fixed, M12 or CS/C mount depending on the board |
- CSI ribbon (15-pin, 1 mm pitch)
- Camera data lanes, clock, I2C control and power in one flat cable
- Blue stiffener side
- Faces the Ethernet/USB ports on a Pi 4; on a Pi 5 the 22-pin end faces away from the board edge as printed
- Metal contacts
- Face the connector contacts; a reversed cable gives 'no cameras available'
- Lens mount
- Fixed, M12 or CS/C mount depending on the board
Wiring the OV5647 camera
Turn the Pi off before connecting. Lift the connector latch, push the ribbon fully in with the contacts facing the connector pins, then press the latch down. The Pi 5 and Zero use a smaller 22-pin connector, so they need a 15-to-22-pin cable.
| OV5647 camera pin | Raspberry Pi 5 | Raspberry Pi 4 |
|---|---|---|
| Ribbon cable | CAM/DISP 0 or 1 (22-pin, use a 15-to-22 cable) | CAMERA port (15-pin) |
| Power | From the ribbon (no extra wires) | From the ribbon (no extra wires) |
| Software | rpicam-apps / Picamera2 (Bookworm) | rpicam-apps / Picamera2 (Bookworm) |
- Ribbon cable
- Raspberry Pi 5:
- CAM/DISP 0 or 1 (22-pin, use a 15-to-22 cable)
- Raspberry Pi 4:
- CAMERA port (15-pin)
- Power
- Raspberry Pi 5:
- From the ribbon (no extra wires)
- Raspberry Pi 4:
- From the ribbon (no extra wires)
- Software
- Raspberry Pi 5:
- rpicam-apps / Picamera2 (Bookworm)
- Raspberry Pi 4:
- rpicam-apps / Picamera2 (Bookworm)
Example code
First check the camera from a terminal with rpicam-hello --list-cameras (older images: libcamera-hello). Picamera2 is installed by default on Raspberry Pi OS Bookworm.
from picamera2 import Picamera2
from picamera2.encoders import H264Encoder
import time
cam = Picamera2()
cam.configure(cam.create_still_configuration())
cam.start()
time.sleep(2) # let exposure and white balance settle
cam.capture_file("ov5647.jpg")
cam.stop()
video = cam.create_video_configuration(main={"size": (1920, 1080)})
cam.configure(video)
cam.start_recording(H264Encoder(bitrate=10_000_000), "clip.h264")
time.sleep(10)
cam.stop_recording()Setup and tuning
rpicam-hello --list-cameras should list the sensor. If not, re-seat the ribbon and check its direction.
some need a line in /boot/firmware/config.txt, such as camera_auto_detect=0 and dtoverlay=ov5647, then a reboot.
fixed-focus lenses can be turned gently to adjust; M12 and CS lenses screw in and out.
long recordings warm the sensor; leave some air around it.
use IR lighting at night and accept odd colours by day, or choose an IR-cut version.
What you need
Shop this list20 of 20 found in our store · ₹46,807
5MP OV5647 Fisheye Lens Camera Module for Raspberry Pi: the part this guide covers5MP OV5647 Fisheye Lens Camera Module for Raspberry Pi₹889
Arducam 5MP OV5647 160° Wide Angle Camera Module: another version this guide coversArducam 5MP OV5647 160° Wide Angle Camera Module₹2,799
Arducam 5MP OV5647 Camera Board with LS-40180 Fisheye Lens: another version this guide coversArducam 5MP OV5647 Camera Board with LS-40180 Fisheye Lens₹2,699
Arducam 5MP OV5647 Camera Module w/ M12x0.5 Lens for Raspberry Pi: another version this guide coversArducam 5MP OV5647 Camera Module w/ M12x0.5 Lens for Raspberry Pi₹2,209
Arducam 5MP OV5647 Fisheye Camera w/ M8 Lens for Raspberry Pi: another version this guide coversArducam 5MP OV5647 Fisheye Camera w/ M8 Lens for Raspberry Pi₹2,769
Arducam 5MP OV5647 NoIR Camera Module for Raspberry Pi: another version this guide coversArducam 5MP OV5647 NoIR Camera Module for Raspberry Pi₹1,339
Arducam 5MP OV5647 NoIR Camera Module for Raspberry Pi 4/3B+/3: another version this guide coversArducam 5MP OV5647 NoIR Camera Module for Raspberry Pi₹1,339
Arducam 5MP OV5647 NoIR MINI Camera Module w/ Flex Cable: another version this guide coversArducam 5MP OV5647 NoIR MINI Camera Module w/ Flex Cable₹2,409
Arducam 5MP OV5647 NoIR Motorized IRcut Camera w/ LS-1820 Lens: another version this guide coversArducam 5MP OV5647 NoIR Motorized IRcut Camera w/ LS-1820 Lens₹4,049
Arducam 5MP OV5647 NoIR Motorized IRcut Filter Camera w/ LS-30188 Lens: another version this guide coversArducam 5MP OV5647 NoIR Motorized IRcut Filter Camera w/ LS-30188 Lens₹4,139
Arducam 5MP OV5647 Pan Tilt Camera for Raspberry Pi: another version this guide coversArducam 5MP OV5647 Pan Tilt Camera for Raspberry Pi₹2,194
Arducam Auto Focus Camera Module, OV5647 5MP 1080P Motorized Lens for Raspberry Pi: another version this guide coversArducam Auto Focus Camera Module, OV5647 5MP 1080P Motorized Lens for Raspberry Pi₹1,849
Arducam B0032 OV5647 CS-Mount Camera Board for Raspberry Pi: another version this guide coversArducam B0032 OV5647 CS-Mount Camera Board for Raspberry Pi₹2,729
Arducam B0033R 5MP OV5647 Camera Module w/ 100cm Ribbon Cable for Raspberry Pi: another version this guide coversArducam B0033R 5MP OV5647 Camera Module w/ 100cm Ribbon Cable for Raspberry Pi₹489
Arducam MINI OV5647 Wide Angle Camera Module for Raspberry Pi: another version this guide coversArducam MINI OV5647 Wide Angle Camera Module for Raspberry Pi₹6,149
Arducam Noir Camera for Raspberry Pi w/ CS Mount Lens LS-2717CS & OV5647 5MP: another version this guide coversArducam Noir Camera for Raspberry Pi w/ CS Mount Lens LS-2717CS & OV5647 5MP₹2,479
Arducam OV5647 5MP Mini Camera Module for Raspberry Pi: another version this guide coversArducam OV5647 5MP Mini Camera Module for Raspberry Pi₹1,499
Arducam Ultra Wide Angle Fisheye 5MP OV5647 Camera for Raspberry Pi: another version this guide coversArducam Ultra Wide Angle Fisheye 5MP OV5647 Camera for Raspberry Pi₹2,839
OV5647 5MP 1080P IR-Cut Camera for Raspberry Pi: another version this guide coversOV5647 5MP 1080P IR-Cut Camera for Raspberry Pi₹970
OV5647 5MP 1080P IR-Cut Camera for Raspberry Pi 3/4 w/ Auto Day/Night Mode: another version this guide coversOV5647 5MP 1080P IR-Cut Camera for Raspberry Pi₹970
Alternatives and when to choose them
- IMX219 camera: 8 MP, sharper and less noisy, the Camera v2 sensor.
- IMX708 Camera Module 3: 12 MP with autofocus and HDR.
- Raspberry Pi camera modules: every Pi camera compared.
Common mistakes to avoid
- Inserting the ribbon backwards, so the camera is not detected.
- Using a 15-pin cable on a Pi 5 or Zero, which has the smaller 22-pin connector.
- Expecting good colours from a NoIR camera in daylight.
- Plugging the camera in with the Pi powered on.
Frequently asked questions
Does the OV5647 work with Raspberry Pi 5?
Yes, with a 15-to-22-pin camera cable.
What resolution is the OV5647?
5 MP stills (2592 × 1944) and 1080p video at 30 fps.
What does NoIR mean?
The camera has no infrared filter, so it can see IR light for night vision.
Why does it say no cameras available?
Usually the ribbon is backwards or loose, or a third-party board needs the ov5647 overlay in config.txt.
OV5647 or IMX219?
IMX219 for better image quality; OV5647 when cost matters most.
Parts for this guide
- ₹889View
- ₹2,799View
- ₹2,699View
- ₹2,209View
- ₹2,769View
- ₹1,339View
- ₹3,189View
- ₹2,409View
- ₹4,049View
- ₹4,139View
- ₹2,194View
- ₹1,849View
- ₹2,729View
- ₹489View
- ₹6,149View
- ₹2,479View
- ₹1,499View
- ₹2,839View
- ₹970View
- ₹970View
- ₹1,609View
- ₹6,299View
- ₹1,419View
- ₹2,139View
- ₹1,419View
- ₹2,119View
- ₹289View
- ₹14,079View
- ₹11,461View
- ₹2,179View
- ₹227View
- ₹1,129View
Keep learning
Sources
- Raspberry Pi camera documentation (raspberrypi.com)
- OmniVision OV5647 product brief
- Picamera2 library manual (Raspberry Pi Ltd)
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.














