Skip to main content

Working with Raspberry Pi

Hardware Connection​

Raspberry Pi 4

Connected to Raspberry Pi 4

Raspberry Pi 5

Connected to Raspberry Pi 5

CM 4 / 5 Expansion Board

Connected to CM 4 / 5 Expansion Board

Raspberry Pi Zero 2W

Connected to Raspberry Pi Zero 2W

tip

The images above are for demonstration purposes only. This product does not include the above mainboards or kits.

Software Environment Configuration and Testing​

Update the System​

To ensure the camera works properly, please use the latest version of the Raspberry Pi OS and run the following commands to update.

sudo apt-get update -y
sudo apt-get upgrade -y

If using only one camera, connect it to the CAM1 port.

Configure the config.txt File​

  • Use the nano tool to open and edit the /boot/firmware/config.txt file.

    sudo nano /boot/firmware/config.txt
  • Locate the line camera-auto-detect=1 and change it to camera_auto_detect=0.

  • At the end of the file, add the line dtoverlay=imx477. If multiple cameras are connected, you can specify the cam0 or cam1 parameters, for example:

    dtoverlay=imx477,cam0
    dtoverlay=imx477,cam1
  • After configuration, save the file and reboot the system with sudo reboot.

Test the Camera​

  • After rebooting, run sudo rpicam-hello --list-cameras to check if the camera is detected.
  • With a display connected, you can preview the camera feed with sudo rpicam-hello -t 0.

For more information about rpicam commands, please refer to Raspberry Pi Camera Tool Guide.

IR-CUT Filter Switching Control​

This module supports both manual switch control and external GPIO control: IMX477_IR-CUT_Camera_B-1

  1. Manual switch control (① in the figure): Manually switch the filter state using the onboard switch. IR-D is day mode. IR-N is night vision mode.
  2. External GPIO control (② in the figure): Connect the GPIO output of the host device to the IR-GPIO interface on the module. The host device switches to day mode by outputting a high level and to night mode by outputting a low level. DuPont wires can be used for the connection.
note

The module uses onboard switch control by default. When external GPIO control is connected, GPIO control takes priority over the onboard switch, and the filter state is determined by the GPIO input level.