Close
0%
0%

Carrier board for the Raspberry Pi Compute Module

This is a carrier board for the Raspberry Pi compute module. Inspired by the StereoPi project and the official carrier board for the module.

Similar projects worth following
Connectivity:
- 2x camera (both 15pin/1mm and 22pin/0.5mm)
- 1x DSI (compatible with Raspberry Pi)
- 1x HDMI
- 1x MicroSD (for operating system)
- 1x SD (for additional storage)
- 3x USB Host (via a hub chip)
- 1x USB device (used for flashing the CM)
- 1x 40-pin GPIO connector (compatible with Raspberry Pi)
- 1x 12-pin GPIO connector (extra GPIOs, partially shared with the SD card)
- 1x 16-pin connector (power supplies, 1x USB Host, TV DAC)
- 1x +5v output connector (for the DSI display power)
- 1x Fan connector (PWM capable via external IC)
- 1x DC barrel jack connector for power
- 1x 3-pin connector for battery pack (8.4V 2S) with thermistor

Features:
- Powered from 12V DC (wall adapter)
- Support for 2S LiIon/LiPo battery (8.4V) for stand alone operation
- Built-in battery charger
- Power switch IC. Offers the power button and software power-down feature

The board was originally meant for CM3/CM3+ but should work also with previous version(s) as they are pin compatible. When using a module with EMMC flash on board, the microSD card slot must remain unused (it is not connected on the CM).

Since both hardware I2C interfaces are used for the cameras (and they have to be), there is a software I2C interface enabled on GPIO32-33. This interface is used for communication with on-board chips such as battery ADC and GPIO+PWM expander. SDA and SCL signals are also available on the 12-pin goldpin connector next to the SD card. Software I2C driver is available on Raspbian.

The second SD card is connected to the SD1 interface on the CM via 4-bit SDIO bus yielding in 6-pin connection. Those pins are exposed on the 12-pin goldpin connector and can be used as regular GPIOs when the SD1 interface is disabled.

Since the Broadcom chip on the CM has only one USB interface, all downstream ports are served by the 4-port hub chip USB2514B. There are 3x USB A connectors with independent current draw monitoring controlled by the hub. The 4-th USB port is available on the 16-pin goldpin connector.

The micro USB connector allows to flash the CM when using one with EMMC on-board. This feature works identically as in the official compute module carrier board. When a micro USB host is plugged in then the USB hub chip serving all USB devices is disconnected from the CM. Unfortunately I haven’t tested this feature since I only have the CM3+ lite module without EMMC.

There is no Ethernet interface. If one is needed an external USB to Ethernet converter must be used (actually this is how the Ethernet is implemented on RaspberryPi).

The battery is managed by the BQ24170 chip. It provides charging control and battery temperature monitoring. It can also limit the charge current if total current draw from the DC supply exceeds a given threshold. The charge current is set to 2A while the maximum current draw from the DC supply is set to 4A. The whole system works like in a laptop computer, the power supply can be seamlessly connected/disconnected.

The battery voltage is measured by the MCP3421A0T ADC chip. This is the only means for monitoring battery charge state. There is also a GPIO+PWM expander (PCA9531). One input of the expander is used to monitor whether there is external DC power present. There is no means for checking whether the battery is actually being charged or not. Both chips communicate with the CM though the software I2C bus. Linux driver for the MCP3421A0T is available in Raspbian while driver for the PCA9531 (as GPIO+PWM) is my work in progress.

The power button function is implemented using STM6601 chip. Short press of the power button when the power is off enables DC-DC converters which generate +5V for the CM and peripherals. Short press when the power is on generates a negative pulse on GPIO41 which tells the CM to start graceful shutdown. Once the graceful shutdown is complete the CM sets GPIO40 high which tells the STM6601 to disable DC-DC converters. Linux drivers that allow to implement this functionality are already available in Raspbian. A long press (>5sec) of the power button forces the power off.

The 40-pin connector provides identical pinout as on RaspberryPi boards.

WHAT HAVEN'T BEEN TESTED:

- USB Device function / flashing the CM module

WHAT DOES NOT WORK:

- The RTC chip since there is I2C address conflict with ADC used for battery voltage measurement.

Assembly details:

  • R70, D8 - Choose value of R70 depending on type of LED D8
  • R30, D6 - Choose value of R30 depending on type of LED D6
  • R65 - 0R
  • R89 - 0R
  • R66 - DNP (!) mounting it will fry 5V DC/DC converters (!)
  • R67 - DNP
  • R68 - DNP
  • R44 - DNP

The PCB has 4-layers. Width and spacing of HDMI, CSI and DSI tracks was designed (mostly) for the following stackup:

  • Copper      1    35um
  • Dielectric ...
Read more »

sheet - 9.47 kB - 04/21/2019 at 12:51

Download

sheet - 6.11 kB - 04/21/2019 at 12:46

Download

Zip Archive - 1.11 MB - 04/21/2019 at 12:23

Download

Zip Archive - 473.86 kB - 04/21/2019 at 12:21

Download

  • Power button

    MatYay05/03/2019 at 08:43 0 comments

    In order to make the power button and power off to work add these lines to the /boot/config.txt The necessary drivers are already in Raspbian:

    dtoverlay=gpio-poweroff,gpiopin=40
    dtoverlay=gpio-key,gpio=41,label="Power button",keycode=116,active_low
    

View project log

Enjoy this project?

Share

Discussions

abstractspace wrote 05/20/2020 at 19:57 point

This project is so awesome! Definitely a very well thought out board. Quick question, why use a 5.6V Zener on the VCC pin of the STM6601? Why not a lower voltage one like 5.1V. The chip has a absolute max voltage rating of 7V, so I guess it is ok, but why exceed the 5.5V recommended voltage?

Thanks!

  Are you sure? yes | no

Lipwig wrote 04/22/2020 at 17:13 point

Hi,
really great work!
I have searched for many schematics to get into the CM, but your project is definitely the best place to start with!
Unfortunately, there are many footprint files which are not part of the standard KiCad installation or other repositories (e.g. SD-cards, CM-connector, ...). 

Could you please provide us these files?

  Are you sure? yes | no

A Logan wrote 03/20/2020 at 21:02 point

Great work MatYay, looks superb. Slightly off topic, but do you have the 3D model for those USB-A sockets for KiCad? Thanks for sharing :)

  Are you sure? yes | no

MatYay wrote 03/22/2020 at 14:14 point

Thanks! I forgot where I have them from. But you can look at eg. https://www.3dcontentcentral.com/ there are lot of models of electronic components there. Also some vendors provide their own 3D models, you can look there as well.

  Are you sure? yes | no

A Logan wrote 03/22/2020 at 16:49 point

Great, thanks, I'll take a look!

  Are you sure? yes | no

Eugene wrote 08/04/2019 at 11:56 point

Hi,

Cool board! Just a curious: have you found any use case for the Display DSI connector? We've excluded it in our StereoPi board, but it was a compromise solution to save some space.

  Are you sure? yes | no

mbt28 wrote 04/30/2019 at 13:12 point

Hi,

Amazing work, I am sure it costed you so much time.

Are you planning to make more updates on the pcb or would you go as is?

  Are you sure? yes | no

MatYay wrote 04/30/2019 at 18:07 point

Hi,

I guess I will but I will neither fabricate it nor test it. There is actually not much more that can be connected to the CM.

There are some things that come to my mind:

- The RTC chip has address conflict with the ADC chip. I need to change one of them

- There is no connector for the power button which might be useful when the device is enclosed in a case. I think I would add it.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates