Cameras for Raspberry Pi

  1. Home
  2. Docs
  3. Cameras for Raspberry Pi
  4. Synchronized Stereo Camera HAT
  5. Camarray – Arducam 8MP Synchronized Stereo Camera Bundle Kit

Camarray – Arducam 8MP Synchronized Stereo Camera Bundle Kit

Table Of Contents

Introduction

​This Arducam 8MP Synchronized Stereo Camera Bundle Kit is capable of running two 8MP IMX219 Camera Modules simultaneously through a single MIPI CSI-2 camera slot connection on Raspberry Pi. The stereo camera HAT is enabled by ArduChip to disguise the dual-camera connection as a single camera to be accepted by the single-board computers. You can use this bundle to build your stereo camera system for depth-related vision applications or advanced surveillance cameras.

What is Camarray

Camarray is a series of embedded stereo cameras and multiple camera solutions from Arducam. Upgraded from Arducam Sync Stereo Camera HAT, the Camarry can disguise up to 4 synched camera modules as a single camera slot connection to embedded systems like the Raspberry Pi, Jetson nano, and Xavier NX. With Arducam camarray, your camera connectivities are no longer limited to the camera connectors on the motherboard or the carrier board. Along with Arducam-provided camera drivers, more flexibility can be added to your multi-camera applications.

NOTE

1.The Camarray HAT does not support digital pan in half resolution combine and programmable pan speed control.
2.The Camarray HAT is not a crop and a half (halving the horizontal resolution of each camera and halving the field of view) but a compressed half (halving the horizontal resolution of each camera but leaving the field of view unchanged), so it does not need to support scan mode.

Common Specs

Image sensor

Sensor ModelIMX219
Shutter TypeRolling Shutter
Active Pixels3280 (H) × 2464 (V)
Resolution8MP*2
Image Sensor FormatType 1/4″
Pixel Size1.12μm×1.12μm
Color Filter Array650nm
IMX219 block diagram
IMX219 Block Diagram

Lens Assembly

InterchangeabilityNo
F/NO0
Focus TypeFixed Focus
Field of View(FoV)54°H×41°V
IR SensitivityVisible light

Board

Camera Board Size105×24 mm
HAT Size65×56 mm
IMX219 stereo camera board size

Camera Board Mechanical Drawing

UC 512.Rev .C DIM 01

HAT Mechanical Drawing

Pin No.Pin NameTypeDescription
13V3Power3.3V power supply
2FSINInputFrame Sync Input
3STBOutputLED Strobe Output
4GNDGroundGround
53V3Power3.3V power supply
6SDAI/OSCCB serial interface data I/O
7SCLInputSCCB serial interface clock input
8GNDGroundGround

Connector & Cable

Connector InterfaceMIPI CSI-2 15-pin 2-lane
Ribbon Cable Length80mm(22-pin), 73mm(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_IO0Power Enable
12CAM_IO1LED Indicator
13CAM_SCLI2C SCL
14CAM_SDAI2C SDA
15CAM_3V33.3V Power Input

Driver Performance

Output Interface2-lane MIPI serial output
Output Formats8/10-bit RAW
Frame Rates[email protected]×2464, [email protected]×1080, [email protected]×720
[email protected]×972(raspistill default configuration)
[email protected]×720(raspivid default configuration)

Quick Start Guide

Hardware Setup​​

Check the Driver

There are 3 drivers for Raspberry Pi:

  • Official driver
  • Arducam MIPI camera driver
  • Arducam V4L2 driver

1)The MIPI camera driver does not conflict with the official driver. But the V4L2 driver conflicts with the official driver and MIPI camera driver. 

2)Installing the Arducam V4L2 driver will automatically overwrite the other two drivers. After uninstalling the Arducam V4L2 driver, it will automatically revert to the official driver.

3)If you want to use the official commands like raspistill and raspivid, you need to check if the V4L2 driver is installed first, if so, uninstall it.

Arducam 8MP Synchronized Stereo Camera uses the official driver or MIPI camera driver.

Check if the V4L2 driver is installed:

1.Type the following command:

sudo nano /boot/config.txt

2.Press【PageDown】several times or scroll your mouse wheel down to check if there is “dtoverlay=arducam”.

dtoverlayarducam”

1)If you see “dtoverlay=arducam”, modify it as “#dtoverlay=arducam” to uninstall the V4L2 driver. Press 【Ctrl+X】【Y】,【Enter】to save the change and exit. Finally, type the following command to reboot.

sudo reboot

2)If you don’t see “dtoverlay=arducam”, it means you haven’t installed the V4L2 driver. Please follow the below steps to continue.

3)If you see “#dtoverlay=arducam”, it means that Arducam’s V4L2 driver has been installed before, but it is uninstalled. Please follow the below steps to continue.

Check the Camera​​

1.Go to the main menu and open the Raspberry Pi Configuration tool.

check camera1

2.Select the Interfaces tab and ensure that the camera is enabled:

check camera2

3.Reboot your Pi

4.Check whether the camera is detected

  1. vcgencmd get_camera
whether the camera is detected
  • detected=1 means the camera is detected. (The camera is OV5647, IMX219, or IMX477.)
  • detected=0 means the camera is not detected. You might have to check the ribbon connection correctly, then reboot the Raspberry Pi.

First Use with Official Driver

You can refer to the page for instructions. Or refer to this page for the official commands.

NOTE

The images from two cameras are compressed to half of the original in the horizontal direction, but the field of view remains the same and the composite output image has the same resolution as the input. The Raspberry Pi does not know that it is a synthesized image and still receives it as a normal image to display.

1. Preview the camera feed in real time

Execute the official native command raspistill

raspistill -t 0

Press 【Ctrl】+【C】 to exit the preview.

8MP stereo camera preview1

Execute the official native command raspivid

raspivid -t 0
8MP stereo camera preview2

It can be zoomed into the display.

raspistill -t 0 -p 800,100,1024,768
raspivid -t 0 -p 800,100,1024,768

800,100 indicates the starting position of the window (top left corner).
1024,768 indicates the size of the image after scaling.

8MP stereo camera preview3

2. Save an image

Take a picture after a two-second (time in milliseconds) delay and save it as image.jpg.

raspistill -t 2000 -o image.jpg
pi doc
8MP stereo camera save an image2

Take a custom sized photo

raspistill -t 2000 -o image.jpg -w 1920 -h 1080
8MP stereo camera save an image3

3. Save a video

Record 10 seconds (time in milliseconds) of h264 video and save it as video.h264.

raspivid -t 10000 -o video.h264
save a video imx477 dual command
pi doc imx477 dual

Double click “video.h264” file, it will call the VLC media player to play.

8MP stereo camera save a video1

4. Advanced controls

The stereo camera HAT support channel selection and digital pan. It requires to write onboard ArduChip registers through the I2C bus on Raspberry Pi. So the user needs to active the I2C bus first(please refer to chapter 5.1 or the following methods).

Clone the GitHub repository from https://github.com/ArduCAM/MIPI_Camera.git and run the script ./enable_i2c_vc.sh, a reboot is required.

For more information about the ArduChip registers, please refer to chapter 7.

Before issuing any control command, you have to launch preview or video using raspistill or raspivid command first, then launch another terminal window to run the following commands.

4.1 Switch to CAM0, Single Mode

Run command i2cset -y 0 0x24 0x24 0x01 to switch from stereo mode to single mode CAM0 feed.

4.2 Switch to CAM1, Single Mode

Run command i2cset -y 0 0x24 0x24 0x02 to switch from stereo mode to single mode CAM1 feed.

4.3 Swtich back to Stereo Mode, Resized Full-Combine

Run command i2cset -y 0 0x24 0x24 0x00 to switch back to stereo mode.

First Use with Arducam MIPI Camera Diver

1.Download and Install the SDK

Download the SDK library:

git clone https://github.com/ArduCAM/MIPI_Camera.git
download sdk1
Downloading
download sdk2
Download completed (it usually takes a few minutes)

Enter the SDK directory:

cd MIPI_Camera/RPI/
Enter the SDK directory

Install SDK:

make install
install sdk

Enable I2C_0:

chmod +x enable_i2c_vc.sh
./enable_i2c_vc.sh
enable i2c

Press 【y】, 【Enter】 to reboot Pi.

2.Compile demo

Enter the directory:

cd MIPI_Camera/RPI/

Compile demo:

make clean && make
complie demo

1.It doesn’t matter if opencv reports an error

2.The demo program needs to be recompiled after modification.

3.Run demo (through the “arducamstill” command)

This is a comprehensive application, user can use it to preview, get images in a different format and fine tuning the image quality.

3.1 Get help

Execute the following command to get a description of the parameters of the arducamstill command.

Be sure to run it in the MIPI_Camera/RPI directory.

./arducamstill -?
8MP stereo camera get help1
3.2 Preview the camera feed in real time

Check the supported modes.

./list_format

You can only run the modes that include “Used for Arducam Synchronized stereo camera HAT” in the mode description

8MP stereo camera MIPI driver preview1

Take mode12 for example:

./arducamstill -t 0 -m 12
8MP stereo camera MIPI driver run mode12

4.NOTE

Arducam MIPI Camera Driver does not conflict with the official driver.
● If you have compiled the Arducam MIPI Camera demo before, after running the official commands (raspistill and raspivid), you can enter the Arducam MIPI Camera demo directory and run the Arducam MIPI Camera commands directly (no need to compile and reboot the system again).
● When you want to run the official commands (raspistill and raspivid) again after running the Arducam MIPI Camera command, you need to restart the system first.

What’s Next​

Here are the things you can do after this quick start:

Was this article helpful to you? Yes No 1