Introduction
This Arducam IMX477 High Quality motorized focus camera module integrates a motor that could be controlled by software for a smarter focus, and you will no longer focus the camera by screwing the lens with your bare hands.
So how has software focus control made it more convenient? Here is an idea: Arducam provides you with an example program to control the focusing motor with keyboard keys, so you can focus the camera remotely with precision in an intuitive way. In another example powered by OpenCV, algorithms are used to control the motor and achieve autofocus.
Other than its motorized focus, it offers the same picture quality and camera controls as the Raspberry Pi High Quality camera.
To learn more about autofocus with Raspberry Pi camera modules, we recommend you read Raspberry Pi Camera Autofocus: The Complete Guide.
Common Specs
Image sensor
Sensor Model | IMX477 |
Shutter Type | Rolling Shutter |
IR Sensitivity | Visible light |
Active Pixels | 4056×3040 |
Resolution | 12 MP |
Image Sensor Format | 1/2.3″ |
Pixel Size | 1.55μm×1.55μm |

Lens
F/NO | 2.0 |
Focus Type | Motorized Focus |
Lens Focal Length | 3.24mm |
Field of View(FoV) | 87° (H) |
Back Focal Length | 7.53mm |
Lens Dimention | Φ16×18mm |
Connector & Cable
Camera Connector | MIPI CSI-2 22-pin |
Cable Length | 300mm (22-pin), 300mm(15-22pin) |
Pin # | Name | Description |
---|---|---|
1 | GND | Ground |
2 | CAM_D0_N | MIPI Data Lane 0 Negative |
3 | CAM_D0_P | MIPI Data Lane 0 Positive |
4 | GND | Ground |
5 | CAM_D1_N | MIPI Data Lane 1 Negative |
6 | CAM_D1_P | MIPI Data Lane 1 Positive |
7 | GND | Ground |
8 | CAM_CK_N | MIPI Clock Lane Negative |
9 | CAM_CK_P | MIPI Clock Lane Positive |
10 | GND | Ground |
11 | CAM_D2_N | MIPI Data Lane 2 Negative |
12 | CAM_D2_P | MIPI Data Lane 2 Positive |
13 | GND | Ground |
14 | CAM_D3_N | MIPI Data Lane 3 Negative |
15 | CAM_D3_P | MIPI Data Lane 3 Positive |
16 | GND | Ground |
17 | CAM_IO0 | Power Enable |
18 | CAM_IO1 | LED Indicator |
19 | GND | Ground |
20 | CAM_SCL | I2C SCL |
21 | CAM_SDA | I2C SDA |
22 | CAM_3V3 | 3.3V Power Output |
Quick Start Guide
NOTE
The latest Raspberry Pi Image System is recommended.

Hardware Setup

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