Camera

About the Camera Modules

There are now several official Raspberry Pi camera modules. The original 5-megapixel model was released in 2013, it was followed by an 8-megapixel Camera Module 2 which was released in 2016. The latest camera model is the 12-megapixel Camera Module 3 which was released in 2023. The original 5MP device is no longer available from Raspberry Pi.

All of these cameras come in visible light and infrared versions, while the Camera Module 3 also comes as a standard or wide FoV model for a total of four different variants.

Camera Module 3 normal and wide angle
Camera Module 3 (left) and Camera Module 3 Wide (right)
Camera Module 3 NoIR normal and wide angle
Camera Module 3 NoIR (left) and Camera Module 3 NoIR Wide (right)

Additionally a 12-megapixel High Quality Camera with CS- or M12-mount variants for use with external lenses was released in 2020 and 2023 respectively. There is no infrared version of the HQ Camera, however the IR Filter can be removed if required.

M12- and C/CS-mount versions of the HQ Camera
HQ Camera, M12-mount (left) and C/CS-mount (right)

Finally, there is the Global Shutter camera, which was released in 2023. There is no infrared version of the GS Camera, however the IR Filter can be removed if required.

GS Camera
Global Shutter Camera
Note
Raspberry Pi Camera Modules are compatible with all Raspberry Pi computers with CSI connectors - that is, all models except Raspberry Pi 400 and the 2016 launch version of Zero.

Rolling or Global shutter?

Most digital cameras — and our Camera Modules — use a rolling shutter: they scan the image they’re capturing line-by-line, then output the results. You may have noticed that this can cause distortion effects in some settings; if you’ve ever photographed rotating propeller blades, you’ve probably spotted the image shimmering rather than looking like an object that is rotating. The propeller blades have had enough time to change position in the tiny moment that the camera has taken to swipe across and observe the scene.

A global shutter — and our Global Shutter Camera Module — doesn’t do this. It captures the light from every pixel in the scene at once, so your photograph of propeller blades will not suffer from the same distortion.

Why is this useful? Fast-moving objects, like those propeller blades, are now easy to capture; we can also synchronise several cameras to take a photo at precisely the same moment in time. There are plenty of benefits here, like minimising distortion when capturing stereo images. (The human brain is confused if any movement that appears in the left eye has not appeared in the right eye yet.) The Raspberry Pi Global Shutter Camera can also operate with shorter exposure times - down to 30µs, given enough light - than a rolling shutter camera, which makes it useful for high-speed photography.

Note
The Global Shutter Camera’s image sensor has a 6.3mm diagonal active sensing area, which is similar in size to Raspberry Pi’s HQ Camera. However, the pixels are larger and can collect more light. Large pixel size and low pixel count are valuable in machine-vision applications; the more pixels a sensor produces, the harder it is to process the image in real time. To get around this, many applications downsize and crop images. This is unnecessary with the Global Shutter Camera and the appropriate lens magnification, where the lower resolution and large pixel size mean an image can be captured natively.

Installing a Raspberry Pi camera

Warning
Cameras are sensitive to static. Earth yourself prior to handling the PCB. A sink tap or similar should suffice if you don’t have an earthing strap.

Connecting the Camera

The flex cable inserts into the connector labelled CAMERA on the Raspberry Pi, which is located between the Ethernet and HDMI ports. The cable must be inserted with the silver contacts facing the HDMI port. To open the connector, pull the tabs on the top of the connector upwards, then towards the Ethernet port. The flex cable should be inserted firmly into the connector, with care taken not to bend the flex at too acute an angle. To close the connector, push the top part of the connector towards the HDMI port and down, while holding the flex cable in place.

We have created a video to illustrate the process of connecting the camera. Although the video shows the original camera on the original Raspberry Pi 1, the principle is the same for all camera boards:

Depending on the model, the camera may come with a small piece of translucent blue plastic film covering the lens. This is only present to protect the lens while it is being mailed to you, and needs to be removed by gently peeling it off.

Note
There is additional documentation available around fitting the recommended 6mm and 16mm lens to the HQ Camera.

Preparing the Software

Before proceeding, we recommend ensuring that your kernel, GPU firmware and applications are all up to date. Please follow the instructions on keeping your operating system up to date.

