This is a binocular camera based board that is designed for Raspberry Pi Compute Module 4. Two IMX219 800MP cameras are integrated for the stereo vision projects. An interface expander board is optional for connecting other accessories.
1: Do not unplug devices other than USB and HDMI when power on.
2: A type C interface can be used for the power supply or a USB SLAVE interface for burning images.
3: In order to ensure the normal power supply of CM4, please do not connect other devices when using the Type C interface to program the image.
4: When CM4 is in normal use, it needs to provide 5V/2A power supply for CM4. Otherwise, it may occurs problems such as automatic shutdown, frequency reduction, etc.
5: The module does not have any protection, please do not short-circuit the power supply.
6: The USB2.0 interface is disabled by default, you should add line dtoverlay=dwc2,dr_mode=host to the /boot/config.txt file to enable it.
7: This board doesn't support the PoE function.
What's on board
|1||CM4 soclet||Suitable for all versions of Compute Module 4|
|2|HDMI connector||supports 4K 30fps output|
|3||USB 2.0 port||for connecting sorts of USB devices|
|4||PWR & USB||USB-C connector, 5V DC power supply or USB programming port|
|5||BOOT selection||ON: CM4 will be booted from USB-C interface |
OFF: CM4 will be booted from eMMC or Micro SD card
|6||CM4 status indicator||PWR: Raspberry Pi power indicator |
ACT: Raspberry Pi operating status indicator
|7||RJ45 Gigabit Ethernet||10/100/1000M compatible|
|8||Micro SD card slot||for connecting a Micro SD card with pre-burnt image (Lite variant ONLY)|
|9||GPIO FFC connector||for expanding 40PIN GPIO|
|10||HDMI & PCIe & USB FFC connector||for expanding HDMI1, PCIe, USB|
|11||Dual cameras||IMX219, 8MP|
|1||USB 2.0 port||for connecting sorts of USB devices|
|2||HDMI1 connector||supports 4K 30fps output|
|3||HDMI & PCIe & USB FFC connector||for expanding HDMI1, PCIe, USB|
|4||GPIO FFC connector||for expanding 40PIN GPIO|
|5||40PIN GPIO header||for connecting sorts of Raspberry Pi HATs|
|6||M.2 M KEY||for NVME SSD, or communication module with PCIE M.2 M KEY interface|
|7||M.2 indicator||indicating operating status of the interface|
- Write Image for Compute Module Boards eMMC version
- Write Image for Compute Module Boards Lite version
To reduce consumption, USB interfaces are disabled in CM4 by default. If you need to use USB ports, please add the following line to config.txt file.
Then reboot the CM4. If you use the newest Bullseye image, the USB2.0 is set to OTG mode by default, and it occurs the error in CM4:
config failed, hub doesn't have any ports! (err -19)
To remove the errors, you can remove the line otg_mode=1 from config.txt file and add the line:
CSI and DSI are disabled by default. When using the camera and DSI, it will occupy three I2C devices: I2C-10, I2C-11, and I2C-0.
- Open a terminal and run the following commands:
wget https://www.waveshare.com/w/upload/7/75/CM4_dt_blob_Source.zip unzip -o CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source sudo chmod 777 -R CM4_dt_blob_Source cd CM4_dt_blob_Source/ sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
And then connect the cameras and DSI display
1: Please power off the IO Board first before your connection.
2: Connect the power adapter after connecting the cameras and DSI display
3: Wait a few seconds before the screen boot up.
4: If the DSI LCD cannot display, please check if you have added /boot/dt-blob.bin. If there already has the dt-blob.bin, just try to reboot.
5: The camera needs to be enabled by raspi-config, enter sudo raspi-config on the terminal, choose Interfacing Options->Camera->Yes->Finish-Yes and reboot the system
Old Version (Buster)
- Test the Cameras:
sudo raspivid -t 0 -cs 0
sudo raspivid -t 0 -cs 1
New Version (Bullseye)
If you are using the latest Raspberry Pi OS (Bullseye):
libcamera-hello -t 0 or libcamera-hello #The new system uses dual cameras #Remove or comment out the line camera_auto_detect=1 in config.txt #camera_auto_detect=1 #Add the following lines: dtoverlay=imx219,cam1 dtoverlay=imx219,cam0 #Add the corresponding line according to the camera you use, where imx219 is the camera sensor model, and there are other sensors dtoverlay=ov5647,cam0 dtoverlay=imx219,cam0 dtoverlay=ov9281,cam0 dtoverlay=imx477,cam0 #then restart reboot #Other part of the commands: #Check if the camera is detected libcamera-hello --list-cameras #Open the corresponding camera libcamera-hello --camera 1 libcamera-hello --camera 0 #Taking Pictures libcamera-jpeg -o test.jpg #You can add --camera to specify the camera
More instructions click me
- HDMI1 is disabled if you use DSI interfaces for displaying, even if you just compile the corresponding files without connecting to the DSI screen, please note it
- Any connection of two HDMI ports can output images, not limited to which HDMI port, if two HDMI screens are connected, only HDMI0 has image output
- If you want to enable both HDMI, please delete the dt-blob.bin file with the following command:
sudo rm -rf /boot/dt-blob.bin
- Then reboot
Reference Raspberry Pi Manual
- Connect the camera to CSI interfaces
- Connect power to the CM4 board
- After booting, run command raspi-config and choose Interface Options -> Camera -> Yes -> Finish -> Yes.
- Reboot CM4 and test the camera with the commands below
- If you use Buster image
sudo raspivid -t 0 -cs 0 sudo raspivid -t 0 -cs 1
- If you use Bullseye image
sudo libcamera-vid -t 0 -cs 0 sudo libcamera-vid -t 0 -cs 1
- CAM4 Dual camera Schematic
- CM4 dual camera expand board Schematic
- CSI Camera Reference
- DSI Display Reference
a) Check whether dtparam -audio - on is blocked in /boot/config.txt