[[https://wiki.57north.org.uk/doku.php?id=user:nordin| Back to Ed's Nightly Builds]]
====== The Job ======
I plan to bundle at Pi 4B and 5" touchscreen in a neat package for a few specific uses that tie into my hobbies. The end result will be used as a digimode radio headend for an otherwise headless ICOM 7100 radio, and occasional retroPi gaming device. I planning to use Kali Rolling 2020.1 Debian Buster (plus the hamradio metapackages) and RetroPi OSs. The case will be modelled on an old 90's scavenged serial-to-ethernet adaptor housing I have previously used with a PI 2B and the same screen. Perhaps not the best case shape, but I have grown attached to it.
{{ https://media.startech.com/cms/products/main/netrs232_4.main.jpg }}
===== Build log =====
**20/02/21**\\
Starting with my trusty OpenSCAD template, I found that I was able to use combined minkowski functions to get the two types of edge bevelling needed for the look. Like all my OpenSCAD models, it's all based on primitive objects tied to variables, so I can modify the parameters to fit the hardware very easily (e.g. to fit UPS, batteries etc).
{{ :user:case_v01.jpg?400 |}}
An incremental refining of the case will take place in the background. Meanwhile, I have taken delivery of more items related to the Pi4, namely the heatsink and UPS batteries. I had bricked the OS whilst attempting to install the touch-screen drivers, so I diverted to reinstalling the same OS with the updated TS drivers for Kali, getting me ready to start on the I2C UPS comms for battery state tracking. Once I know this works, I can incorporate the UPS and battery space in the case design.
Install order:
- Install Kali Rolling (kali-linux-2020.4-rpi4-nexmon-64.img in this case) on to SD card, fit the [[https://www.amazon.co.uk/Resistive-Touch-Screen-Display-interface/dp/B071CKFTJH| Waveshare 5" HDMI TFT]] to the Pi.
- Add the following to the default config.txt to enable the Waveshare 5" HDMI full screen area and touch panel drivers from the get go.
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=129,xmax=3976,ymin=207,ymax=3975
hdmi_drive=1
hdmi_force_hotplug=1
- Hook up Pi with a keyboard. Touchscreen drivers will work although [[https://www.waveshare.com/wiki/5inch_HDMI_LCD#Touch_screen_calibration| calibration]] may be needed.
- Start Bt and enable on boot.
sudo /etc/init.d/bluetooth start
sudo systemctl enable bluetooth
- Add BT Keyboard & Touchpad as trusted device(s)
- Fit [[https://www.ebay.com/itm/UPS-V5-UPS-Plus-With-Remote-OTA-Firmware-Upgrade-For-Raspberry-Pi-4-B-3B-3B-/184635804446|UPS plus (EP-0136)]], [[https://www.amazon.co.uk/gp/product/B07TFSDKDV|LiPo batts]], [[https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136|configure I2C for RTC and battery state]], add scripts
- Test the 18650 LiPo batts [[https://batterybro.com/blogs/18650-wholesale-battery-reviews/104619270-can-you-identify-the-fake-lg-hg2-18650-battery|are real]], then maybe against [[https://batterybro.com/blogs/18650-wholesale-battery-reviews/57179459-lg-hg2-review-20a-3000mah|their specs]], and maybe get some [[https://www.fogstar.co.uk/collections/batteries/products/fogstar-3500mah-10a|Fogstar Li-ion 18650 batts also]] to compare against.
- install I3 window manager
- Install OBCD onscreen keyboard
- add onscreen KB helper to gdm3 window manager
- Install HAM radio packages
- EITHER apt-get install hamradio-* or [[https://dl1gkk.com/setup-raspberry-pi-for-ham-radio/|individually]]
- Add auto-mounting udev for USB storage (for radio contact logging)
- Add [[https://shop.pimoroni.com/products/trackball-breakout?variant=27672765038675|I2C trackball]] ?
- Enable OverlayFS and RO/RW switching
**27/03/21**\\
{{:user:nordin:20210327_121921_sm.jpg?400|}}\\
The hardware has been assembled and python scripts ran to check the hardware heat dissipation and stability. Everything is in the green. I plan to finish the case design for test printing next.