Then, please follow the relevant setup instructions for the libcamera software stack, and the Picamera2 Python library.

Hardware Specification

Camera Module v1 Camera Module v2 Camera Module 3 Camera Module 3 Wide HQ Camera GS Camera

Net price

$25

$25

$25

$35

$50

$50

Size

Around 25 × 24 × 9 mm

Around 25 × 24 × 9 mm

Around 25 × 24 × 11.5 mm

Around 25 × 24 × 12.4 mm

38 x 38 x 18.4mm (excluding lens)

38 x 38 x 19.8mm (29.5mm with adaptor and dust cap)

Weight

3g

3g

4g

4g

30.4g

34g (41g with adaptor and dust cap)

Still resolution

5 Megapixels

8 Megapixels

11.9 Megapixels

11.9 Megapixels

12.3 Megapixels

1.58 Megapixels

Video modes

1080p30, 720p60 and 640 × 480p60/90

1080p47, 1640 × 1232p41 and 640 × 480p206

2304 × 1296p56, 2304 × 1296p30 HDR, 1536 × 864p120

2304 × 1296p56, 2304 × 1296p30 HDR, 1536 × 864p120

2028 × 1080p50, 2028 × 1520p40 and 1332 × 990p120

1456 x 1088p60

Sensor

OmniVision OV5647

Sony IMX219

Sony IMX708

Sony IMX708

Sony IMX477

Sony IMX296

Sensor resolution

2592 × 1944 pixels

3280 × 2464 pixels

4608 x 2592 pixels

4608 x 2592 pixels

4056 x 3040 pixels

1456 x 1088 pixels

Sensor image area

3.76 × 2.74 mm

3.68 x 2.76 mm (4.6 mm diagonal)

6.45 x 3.63mm (7.4mm diagonal)

6.45 x 3.63mm (7.4mm diagonal)

6.287mm x 4.712 mm (7.9mm diagonal)

6.3mm diagonal

Pixel size

1.4 µm × 1.4 µm

1.12 µm x 1.12 µm

1.4 µm x 1.4 µm

1.4 µm x 1.4 µm

1.55 µm x 1.55 µm

3.45 µm x 3.45 µm

Optical size

1/4"

1/4"

1/2.43"

1/2.43"

1/2.3"

1/2.9"

Focus

Fixed

Adjustable

Motorized

Motorized

Adjustable

Adjustable

Depth of field

Approx 1 m to ∞

Approx 10 cm to ∞

Approx 10 cm to ∞

Approx 5 cm to ∞

N/A

N/A

Focal length

3.60 mm +/- 0.01

3.04 mm

4.74 mm

2.75 mmm

Depends on lens

Depends on lens

Horizontal Field of View (FoV)

53.50 +/- 0.13 degrees

62.2 degrees

66 degrees

102 degrees

Depends on lens

Depends on lens

Vertical Field of View (FoV)

41.41 +/- 0.11 degrees

48.8 degrees

41 degrees

67 degrees

Depends on lens

Depends on lens

Focal ratio (F-Stop)

F2.9

F2.0

F1.8

F2.2

Depends on lens

Depends on lens

Maximum exposure times (seconds)

6

11.76

112

112

670.74

15.5

Lens Mount

N/A

N/A

N/A

N/A

C/CS- or M12-mount

C/CS

NoIR version available?

Yes

Yes

Yes

Yes

No

No

Note
There is some evidence to suggest that the Camera Module 3 may emit RFI at a harmonic of the CSI clock rate. This RFI is in a range to interfere with GPS L1 frequencies (1575 MHz). Please see the thread on Github for details and proposed workarounds.

Mechanical Drawings

Available mechanical drawings;

  • Camera Module 2 PDF

  • Camera Module 3 PDF

  • Camera Module 3 Wide PDF

  • HQ Camera Module (CS-mount version) PDF

    • The CS-mount PDF

  • HQ Camera Module (M12-mount version) PDF

  • GS Camera Module PDF

Note
Board dimensions and mounting-hole positions for Camera Module 3 are identical to Camera Module 2. However, due to changes in the size and position of the sensor module, it is not mechanically compatible with the camera lid for the Raspberry Pi Zero Case.

Schematics

Schematic of the Raspberry Pi CSI camera connector.

