The ArduCAM brand also sells a camera module for the Raspberry Pi, which some of you may have used.
This time, it is the same camera module, but with a slightly special camera called ToF, which, simply put, is a camera that can tell the depth of the object being photographed.

The photo shows the PL-R5 BASE BOARD for the industrial Raspberry Pi (CM5). Commercially available Raspberry Pi can also be connected using an FPC cable.
What is different from a normal camera module is that the camera itself also needs a power supply, so connect it to the GPIO pin to get power.
Difference between ToF and LiDAR
Similar to the ToF camera is LiDAR.
It is difficult to tell the difference between the two, as both use the reflection of laser light.
In some cases, they do not make much of a distinction, but because of their different characteristics, each has its own suitable environment.
Broadly speaking, ToF is more likely to be selected for smaller sites, while LiDAR is more likely to be selected for larger sites.
However, depending on how it is used, it can be adapted to either.
For example, there are intermediate categories of LiDAR depending on performance. Depending on the product, there are cases where “small scale is LiDAR adaptable” or “large scale is sufficient with ToF”.
The final decision will be based on various environmental conditions, such as the range and accuracy you want to carve out, and the cost of installation & operation.
| Comparison items | Small sites (ToFs are easily suited) | Large-scale sites (LiDAR is easily suited) |
|---|---|---|
| Distance Range | Within several centimeters to several tens of meters | Several tens of meters to more than several hundred meters |
| Required accuracy | Several centimeters to several tens of centimeters | cm order to high precision |
| data request | Single-point distance measurement, low to medium resolution depth map | High-density 3D point cloud, wide-area mapping |
| Main Constraints | Low cost, low power consumption, small size, easy installation | Installation space, power supply capacity, laser safety measures, maintainability |
| Installation Cost | Comparatively low | Comparatively high |
| Equipment Size | Easy to miniaturize | Tend to be large in size |
| preferred environment | Indoor, short range, embedded applications | Outdoors, large area, high altitude, large space |
| Typical Applications | Proximity detection, short-range obstacle avoidance, gesture recognition, shelf management, embedded sensors | Automated driving, topographical surveying, outdoor surveillance, overall mapping of warehouses |
| Compatibility with Raspberry Pi | good | Good depending on application (expensive and prone to high load) |
| The axis of decision-making that is suited to | I want to acquire distance easily. | I want to measure a large area with high precision 3D measurement. |
ArduCAM ToF Camera” Product Specifications
Here are the details of the ArduCamToF camera.
The connection is easy with the Raspberry Pi’s camera module terminal, and it is compatible with V4L2-based video kernel devices, so you can try it out right away.

| (data) item | Contents |
|---|---|
| Product Overview | ToF method Depth camera module |
| Main Features | Real-time point cloud (Point Cloud) and depth map output |
| Number of effective pixels | 240 × 180 |
| Sensor size | 1/6 in. |
| Resolution / FPS on Raspberry Pi | 240 × 180 @ 30fps |
| Sensor maximum frame rate | 120fps |
| Maximum depth frame rate (Raspberry Pi) | 30fps (4-phase) |
| Maximum depth frame rate (NVIDIA Jetson) | 30fps (4-phase) |
| Measuring distance | Far Mode: 4m / Near Mode: 2m |
| modulation frequency | 75MHz / 37.5MHz |
| viewing angle | Diagonal angle 70°. |
| light source | Built-in 940nm VCSEL laser |
| Indoor and outdoor use | Yes (no external lighting required) |
| interface | MIPI (2-Lane) |
| output format | 4-phase RAW / Depth Frame / Grayscale Amplitude Frame |
| Linux Support | V4L2-based video kernel device |
| SDK | C / C++ / Python |
| ROS support | already supported |
| Supported OS | Raspberry Pi OS Bookworm / Bullseye (32bit / 64bit) from 2022/01/28 |
| Supported hardware | Raspberry Pi 5 / 4 / 2 / 3 / CM3 / CM4 / Zero W / Zero 2 W / NVIDIA Jetson |
| Power consumption (TDP) | 3.5W |
| Recommended power supply | 5V / 4A or more |
| Substrate Size | 38mm x 38mm |
Environment of this time
- Industrial Raspberry Pi (CM5) PL-R5 BASE BOARD
- ArduCAM ToF camera (power supply required)
- Raspberry Pi OS Trixie
– Model: Raspberry Pi Compute Module 5 Rev 1.0
– OS: Debian GNU/Linux 13 (trixie)
– Kernel: 6.12.54-v8-16k+
– Python3.13
Note: We have tried with the latest Trixie, but currently the earlier versions of Bookworm or Bullseye work more stably.
Add to Config.txt
You need to add a description of the camera module in config.txt. It is valid on reboot.
sudo nano /boot/firmfare/config.txt
dtoverlay=arducam-pivariety,cam0
Tried sample programs (C/C++)
./Install_dependencies.shrequires Driver, Dependencies, SDK, and OpenCV to run.
The sample application can be started by git cloning and running the shell scripts for installation and build.
The C/C++ sample programs will work as they are because we found the shared libraries libArducamDepthCamera.so and libArducamDepthCamera4C.so that the C/C++ sample programs use.
In this Trixie environment, the Python sample program and the C++ Point Cloud required additional support and code modification.
github: https://github.com/ArduCAM/Arducam_tof_camera/
SDK: https://docs.arducam.com/Raspberry-Pi-Camera/Tof-camera/Arducam-ToF- Camera-SDK/
git clone https://github.com/ArduCAM/Arducam_tof_camera.git
cd Arducam_tof_camera
./Install_dependencies.sh
./compile.sh
The sample programs (C/C++) can be run individually, but the command to run all three appeared in the terminal after ./compile.sh.
/home/$USER/Arducam_tof_camera/build/example/cpp/example
Individual cases:
cd build/example/cpp
./preview_depth
# or
./capture_raw
Executed screen
When executed, three windows appear on the screen.

