A small update in regards to the project - we're mostly done now, except for ironing out a few small software bugs. Dmcke5 and I are excited to share the final product in the Cutting Edge soon!
I've ordered 5 x assembled PCBs from Makerfabs for prototypes, which cost me a fair sum... however, I think it is worth it now as I was getting frustrated and annoyed at soldering this board by hand so many times. I think this is a wise decision that the hand assembled PCB is confirmed to work, I definitely wouldn't take the risk with it otherwise. Part availability still is pretty damn awful due to the shortages (I'll have to solder two components by hand from a random supplier) but this will free up some of my time to start to work on other projects now and finish off the commissions I have sitting around on my desk (long overdue).
Dmcke5 is currently finishing off the HUD options for brightness and volume adjust, as well as low voltage shutdown warning pop-ups and other random setting configs that we want to add in for QoL benefits. Brightness is currently controlled by holding select whilst simultaneously using up and down on the DPAD to step through the brightness levels. This was done via the internal ATMEGA USB controller, which now both acts a usb serial device and usb controller to send messages onto the pi that could be read. We adjust the PWM signal duty cycle of a GPIO pin on the Pi to the TPS61160A chip.
HDMI out also is confirmed working.
View attachment 19953
It's a little bit of a pain in the backside to get HDMI out working at the moment with the fkms 3d graphical drivers. These drivers don't allow it to be "hot pluggable" in the traditional sense like the Switch dock (i.e the Pi doesn't recognize a hot plug unless the HDMI cable is plugged in before a bootup). We will need to ensure that the system is powered off and docked before we are able to use the HDMI out function. When docked, the hot plug detect pin is driven high by the sink side and this will force a reboot to the system, reloading the configuration settings to be used for HDMI out. When unplugged, the system will automatically reboot back to the internal screen configuration settings. It's a bit of a shame but I haven't been able to figure out a work around for this yet - maybe someone else could chime in/test with a Pi 4 and see if they see similar issues on both HDMI ports with RetroPie.
Low battery safe shutdown is controlled via a combo of the Pi & ATtiny. The Pi sends a GPIO high signal to the ATtiny input when voltage drops below 3.0V, which turns off the regulators safely with a slight delay to allow for the software side of things to safely shutdown to prevent corruption of the SD card.
Here's a look at the images Dmcke5 has put together, which I think add a really nice touch to the OSD and give it that really professional touch.
Battery icons:
View attachment 19907 - 0% SOC
View attachment 19908 - 10% SOC
View attachment 19909 - 20% SOC
View attachment 19910 - 30% SOC
View attachment 19911 - 40% SOC
View attachment 19912 - 50% SOC
View attachment 19913 - 60% SOC
View attachment 19914 - 70% SOC
View attachment 19915 - 80% SOC
View attachment 19916 - 90% SOC
View attachment 19917 - 100% SOC
View attachment 19931 -Charging icon 1
View attachment 19932 - Charging icon 2
View attachment 19933 - Charging icon 3
View attachment 19934 - Charging icon 4
View attachment 19935 - Charging icon 5
View attachment 19936 - Battery error, no battery detected
Volume icons:
View attachment 19918
View attachment 19954
View attachment 19921
View attachment 19922
View attachment 19923
View attachment 19924
View attachment 19925
View attachment 19927
View attachment 19928
View attachment 19929
View attachment 19930
Brightness icons:
View attachment 19941
View attachment 19943
View attachment 19944
View attachment 19945
View attachment 19946
View attachment 19947
View attachment 19948
View attachment 19949
View attachment 19950
View attachment 19951
View attachment 19952
Stick calibration/low voltage icons. The sticks can be calibrated by clicking start and the right trigger "R3" button, which will bring prompt the user to rotate the sticks to calibrate the ranges.
View attachment 19937
View attachment 19938
View attachment 19940
That's all for now - I think this hopefully (fingers crossed) will be the last update before the project is completed.
I'll add this in here for anyone who was interested, but I did get a resin "3D printed" case from PCBway to see how it would turn out for those who want to build their own if we do open source the case files. As you can see, it's not perfect at all (not that we expected it to be, the case isn't designed for printing) but it is possible to get something usable with a bit of work. I used a hair dryer to flatten out the warped areas of the case, which included the bezel region and near the fan vent exhaust. I think it looks not too bad for a $40 price point - obviously not ideal but usable if you're on a budget.
View attachment 19955
View attachment 19956
View attachment 19957