April 14, 2025
Description
This remix combines the two part case into one, adds an e-Ink display window with the Pimoroni InkyPHAT display, and adds additional mount points for 40mm case fans. All other files are the same, but they have been converted to STL for easier printing. This remix is subject to change as I make a more elegant back panel that fits the hardware I am using. Right now it's just a rectangle cutout as I work out the best way to enclose the cables. I will also add more detail to the assembly instructions as I go.
This is a fairly easy project but it has a lot of steps. It’s also a bit expensive to produce given the price of the four SATA drives. You do not have to use the same components I used, but where you make changes, you’ll need to account for the differences. If you use cheaper drives, there should not be a significant difference in setup other than cost. I used the Samsung EVO 2tb SATA drives because I already had them for a different project. It does not fundamentally matter what hardware you choose.
Raspberry Pi 5 4gb + Active cooler + pro endurance SD card
Raspberry Pi Zero 2w (with headers) + regular SD card
Four 2tb SATA SSD Drives (Samsung 870 EVO)
Pimoroni red InkyPhat e-ink display
Geekworm x1009 SATA hat with power adapter
Fans
Temperature sensor
USB Ethernet adapter
M2.5 heat set sockets
A bunch of various sizes of screws, M2 and 2.5
M2.5 x 15mm standoffs
Cables
Print all pieces (this will take a few days). Print all with supports (everywhere) in the orientation that they appear.
Install a basic Raspberry Pi Lite OS onto an SD card and configure it for Wifi (you’ll need an ethernet cable later but for now we can do our config over wifi)
Install 8 heat set inserts into the top and bottom holes of the raspberry pi sled
Mount the raspberry pi on the sled using standoffs
Install the Geekworm SATA hat and follow the instructions
Install the temperature sensor and follow the instructions here
Optionally print the mounting bracket for the breakout board and install it with screws
Mount the sled into the case from the bottom using M2.5 screws (optional but recommended)
Plug in the SATA drives in order starting from the left (0) to (3) if using right angle cables, the last drive should be mounted with the right angle bracket going into the raspberry pi while the other three cables will have the right angle brackets going into the drives. This is because it doesn’t fit any other way and I didn’t want to mod the case again, so I just reversed the cable.
Plug in the SATA power cable to the Geekworm Hat
Do not power the raspberry pi yet
Optionally glue the breakout board mount to the case (but really it’s better to wait until near the end for this step and honestly I didn’t glue it, it’s just hanging out in there loose
Thermal sensor should go in the open space behind the SATA cables but in front of Zero 2W
Follow the instructions from Pimoroni here to setup the InkyPhat display:
https://github.com/pimoroni/inky
At this point you should have all the cables connected. Power up the raspberry pi using the Geekworm power supply (not the USB port, which will not be used)
nas.localInstall drivers:
wget https://geekworm.com/cdn/shop/files/x1001-v1.1.sh
sudo chmod +x x1001-v1.1.sh
sudo ./x1001-v1.1.sh
Edit /boot/firmware/config.txt:
sudo nano /boot/firmware/config.txt
Add these lines:
dtparam=pciex1_gen=3
PSU_MAX_CURRENT=5000
Reboot and verify:
sudo reboot
sudo lspci # Should show SATA controller
lsblk # Should show your SSDs
Wiring:
Software configuration:
sudo nano /boot/firmware/config.txt
Add:
dtoverlay=w1-gpio
Reboot and verify:
sudo reboot
sudo modprobe w1-gpio
sudo modprobe w1-therm
ls /sys/bus/w1/devices/ # Should show 28-xxxx device
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash
Configure OMV:
http://nas.localClone the repository:
cd ~
git clone https://github.com/adunderwood/RaspberryPi_NAS.git
cd RaspberryPi_NAS/Raspberry\ Pi\ 5/
Install dependencies:
sudo apt update
sudo apt install python3-pip -y
pip3 install -r requirements.txt
Configure the service:
cp .env.example .env
nano .env
Adjust settings if needed (defaults are fine for most users):
LOG_DIR=/home/nas/services
MAX_LOG_LINES=2000
LOG_INTERVAL=3
SAVE_INTERVAL=60
TEMP_UNIT=F
Install and enable the service:
sudo mkdir -p /home/nas/services
sudo cp nas_service.py /home/nas/services/
sudo cp .env /home/nas/services/
sudo cp services/nas_service.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable nas_service
sudo systemctl start nas_service
Verify it's running:
sudo systemctl status nas_service
curl http://localhost:5000/cpu
curl http://localhost:5000/raid
display.localsudo raspi-config
Enable:
curl https://get.pimoroni.com/inky | bash
Select "InkyPHAT" when prompted.
Test the display:
python3 ~/Pimoroni/inky/examples/phat/hello-world.py
Clone the repository:
cd ~
git clone https://github.com/adunderwood/RaspberryPi_NAS.git
cd RaspberryPi_NAS/Raspberry\ Pi\ Zero\ 2w/
Create virtual environment:
python3 -m venv ~/.virtualenvs/pimoroni
source ~/.virtualenvs/pimoroni/bin/activate
Install dependencies:
pip install inky pillow requests python-dotenv sparklines font-fredoka-one
Configure environment:
cp .env.example .env
nano .env
Update the NAS hostname/IP if needed:
NAS_URL=http://nas.local:5000/raid
TEMPERATURE_URL=http://nas.local:5000/temperature
CPU_URL=http://nas.local:5000/cpu
CPU_TEMP_URL=http://nas.local:5000/cpu_temp
THEME=light
WARN_PERCENT=90
WARN_TEMP=90
FONT_DIR=/home/nas/fonts
Set up display script wrapper:
chmod +x display.sh
./display.sh
The display should update with your NAS stats!
crontab -e
Add this line to update every 5 minutes:
*/5 * * * * /home/nas/display/display.sh
One service replaces 7+ separate scripts:
API Endpoints:
http://nas.local:5000/cpu - CPU usage %http://nas.local:5000/cpu_temp - CPU temperature (°C)http://nas.local:5000/temperature - Ambient temperaturehttp://nas.local:5000/raid - RAID disk usageService won't start:
sudo journalctl -u nas_service -n 50
Test endpoints:
curl http://localhost:5000/cpu
curl http://localhost:5000/cpu_temp
curl http://localhost:5000/temperature
curl http://localhost:5000/raid
Temperature sensor not found:
dtoverlay=w1-gpio in /boot/firmware/config.txtls /sys/bus/w1/devices/RAID not showing:
df -h | grep /dev/mdDisplay not updating:
crontab -lping nas.localcurl http://nas.local:5000/cpujournalctl -u nas_serviceDisplay shows errors:
display.shls /home/nas/fonts/./display.shInkyPHAT not working:
sudo raspi-configpython3 ~/Pimoroni/inky/examples/phat/hello-world.pyFull source code, detailed documentation, and configuration examples:
https://github.com/adunderwood/RaspberryPi_NAS
Each Pi has its own detailed README with step-by-step instructions:
Raspberry Pi 5/README.md - Monitoring service setupRaspberry Pi Zero 2w/README.md - Display setupPerformance:
Customization:
WARN_PERCENT and WARN_TEMP thresholds in display .envTHEME=light|dark|redMaintenance:
License:
Creative Commons - Attribution - Share Alike