Cameras for Raspberry Pi

  1. Home
  2. Docs
  3. Cameras for Raspberry Pi
  4. Native Raspberry Pi Cameras
  5. 12MP IMX477 Motorized Focus Camera Module

12MP IMX477 Motorized Focus Camera Module

Table Of Contents

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 ModelIMX477
Shutter TypeRolling Shutter
IR SensitivityVisible light
Active Pixels4056×3040
Resolution12 MP
Image Sensor Format1/2.3″
Pixel Size1.55μm×1.55μm
IMX477 camera board
IMX477 mechanical drawing

Lens

F/NO2.0
Focus TypeMotorized Focus
Lens Focal Length3.24mm
Field of View(FoV)87° (H)
Back Focal Length7.53mm
Lens DimentionΦ16×18mm

Connector & Cable

Camera ConnectorMIPI CSI-2 22-pin
Cable Length300mm (22-pin), 300mm(15-22pin)
Pin #NameDescription
1GNDGround
2CAM_D0_NMIPI Data Lane 0 Negative
3CAM_D0_PMIPI Data Lane 0 Positive
4GNDGround
5CAM_D1_NMIPI Data Lane 1 Negative
6CAM_D1_PMIPI Data Lane 1 Positive
7GNDGround
8CAM_CK_NMIPI Clock Lane Negative
9CAM_CK_PMIPI Clock Lane Positive
10GNDGround
11CAM_D2_NMIPI Data Lane 2 Negative
12CAM_D2_PMIPI Data Lane 2 Positive
13GNDGround
14CAM_D3_NMIPI Data Lane 3 Negative
15CAM_D3_PMIPI Data Lane 3 Positive
16GNDGround
17CAM_IO0Power Enable
18CAM_IO1LED Indicator
19GNDGround
20SCLI2C SCL
21SDASCCB serial Interface data IO
22VCC3.3V Power Supply

Quick Start Guide

NOTE

The latest Raspberry Pi Image System is recommended.

pi image system 2020 08 20
We tested on this image system.

Hardware Setup

B0272 04

First Use

1.Clone the file

git clone https://github.com/ArduCAM/RaspberryPi.git
clone file imx477 b0272

2.Install Python Dependency libraries

sudo apt-get install python-opencv 
install Python Dependency libraries imx477 b0272

3.Enable the I2C0 adapter

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

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
Motorized Focus Camera Preview.py imx477 b0272

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

FAQ/Troubleshooting

The use of the four Raspberry Pi camera applications

FAQ about raspberry pi camera module

Was this article helpful to you? Yes 2 No 2