Compute Module 4 PoE Board (B)

From Waveshare Wiki
Jump to: navigation, search
Compute Module 4 PoE Board (B)
Compute Module PoE Board (B)
CM4-IO-POE-BOX-B-1.jpg


Raspberry Pi Compute Module 4 IO Board With PoE Feature (Type B), for all Variants of CM4
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

The Compute Module 4 PoE 4G Board is an industrial-grade IO baseboard designed for Raspberry Pi Compute Module 4 (not included). It is a baseboard that can be used with Raspberry Pi Compute Module 4, supports PoE power supply and 5V DC power supply, and has four USB2.0 onboard, which is convenient for users to use.

Precautions for use

1: Do not plug and unplug any device except USB and HDMI while the baseboard is working.
2: Please confirm the fan voltage before connecting. It supports 5V and 12V. The default connection is 5V. Please modify the jumper of FAN_VCC if you want to switch the fan voltage
3: Type C interface can be used for the power supply or a USB SLAVE interface for burning images.
4: To ensure the normal power supply of CM4, please do not connect other devices when using the Type C interface to burn the image.
5: When CM4 is in normal use, it needs to provide 5V 2A power supply for CM4. Otherwise, problems such as automatic shutdown, frequency reduction, etc. may occur.
6: USB2.0 is closed by default, if you need to open it, you need to add dtoverlay=dwc2,dr_mode=host in the config.txt.
7: When using the PoE function, pay attention to checking whether the switch supports the PoE of the 802.3af network standard.
8: When you need to use POE, connect the POE jumper cap to the EN position.
9: Two DISP interfaces cannot be used together by default.

Dimension

Compute_Module 4 POE Board (B)
Compute-Module-4-PoE-Board-B-details-size.jpg
Compute_Module 4
Compute Module 4 IO Board 5.jpg

What's on board

Compute-Module-4-PoE-Board-B-details-intro.jpg Compute-Module-4-PoE-Board-B-details-intro2.jpg

No. Component Description
1 CM4 socket Suitable for all variants of Compute Module 4
2 40PIN GPIO header ~
3 BOOT selection ON: CM4 would be booted from USB-C interface
OFF: CM4 would be booted from eMMC or Micro SD card
4 Misc functional pins ~
5 USB Type-C power supply/programming 5V/2.5A power supply,
also allows burning system image into Compute Module 4 eMMC variants
6 Status indicators ACT: Raspberry Pi operating status indicator
PWR: Raspberry Pi power indicator
7 DISP 2x MIPI DSI display port
8 CAM 2x MIPI CSI camera connectors.
9 USB2.0 ports 4x USB2.0 ports, for connecting sorts of USB devices
10 HDMI ports 2x HDMI ports, supports dual 4K 30fps output
11 RTC battery holder supports CR1220 button cell
12 FAN header for connecting cooling fan, allows speed adjustment and measurement
13 PCIe Gen 2 × 1 socket forconnecting PCIe Gen 2 × 1 modules
14 Gigabit Ethernet connector Gigabit Ethernet RJ45 with PoE support, 10/100/1000M compatible
15 DC 5V output ~
16 RS485 with 600W lightning-proof, anti-surge, and 15KV ESD protection,
reversed optional 120R balancing resistor jumper
17 RS232 with TVS diode, anti-surge, and ESD protection
18 Buzzer ~
19 FAN_VDD/PoE selection cooling fan driving voltage: 12V or 5V
PoE: enable (EN) or disable (DIS)
20 FE1.1S USB expansion chip
21 PCF52063ATL RTC chip
22 RTC/FAN I2C bus switch,
SDA0/SCL0: I2C-10 is shared with CSI/DSI
GPIO3/2: I2C-1 is shared with 40PIN header
23 IO logic level selection set the CM4 IO logic level as 3.3V or 1.8V
24 RTC interruption configuration PI-RUN: CM4 will reboot on RTC interruption
GN-EN: CM4 powerdown on RTC interruption
D4: D4 pin is triggered on RTC interruption
25 Micro SD card slot Insert a Micro SD card with pre-programmed system, to start up Compute Module 4 Lite

