Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Raspberry Pi Compute Module 4 IO Board: Examples, Pinouts, and Specs

Image of Raspberry Pi Compute Module 4 IO Board
Cirkit Designer LogoDesign with Raspberry Pi Compute Module 4 IO Board in Cirkit Designer

Introduction

The Raspberry Pi Compute Module 4 IO Board (Manufacturer Part ID: CM4 IO Board) is a versatile interface board designed by the Raspberry Pi Foundation. It serves as a development platform for the Raspberry Pi Compute Module 4 (CM4), providing access to a wide range of input/output (I/O) ports. These include HDMI, USB, GPIO, PCIe, and more, making it an ideal choice for prototyping, development, and integration into custom applications.

Explore Projects Built with Raspberry Pi Compute Module 4 IO Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 4B with I2C Current Sensing and OLED Display
Image of iot task 2: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADC is connected to a current sensor for measuring electrical current, with the sensor's output connected to the ADC's AIN0 pin and the burden resistor connected to AIN1. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using GPIO2 (SDA) and GPIO3 (SCL) for data exchange.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B-Controlled Relay System with Environmental Sensing and Power Monitoring
Image of smart_power_meter: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
This circuit is designed to interface a Raspberry Pi 4B with various sensors and output devices. It includes a 4-channel relay for controlling external loads, an ADS1115 for analog-to-digital conversion of signals from a current sensor and a ZMPT101B voltage sensor, a DHT11 for temperature and humidity readings, and a 0.96" OLED display for data output. The Raspberry Pi 4B serves as the central controller, managing data acquisition from the sensors, processing the information, and driving the relay and display based on the sensor inputs and programmed logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B-Based Current Monitoring System with I2C OLED Display
Image of Virtual Energy Monitoring Circuit: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADS1115 is connected to a current sensor for measuring electrical current, with the sensor's output and burden pins connected to the ADC's analog input channels. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using its GPIO2 and GPIO3 pins for data (SDA) and clock (SCL) lines, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi 4B Controlled RFID and Keypad Security System with I2C LCD Feedback and Motorized Lock Mechanism
Image of CVM: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
This circuit features a Raspberry Pi 4B as the central controller, interfaced with an I2C LCD screen for display, an RFID-RC522 module for RFID reading, a 4x4 membrane matrix keypad for user input, and an L298N motor driver to control a DC motor. The Raspberry Pi manages data communication with the LCD via I2C, reads RFID tags, processes keypad inputs, and controls the motor's operation. Power is supplied to the motor driver and the Raspberry Pi through a 9V battery and regulated 5V connections.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Raspberry Pi Compute Module 4 IO Board

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of iot task 2: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
Raspberry Pi 4B with I2C Current Sensing and OLED Display
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADC is connected to a current sensor for measuring electrical current, with the sensor's output connected to the ADC's AIN0 pin and the burden resistor connected to AIN1. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using GPIO2 (SDA) and GPIO3 (SCL) for data exchange.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of smart_power_meter: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
Raspberry Pi 4B-Controlled Relay System with Environmental Sensing and Power Monitoring
This circuit is designed to interface a Raspberry Pi 4B with various sensors and output devices. It includes a 4-channel relay for controlling external loads, an ADS1115 for analog-to-digital conversion of signals from a current sensor and a ZMPT101B voltage sensor, a DHT11 for temperature and humidity readings, and a 0.96" OLED display for data output. The Raspberry Pi 4B serves as the central controller, managing data acquisition from the sensors, processing the information, and driving the relay and display based on the sensor inputs and programmed logic.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Virtual Energy Monitoring Circuit: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
Raspberry Pi 4B-Based Current Monitoring System with I2C OLED Display
This circuit features a Raspberry Pi 4B as the central processing unit, interfaced with an Adafruit ADS1115 16-bit I2C ADC for analog-to-digital conversion and a 0.96" OLED display for visual output. The ADS1115 is connected to a current sensor for measuring electrical current, with the sensor's output and burden pins connected to the ADC's analog input channels. The Raspberry Pi communicates with both the ADC and the OLED display over the I2C bus, using its GPIO2 and GPIO3 pins for data (SDA) and clock (SCL) lines, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CVM: A project utilizing Raspberry Pi Compute Module 4 IO Board in a practical application
Raspberry Pi 4B Controlled RFID and Keypad Security System with I2C LCD Feedback and Motorized Lock Mechanism
This circuit features a Raspberry Pi 4B as the central controller, interfaced with an I2C LCD screen for display, an RFID-RC522 module for RFID reading, a 4x4 membrane matrix keypad for user input, and an L298N motor driver to control a DC motor. The Raspberry Pi manages data communication with the LCD via I2C, reads RFID tags, processes keypad inputs, and controls the motor's operation. Power is supplied to the motor driver and the Raspberry Pi through a 9V battery and regulated 5V connections.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Prototyping and testing with the Raspberry Pi Compute Module 4.
  • Industrial and embedded systems development.
  • Custom hardware integration for IoT, robotics, and automation.
  • Media streaming and display applications using HDMI.
  • USB-based peripherals and PCIe device integration.

Technical Specifications

The following are the key technical details of the Raspberry Pi Compute Module 4 IO Board:

