CM4-DUAL-CAMERA-BASE
| ||
Overview
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.
Note
1: Do not unplug devices other than USB and HDMI when powered 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.
Dimension
CM4-DUAL-CAMERA-BASE
Compute_Module 4 Core board
What's on board
No. | Component | Description |
1 | CM4 socket | 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 a 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 |
No. | Component | Description |
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 |
Writing Image
- Write Image for Compute Module Boards eMMC version
- Write Image for Compute Module Boards Lite version
USB2.0
The USB port is disabled by default on the CM4 to save power. If you need to start, you need to add the following demo to the config.txt file:
dtoverlay=dwc2,dr_mode=host
After restarting.
If you use the latest Raspberry Pi OS (image after October 30, 2021) USB2.0 is OTG mode by default, CM4 will report an error:
config failed, hub doesn't have any ports! (err -19)
However, USB can still be used. If you want to remove this error, remove otg_mode=1 in [cm4] of config.txt, and add dtoverlay=dwc2, dr_mode=host (USB cannot be recognized without adding it).
CSI
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://files.waveshare.com/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 # HDMI1 has no image output when using any CSI #If you need to restore, delete the corresponding dt-blob.bin: sudo rm -rf /boot/dt-blob.bin #Execution is complete. Power off and restart CM4.
Recording test
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:
Test camera0:
sudo raspivid -t 0 -cs 0
Test camera1:
sudo raspivid -t 0 -cs 1
New Version (Bullseye)
If you are using the latest Raspberry Pi OS (Bullseye):
#New system uses dual cameras #Remove camera_auto_detect=1 in config.txt #camera_auto_detect=1 #Add dtoverlay=imx219,cam1 dtoverlay=imx219,cam0 #imx219 is the camera sensor model, there are other sensors supported dtoverlay=ov5647,cam0 dtoverlay=imx219,cam0 dtoverlay=ov9281,cam0 dtoverlay=imx477,cam0 dtoverlay=imx519,cam0 #and then reboot reboot #Open the camera libcamera-hello -t 0 or libcamera-hello #Other partial commands: #Check if the camera is detected libcamera-hello --list-cameras #Turn on the corresponding camera, preview for 5 seconds libcamera-hello --camera 1 libcamera-hello --camera 0 #Take a photo libcamera-jpeg -o test.jpg #Shooting video libcamera-vid -t 10000 -o test.h264 #you can add --camera to specify a camera #-t <duration> allows the user to select how long the window is displayed, in milliseconds
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
Resource
Document
- CAM4 Dual camera Schematic
- CM4 dual camera expand board Schematic
- CSI Camera Reference
- DSI Display Reference
3D Drawing
Demo codes
Software
FAQ
b) Check whether the /boot/dt-blob.bin file exists, if it cannot be used, delete it.
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)
If it is a technical problem, you can contact me directly:
https://join.skype.com/invite/WI7vBbbvPf98