Compute Module IO Board Plus

From Waveshare Wiki
Jump to: navigation, search
Compute Module IO Board Plus
Compute-Module-IO-Board-Plus-1.jpg

Compute Module Board Plus, Compisite Breakout Board fir Developing with Raspberry Pi CM3, CM3L
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Introduction

Compute Module Board Plus, Compisite Breakout Board fir Developing with Raspberry Pi CM3, CM3L

More

Feature

  • Compatible with the Compute Module IO Board V3 from the Raspberry Pi Foundation.
  • Raspberry Pi GPIO header, for connecting sorts of Raspberry Pi HATs.
  • Arduino connectivity, also supports Arduino shields.
  • 1-WIRE interface, for connecting single-bus devices like DS18B20.
  • 4 x keys, 4 x LEDs, and 1 x Buzzer, for I/O testing.
  • Onboard USB HUB, allows connecting more USB devices.
  • IR receiver, IR remote control is available.
  • Onboard USB TO UART, for serial debugging.
  • Sensor interface.
  • 10-bit ADC, 38KSPS, 11-ch (6-ch for Arduino interface, 5-ch for sensors).
  • 16-bit DAC, 2-ch.
  • Onboard RTC, one of the most common and useful functions.

Onboard Resource

Compute module io board001.jpg

  1. Compute Module interface: for connecting Compute Module (CM3 / CM3L / CM3+ / CM3+L)
  2. Compute Module GPIO header: breakout all the Compute Module pins
  3. Raspberry Pi GPIO header: for connecting Raspberry Pi HATs
  4. CSI interface: camera ports, for connecting Raspberry Pi Camera
  5. DSI interface: display ports, for connecting Raspberry Pi LCD
  6. HDMI port
  7. USB ports: for connecting USB devices
  8. USB SLAVE interface: allows you to burn system image in to Compute Module 3/3+
  9. USB TO UART interface: for serial debugging
  10. Arduino header: for connecting Arduino shields
  11. AD/DA input/output screw terminals
  12. 1-WIRE interface: for connecting single-bus devices like DS18B20
  13. Sensor interface
  14. Power port: 5V 2.5A
  15. FE1.1S: USB HUB chip
  16. 12MHz crystal
  17. CP2102: USB TO UART converter
  18. Micro SD card slot: insert a Micro SD card with pre-burnt system, to start up Compute Module 3/3+ Lite variant
  19. TLC1543: AD converter
  20. DAC8552: 16-bit DAC, 2-ch
  21. DS3231: high-precision RTC chip, I2C interface
  22. RTC battery holder: supports CR1220 batteries
  23. Voltage regulator: 3.3V / 2.5V / 1.8V
  24. LFN0038K: IR receiver
  25. Buzzer
  26. Power indicator
  27. ACT indicator: indicating the Micro SD card status
  28. User LEDs
  29. User Keys
  30. BOOT selection
    • EN: enable the PC to access SD card/eMMC through USB SLAVE
    • DIS: the Compute Module will boot from SD card/eMMC
31. VGx power selection: config the I/O level
32. USB HUB enable jumper: HUB enable and USB SLAVE power selection
33. ADC/DAC configuration: config the power supply and reference voltage of ADC/DAC
34. Peripheral configuration: config the control pins of UART, user keys, user LEDs, 1-WIRE interface, IR receiver, and buzzer
35. Arduino AD selection
    • connect 1 and 2: Arduino A0-A5 as digital control pin
    • connect 2 and 3: Arduino A0-A5 as AD input

User Guide

