Woah, that looks awesome! I would love to add it to the project. Heck, I’d even make one for myself! I look forward to updates on your progress. Thanks Paul!
If it works, then everyone is welcome to download the files (don’t want to upload them until I’ve tested my one ). They’re created in EastEDA and you can order straight from their site through JCLPCB. Which is convenient
The parts are going to be a couple of weeks in total and then time to make sure I solder it correctly etc.
If I manage to get a Pi Zero at any point I might try and do a HAT for one of those to. Although (if this works) this one should work as the GPIO is the same.
Next step will be to design a case around this layout
I’ve got some of the parts (PCB etc), but I’m waiting on the connectors. I’m also looking into moving away from having a connector that loops round the board, as I’ve realised now (that I’ve ordered everything etc) that I should be able to use VIA’s instead. The joys of learning something new
Once I’ve got it put together and tested I’ll upload another shot.
Small update on this. I have decided to order V2 of the board, before getting V1 up and running.
As on further investigation I realised I missed a resistor off of the Activity Light LED, and when I researched this I found it can cause issues with burning out the board / GPIO.
So I’ve now added a resistor on this LED as well. And also changed the design so you should only have to solder the GPIO pins and OLED.
I’m hoping that this is a better long term solution. A costly mistake, but at least I didn’t damage my Pi
Anyway, I also now have a Pi Zero. So if this HAT works, that will be my next project.
So. After much waiting. I have progress. V2 of the board was delivered today.
I need to add some coding in for the LED’s, but here is what it looks like!
Please excuse the messy desk
Green LED I was intending as Activity (Right LED) and Red = Power (left LED).
I connected them to GPIO17 & 22 (17 = LED1 = Power, 22 = LED3 = Activity)
I’ll forward you on the EasyEDA files. I had it manufactured by JLCPCB and had them do the surface mount LEDs, then just soldered the GPIO pins and OLED
Progress update on this. Gen 3 of the board is being shipped as we speak.
I’ve changed the way I do it, so that all of the components are manually soldered. My view on this is that it will give the person producing the board greater control over the components (e.g. LED colour etc).
It also includes a fan cutout for a 30mm 5v fan.
Once I’ve received the boards, I’ll solder one up and test it and then post pictures and provide the Gerber files to Dmitri to include (if he wishes ) in the project.
I’ll also provide a parts list (recommended).
The Gerber files for version 3 as yet aren’t publicly available as I’m just ensuring the end result works as expected. Testing so far seems A-OK, so I will provide them to Dmitri once I’m happy with them.
V2 I think may already be available, but as this is Dmitri’s “baby” I’m not 100% sure. I’m hoping to have the files available soon. As the tests seem fine so far.
I’m going to provide some photos with the Gerber’s to Dmitri once all is OK.
It’s been a while since I posted an update. But I’ve still been working away.
Have been trying to add / write some of my own code to do little extras. This is my current setup.
Fan running from GPIO, temp control to kick in at a given temp. Bar LED for storage space usage (e.g. 10% 1 LED = lit, 20% 2 LEDs lit, etc). The storage usage control is done by the Pi, but offloads the LED lighting to the Pico. I started running out of GPIO headers, so this seemed logical.
Now using a Pi 4 2gb model, and a USB 2 > Sata adapter, whilst there are faster options (I have a USB 3 M.2 container) the trade off of speed over storage space seems worthwhile. And as it’s still USB, I can swap out at any point
The next step is going to be a larger PCB to connect this all up to (about the same size as a 2.5" SSD) and then installing it into a case.
The code is quite simple, and could be adapted to use GPIO (as this is how I originally used it).
This is the basics to check the space available (Python script):
Start
import os
total = 100 #disk = os.statvfs("/media/pi/UBUNTU 20_0") #totalBytes = float(disk.f_bsizedisk.f_blocks) #totalUsedSpace = float(disk.f_bsize(disk.f_blocks-disk.f_bfree)) #totalPercent = round((totalUsedSpace / totalBytes) * 100)
totalPercent = 0 # USED FOR TESTING LEDs WORK, UNCOMMENT THE ABOVE TO USE LIVE
print("total %: ", totalPercent)
if totalPercent >= 95:
os.system(‘ampy --port /dev/ttyACM0 run “[Folder Location]/Pico/95_perc.py”’)
exit()
Then in the relevant .py file
from machine import Pin
diskspace0 = Pin(16,Pin.OUT) # CHANGE TO WHICHEVER PIN
diskspace0.on()
Please note this IS NOT my code, I can’t recall the source. I have the page saved and will add the relevant credit before I use it.