Getting Started: Arducam ToF Camera for Raspberry Pi
A quick step-by-step tutorial to help you jump-start your Machine Vision adventure with the Arducam ToF camera for Raspberry Pi.
Note
Raspberry Pi Bullseye/Bookworm OS is required for this camera (04/04/2022 and later releases), a fresh install is highly recommended.
How ToF Works?
"ToF" stands for "Time of Flight".
A ToF Camera emits modulated lights (CW method) and uses the time it takes for the said lights to be reflected back to measure the distance/depth info of any given object/scene, and you can obtain depth data (X, Y & Z coordinate position) in every pixel.
Light travel is calculated with d=C/2f
, where C is the speed of light and f is the modulation frequency.
Hardware Connection
Hardware Connection on Pi5
Hardware Connection on Pi4
For a more detailed graphic guide on how to connect, please find out here.
Software Guide
Next
For Raspberry Pi 4 users and Raspberry Pi 5 users who have updated the camera firmware, please refer to the following content to continue using the camera:
Step 1. Pull the repository
git clone https://github.com/ArduCAM/Arducam_tof_camera.git
Step 2. Change the directory to Arducam_tof_camera
cd Arducam_tof_camera
Step 3. Installation (Driver, Dependencies, SDK, OpenCV)
./Install_dependencies.sh
When you see the reboot prompt, enter y. Raspberry Pi will automatically reboot.
Step 4. Compile
./compile.sh
Once it’s successfully compiled, you can refer to the link below to run the demo programs.
Instructions for Safe Use
To properly use the Arudcam ToF Camera, kindly note:
- Before connecting, you should always power the Raspberry Pi off and remove the power supply first.
- Make sure the cable on the camera board is locked in place.
- Make sure the cable is correctly inserted in the Raspberry Pi board’s MIPI CSI-2 connector.
- Avoid high temperatures.
- Avoid water, moisture, or conductive surfaces while in operation.
- Avoid folding, or straining the flex cable.
- Avoid cross-threading with tripods.
- Gently push/pull the connector to avoid damaging the printed circuit board.
- Avoid moving or handling the printed circuit board excessively while it’s in operation.
- Handle by the edges to avoid damage from electrostatic discharge.
- Where the camera board is stored should be cool and as dry as possible.
- Sudden temperature/humidity changes can cause dampness in the lens and affect the image/video quality.