halfpint.me.uk

Personal website of Martin Halford


Raspberry Pi CM4 on Waveshare POE IO Board (B)



Introduction

The project utilises a Raspberry Pi Compute Module 4 (without eMMC but with 4GB RAM and Wireless) mounted on a Waveshare 'Raspberry Pi Compute Module 4 IO Board With PoE Feature (Type B)'. For the operating system and storage an M.2 SSD is mounted on the PCIe slot using a Waveshare adapter and cooling is provided by a heatsink and fan mounted on the CM4 module. Raspberry Pi OS (Debian Linux based) will be utilised for the operating system. Power is provide by a Raspberry Pi 5V 3A adapter, although the option of upgrading to a 12V supply is available.

The notes below describe the initial install, highlighting issues encountered, some performance testing undertaken and the installation of software, eventually to include NextCloud on a full fibre Internet connection and monitoring a security camera.

Components

These are the components used for the project:

Waveshare Compute Module 4 POE Board (B)

Raspberry Pi Compute Module 4 WiFi no eMMC 4GB RAM

Waveshare PCIe to M.2 Adapter 

Tall Aluminium Heatsink & Fan for Raspberry Pi Compute Module 4 

Official UK Raspberry Pi 4 Power Supply 

Crucial P2 250GB PCIe M.2 2280 SSD

CR1220 Battery (for RTC)

Hardware Issues

The only issue encountered with the build was with the tiny nuts and bolts fixing the heatsink and fan to the Compute Module. With these bolts installed downwards as per the instructions, the nuts on the underside prevented the CM4 module from clicking into place on the Waveshare Board. Fortunately, when reversed (with the thinner bolt heads underneath) all was well.

Importantly, the SSD was detected without any additional configuration ( sudo fdisk -l ).

Installation Issues

The Raspberry Pi imager running on a Pop!_OS desktop PC was used to install Raspberry Pi OS to a MicroSD card.  Upon first boot, two issues were encountered:

  1. Despite placing an empty file named 'SSH' on the boot partition, SSH'ing to the Pi with the formerly default user 'pi' and password 'raspberry' did not work. It turns out the user and password now have to be set in the Raspberry Pi imager program using the 'Gear Wheel' options.  Repeating the imaging process solved this problem.
  2. With a monitor, keyboard and mouse connected there was no output after an initial message and a very brief logo display. Some Googling suggested editing /boot/config.txt to comment out the dtoverlay line, uncommented by default on the PiOS image. After reboot the graphic environment was finally available.
    #dtoverlay=vc4-kms-v3d
     This may not be a full solution.

The installation process was then repeated from the imager program within Raspberry OS running from the MicroSD card, installing to the M.2 SSD. This which helpfully came up as an available storage medium. The process was extremely straightforward, especially having already debugged the above issues.

Further Configuration

The Real Time Clock and Fan Control were set up using the guidance in the Waveshare Wiki for the board. This can be found using the link below:

Waveshare Wiki for Compute Module 4 POE IO Board (B)

Neofetch was installed to show details of the install as shown on the screenshot below:

Neofetch Screenshot

Stress Testing and Power Consumption

Stress testing using Stressberry was undertaken initially with all four cores at idle, then at 100% utilisation on all four cores (verified with htop). This produced remarkable results, albeit with the board in the open air, not in a case.  The ambient temperature was around 21 degrees C.

  CPU Frequency CPU Temperature Power Consumption Fan Speed
Idle 700 Hz 30-35 C 3W Low
4 x CPU's at 100% 1500 Hz 40-45 C 5W Low

It did not appear to be possible to stress out the CM4 with the heatsink and fan as fitted, suggesting that there is scope for overclocking the processor.

The power draw at 5W seems well within the 5V, 3A Raspberry Pi plug, although the accuracy at such low power levels may be questionable.

 

Overclocking the CM4

Here are the results of overclocking the CPU to 2000MHz and the GPU to 750MHz with the flollowing configuration in /boot/config.txt

#uncomment to overclock the arm. 700 MHz is the default.
over_voltage=6
arm_freq=2000
gpu_freq=750

 

The result was a creditable 38C at idle and 56C under the 4 x 100% CPU stress test using Stressberry.  The fan noise remained barely audible.

Power draw had increased to ~7W.

 

Stressberry Plot of CM4 CPU Temperature 2000MHz Overclock