camera connector

Other available schematics;

  • Camera Module v2 PDF

  • HQ Camera Module PDF

Camera Filters

Some transmission characteristics are available for the Camera Module 3 and the HQ camera.

Camera Module 3

The Camera Module 3 is built around the IMX708, which has the following spectral sensitivity characteristics.

Camera Module 3 Transmission Graph

HQ Camera

The HQ Camera uses a Hoya CM500 infrared filter. Its transmission characteristics are as represented in the following graph.

CM500 Transmission Graph

Filter Removal

Note
This procedure applies to both the HQ and GS cameras.
Warning
This procedure cannot be reversed: the adhesive that attaches the filter will not survive being lifted and replaced, and while the IR filter is about 1.1mm thick, it may crack when it is removed. Removing it will void the warranty on the product. Nevertheless, removing the filter will be desirable to some users.

FILTER ON small

Both the High Quality Camera and Global Shutter Camera contain an IR filter, which is used to reduce the camera’s sensitivity to infrared light. This ensures that outdoor photos look more natural. However, some nature photography can be enhanced with the removal of this filter; the colours of sky, plants, and water can be affected by its removal. The camera can also be used without the filter for night vision in a location that is illuminated with infrared light.

Warning
Before proceeding read through all of the steps and decide whether you are willing to void your warranty. Do not proceed unless you are sure that you are willing to void your warranty.

To remove the filter:

  • Work in a clean and dust-free environment, as the sensor will be exposed to the air.

  • Unscrew the two 1.5 mm hex lock keys on the underside of the main circuit board. Be careful not to let the washers roll away. There is a gasket of slightly sticky material between the housing and PCB which will require some force to separate.

SCREW REMOVED small

  • Lift up the board and place it down on a very clean surface. Make sure the sensor does not touch the surface.

FLATLAY small

  • You may try some ways to weaken the adhesive, such as a little isopropyl alcohol and/or heat (~20-30 C).

SOLVENT small

  • Turn the lens mount around so that it is "looking" upwards and place it on a table.

  • Using a pen top or similar soft plastic item, push down on the filter only at the very edges where the glass attaches to the aluminium - to minimise the risk of breaking the filter. The glue will break and the filter will detach from the lens mount.

REMOVE FILTER small

  • Given that changing lenses will expose the sensor, at this point you could affix a clear filter (for example, OHP plastic) to minimize the chance of dust entering the sensor cavity.

  • Replace the main housing over the circuit board. Be sure to realign the housing with the gasket, which remains on the circuit board.

  • The nylon washer prevents damage to the circuit board; apply this washer first. Next, fit the steel washer, which prevents damage to the nylon washer.

  • Screw down the two hex lock keys. As long as the washers have been fitted in the correct order, they do not need to be screwed very tightly.

FILTER OFF small

Note
It is likely to be difficult or impossible to glue the filter back in place and return the device to functioning as a normal optical camera.

The following lenses are recommended for use with our HQ and GS cameras.

Note
While the HQ Camera is available in both C/CS- and M12-mount versions, the GS Camera is available only with a C/CS-mount.

C/CS Lenses

We recommend two lenses, a 6mm wide angle lens and a 16mm telephoto lens. These lenses should be available from your nearest Authorised Reseller.

16mm telephoto 6mm wide angle

Resolution

10MP

3MP

Image format

1"

1/2"

Aperture

F1.4 to 1.6

F1.2

Mount

C

CS

Field Angle

1"

44.6°× 33.6°

63°

2/3"

30.0°× 23.2°

1/1.8"

24.7°× 18.6°

1/2"

21.8°× 16.4°

Back focal length

17.53mm

7.53mm

M.O.D.

0.2m

0.2m

Dimensions

φ39.00×50.00mm

φ30×34mm

M12 Lenses

m12 lens

We recommend three lenses manufactured by Gaojia Optotech. These lenses should be available from your nearest Authorised Reseller.

8mm 25mm Fish Eye

Resolution

12MP

5MP

15MP

Image format

1/1.7"

1/2"

1/2.3"

Aperture

F1.8

F2.4

F2.5

Mount

M12

Field of View (D/H/V)

72.64°/57.12°/42.44°

18.3°/14.7°/11.1°

184.6°/140°/102.6°