Special function pin description

Compute Module 4 POE Board (B) 4.png

Name Description
1 PI BOOT Don't use it, use the BOOT DIP switch
2 EEPROM WP Low level prevents EEPROM from being rewritten
3 IP1/0 CM4 motherboard MXL7704 AN1/0 pin
4 VADC COMP Composite video output
5 ETH IN ETH sync signal
6 PI_EN is synchronized with PI_RUN signal
7 PI_GLOBAL_EN CM4 onboard MXL7704 power enable pin, low level disable
8 PI_RUN CM4 status indication, high level means it is powered on, forcibly pull down to force restart CM4
9 WIFI_EN WIFI enable, disable at low level, open when suspended
11 BT_EN Bluetooth enable, disable at low level, enable when floating

Precautions

Do not plug or unplug any device while it is powered on.

Writing Image

RS485/RS232

It is closed by default. If you need to open it, you need to add content in config.txt:
sudo nano /boot/config.txt

 dtoverlay=uart3
 dtoverlay=uart5



RS232 occupies GPIO5/GPIO4 (BCM code 4/5), device number ttyAMA1.
RS485 occupies GPIO13/GPIO12 (BCM code 13/12), device number ttyAMA2.

Note: There is an RS485 serial port switch on the back, which can be switched to GPIO14/GPIO15.

USB2.0

The USB interfaces are default disabled in CM4, you need to enable it by adding the following lines: the config.txt.

dtoverlay=dwc2,dr_mode=host

It will take effect after restart.

If you use the latest Raspberry Pi OS (image after October 30, 2021) USB2.0 is OTG mode by default, CM4 will report an error:

 config failed, hub doesn't have any ports! (err -19)

However, USB can still be used. If you want to remove this error, remove otg_mode=1 in [cm4] of config.txt, and add dtoverlay=dwc2, dr_mode=host (USB cannot be recognized without adding it).
CM4 Burn EMMC 12.png

RTC FAN

  • Note: Please connect the fan before turning on the power of the expansion board and then complete the test. Please do not connect the fan after the expansion board has been powered on, that is, the fan control chip has been powered on, otherwise the chip will be burned!
  • Note: Please confirm the fan voltage and the actually connected fan power supply before connecting.

Note that if you want to use the RTC function, please first disable the DSI and CSI. And I2C-10 is used by default.

RTC (PCF85063a) on i2c-10, address is 0x51 (7-bit address)
FAN (EMC2301) on i2c-10, address is 0x2f (7-bit address)
If you need simple use or need to add to your program instead of the kernel, see C and Python demos. CM4 RTC FAN

RTC

Open the terminal and modify the config.txt file.

 sudo nano /boot/config.txt

Add the following lines to the file and modify the audio setting:

 #Add the lines to the end of file
 dtparam=i2c_vc=on
 dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi
 #remove the setting dtparam=audio=on by adding the # to the front of the line
 #dtparam=audio=on

Save and reboot the Raspberry Pi.

 sudo reboot

Hwclock

Synchronize system clock -> hardware clock.

 sudo hwclock -w

Synchronize hardware clock -> system clock.

sudo hwclock  -s

Note that you need to disable the network synchronization function, otherwise, the time will be changed according to network time.

Set hardware clock:

sudo hwclock --set --date="9/8/2021 16:45:05"

Check the hardware clock.

sudo hwclock -r

Check the version.

sudo hwclock --verbose

Cooling fan

When powered on, the fan will spin for 1 second, then stop for 2 seconds, and then spin again, this is a normal phenomenon.
There is currently no official configuration method for fans, there is a third-party configuration method: https://github.com/neg2led/cm4io-fan
This method is released by a third party, not an official release, and we are not responsible for any problems!

 mkdir -p ~/src
 cd ~/src
 git clone https://github.com/neg2led/cm4io-fan.git
 cd cm4io-fan
 sudo chmod 777 install.sh
 sudo  ./install.sh

The device tree overlay has a few options, here's the equivalent of a /boot/overlays/README info section:

 #############################
 Name:   cm4io-fan
 Info:   Raspberry Pi Compute Module 4 IO Board fan controller
 Load:   dtoverlay=cm4io-fan,<param>[=<val>]
 Params: minrpm             RPM target for the fan when the SoC is below 
                            mintemp (default 3500)
        maxrpm              RPM target for the fan when the SoC is above
                            maxtemp (default 5500)
        midtemp             Temperature (in millicelcius) at which the fan
                            begins to speed up (default 50000)
        midtemp_hyst        Temperature delta (in millicelcius) below mintemp
                            at which the fan will drop to minrpm (default 2000)
        maxtemp             Temperature (in millicelcius) at which the fan 
                            will be held at maxrpm (default 70000)
        maxtemp_hyst        Temperature delta (in millicelcius) below maxtemp
                            at which the fan begins to slow down (default 2000)
  #############################

For example, speed up the fan if the temperature is higher than 45°C and set it to maximum value if the temperate is higher than 50°C:

 dtoverlay=cm4io-fan,minrpm=500,maxrpm=5000,midtemp=45000,midtemp_hyst=2000,maxtemp=50000,maxtemp_hyst=2000

CSI DSI

Configuration file

CSI and DSI interfaces are closed by default, they will use the I2C-10, I2C-11, and I2C-0.
Open a terminal and run the following commands:

wget https://files.waveshare.com/upload/7/75/CM4_dt_blob_Source.zip
  unzip -o CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source
  sudo chmod 777 -R CM4_dt_blob_Source
  cd CM4_dt_blob_Source/
  #If using two cameras and DSI0 execute
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp0-double_cam.dts
  # if using two cameras and DSI1 execute
  sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-double_cam.dts
  #When using any DSI, HDMI1 has no image output, even if you do not connect the DSI screen, as long as the corresponding file is compiled, then HDMI1 will not output
  #If you need to restore, delete the corresponding dt-blob.bin: sudo rm -rf /boot/dt-blob.bin
  # After execution, turn off the power and restart the CM4

Recording test

Then connect the Camera and DSI display:
1: Make sure the connection is in the power-off state
2: Connect Power
3: Wait a few seconds for the screen to start up
4: If it fails to start, check whether /boot/dt-blob.bin exists, and restart it if it exists.
5: The camera needs to run raspi-config, select Interfacing Options->Camera->Yes->Finish-Yes, reboot the system, open the enabled camera, and then restart to save the changes.

Old version (Buster)

Test the Raspberry Pi camera.
Check the first camera connected to the screen:

 sudo raspivid -t 0 -cs 0

Check the second camera connected to the screen:

 sudo raspivid -t 0 -cs 1

New version(Bullseye)

If using the latest Raspberry Pi OS (Bullseye):

libcamera-hello -t 0
or
libcamera-hello

#The new system uses dual cameras
#Remove camera_auto_detect=1 in config.txt
#camera_auto_detect=1

#Add to
dtoverlay=imx219,cam1
dtoverlay=imx219,cam0

#where imx219 is the camera sensor model, and there are other sensors
dtoverlay=ov5647,cam0
dtoverlay=imx219,cam0
dtoverlay=ov9281,cam0
dtoverlay=imx477,cam0

#then restart
reboot

#Other part of the command:
#Check if the camera is detected
libcamera-hello --list-cameras

#Open the corresponding camera
libcamera-hello --camera 1
libcamera-hello --camera 0

#Taking Pictures
libcamera-jpeg -o test.jpg
#You can add --camera to specify the camera

More instructions click me

  • Note: If using the DSI interface display will have an HDMI disabled, even if just compile the corresponding file without connecting the DSI screen.
  • Any connection of two HDMIs can output images, not limited to that HDMI, if two HDMI screens are connected, only HDMI0 has image output
  • If you want to enable both HDMI, delete the dt-blob.bin file with the following command:
 sudo rm -rf /boot/dt-blob.bin
  • Then reboot

Reference Raspberry Pi Manual

Resource

Document

Demo codes

3D Drawing

Software

FAQ

 Answer:
a) Check whether "dtparam -audio - on"is blocked in /boot/config.txt;
b) Check if the "/boot/dt-blob.bin" file exists, if it cannot be used, delete it.


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)