Raspberry Pi Compute Module 4: The Embedded Powerhouse
A compact, powerful System-on-Module designed for industrial and embedded applications, offering flexibility and performance.

The Raspberry Pi Compute Module 4 (CM4) is a highly versatile and powerful System-on-Module (SoM) that brings the capabilities of the Raspberry Pi to a more embedded-friendly form factor. Unlike traditional Raspberry Pi boards with fixed ports and layouts, the CM4 is designed to be integrated directly onto a custom carrier board, allowing engineers and makers to create bespoke hardware solutions. This approach offers significant advantages in terms of size, cost, and customization for production runs or specialized projects.
At its heart, the CM4 features the Broadcom BCM2711, a quad-core 64-bit ARM Cortex-A72 processor, the same capable SoC found in the Raspberry Pi 4 Model B. This provides ample processing power for demanding tasks, from running complex applications to handling real-time data processing. The CM4 is available in various configurations, differing in RAM (from 1GB to 8GB LPDDR4) and onboard eMMC flash storage (from 8GB to 32GB), or without eMMC for external storage solutions. This modularity allows users to select the precise specifications needed for their application, optimizing cost and performance.
Sitting in the Raspberry Pi family, the CM4 represents a shift towards professional and industrial embedded systems. While earlier Compute Modules were targeted at similar markets, the CM4's significantly enhanced processing power, wider range of I/O options exposed via its high-density connectors, and support for features like PCIe make it suitable for a broader spectrum of applications. It bridges the gap between hobbyist-friendly Raspberry Pi boards and full-fledged industrial single-board computers, making advanced computing accessible for embedded projects.
The CM4 is ideal for makers, students, and embedded engineers who require a compact, powerful, and customizable computing solution. It's perfect for projects that need to be integrated into tight spaces, mass-produced, or require specific hardware interfaces not found on standard Raspberry Pi boards. Applications range from industrial automation and IoT gateways to digital signage, robotics, and custom control systems where reliability and performance are paramount.
Watch
Related video, embedded from YouTube.
Specifications
| Microcontroller / SoC | Broadcom BCM2711 |
| Architecture | 64-bit Quad-Core ARM Cortex-A72 |
| Clock speed | 1.5 GHz |
| Flash / Storage | Optional 8GB, 16GB, or 32GB eMMC flash; or no eMMC for external storage |
| RAM / SRAM | 1GB, 2GB, 4GB, or 8GB LPDDR4-3200 SDRAM |
| Operating voltage | 3.3V (core logic) |
| Digital I/O pins | Up to 28 GPIO (depending on carrier board implementation) |
| Analog / ADC | No built-in ADC on CM4 itself; requires external components on carrier board |
| PWM | Hardware PWM available on specific GPIO pins |
| Connectivity | Gigabit Ethernet, Dual-band 802.11ac Wi-Fi, Bluetooth 5.0 |
| USB | 2x USB 3.0 interfaces (via carrier board), 1x USB 2.0 interface (via carrier board) |
| Power input | Typically 5V DC via carrier board, with power management for the CM4 |
| Dimensions | 55mm x 40mm |
Pinout & pin functions
| Pin | Function |
|---|---|
| 3V3 | Power output (3.3V) |
| GND | Ground |
| GPIO17 | General Purpose Input/Output |
| GPIO27 | General Purpose Input/Output |
| GPIO22 | General Purpose Input/Output |
| GPIO23 | General Purpose Input/Output |
| GPIO24 | General Purpose Input/Output |
| GPIO25 | General Purpose Input/Output |
| GPIO05 | General Purpose Input/Output |
| GPIO06 | General Purpose Input/Output |
| GPIO12 | General Purpose Input/Output, PWM0 |
| GPIO13 | General Purpose Input/Output, PWM1 |
| GPIO19 | General Purpose Input/Output, PWM2 |
| GPIO16 | General Purpose Input/Output, PWM3 |
| GPIO26 | General Purpose Input/Output |
| GPIO18 | General Purpose Input/Output, PWM4 |
| GPIO04 | General Purpose Input/Output |
| GPIO11 | General Purpose Input/Output, SPI0 MOSI |
| GPIO09 | General Purpose Input/Output, SPI0 MISO |
| GPIO10 | General Purpose Input/Output, SPI0 SCK |
| GPIO08 | General Purpose Input/Output, SPI0 CS0 |
| GPIO07 | General Purpose Input/Output, SPI0 CS1 |
| GPIO02 | General Purpose Input/Output, I2C1 SDA |
| GPIO03 | General Purpose Input/Output, I2C1 SCL |
| GPIO14 | General Purpose Input/Output, UART0 TX |
| GPIO15 | General Purpose Input/Output, UART0 RX |
| GPIO20 | General Purpose Input/Output, I2C0 SDA |
| GPIO21 | General Purpose Input/Output, I2C0 SCL |
| RUN | System reset pin |
| VSYS | System power input (typically 5V) |
Wiring & circuit basics
The Raspberry Pi Compute Module 4 requires a carrier board for operation, as it lacks the standard USB, HDMI, and Ethernet ports of a typical Raspberry Pi. The carrier board provides the necessary power regulation and connectors. Power is typically supplied as 5V DC to the carrier board, which then steps it down to the 3.3V required by the CM4's core logic. Ensure your power supply can provide sufficient current, especially under load; a 3A supply is often recommended for the CM4 and connected peripherals. Always connect power to the carrier board's designated input, not directly to the CM4's module edge connector.
The GPIO pins on the CM4 operate at 3.3V logic levels. Connecting a 5V device directly to a 3.3V GPIO pin can cause damage. If you need to interface with 5V devices, use a level shifter. For example, to connect a standard LED, you would connect a GPIO pin (e.g., GPIO17) to one end of a current-limiting resistor (typically 220-330 ohms), the other end of the resistor to the LED's anode, and the LED's cathode to a GND pin on the carrier board. The GPIO pin would be configured as an output to turn the LED on.
For sensors or modules that communicate via I2C or SPI, the CM4 offers dedicated pins. For an I2C device, connect its SDA pin to a designated I2C SDA GPIO (e.g., GPIO2) and its SCL pin to the corresponding I2C SCL GPIO (e.g., GPIO3). Ensure the sensor is also powered correctly, usually from the carrier board's 3.3V or 5V rail, depending on the sensor's requirements. Always consult the datasheets for both the CM4's carrier board and your peripheral devices to ensure correct wiring and voltage compatibility.
Programming & getting started
The primary operating system for the Compute Module 4 is Raspberry Pi OS (formerly Raspbian), which can be flashed onto the eMMC storage or an SD card via a carrier board with an SD card slot. Toolchains like the standard Linux development environment, cross-compilation tools, and package managers (apt) are used. For more embedded-focused development, MicroPython or CircuitPython can be installed, offering a Python-based programming environment. PlatformIO is also an excellent choice for managing projects and dependencies across different environments. Uploading code typically involves SSHing into the running Raspberry Pi OS or using serial debugging tools, depending on the chosen OS and development approach.
To get started with Raspberry Pi OS, you'll typically flash the OS image onto the eMMC or an SD card using Raspberry Pi Imager on another computer. Once booted, you can access the CM4 via SSH or a connected keyboard/monitor. For Python-based development, you can write scripts directly on the CM4. For bare-metal or RTOS development, you would use cross-compilation toolchains (like GCC for ARM) on a separate development machine and flash the compiled binaries to the CM4's storage or load them via TFTP.