What Is the Right Compute Module for Your Embedded Project

In the realm of embedded computing solutions, Raspberry Pi has emerged as a pioneering force, offering a diverse range of compact modules tailored for industrial and commercial applications. Here we take a look at the differences between the foundation’s Compute Module 4 (CM4) and Compute Module 3+ when it comes to developing embedded projects.

  • Iono Pi Max, an all-in-one solution for industrial control with a Raspberry Pi core. Iono Pi Max with a wide range of analog and digital interfaces.
    Iono Pi Max, an all-in-one solution for industrial control with a Raspberry Pi core. Iono Pi Max with a wide range of analog and digital interfaces.
  • Strato Pi CM, compact industrial server CE/FCC/IC compliant, with a wide-range power supply.
    Strato Pi CM, compact industrial server CE/FCC/IC compliant, with a wide-range power supply.

Raspberry Pi has carved a niche for itself with its versatile array of single-board computers (SBCs), catering to a diverse spectrum of applications ranging from hobbyist projects to industrial-grade solutions. Central to its product lineup are the Compute Modules, compact and modular iterations of the Raspberry Pi boards designed specifically for embedded applications. These modules encapsulate the core processing power, memory, and connectivity features of their larger counterparts, empowering developers to integrate Raspberry Pi functionalities seamlessly into custom hardware designs.

The first version of the Compute Module was released in April 2014, and, up to its third version (CM 3+), it had a 67.6mm × 31.0mm DDR2-SODIMM form factor. In October 2020 - 16 months after the release of the Raspberry Pi 4 Model B SBC - the CM4 was launched too, and, to the surprise of many, it had a new form factor: 55 mm × 40 mm PCB with two 100-pin high-density connectors.

This change opened up for new embedded solutions based on the Raspberry Pi CM but it also made things “interesting” for those who designed products around the old form factor and were accustomed with upgrading to the latest version without any hardware redesign. Luckily, in mid 2022, Raspberry Pi released a Compute Module with the same core of the CM4, but with a SODIMM form factor: the Compute Module 4S (CM4S).

Main Differences

Due to supply chain challenges faced by the industry, the procurement of CM3+ became difficult, and switching to the CM4S was necessary for many industrial adopters.

Here is an overview of the main hardware differences between the CM3+ and the CM4S:

Processing Power and Performance:
At the heart of any computing module lies its processing prowess. The CM3+ is powered by the Broadcom BCM2837B0 processor, sporting four ARM Cortex-A53 cores clocked at 1.2GHz. In contrast, the CM4S boasts a Broadcom BCM2711 processor, featuring quad-core Cortex-A72 cores operating at a blazing 1.5GHz. This boost in processing power translates to enhanced performance and accelerated execution of computational tasks, positioning the CM4S as a powerhouse in the embedded computing landscape.

Memory and Storage Configuration:
Memory and storage play pivotal roles in determining the efficiency and responsiveness of a computing system. While the CM3+ integrates 1GB of LPDDR2 SDRAM, the CM4S offers a superior memory configuration with 1GB LPDDR4-3200 SDRAM, with ECC (Error-Correcting Code) for data reliability. Both the CM3+ and the CM4S provide options for 8GB, 16GB, or 32GB of eMMC flash storage, as well as the "Lite" version for custom external storage.

Form Factor and Connectivity Options
As per above, both the CM3+ and CM4S adhere to the SODIMM form factor, facilitating straightforward integration into custom systems. The interfaces exposed on the connectors are the same, with the notable difference of the HDMI V1.3a of the CM3+ upgraded to HDMI 2.0 in the CM4S.

Power Supply and Voltage Requirements
When it comes to power supply and voltage specifications, the CM4S mandates VBAT (2.5V to 5V) and +3.3V supplies for operation. The +1.8V supply required by older Compute Modules is no longer utilized in the CM4S, although it can be supplied for backward compatibility purposes. This streamlined power architecture ensures efficient operation while accommodating the diverse needs of embedded system designers.