If you hold your hand in front of the camera, you can tell the difference in depth by color.

Python sample programs need to be supported
The Python sample program (preview_depth.py) did not work as is in this environment.
Error:
ModuleNotFoundError: No module named 'ArducamDepthCamera'
# or
ModuleNotFoundError: No module named 'cv2'
The Python sample import ArducamDepthCamera requires an extension module built for Python.
The Raspberry Pi OS Trixie with Python 3.13 does not provide or install this module for Python, which is why ModuleNotFoundError This is because the module for this Python is not provided or not installed.
I checked and found a Python package called arducamdepthcamera in PyPI, the latest version as of March 2026 is 0.1.24 (https://pypi.org/project/arducamdepthcamera/)
Even with Python 3.13, I was able to use Python bindings together with the apt version of OpenCV and the pip version of ArduCAM by creating a virtual environment with --system-site-packages.
Since the pip version of opencv-python can be heavy and unstable on the Raspberry Pi, using the system apt version from a virtual environment.
pip install --upgrade pip
python3 -m venv --system-site-packages ~/venv-arducam # Create only once (initial setup)
source ~/venv-arducam/bin/activate # Run every time, or add an alias to .bashrc
pip install arducamdepthcamera # Install only once
I will check.
python3 -c "import numpy; print(numpy.__version__, numpy.__file__)"
python3 -c "import cv2; print(cv2.__version__)"
python3 -c "import ArducamDepthCamera as ac; print(ac)"
As a result, numpy uses within venv, cv2 uses 4.10.0 and system side, and the last ArducamDepthCamera also uses within venv.
1.26.4 /home/pi/venv-arducam/lib/python3.13/site-packages/numpy/__init__.py
4.10.0
<module 'ArducamDepthCamera' from '/home/pi/venv-arducam/lib/python3.13/site-packages/ArducamDepthCamera/__init__.py'>
Run a sample Python program
After rebuilding, I ran the Python sample program and it started successfully.
python3 ~/Arducam_tof_camera/example/python/preview_depth.py

arducamdepthcamera was installed within a virtual environment and must be activated before the Python sample can be run.
source ~/venv-arducam/bin/activate
If you do not run it in this state, the system side Python will not find ArducamDepthCamera and it will be ModuleNotFoundError again.
Point Cloud
The Point Cloud sample code for ArduCAM could not be built as is, as well as Python.
Upon investigation, we found that the Open3D API specification in the Raspberry Pi OS Trixie had changed, and the problem was solved by modifying the description on the sample code side to match the current Open3D.
point(s) to be corrected
In the case statement on line 159~ of ~/Arducam_tof_camera/open3d_preview/preview_pointcloud.cppwhere the error occurred, the six lines from line 160 needed to be replaced.
case 's': {
open3d::io::WritePointCloudToPCD( //
"pointcloud.pcd", pcd,
{
open3d::io::WritePointCloudOption::IsAscii::Ascii,
open3d::io::WritePointCloudOption::Compressed::Uncompressed,
});
} break;
case 's': {
open3d::io::WritePointCloudOption option(
"pcd",
true, // write_ascii
false, // compressed
false // print_progress
);
open3d::io::WritePointCloudToPCD(
"pointcloud.pcd",
pcd,
option);
} break;
Build again.
./compile_pointcloud.sh
This time the build was successful./home/$USER/Arducam_tof_camera/build/open3d_preview/preview_pointcloudThe following is an example of a program that can be executed with the
[ 50%] Building CXX object open3d_preview/CMakeFiles/preview_pointcloud.dir/preview_pointcloud.cpp.o
[100%] Linking CXX executable preview_pointcloud
[100%] Built target preview_pointcloud
== Build success
== Run /home/pi/Arducam_tof_camera/build/open3d_preview/preview_pointcloud

Depth image
In the Depth image, the distance to the object is represented by color.
The min-range and max-range slider bars allowed adjustment.
The default value for max-range is 4,000/6,000.

Comparing the three side-by-side images, 1,378, 2,082, and 4,000 respectively, we can see that the higher maximum value has more reddish tones, while the lower value has more black and blue tones.
With a hand placed in front of the eye, the distance perspective is not so clear when the maximum range is 4,000, but when the maximum range is around 1,378, the difference in color between the front and the back is clearly visible. That is how easy it is to see the perspective.
Adjust according to what you want to target.
See the video of the slider bar in action.
Also, can you see the color change in the video of the hand moving closer and further away?
Industrial Applications of ToF Cameras
ToF cameras provide low-power and real-time depth measurements in near- to mid-range space.
In industrial applications, it is suitable for “sites where you want to easily obtain 3D information.
For example, the following cases can be assumed
- Determination of objects (presence or absence and position) in conveyor lines (conveyors)
- Simple object-object alignment
- Simple inventory control (e.g., empty shelf detection)
- AGV and robot obstacle avoidance
- Monitoring the distance between people to understand when they are crowded
It is suitable for facilities and equipment that require space saving, low cost, and ease of integration.
Unlike conventional cameras (RGB), human detection is based on distance information (color) rather than face or clothing, making it easy to determine the number of people and their locations while maintaining privacy.
While LiDAR is advantageous for wide-area, high-precision surveying, a simple ToF camera is a viable option as a practical sensor to be integrated into field equipment.
Article contributed by Raspida
Raspberry Pi information site that even non-engineers can enjoy using raspida.com a Raspberry Pi information site that even non-engineers can enjoy and handle. He also contributes technical blog articles to the PiLink site on the Raspberry Pi for industrial use.