Download demo codes

  • Please download demo codes from #Resources.
  • After you write the image to an SD card or EMMC, you can copy the demo codes downloaded to BOOT directly. (If you use the pre-configured image, this step isn't required).
  • Download rpiboot_setup software from #Resources and unzip it. Install rpiboot software and remember the installation directory.

Writting image

On Compute Module IO Board Plus (Hereafter called IO Board), an SD card slot is integrated for image installation of Compute Module 3 Lite (hereafter called CM3L) and Compute Module 3+ Lite(hereafter called CM3+L). If the board you use is Compute Module 3 (CM3) or Compute Module 3+ (CM3+), the image is written to EMMC and booted instead of the SD card.

Download image

  • Download the newest Raspbain image from the Raspberry Pi website or download the pre-configured images from #Resources.
  • Unzip the file downloaded to get the .img file.

Write image for CM3L/CM3+L

  • To write an image, you should prepare an SD card (16G or large) and a card reader.
  • Use Win32DiskImage.exe software to write images to an SD card. (It is the same as how you write an image for Pi 3B)
  • After writing, insert the SD card into the card slot of the IO Board.

Write image for CM3/CM3+

  • Download the Raspbian image and unzip it to get the .img file.
  • Insert CM3/CM3+ to IO Board, set BOOT ENABLE USB SLAVE jumper to EN side, remove USB SLAVE1/2/3/4 Select jumper caps. Connect USB SLAVE of IO Board to PC.
Compute-Module-Board-Manual-1.png
  • Under the installation directory of "rpiboot_setup", find the "rpiboot.exe" file and run it as an administrator. After successful execution, you will find that the CM3/CM3+ is recognized as a removable disk on your PC. (Note: When using CM3+ for the first time, you may need to manually format and assign a drive letter in your PC's disk management for it to be detected in "My Computer".
  • Use WinDiskImager.exe tool to write images downloaded to EMMC of CM3/CM3+. (Please first format it)
  • After writing, please set BOOT ENABLE USB SLAVE jumper back to DIS side and insert USB SLAVE1/2/3/4 Select jumpers back.
Compute-Module-Board-Manual-2.png
  • Connect the Power adapter to the Power interface to start devices.

【Note】

While writing images, DO NOT write other portable storage drives to avoid conflict. The EMMC of CM3+ is extended, which allows CM3+ to install a common desktop image. Because the EMMC of CM3 is only 4G, therefore if you want to write an image to CM3, please choose Raspbian Lite. You can also install GUI for Lite image separately by commands below (network is required)
sudo apt-get update
sudo apt-get install raspberrypi-ui-mods

Connect Display and Camera

If you use the pre-configured image, you only need to connect the devices and use them. If the image you use is official Raspbain, you also need to configure software for the official display and camera.

Connect official Raspberry Pi 7inch display

  • Connect the official 7-inch display to the DISP1 interface of the IO Board by adapter board.
  • Wire 5V and GND pins of display to 5V and GND of IO Board.
  • Wire pins:
    • GPIO0 <-> CD1_SDA
    • GPIO1 <-> CD1_SCL
  • Connect power adapter
  • Display is on after booting.

【Note】

If the display works abnormally, please check the hardware connection and software setting (for software setting, please refer to #Setup software for display and camera)

Connect Waveshare HDMI display

  • We have several HDMI displays used for Raspberry Pi, here we take the 7-inch HDMI LCD (C) as an example.
  • Disconnect the official DPI display, otherwise HDMI display cannot work.
  • Connect the HDMI interface of the 7-inch HDMI LCD (C) to the HDMI interface of the IO Board. Connect the Touch interface of the display to the USB port of the IO Board.
  • Connect the power adapter.
  • Display is turned on after booting.

【Note】

If you use Waveshare HDMI display, you need to config Raspbain according to WIKI page of display.

Connect Camera

  • Connect camera to CAM1 interface of IOBoard.(You may require RPi zero V1.3 Camera cable
  • Wire:
    • GPIO0 <-> CD1_SDA
    • GPIO1 <-> CD1_SCL
    • GPIO4 <-> CAM1_IO1
    • GPIO5 <-> CAM1_IO0
  • Connect power adapter
  • You can connect two cameras at the same time by connecting another camera to the CAM0 interface.
  • Wire:
    • GPIO28 <-> CD0_SDA
    • GPIO29 <-> CD0_SCL
    • GPIO30 <-> CAM0_IO1
    • GPIO31 <-> CAM0_IO0
  • To capture camera, please run commands:
    • sudo raspivid -t 0 -cs 0
    • sudo raspivid -t 0 -cs 1

【Note】

-cs is used to choose camera 0 or 1; 0 for CAM1 and 1 for CAM0
The parameter of -cs stand for the number of the camera connected, it may be different with the silk screen printing on the board. If you only connect one camera and connect it to the CAM1 interface, the command run is also "-cs 0", which means that it will call the first camera (camera 0).

Setup software for display and camera

If you use the official Raspbian, you need to set up software for using the official display and the cameras as well. Convert dts file to bin and then put it to /boot directory. (dts files are provided in demo codes, located in /Program/dt)

Covnert commands:

sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-cam2.dts

If you use pre-configured, you do not need to set up again.

Compute-Module-Board-Manual-3.jpg

Demo codes

To run the sample codes, you should connect the display and keyboard to Raspberry Pi for control, or you can remotely access Raspberry Pi via SSH.

If you use the original Raspbian image, please first install libraries before running the example. For details of libraries installation, please refer to Libraries for Pi

PWM: Buzzer testing

Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/Buzzer_PWM/python/
  • Run the example by command:
sudo ./buzzer.py
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/Buzzer_PWM/wiringPi/
  • Run the example by command:
sudo ./buzzer
Expected result
  • The sound of the buzzer first turns higher and then turns lower back.
  • Note: When using the IO Board, the buzzer may sound because of GPIO conflict, in this case, you can directly remove the last BUZ jumper cap of USER_JMP.

DAC testing

BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DAC8532
  • Run the example by command:
sudo ./dac8532
Expected result
LED1 and LED2 flash respectively, turn brighter from dim, and then turn to dim again.

DS18B20 testing

You should prepare a DS18B20 for this example. Connect it to IO Board according to screen printing. DO NOT reverse it to avoid from high hot.

sysfs
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DS18B20/fs/
  • Run the example by command:
sudo ./ds18b20
Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DS18B20/python/
  • Run the example by command:
sudo ./ds18b20.py
Expected result
The current temperature measured is printed to the terminal, you can press Ctr+C to stop the process.

RTC: DS3231 testing

BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DS3231/bcm2835/
  • Run the example by command:
sudo ./ds3231
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DS3231/wiringPi/
  • Run the example by command:
sudo ./ds3231
Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/DS3231/python/
  • Run the example by command:
sudo ./ds3231.py
Expected result
Time information is printed to the terminal, you can press Ctrl+C to stop the process.

IRM Infrared remotely control testing

  • Here we should use an Infrared controller.
BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/IRM/bcm2835/
  • Run the example by command:
sudo ./irm
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/IRM/wiringPi/
  • Run the example by command:
sudo ./irm.py
Expected result
Terminal prints relate key values when pressing the controller. You can press Ctrl+C to stop the process.

Button testing

BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/KEY/bcm2835/
  • Run the example by command:
sudo ./key
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/KEY/wiringPi/
  • Run the example by command:
sudo ./key
python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/KEY/python/
  • Run the example by command:
sudo ./key.py
Expected result
Terminal print related information when you press KEY1, KEY2, KEY3 and KEY4 of IO Board. You can press Ctrl+C to stop the process.

LED testing

BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/LED/bcm2835/
  • Run the example by command:
sudo ./led
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/LED/wiringPi/
  • Run the example by command:
sudo ./led
Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/LED/python/
  • Run the example by command:
sudo ./led.py
Expected result
4 LED so IO Board flash respectively. You can press Ctrl+C to stop the process.

ADC testing

BCM2835
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/TLC1543/bcm2835/
  • Run the example by command:
sudo ./tlc1543
wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/TLC1543/wiringPi/
  • Run the example by command:
sudo ./tlc1543
Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/TLC1543/python/
  • Run the example by command:
sudo ./tlc1543.py
Expected result
AD data are printed to the terminal. You can press Ctrl+C to stop the process.

UART communicatation testing

Connect USB TO UART interface of IO Board to PC. Install CP2102 driver on the computer, open Putty software on the PC, and set it to 115200.

Access Raspberry by putty via UART port (username and password are pi and raspberry).

wiringPi
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/UART/wiringPi/
  • Run the example by command:
sudo ./uart
Python
  • Open the terminal and enter the directory of codes by command:
cd /home/pi/CM3/UART/python/
  • Run the example by command:
sudo ./usart.py
Expected result
Hello World!!! is printed to Putty. You can press Ctrl+C to stop the process.

Resources

Documentation

Image

Demo code

Software

Others

FAQ

 Answer:
  • Make sure your CM3/CM3+ version is correct. The eMMC version of CM3/CM3+ will have an additional IC on the back. Only the eMMC version can be programmed using the USB SLAVE method.
  • We recommend using the WIN10 system for programming, as most users have reported unstable programming on WIN7 or Linux systems.
  • Ensure the Power interface is connected to a 5V 2A or higher power adapter. Try to re-power the mainboard.
  • Open the 'rpiboot.exe' software with administrator privileges.
  • Try using a different USB data cable.
  • Switch to a different USB port on your PC.
  • Attempt to unplug and re-plug the CM3/CM3+.
  • Try restarting your PC.
  • Attempt programming on another computer.

{{{5}}}


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)

,