Component guide · Intermediate · 5 min read
Raspberry Pi HQ Camera (IMX477)

Lenses, Setup and Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
The Raspberry Pi High Quality Camera uses the 12.3 MP Sony IMX477, a larger sensor than other Pi cameras, with interchangeable lenses on a C/CS mount (or M12 on the newer version). You choose the lens for the job: telephoto, wide or macro. It suits microscopy, wildlife, astrophotography and inspection, and Arducam makes IMX477 boards for the Jetson too.
Key specs at a glance
- Sensor
- Sony IMX477, 12.3 MP (4056 × 3040), 7.9 mm diagonal
- Pixel size
- 1.55 µm
- Lens mount
- C/CS (with adapter) or M12, depending on version
- Video
- 1080p50, 4056 × 3040 at 10 fps
- Back focus
- Adjustable 12.5 to 22.4 mm (C/CS version)
- Interface
- MIPI CSI-2, 15-pin ribbon
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Raspberry Pi High Quality Camera – C/CS Mount₹6,819
Option 2Raspberry Pi HQ Camera, M12 Mount₹6,466
Option 3Arducam 12.3MP 1/2.3-Inch HQ Camera Module w/ 6mm CS Lens for Raspberry Pi₹6,799
Option 4Arducam 12.3MP IMX477 IR-CUT Camera Module w/ 6mm CS Lens for Jetson Nano/Xavier NX₹8,359
Option 5Arducam 12MP IMX477 Motorized Focus Camera for Jetson Nano₹8,499
Option 6Arducam 12MP IMX477 Motorized Focus Camera for Jetson Nano/Xavier NX₹9,889
What the HQ Camera (IMX477) is
The larger pixels collect more light, so the HQ Camera gives cleaner images in dim light than the 8 MP and 12 MP small-sensor cameras. It has no lens of its own: buy a 6 mm wide lens, a 16 mm telephoto, a microscope adapter or any C-mount lens.
The C/CS version has a tripod mount and a back-focus ring. CS lenses screw in directly; C lenses need the 5 mm C-CS adapter ring that comes with it.
HQ Camera (IMX477) pinout
The pins on the HQ Camera (IMX477) 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 HQ Camera (IMX477)
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.
| HQ Camera (IMX477) 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("hq.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
CS lenses go straight on; C lenses need the C-CS adapter ring.
set the lens focus ring first, then the back-focus ring if infinity is not sharp.
a smaller aperture (higher f-number) gives more depth of field but needs more light.
the sensor has an IR-cut filter; removing it for astro or IR work cannot easily be undone.
What you need
Shop this list20 of 20 found in our store · ₹1,74,808
Raspberry Pi High Quality Camera – C/CS Mount: the part this guide coversRaspberry Pi High Quality Camera – C/CS Mount₹6,819
Raspberry Pi HQ Camera, M12 Mount: another version this guide coversRaspberry Pi HQ Camera, M12 Mount₹6,466
Arducam 12.3MP 1/2.3-Inch HQ Camera Module w/ 6mm CS Lens for Raspberry Pi: another version this guide coversArducam 12.3MP 1/2.3-Inch HQ Camera Module w/ 6mm CS Lens for Raspberry Pi₹6,799
Arducam 12.3MP IMX477 IR-CUT Camera Module w/ 6mm CS Lens for Jetson Nano/Xavier NX: another version this guide coversArducam 12.3MP IMX477 IR-CUT Camera Module w/ 6mm CS Lens for Jetson Nano/Xavier NX₹8,359
Arducam 12MP IMX477 Motorized Focus Camera for Jetson Nano: another version this guide coversArducam 12MP IMX477 Motorized Focus Camera for Jetson Nano₹8,499
Arducam 12MP IMX477 Motorized Focus Camera for Jetson Nano/Xavier NX: another version this guide coversArducam 12MP IMX477 Motorized Focus Camera for Jetson Nano₹8,499
Arducam 12MP IMX477 Motorized Focus Camera for Raspberry Pi: another version this guide coversArducam 12MP IMX477 Motorized Focus Camera for Raspberry Pi₹11,049
Arducam 12MP IMX477 Pan Tilt Zoom PTZ Camera w/ IR-Cut for Raspberry Pi & Jetson Nano: another version this guide coversArducam 12MP IMX477 Pan Tilt Zoom PTZ Camera w/ IR-Cut for Raspberry Pi & Jetson Nano₹13,829
Arducam B0240E 12.3MP IMX477 Camera Module w/ C/CS-Lens Mount: another version this guide coversArducam B0240E 12.3MP IMX477 Camera Module w/ C/CS-Lens Mount₹8,499
Arducam B0251 MINI Camera Module, 12.3MP IMX477 Sensor w/ M12 Lens: another version this guide coversArducam B0251 MINI Camera Module, 12.3MP IMX477 Sensor w/ M12 Lens₹6,459
Arducam B0466N 12.3MP 477M HQ Camera Module w/ 158° M12 Lens: another version this guide coversArducam B0466N 12.3MP 477M HQ Camera Module w/ 158° M12 Lens₹5,379
Arducam HQ Camera for Jetson Nano & Xavier NX, 12MP IMX477 with 6mm CS-Mount Lens: another version this guide coversArducam HQ Camera for Jetson Nano & Xavier NX, 12MP IMX477 with 6mm CS-Mount Lens₹8,389
Arducam IR-CUT Camera Module for Raspberry Pi w/ 12MP IMX477: another version this guide coversArducam IR-CUT Camera Module for Raspberry Pi w/ 12MP IMX477₹12,359
Arducam MINI IMX477 Camera Module for Raspberry Pi CM/CM4 w/ Lens: another version this guide coversArducam MINI IMX477 Camera Module for Raspberry Pi CM/CM4 w/ Lens₹5,459
Waveshare IMX477-160 12.3MP Camera, 160° FOV, for Jetson Nano/Compute Module: another version this guide coversWaveshare IMX477-160 12.3MP Camera, 160° FOV, for Jetson Nano/Compute Module₹7,914
Raspberry Pi 5 (4 GB): the computer the camera plugs intoRaspberry Pi 5 16GB RAM Single Board Computer₹36,169Closest match, check the specs
Raspberry Pi 4 Model B (4 GB): works with the standard 15-pin cableRaspberry Pi 4 Model B 1GB RAM₹4,476Closest match, check the specs
15-pin to 22-pin camera cable: for Raspberry Pi 5 and Zero boardsArducam CB008 3.8cm 15-Pin to 22-Pin Camera Cable for Raspberry Pi Zero/W₹227
Raspberry Pi 6 mm wide angle lens for HQ Camera: a general-purpose lensRaspberry Pi 6mm Wide Angle Lens for HQ Camera₹2,880
Raspberry Pi 16 mm telephoto lens for HQ Camera: for distant subjects and close-up detailRaspberry Pi 16mm Telephoto Lens for HQ Camera₹6,279
Alternatives and when to choose them
- Camera Module 3 (IMX708): autofocus, no lens to choose.
- Camera lenses: M12, CS and C mount: picking the right lens.
- IMX219 camera: cheaper fixed-lens camera.
Common mistakes to avoid
- Fitting a C lens without the adapter ring, so nothing focuses.
- Over-tightening the back-focus lock screw.
- Buying the camera without a lens.
- Removing the IR filter and losing true daytime colour for good.
Frequently asked questions
Does the HQ Camera come with a lens?
No, buy a C, CS or M12 lens to suit your project.
C or CS lens?
CS lenses fit directly; C lenses need the 5 mm adapter ring supplied.
Does it work with Raspberry Pi 5?
Yes, with a 15-to-22-pin cable.
Is it good for astrophotography?
Yes, its larger sensor and long exposures make it popular for astro and microscopy.
Does it work with Jetson?
Arducam IMX477 boards are made for Jetson Nano and Xavier NX.
Parts for this guide
Keep learning
Sources
- Raspberry Pi High Quality Camera product brief (Raspberry Pi Ltd)
- Sony IMX477 product information
- 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.



