Close
0%
0%

Portable Pi

An easy to build rugged-ish, portable-ish raspberry pi with a 10.1 ins screen and a 40% mechanical keyboard.

Similar projects worth following
I wanted a reasonably robust, at least splash proof, portable computer and have ended up with the classic Raspberry Pi in a waterproof case. Saying that, the result has a more minimalist aesthetic than the traditional cyberdeck which usually has a lot of switches, sockets and ancillary devices to support additional functionality. However, while it may have little post apocalyptic utility, it is a computer that I use on a daily basis and one that I take on my travels - although it is too heavy for a backpack. I am temperamentally unsuited to 3D printing - lacking the patience to wait 6 hours for a print to complete and the forbearance to remain calm when I find it has warped - so the construction involves only Dremel drilling and cutting of acrylic sheets.

 Processor

This is a 4GB Raspberry Pi 4 Model B. Initially, I used an SD card for storage but have now upgraded to an Integral 120GB USB connected SSD. This really improves the startup time for applications but has an impact on battery life as outlined in the section on power supply. I have considered upgrading to an RPi5 but I think the power supply would not meet the demands of the RPi5 added to the display and keyboard.

 Display

This is a 10.1 ins 1024 x 600 pixel WIMAXIT touchscreen which has the advantage of having a neat way of mounting the RPi4 on its back and in addition has two attached speakers. The display comes with  instructions  to add to `config.txt` to ensure compatibility with the Raspberry Pi. Unfortunately, while these work perfectly for Bullseye the new OS version - Bookworm -  has switched from X11 to Wayland which does not use the now obsolete `hdmi_timings` directive. I have worked out the required custom mode to put in `wayland.ini` but there are still some start up issues. In any case, I am happy to stick with the Bullseye release for the moment as some of my favourite applications do not always work as well on 64 bit Bookworm - for example GhostWriter which I am using to type this.

 Keyboard

The keyboard is a BM40 40% ortholinear mechanical  keyboard from KPrepublic (details below). I started off using a small bluetooth keyboard but this did not always connect reliably and was not a great typing experience. I really like mechanical keyboards and one of the advantages of building your own portable is getting to choose a nice keyboard. The CASOMAN case is not wide enough to fit a standard 60% keyboard, so I have fitted this 40% one. Numbers and symbols are accessible using the `RAISE` and `LOWER` layer selection keys. To help me get used to this, I have used some key cap stickers to remind me where the missing keys are. I am not a great typist but I really do like the 40% keyboard as you do not have to move your fingers around very much to access all the keys.

Power

For power, I carefully dismantled a 10000 maH power bank from Amazon ( sadly no longer available). I chose it as it had a plastic case, making it easy to take apart, and a display of remaining capacity ( see  photos). I fitted a switch as with out modification the  Raspberry  Pi 4 Model B draws sufficient current when shutdown to keep the power bank active and I found that it drained pretty quickly. Recently, I found an article on Tom's Hardware - https://www.tomshardware.com/raspberry-pi/how-to-reduce-raspberry-pi-5-4-standby-power-consumption - which explains how to reduce standby current by editing the configuration eeprom. With this edit, the power bank turns off and you could use the button on the power bank, instead of the switch I used, to turn it on and power up the Raspberry Pi.

The battery lasts around 5 hours with normal usage and using an SDcard for storage. This has reduced with the SSD but is still more than 4 hours. 

Until recently, I could have the computer running or charge the battery as the 3 amps provided by the RPi 4 power supply was insufficient to do both. However, the new 5 amp RPi 5 power supply does let me charge the battery while the Pi and display are on.

Construction

The extra materials are two sheets of 3mm acrylic/perspex and some brass standoffs.  As can be seen in the photographs, the clear perspex on the back of the display is used to mount the shutdown button, power pcb and switch, and the SSD. It is held into the case by two screws. I used some foam that came as packing for the display to provide some shock absorption. The foam around the keyboard helps to deaden the sound of the mechanical keyboard. Mounting the display and the keyboard involved drilling some hole in the  case which obviously compromises water resistance. Currently, I cover the screw heads with tape to make it at least splash proof, however, it would not be difficult...

Read more »

1024x600.bin

revised EDID file for WIMAXIT display

octet-stream - 256.00 bytes - 02/07/2024 at 17:44