Video and Multimedia Capabilities
The CM4S features an HDMI 2.0 port supporting resolutions of up to 4Kp60. Moreover, it has support for H.265 (HEVC) decoding up to 4Kp60, alongside H.264 decoding up to 1080p60 and encoding up to 1080p30. Coupled with OpenGL ES 3.0 graphics support, the CM4S sets the stage for advanced multimedia applications in embedded environments.

Migrating your application from the Raspberry Pi Compute Module 3+ to the Compute Module 4S involves some considerations.

From a software perspective the move from 3+ to 4S is relatively painless, as Raspberry Pi OS images should work on all platforms. Of course it needs to be updated to a version supporting the 4S. Specifically a Linux kernel version 5.10 or above is required. Keeping your OS up-to-date is anyway good practice even if sticking to the same core.

On early releases of the OS supporting the 4S version, the USB 2.0 interface used by the I/O board (and other products embedding the CM) was not enabled by default. As a result devices would not show up on the network when booting as the Ethernet controller is connected to the USB bus, and those who attempted a boot from USB did not succeed.
The issue could be easily solved by adding the following line to /boot/config.txt: dtoverlay=dwc2,dr_mode=host

Speaking of USB boot, an interesting difference on the CM4S is that USB and network boot are enabled by default. For device provisioning (especially when done in high volumes) this is a very handy addition as booting and/or flashing a unit no longer requires the use of rpiboot and an I/O board with a USB slave interface, which are instead required for the CM3+.

So, for instance, a plain vanilla Strato Pi CM by Sfera Labs with no OS installed, can now be flashed with a custom image by simply plugging a bootable USB stick in one of its ports (no need to open the case), power it up, access the unit via SSH, and write to the internal eMMC.

Finally, on the CM4S, enabling boot options and modifying priority sequences can be conveniently done by editing the bootloader configuration, which is written in the module's EEPROM (check the rpi-eeprom-config command). On the CM3+ this requires writing to the OTP (One Time Programmable) memory, which cannot be undone, and possibly toggling some GPIOs using external hardware.

Long-term availability for industrial applications

The introduction of the Raspberry Pi Compute Module 4S has addressed the need for a migration path for industrial adopters facing supply chain challenges with the CM3+. With its enhanced processing power, memory configuration, and advanced multimedia capabilities, the CM4S offers a significant upgrade for embedded computing applications. While transitioning from the CM3+ to the CM4S may require some work, the benefits of improved performance and expanded features make it a worthwhile investment for developers and designers alike.

Sfera Labs was the first industrial manufacturer to introduce support for CM4S in August 2022, only a few months after its launch by Raspberry Pi. Sfera Labs launched its first server based on the Compute Module, the Strato Pi CM, in 2018. Strato Pi CM is a compact industrial server CE/FCC/IC compliant, with a wide-range power supply, eMMC Flash, RTC, RS-485, watchdog, and secure element. In 2019, the Strato Pi CM Duo followed, the first Raspberry Pi-based server offering a dual SD card slot. This feature is critical for high-reliability systems, which must guarantee a functional life cycle of many years. In addition to ensuring data integrity and redundancy, Strato Pi CM Duo can perform a remote full-system upgrade.

Furthermore, in 2020, Sfera Labs launched Iono Pi Max, an all-in-one solution for industrial control with a Raspberry Pi core. Iono Pi Max features an incredibly wide range of analog and digital interfaces: four 4 mA to 20 mA and four 0 V to 10 V, galvanically isolated, highly accurate inputs to connect standard industrial probes, as well as two additional inputs specific for Pt100 and Pt1000 temperature sensors. Six digital inputs, accepting up to 30 V signals, let users integrate digital counters and general status signals. 

The Strato Pi CM, Strato Pi CM Duo, and Iono Pi Max support all the Raspberry Pi Compute Module versions: 3, 3+, 4S, opening the door for new, advanced applications while safeguarding existing developments.

Sfera Labs’ Exo Sense Pi is based on CM4. The Exo Sense Pi is a multi-sensor module with an extensive range of connectivity options. These options are ready for residential and commercial applications, such as environmental monitoring and data gathering, BLE positioning, indoor people and assets tracking, room management and access control, voice control, and much more.

Author: Giampiero Baggiani, Co-Founder and Head of Software Development at Sfera Labs