1. Home
  2. Docs
  3. Jetson Cameras
  4. Native Jetson Cameras – IMX219/IMX477
  5. IMX477 – Motorized Focus Camera

IMX477 – Motorized Focus Camera

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.

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(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

Hardware Setup

B0273 05

Driver Setup

Manual driver installation only for L4T32.4.3 and later versions

1. Download automatic installation script

https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.2/install_imx477.sh

2. Enter the folder

cd Downloads

3. Install the driver

chmod +x install_imx477.sh
 ./install_imx477.sh
automatic driver installation1

press y to reboot.

automatic driver installation2

*4. Uninstallation

If you want to roll back to original Jetson Nano camera driver, just run the following command to uninstall the Arducam driver, a reboot is also required.

sudo dpkg -r arducam-nvidia-l4t-kernel

Manual driver installation for L4T32.4.3 before versions

1. Identify Kernel Number

Different kernel versions require different driver packages. You need a matching driver package for your camera to work.

To identify your kernel:

  1. Print your Kernel Version with the following command.
uname -a

Example output:

Linux jetson-desktop 4.9.140-tegra #3 SMP PREEMPT Thu Jul 16 13:41:48 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

4.9.140 is our desired value.

  1. Print your L4T release number with the following command.
cat /etc/nv_tegra_release

Example output:

# R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t210ref, EABI: aarch64, DATE: Fri Jun 26 04:38:25 UTC 2020

R32 and 4.3 are our desired value.

  1. Combine the desired printed results to get the kernel detail.

From the example above, we get kernel 4.9.140 L4T-32.4.3.

2. Download Driver Package

To download Arducam IMX477 driver package:

  1. Go to Arducam GitHub repository for IMX477 on Jetson with the following URL:
https://github.com/ArduCAM/MIPI_Camera/tree/master/Jetson/IMX477/driver

What if I can’t find a matching driver?

If you can’t find a driver package matching your kernel version, please contact Arducam to update that.

  1. Enter the folder for your target Jetson board.
Jetson nano xavier nx camera driver folder

There are separate driver folders for Jetson Nano and Jetson Xavier NX, so use whichever match your target board.

  1. Click on the name of the matching driver package.
jetson camera driver package click
Example: Driver for Xavier NX with kernel 4.9.140-32.4.3

Refer to the kernel information from last step to decide which package is needed.

  1. Click on the Download button to download the file.
jetson camera driver download button
Example: Download driver for Xavier NX with kernel 4.9.140-32.4.3

3. Install the IMX477 Driver

To install the IMX477 driver for Jetson:

  1. Go to the folder in which you’ve saved the driver package, for example:
cd Downloads
  1. Install the driver with the following command, for example:
sudo dpkg -i arducam-nvidia-l4t-kernel_x.x.xxx-xx.x.x-xxxxxxxxxxxxxx_arm64_imx477.deb
  1. Reboot your Jetson
sudo reboot

First use

Download Arducam’s Jetson Nano repository

git clone https://github.com/ArduCAM/MIPI_Camera.git

Enter the folder with autofocus demo

cd /MIPI_Camera/Jetson/IMX477/AF_LENS

Auto focus

python Autofocus.py -i 7

Help:

help b0272

NOTE

The I2C bus of the CAM0 interface of Jetson Nano B01 is 7, and the I2C bus of the CAM1 interface is 8.
The I2C bus of the CAM0 interface of Jetson Xavier NX is 10, and the I2C bus of the CAM1 interface is 9.

Motorized focus

python FocuserExample.py -i 7

Help:

help1 b0272

Example:

example b0272

Screenshot:

screenshot b0272 2

Troubleshoot

Reference

Was this article helpful to you? Yes 2 No