Download

  • Fixing the Real-time Clock

    jefmer02/14/2024 at 10:25 0 comments

    Out of the box, a Raspberry Pi 4 does not have a real-time clock. When it is booted up, it initially displays the time it was shutdown at - then when it connects to the network, it updates the time via Network Time Protocol (NTP).

    I fitted a DS3231 real-time clock module to the Portable Pi as I do use it when there is no network connection and it is confusing if files end up with the wrong date. The DS3231 has internal temperature compensation and has by far the lowest drift of all the RTC modules available for the Raspberry Pi. The module plugs into the GPIO pins and you can just see it in the photo of the back of the display assembly. Because, the Pi usually connects to the network with little delay, I only noticed recently that the clock had stopped working and that the Pi was starting up with the same time it had shutdown at.

    My first thought was that I had done something wrong in the setup - I used these excellent instructions* - https://pimylifeup.com/raspberry-pi-rtc/.  However, everything in the software set up checked out, so I removed the clock module as seen in the right of the photo below:

    The module has a small long-life battery fitted under the chip - it has some yellow plastic around the rim. This proved to be completely flat - I bought a set of three of these modules some time ago and I think in addition the modules were manufactured some time before that. As can be seen on the left of the photo, I cut out the failed battery and connected a standard CR2032 Lithium battery which should last for quite a long time as, on standby, the DS3231 draws only a few micro-amps.

    * ( There are a lot of out of date instructions on the Web -  of course the RPi5 has a built in RTC.)

  • Installing Ubuntu

    jefmer02/10/2024 at 12:39 0 comments

    To make it easy to experiment with different OS images, I fitted a 15cm SDCard extender* from Pimoroni so that I can change SD cards without doing any dismantling. I used a bit of double sided tape to stick the card holder on to the edge of the case. You can just see the card protruding slightly to the left of the screen in the photo below. Out of the box, an RPi4 tries to boot from the SD card and if that fails it looks for a USB device. So, if an SD card is fitted, the Portable Pi boots from that an if none is present in boots from the Integral SSD. This does slow booing up a little but it is really convenient for experimenting.

    * Some have reported problems with using this on an RPi4 but it worked fine for me - see Pimoroni website.

    As you can see from the photo, I installed Ubuntu with no problems on the Portable Pi from the image available from the Raspberry Pi Imager utility. Ubuntu selects a 1024x576 (15:9) screen resolution. I only had to adjust the icon size and Terminal text font size to make it quite useable.

    Overall, it is a bit slower to load applications than the native OS and I had the impression that it was a bit slower at rendering webpages on Chromium, so for the moment, I am sticking with Bullseye.

  • Getting the HDMI speakers to work on Bookworm

    jefmer02/07/2024 at 17:51 0 comments

    I mentioned previously that I had not managed to read a valid EDID block from the WIMAXIT monitor - in fact I thought it did not have one. However, running Bookworm, I managed to read it using the raspberry pi documentation guidance:

    edid-decode /sys/class/drm/card1-HDMI-A-1/edid

    From that, I saw that the EDID had an Audio Data Block describing the HDMI audio capabilities. This is of course missing from the EDID I generated.

    So, I edited this new edid with AW EDID Editor v3.0.20 which is available free from ANALOGWAY to put in the 1024x600 timing information which seems to be incorrect in the version of the EDID from the display. This edited EDID when installed, as I outlined in the previous log, does let the display run with the correct resolution. (The editor is only available for Windows or Mac)

    • The GOOD NEWS: The speakers now work under Bookworm - yeh!
    • The BAD NEWS: When I look closely at the display, text is not as clear as it is under Bullseye, so I am sticking with Bullseye until the display manufacturers come up with something or I can think of how to improve it - by adjusting the timings perhaps.

    In an case, I have replaced the EDID file I previously uploaded with this new one.

  • Bookworm and 1024x600 WIMAXIT screen

    jefmer02/04/2024 at 10:55 0 comments

    The new version of the Raspberry Pi OS (Bookworm) as I mentioned above now uses Wayland rather than X. Consequently the config.txt hdmi commands recommended by WIMAXIT to configure their display for a Raspberry Pi no longer work. The display still works but the resolutions it offers 1920x1080 etc results in blurred text and images.

    My first attempt to remedy this was to convert the hdmi-timings to a custom modeline in the the ~/.config/wayfire.ini file as outlined in raspberry pi configuration documentation:

    [output:HDMI-A-1]
    mode = custom_mod_1
    custom_mode_1 = 51.2 1024 1224 1242 1442 600 650 653 703 +hsync +vsync
    position = 0,0
    transform = normal

    The problem with this is as follows. When Pi boots up, it starts with the display in 1920x1080 which is visible but blurred on the WIMAXIT. I can then select 1024x600 resolution from screen preferences and the display is fine - so the custom mode line works. However, the entry above in wayfire.ini gets overwritten with:

    [output:HDMI-A-1]
    mode = 1024x600@50507
    position = 0,0
    transform = normal
    

     and then the next time, I boot, the 1024x600 resolution is not available.

    The real issue is that the WIMAXIT display does not return an EDID - Extended Display Identification Data - description and so the RPOS assumes it is a standard monitor. To remedy this I used edid-generator to produce a custom edid file 1024x600.bin which must be stored in /lib/firmware/edid. Finally, cmdline.txt is updated to register the edid file:

    drm.edid_firmware=HDMI-A-1:edid/1024x600.bin video=HDMI-A-1:1280x800@60D console=serial0,115200 console=tty1 root=PARTUUID=4cad4df9-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cfg80211.ieee80211_regdom=GB

    The video clause is to make the splash screen more visible even though it is the wrong resolution. Since 1024x600 is a non-standard aspect ratio, it has no effect if included in a video declaration.

    The end result shown below seems to work correctly as shown below with the Portable Pi running 64-bit Bookworm.

    I have uploaded the edid file to the project file section. However, although it works, it may not be completely correct as it results in a few error lines in the boot log.

    Next problem is to get the HDMI speakers to work....

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates