1. Home
  2. Docs
  3. Cameras for Raspberry Pi
  4. Multi Camera Adapter Board
  5. Stereo Camera Adapter for Pi Zero

Stereo Camera Adapter for Pi Zero

INTRODUCTION

This multi-camera adapter board is designed for Raspberry pi ZERO and let you connect two 5MP cameras to Pi Zero.
Only one of the two cameras can be activated at a time, and they are working in alternate ways. It cannot run two cameras at the same time, but we build a simple software which can run two cameras and make it looks like working at the same time.
But the drawback is the frame rate, and resolution will be fairly low, may be useful for surveillance.
Please note that Raspberry Pi multi-camera adapter board is a nascent product that may have some stability issues and limitations because of the cable’s signal integrity and RPi’s closed source video core libraries, so use it on your own risk. This version doesn’t support 8MP Pi camera board. And it also can be used for other Raspberry Pi boards with minor software modifications.

PREREQUISITES

Because the camera switching is done through the camera led pin. You have to disable the automatic management of camera led in /boot/config.txt. The following command helps you disable the led control from the GPU firmware.

$ sudo sh -c 'echo "disable_camera_led=1" >> /boot/config.txt' 
$ sudo reboot

HARDWARE CONNECTION

Connect the multi-camera adapter board to Pi ZERO through 15-22pin flex cable. And connect two 5MP pi cameras to the Camera A and Camera B ports as the following photo shows.

QUICK START

Download the Raspberrypi library

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

pi@raspberrypi:~ $ git clone https://github.com/ArduCAM/RaspberryPi.git

Shell version

This shell script demonstrates how to take two still images from two cameras in turn. Each camera will preview for 5 seconds and then take a photo saved to the local file system. Users can directly see the tested pictures.

Run the script

cd RaspberryPi/Multi_Camera_Adapter/Multi_Adapter_Board_2Channel/shell
sudo chmod +x pi_cam.sh
sudo ./pi_cam.sh

Run the demo

pi@raspberrypi:~/RaspberryPi/Multi_Camera_Adapter/Multi_Adapter_Board_2Channel/shell $ ./pi_cam.sh
The board is Pi 3B/B+.
Set state of 134 to 1
Choose camera A
Set state of 134 to 0
Choose Camera B
Test OK

C++ version code

This example demonstrates to run two cameras and make them looks at the same

  • Install the opencv library
sudo apt-get install libopencv-dev
  • Compile and run
cd RaspberryPi/Multi_Camera_Adapter/Multi_Adapter_Board_2Channel/c++/
sudo make
sudo ./pi_cam
  • Compile and run

Was this article helpful to you? Yes No