General Specifications

  • Power Input: 12V DC via barrel jack or GPIO header.
  • Supported Compute Module: Raspberry Pi Compute Module 4 (CM4).
  • Dimensions: 160mm x 90mm.
  • Operating Temperature: -20°C to 85°C (dependent on CM4 module).

Key Features

  • HDMI Ports: 2x full-size HDMI 2.0 ports.
  • USB Ports: 2x USB 2.0 Type-A ports.
  • Ethernet: Gigabit Ethernet port.
  • PCIe Slot: 1x PCIe Gen 2 x1 slot.
  • GPIO Header: 40-pin GPIO header (compatible with Raspberry Pi HATs).
  • Camera and Display Interfaces: 2x MIPI CSI-2 camera connectors, 2x MIPI DSI display connectors.
  • MicroSD Card Slot: For CM4 Lite variants (without onboard eMMC).
  • Debug Interfaces: UART and JTAG headers for debugging.

Pin Configuration and Descriptions

GPIO Header (40-Pin)

The GPIO header provides access to various I/O pins. Below is the pinout:

Pin Number Pin Name Description
1 3.3V 3.3V Power Output
2 5V 5V Power Output
3 GPIO2 (SDA1) I2C1 Data Line
4 5V 5V Power Output
5 GPIO3 (SCL1) I2C1 Clock Line
6 GND Ground
7 GPIO4 General Purpose I/O
8 GPIO14 (TXD0) UART Transmit
9 GND Ground
10 GPIO15 (RXD0) UART Receive
... ... ...

For the full GPIO pinout, refer to the official Raspberry Pi documentation.

PCIe Slot

Pin Group Description
Power Pins Supplies power to PCIe devices.
Data Pins PCIe Gen 2 x1 data lanes.
Clock Pins Provides clock signal for PCIe.

Usage Instructions

How to Use the CM4 IO Board in a Circuit

  1. Install the Compute Module 4: Insert the CM4 into the IO Board's connector, ensuring proper alignment.
  2. Power the Board: Connect a 12V DC power supply to the barrel jack or use the GPIO header for power input.
  3. Connect Peripherals:
    • Use the HDMI ports for display output.
    • Connect USB devices (e.g., keyboard, mouse) to the USB Type-A ports.
    • Attach cameras or displays to the MIPI CSI-2 and DSI connectors.
    • Use the PCIe slot for compatible expansion cards.
  4. Access GPIO: Connect external devices to the 40-pin GPIO header for custom applications.
  5. Networking: Use the Gigabit Ethernet port for high-speed network connectivity.

Important Considerations and Best Practices

  • Power Supply: Ensure the power supply provides sufficient current for the CM4 and connected peripherals.
  • Cooling: Use a heatsink or fan for the CM4 if operating under heavy loads or in high-temperature environments.
  • Static Protection: Handle the board with care to avoid electrostatic discharge (ESD) damage.
  • Software Configuration: Use the Raspberry Pi Imager to flash the appropriate operating system onto the CM4's eMMC or microSD card.

Example: Using GPIO with Arduino UNO

The GPIO pins on the CM4 IO Board can interface with an Arduino UNO. Below is an example of controlling an LED connected to the GPIO pin using Python:


Import the GPIO library

import RPi.GPIO as GPIO import time

Set the GPIO mode to BCM (Broadcom pin numbering)

GPIO.setmode(GPIO.BCM)

Define the GPIO pin for the LED

LED_PIN = 18

Set up the LED pin as an output

GPIO.setup(LED_PIN, GPIO.OUT)

Blink the LED in a loop

try: while True: GPIO.output(LED_PIN, GPIO.HIGH) # Turn on the LED time.sleep(1) # Wait for 1 second GPIO.output(LED_PIN, GPIO.LOW) # Turn off the LED time.sleep(1) # Wait for 1 second except KeyboardInterrupt: # Clean up GPIO settings on exit GPIO.cleanup()


Notes:

  • Connect the LED's anode to GPIO18 and cathode to GND via a 330-ohm resistor.
  • Install the RPi.GPIO library using pip install RPi.GPIO if not already installed.

Troubleshooting and FAQs

Common Issues

  1. No Power to the Board:

    • Ensure the power supply is connected and provides 12V DC.
    • Check the power switch (if applicable) is turned on.
  2. No Display Output:

    • Verify the HDMI cable is securely connected.
    • Ensure the correct HDMI port is selected on the display.
    • Check the CM4's software configuration for display settings.
  3. USB Devices Not Recognized:

    • Confirm the USB devices are functional and compatible.
    • Check for proper software drivers in the operating system.
  4. GPIO Pins Not Working:

    • Ensure the correct GPIO pin numbering is used in the code.
    • Verify the GPIO pin is not being used by another function (e.g., I2C, SPI).

Solutions and Tips for Troubleshooting

  • Debugging GPIO: Use a multimeter to check voltage levels on GPIO pins.
  • Software Logs: Check system logs (dmesg or /var/log/syslog) for error messages.
  • Firmware Updates: Ensure the CM4 firmware is up to date using the Raspberry Pi Imager.

For additional support, refer to the official Raspberry Pi documentation or community forums.