Skip to content
forked from mebs/CM4-NAS

Raspberry Pi CM4 based NAS solution board

Notifications You must be signed in to change notification settings

FynnSchapdick/CM4-NAS

 
 

Repository files navigation

CM4 NAS Solution

This Compute Module 4 daughter board design exposes a subset of the CM4's interfaces, including its single PCIe lane to accept an external SATA controller card. This design is based off of the official Raspberry Pi Foundation's CM4 IO board (the KiCad project is available on the IO board official page). Removed the unnecessary IO and rearranged the remaining interfaces for a smaller footprint that would fit in the width of a standard 3.5" hard drive.

The board was intentionally kept simple to limit mistakes as this is my first attempt at designing a PCB and I have no background in electronics, so all the power management is left to external power supplies. It's important to use good quality regulated power supplies with this board.

Also working on a 3D printed tower style case to complement the board. It will accommodate a 92mm fan, four 3.5" HDDs, a small OLED screen, and of course the board itself with a SATA controller board. The full design will be made available here and on Thingiverse as soon as I have it completed. Discussion here : mebs#6

Feel free to explore the discussion section of this repo to share ideas.

Original Reddit post here.

Table of Contents

Current State

I will update this section as I go.

I sadly can't get my hands on a CM4, so nothing was tested yet. I have reveived everything I needed to assemble a first prototype, but realized a footprint was wrong (I double checked and I inherited the mistake from the CM4IO board schematics for some reason, but their PCB doesn't reflect it). I fixed the issue, made several other improvements to the board and ordered the latest revision from JLC PCB. I still took the opportunity to use the old boards as training dummies to solder the high density connectors and it turned out to be very doable.

The current version of the board was not meant to be used with the lite version of the CM4 as it doesn't forward the microSD leads of the module, but it retains the necessary IO to program the CM4's eMMC.

I'll make sure to update this repo as I find and solve issues. For the software part of this project, I highly recommend Jeff Geerling's repo, where he documented similar endeavors.

Don't hesitate to ask questions in the Discussion tab of this repo.

Board IO

CM4 IO Breakout

The interfaces the board forwards from the CM4 are the following:

  • PCIe x1 Gen2: Good old PCIe 2.0, nothing special about it... if not that it's on a Raspberry Pi.
  • Ethernet: To reduce the number of components on the board and make assembly easier, a MagJack is used instead of a simple RJ45 connector. I had to look this up when I saw it in the IO board design, but a MagJack seems to be simply an RJ45 connector with integrated filters to help with signal integrity. Footprint is specific to the part listed bellow.
  • Single master/slave USB, selected with jumper: A USB type A port to plug a keyboard, a flash drive, a hub, or whatever you want to use as a USB slave to the CM4. Footprint is not standard so make sure it fits yours if you manufacture the PCB. Can also be used in slave mode (CM4 as slave). You would use this to program the eMMC with you computer. This connection taps into the same single USB bus the CM4 has to offer, but when this is used, the VCC input from the master signals that the CM4 should behave as a slave. Currently the footprint for this is a simple 5 pin header.
  • Full size HDMI: Mostly for debugging purposes, hooked to the HDMI0 output of the CM4.
  • I²C: This is marked "OLED" on the board because this was the intended use, but you can use this to slave any I²C device to the CM4. Five-pin JST connector footprint (fits simple headers too).
  • Single wire temperature sensor: Marked "Temp_sensor" on the board, hooked to GPIO_4 on the CM4. I would recommend using it for a temp sensor near the SATA controller because they can get really hot and control the fan (see bellow) based on that.
  • 9 GPIOs: General purpose IO header, including Gnd, 3V3 and 5V pins.
  • Configuration headers: nRPIBOOT, EEPROM_nWP, AIN1, SYNC_IN, SYNC_OUT, TV_OUT, GLOBAL_EN, RUN_PG, WL_nDis, BT_nDis. The pinout is detailed on the board.

Other Connections on the Board

Other than relaying the compute module's IOs, the board adds other connections, mainly for power.

  • Fan control: The board expects a dedicated PWM fan controller IC (see part list). Its output is routed to this JST connector (or your typical PWM fan connector) marked "Fan_PWM" on the board.
  • USB selection headers: To avoid needing a USB MUX on board, this header should be used with a jumper to select if you want to use the USB bus as master or as slave.
  • Power input: The board expects a 5V input for the CM4, and a 12V input for the PCIe card, both through the same JST connector labeled "PWR_IN".
  • 3V3 buck: The PCIe card also requires a dedicated 3V3 supply. This can be provided through the "3V3_BUCK" header near the power input. The pinout was made to accommodate this daughter board from AliExpress.
  • HDDs power: Labeled "SATA_PWR". This is the power rail for the hard drives.

Assembly

Manufacturing

There is a Fab folder at the repo's root. This folder contains all the files that you need to order PCBs from a manufacturer. You will find in the folder a Fab.zip archive that is all you need to order from JLC PCB. I'll make sure that the archive is always updated as the design is changed.

Required Parts

I'll do a more detailed breakdown of all the parts as I build this document (resistor values etc.), but it's worth mentioning the parts that have specific footprints and were used to design the board. Links to DigiKey Canada are provided.

  • High density connectors: You will need these to connect the CM4 to the board. They can be very daunting, but I found this video of someone neatly soldering them with a hot air gun. Never did it myself, can't wait to try when I get the hot air gun.
  • MagJack: I made the footprint for this specific one.
  • Fan controller: This chip is the exact same one that is on the official IO board and it's controlled by the CM4 through I²C.
  • ESD sinks: They are optional in my (very uninformed) opinion. I think they were included on the IO board for POE applications mostly.
  • Signal buffer: Used to buffer RUN_PG signal to be able to wake the CM4 from a sleep state. Not needed if you're not planning on doing that.

Building

To build the board, you will need a soldering iron and a hot air gun (or a reflow oven). I would recommend starting with the Hirose high density connectors as they are without a doubt the hardest part. This video I referred to earlier is a good starting point, it makes for a fine tutorial. It only took a couple tries before I could get a decent result (image from microscope at around 50-60x):

Once the HD connectors are in place, you can move on to the ESD sinks. They are very small and can also be daunting, but soldering them turned out to be easier than expected. The trick is to put as little solder paste as possible and the chips will be naturally pulled in place by the solder's surface tension.

The rest of the parts should be fairly easy to solder with a standard iron. As is tradition, make sure to start with the lowest components first (resistors, fan controller, etc.) before moving on to the taller ones (headers, PCIe slot, USB connector, MagJack, etc.) since it makes it easier to work around them.

Diagrams and Pinouts

Coming eventually

Next Steps

If the current design works, it would already make for a usable product. The board is fairly simple but until I test it with a CM4, a PCIe card and hard drives, with some real power draw I won't know for sure. I will open issues and solve them as I go, but even if there are none, there would be a few enhancements the project could benefit from. I opened a couple discussions in the ideas section to discuss enhancements and alternative designs.

Revision History

  • 1: Initial version
  • 1.1: Fixed wrong footprint for fan controller
  • 1.2: Changed the USB select headers for a simpler solution with a single jumper
  • 1.3: Replaced the HDMI header by a full size HDMI female connector, exposed 9 GPIOs, inverted polarity back for PCIe Tx/Rx signals and added a power LED.
  • 1.4: Add pin to OLED connector for button, use SMD caps and LEDs, more info on silkscreen and fixed some traces.

About

Raspberry Pi CM4 based NAS solution board

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published