Introduction
This product is an IO board of the 4th generation of Raspberry Pi Compute Module. Compute Module 4 POE Board is a baseboard that can be used with Raspberry Pi Compute Module 4, and supports POE power supply and 7~36V DC power supply, with four onboard USB2 .0 for user convenience.
Users Guides
1: Confirm the fan voltage before connecting, it support 5V and 12V. if you want to connect 12V by default, please modify the jumper cap of FAN_VCC.
2: USB Type C interface is used as the USB SLAVE interface to burn the image, and it can also be used as the power supply interface, but cannot be used as the OTG interface.
3: The BOOT switch is for CM4 startup mode, the ON for CM4 to enter the programming mode, and the OFF for the system to start normally.
4: In normal use, it is necessary to provide at least 5V 1.5A power supply for CM4. Otherwise, there may be problems such as automatic shutdown, frequency reduction and so on.
5: USB2.0 is closed by default, if you want to open it, you need to add dtoverlay=dwc2,dr_mode=host in config.txt.
6: When using the POE function, pay attention to check whether the switch supports PoE of the 802.3af network standard.
7: When you need to use POE, connect the POE jumper cap to the EN position.
8: The Change LED light is the charging indicator, it is always on when charging, goes off when fully charged, and flashes when it fails.
Note
Note 1: When assembling, you need to turn the power switch to the OFF first, disconnect the power supply and then assemble, otherwise the operation will easily cause a short circuit to burn the device.
Note 2: When connecting the battery for the first time, you need to pay attention to whether the WARNING LED is on. If the LED is on, it means that the corresponding battery is connected in reverse. Do not charge if the battery is reversed.
Note 3: When the battery is connected for the first time, there may be no power output. You need to press the BOOT activation button or charge the battery to activate the battery protection chip to have power output. The power switch needs to be turned to ON.
Note 4: It is forbidden to plug and unplug any device except USB and HDMI while the power is on.
Note 5: It is recommended not to exceed 4A when working with high current for a long time. When working for a long time at 4A, it will heat up. Pay attention to heat dissipation.
Note 6: The external power supply must be greater than the power consumption of the entire system, otherwise there will not be enough current to charge the battery for a long time, and the battery power will become lower and lower until it is turned off.
Note 7: When the system load is heavy and the battery voltage is low, there may be a situation where the battery current is insufficient and the system keeps restarting.
Note 8: If the positive insulating pad of the battery is broken, it is recommended not to continue to use it, which may cause a short circuit and fire. When removing the battery, do not use a screwdriver to pry the positive electrode of the battery, which may cause a short circuit. It is recommended to pry the negative electrode of the battery.
Precautions for the use of lithium batteries
- Li-polymer and Li-ion batteries are very unstable. Improper charging or use may result in fire, personal injury and property damage.
- Do not connect the wrong polarity when charging and discharging the battery pack. Do not use other inferior chargers or charging boards to charge the lithium battery.
- Do not mix and use old and new batteries, and avoid using batteries of other brands.
- If you need to purchase lithium battery products separately, you must ensure that the battery parameters are compatible with the lithium battery expansion board. It is recommended to choose a regular battery manufacturer, and you need to self-aging test to ensure that the lithium battery can work stably and safely.
- Lithium batteries have a cycle life, please replace the old battery with a new one when it reaches its useful life or when it has been used for two years (whichever comes first).
- Please place battery products properly, keep away from flammable and explosive items, keep away from children, and avoid safety accidents caused by careless storage.
Demension
Compute_Module 4 POE Board
Compute_Module 4 core board
Onboard Introduction
Special Pins Introduction
Name | Description | |
---|---|---|
1 | EEPROM WP | Low level prevents EEPROM from being overwritten |
2 | VADC COMP | Composite video output |
3 | ETH IN | ETH sync signal |
4 | PI_GLOBAL_EN | CM4 onboard MXL7704 power pin, low level disable |
5 | PI_RUN | CM4 status indication, high level means it is powered on, forcibly pull down to restart CM4 |
6 | WIFI_EN | WIFI enable, disable at low level, open when pin is floating |
7 | BT_EN | Bluetooth enable, disable at low level, open when pin is floating |
Image Program
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: Before connecting, please confirm the fan voltage and the power supply of the actually connected fan
Note DSI and CSI are prohibited using RTC
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 to add to your program instead of the kernel, you can refer to the C and Python demo Link
RTC
sudo nano /boot/config.text #add it at the end dtparam=i2c_vc=on dtoverlay=i2c-rtc, pcf85063a, i2c_csi_dsi #add # before dtparam=audio=on #dtparam=audio=on #save and exit, reboot sudo reboot
- Hwclock Simple Use
Synchronize system clock -> hardware clock
sudo hwclock -w
Synchronize system clock -> system clock
sudo hwclock -s #Require closing the network or invalid
Set up hardware clock time
sudo hwclock -set -date="9/8/2021 16:45:05"
Check the hardware clock
sudo hwclock -r
Display version information
sudo hwclock -verbose
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 published by a third party, and we are not responsible for any problems!
#The following commands is the introduction for config.text
or refer to: dtoverlay=cm4io-fan,minrpm=500,maxrpm=5000,midtemp=45000,midtemp_hyst=2000,maxtemp=50000,maxtemp_hyst=2000 When the temperature is higher than 45 degrees Celsius and starts to accelerate, and the maximum speed is higher when it is more than 50 degrees Celsius
CSI DSI
Configuration File
CSI and DSI are disabled by default. When using camera and DSI, three I2C devices, I2C-10, I2C-11, and I2C-0, will be occupied. Start up as follows:
wget https:www.waveshare.net/w/upload/7/75/CM4_dt_blob_Source.zip unzip -0 CM4_dt_blob_Source.zip -d ./CM4_dt_blob_Source sudo chmod 777 -R CM4_dt_blob_Source cd CM4_dt_blob_Source/ #If you exexute by using two cameras and SI0 sudo dtc -I dts -0 dtb -0 /boot/dt-blob.bin dt-blob-disp0-double_cam.dts #If you exexute by using two cameras and SI0 sudo dtc -I dts -0 dtb -0 /boot/dt-blob.bin dt-blob-disp0-double_cam.dts #When using DSI randomly, HDMI1 doesn't output the image even if just compiling the corresponding file without connecting the DSI screen #if you want to restore, just delete corresponding dt-blob.bin. : sudo rm -rf /boot/dt-blob. bin #Finished Power Off and reboot CM4
Recording test
Then connect the camera and DSI screen:
1: Make sure the connection is power-off
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 enable camera, and then restart to save the changes.
- Old version (Buster)
Testing the Raspberry Pi Camera
View the first connected camera screen:
sudo raspivid -t 0 -cs 0
View the second connected camera screen:
sudo raspivid -t 0 -cs 1
- New version (Bullseye)
Using the newest Raspberry Pi OS(Bullseye)
libcamera-hello -t 0 or libcamera-hello #Using two cameras in the new system #Remove camera_auto_detect=1 in config.text #camera_auto_detect=1 #Add dtoverlay=omx219,cam1 dtoverlay=omx219,cam0 #imx219 is the mode of camera sensor, and other sensors dtoverlay=ov5647,cam0 dtoverlay=imx219,cam0 dtoverlay=ov9281,cam0 dtoverlay=imx477,cam0 #Then reboot reboot #other commands #check the camera whether being detected libcamera-hello -list-cameras #Open corresponding camera libcamera-hello -camera 1 libcamera-hello -camera 0 #Take Picture libcamera-jpg -0 test.jpg #Add -camera for the camera
More commands
- Note: Using the DSI interface will make HDMI disabled, even if just compiling the corresponding file without connecting the DSI screen.
- Any connection of two HDMIs can output images, and it is 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
Refer to Raspberry Pi Manual
INA219 Battery Level Detection
Enter the following command to run the program
sudo apt-get install p7zip wget https://www.waveshare.net/w/upload/5/59/CM4_UPS_Code.7z 7zr x CM4_UPS_Code.7z -r -o./ cd CM4_UPS_Code python3 INA219.py
After the program runs, it will output the battery voltage, current, power and the percentage of remaining battery power.
- Note
- if the current is positive, it means the output current of battery (which can be considered as the Raspberry Pi load current), and if the current is negative, it means the battery charging current.
When the system load is heavy and the battery voltage is low, there may be a situation where the battery current is insufficient and the system restarts continuously. This is not expected to see. In practical applications, automatic shutdown can be avoided by judging that the battery voltage is too low.
The battery voltage judgment has been added to the sample program. When the battery voltage is too low and there is no external power supply for charging, the program will shut down the system within 60s.
The program displays the following statement indicating that the battery voltage is too low and needs to be charged in time, otherwise the program will automatically shut down.
Voltage Low,please charge in time,otherwise it will shut down in 58 s
Resource
Manual
Program
Software
FAQ
b) Check whether the /boot/dt-blob.bin file exists, if it cannot be used, please delete it.