Introduction
Arducam 8MP IMX219 Motorized Focus Camera Modules are designed for you to control the focus via software, so you can see closer and see where you want to see.
To learn more about autofocus with Raspberry Pi camera modules, we recommend you read Raspberry Pi Camera Autofocus: The Complete Guide.
Models in this Series
There are four cameras in this series. The main differences between them are the field of view and IR sensitivity. They are the same in terms of software operation.
SKU | Field of View | IR Sensitivity |
B0190 | 77.6°D x 65°H x 51°V | NoIR |
B0182 | 77.6°D x 65°H x 51°V | Visible Light |
B0180 | 175°D x 145°H x 77°V | Visible Light |
B0122 | 54°H x 41°V | Visible Light |
Too short camera cable?
You may need Arducam 30cm Sensor Extension Cable which extends the small camera module with a much longer distance and fit into the space-constrained environment.

Common Specs
General Specifications
Sensor Model | IMX219 |
Shutter Type | Rolling Shutter |
Active Pixels | 3280 (H) × 2464 (V) |
Resolution | 8MP |
Image Sensor Format | Type 1/4″ |
Pixel Size | 1.12μm×1.12μm |
CSI-2 Data Output | 2-lane mode |
Data Format | Raw Bayer 10bit |

IMX219 Full Datasheet
Refer here:
https://www.arducam.com/downloads/modules/RaspberryPi_camera/IMX219DS.PDF
Quick Start Guide
Hardware Setup
Ensure your Raspberry Pi is turned off.
1.Locate the camera port (CSI)
For Raspberry Pi Model A & B, it’s between the HDMI and audio port of the Raspberry Pi board.

2.Gently pull up on the edges of the connector’s plastic clip and avoid pulling it off
3.Insert the ribbon cable
Make sure the metal contacts are facing the HDMI connectors. Do not bend the flex cable, and make sure it’s firmly inserted.
4.Push the plastic clip down
Do it while holding the flex cable still, until the connector’s clip is back in place.
Software Setup
Note:
If you are running the latest version of Raspberry Pi OS. (January 28th,2022 or later releases, Debian version:11(Bullseye)). You need to update the config file and use libcamera apps.
- For Raspberry Bullseye users running on Pi 4, please do the following:
sudo nano /boot/config.txt Find the line: camera_auto_detect=1, update it to: camera_auto_detect=0 dtoverlay=imx219 Save and reboot.
- For Bullseye users running on Pi 0 ~ 3, please also:
Open a terminal Run sudo raspi-config Navigate to Advanced Options Enable Glamor graphic acceleration Reboot your Pi
If you encounter the display issues, please also execute the following steps:
Open a terminal Run sudo raspi-config Navigate to Advanced Options Navigate to GL Driver Select GL (Full KMS) Reboot your Pi
- For Raspberry Pi Compute Module 3/4
The latest software only supports one camera at this time, CM4 uses CAM1 by default.
If you are running the previous system (Buster legacy and the system before it), you can refer to the following steps:
Preparation
- Start up your Raspberry Pi.
- Go to the main menu and open the Raspberry Pi Configuration tool.
- Select the Interfaces tab and ensure that the camera is enabled:
- Reboot your Raspberry Pi.
First Use
1.Clone the file
git clone https://github.com/ArduCAM/RaspberryPi.git

2.Install Python Dependency libraries
sudo apt-get install python-opencv

3.Enable the I2C0 adapter
cd RaspberryPi/Motorized_Focus_Camera chmod +x enable_i2c_vc.sh ./enable_i2c_vc.sh

Then press ‘y’ to reboot.
4.Demo code
4.1 Motorized_Focus_Camera_Preview.py
This demo supports focusing in preview mode. Single focus by keyboard up and down arrow.
cd RaspberryPi/Motorized_Focus_Camera sudo python Motorized_Focus_Camera_Preview.py

4.2 Motorized_Focus_Camera_Snapshot.py
This demo supports focusing and save the image to the local filesystem. You can save the image after each focus. Single focus by keyboard up and down arrow.
cd RaspberryPi/Motorized_Focus_Camera sudo python Motorized_Focus_Camera_Snapshot.py
4.3 Autofocus.py
This demo supports auto focusing in preview mode.
cd RaspberryPi/Motorized_Focus_Camera sudo python Autofocus.py
Note
You can modify the code to get a better image. The helpful links for you to modify code.
Explore more resources:
https://picamera.readthedocs.io/en/release-1.13/recipes1.html?highlight=shutter%20speed#capturing-consistent-images
https://picamera.readthedocs.io/en/release-1.13/api_camera.html#picamera