Pickle Pi

Combines a Pi Zero 2 W (now a Pi 4), a 7 ins Waveshare 1024 x 600 display and a Gherkin 30% ortholinear keyboard in a portable tablet.

Similar projects worth following
PICKLE PI, the name of this project comes - fairly obviously - from the combination of the Raspberry Pi Zero 2 W and the Gherkin 30% mechanical keyboard. Having used 40% keyboards in my last two projects (Portable Pi and Pocket Pad) I wanted to try an even smaller keyboard - a 30% keyboard has exactly 30 keys whereas a 40% keyboard actually has 48 keys. This Gherkin is a kit available from Mechboards UK based on a design by "40percentclub".

I originally planned to include the keyboard in a smaller version of Portable Pi, however, when I received the display, I felt it might work best with the keyboard in a tablet format. This has worked out reasonably well and I am using it to write this project description - albeit slowly - see below.

The rather unsightly cable sticking out of the top of the Pickle Pi at the moment is there because the right-angle USB adaptor that I ordered has not yet arrived.


This is a 7 ins Waveshare 1024 x 600 pixel touch display designed specifically for a Pi Zero. In addition, it provides two USB ports and support for audio speakers. The Pi Zero, in my case, a Pi Zero 2 W plugs directly into the display controller board as pictured below.

The picture also shows the bodge of glueing a piece of clear perspex to the back of the front panel to repair the crack that I managed to create while cutting out the hole for the keyboard.


The Gherkin is a really nice 30% ortholinear keyboard available in kit form from Mechboards UK. It was originally designed by 40percentclub who made the design freely available and as a result the PCB is available from a number of sources. The kit does not include switches, keycaps or controller. I used Gateron Yellow switches again as they are cheap and I liked the feel and sound of them in the Portable Pi 40% keyboard. The original keycaps I ordered disappeared from my doorstep when I was out for the delivery so those shown here are from a standard set of XDA profile keycaps that I got from Amazon.

The controller is an Atmega32U4 Pro Micro board programmed with QMK (see picture below of controller and switches). I modified the layer profiles slightly to move the backspace key to the end of the middle row. The Gherkin works by making the bottom row of keys have a different function when held than when tapped. So for example, the Shift key does the normal shift function when held but is the Enter key when tapped, 'Z' is the CTRL key when held, the rightmost space key accesses the number function of the top row of keys when held and so on. This sounds complicated but is quite natural in use, however, it does take some time to get used to, so typing this account of the project is going quite slowly:-).


The tablet is two sheets of 3 millimetre thick black perspex held apart by brass spacers. The bottom sheet replaces the bottom plate that comes with the keyboard kit.

To create enough space for the 10000 mah battery pack, I had to remove the battery from its plastic case and increase the height of the spacers at the top of the tablet as can be seen in the side view below.

The buttons fastened to the side of the keyboard are menu buttons to adjust display brightness and contrast. The cable that connects this button board to the controller board can be seen in an earlier photo. Apart from this, only two other cables are required: a USB cable for the keyboard and another to connect the powerbank. 


The Pi Zero 2, with its quad processor chip is a much more capable SBC than its predecessor, however, the programs that it can comfortably run with acceptable performance are limited by its 512 megabytes of RAM. Ghostwriter, which I am using to write this, is fine as is Thonny while Chromium is painfully slow. Indeed, to get Chromium to render complex web pages at all, it is necessary to increase swap space size. I am currently using Puffin which renders pages in the cloud although many are reasonably concerned at the privacy and security concerns that arise from this arrangement. Visual Studio Code, which specifies that it needs a minimum of 1 GB, does run but is not really useable.

The upside is battery life which is at least 7 hours and possibly 8 depending on usage.


In conclusion, I really like the Pickle Pi's tablet format and the Gherkin is a great way of providing full size keys such that the keyboard is still compatible with the overall tablet dimensions. Less satisfactory is the limitation on the programs that the tablet can run. Consequently, the next step in this project is to look at the feasibility of replacing the Pi Zero with a Pi 4. I have already established that the power bank is not capable of meeting...

Read more »

  • Pi 4 Upgrade

    jefmer03/28/2024 at 10:37 0 comments

    Finally, worked out how to cram a Pi 4 into Pickle Pi. This involved a set of new connectors from PiHut and some brutal surgery on the Pi 4. As you can see from the picture below, I had to remove the ethernet connector from the Pi 4 and cut down the IO pins. This I did carefully with snips and pliers.

    Side View

    The improvement in performance is quite dramatic. I can now browse the web using Chromium and Visual Studio Code is now responsive enough to be pleasant to use. It is a mystery to me as to why Code requires so much memory and CPU time - its not very efficient!

    The Pi 4 can be set to cut off power to USB ports on shutdown which reduces power to the level at which the power bank switches off completely. So, no extra power switch is needed as software shutdown turns everything off and power up is achieved by pressing the power bank button.

    I was not sure if I would be able to fit the Pi 4 into Pickle Pi so I economised by going for a 2 GB version, however, this seems to be enough memory as long as you do not open a lot of tabs in Chromium

  • Touch Screen & Right Click

    jefmer03/26/2024 at 13:35 0 comments

    With a clam shell device, use of a touch screen to me feels awkward and unnatural, so I normally use a mouse with Portable Pi since I typically use it when seated at a table. In contrast, I normally use Pickle Pad with it on my lap and so I have been forced to use the touchscreen. The difficulty with this is, with a standard installation of the Raspberry Pi software, there is no way of doing the equivalent of a mouse right click. Following the usually googling, I tried the following four ways of doing right click:


    This right click emulation program creates a right click event for a long touch. This worked OK when I first ran it but then after a while the right click menus only stayed open with finger on the screen - on lifting the finger the menu closed making it impossible to select anything.


    You can create a right click event with the command xdotool click 3 and then activate it with a keyboard shortcut. This did not work for me in all contexts. For example, it did not bring up the menu on the task bar.


    This is a program available from GitHub - JoseExposito/touchegg which runs in the background to support multi-finger touch gestures. A two-finger touch creates a right-click and this worked for me. However, it is really intended to work with touch pads and the problem with using it on a touch screen is that it is difficult to accurately locate your two finger touch over a target object such as the task bar.

    QMK Mouse Emulation

    This is the solution I should have thought of from the outset! The QMK keyboard software that the Gherkin controller runs, has a complete mouse emulation feature. It is only necessary to allocate keys to the mouse movement and button functions. I can upload the keyboard map if anyone is interested. The great advantage of this solution for tablets with keyboards is that it is independent of the Window manager and so will also work with Wayland.

    I had to reflash the keyboard controller after recompiling QMK with the modified key map. All of the videos I watched only mention grounding the reset pin to put the controller into bootstrap mode for reflashing. This would have meant dismantling the Pickle Pi - undoing twenty screws. Luckily, before I did this, I realised that there is a (configurable) key combination to put the Gherkin into bootstrap mode - hold B press ESC.

  • Increasing performance of Pi Zero 2 W based Pickle Pi

    jefmer03/22/2024 at 12:06 0 comments

    Before taking the drastic step of moving to a Pi 4, I thought I would see what could be achieved by looking at using some of the standard Raspberry Pi performance enhancement techniques.

    First, I installed More RAM using Pi-Apps.  This uses a compression algorithm on the contents of RAM to reduce its size and thus increase the size of virtual memory at the expense of CPU time. It replaces swap space on the SD card which I had already increased to get Chromium to display pages without freezing. I did not see a noticeable improvement in displaying web pages, however, moving swap space from the SD card onto compressed RAM or zram has the big advantage of reducing wear on the SD card.

    Secondly, I added the following overclocking instructions to /boot/config.txt :

    #overclock 1300

    The combination of these two modifications makes Chromium just about useable although still painfully slow at times. In fact, I used Pickle Pi running Chromium to write this log,

    I am still working out how to fit a Pi 4 into Pickle Pi - the subject of the next log I hope.

View all 3 project logs

Enjoy this project?



jefmer wrote 03/30/2024 at 11:12 point

Thanks - the idle current for a Pi Zero 2 is between 90 and 100ma, so with the 10,000mah battery the absolute maximum would be less 100 hours even if you managed to power down both the display and keyboard. For very long battery life you need something like Pocket Pad which runs for months on a single battery charge but does not run Linux etc. 

  Are you sure? yes | no

aaaaaa wrote 04/17/2024 at 17:42 point

meybe add solar power, decrease memory sped and cpu, turn off network

raspberry pi can do this

  Are you sure? yes | no

e64 wrote 03/30/2024 at 10:46 point

Very nice project. I no need faster cpu but how to extend the working of this device on a single battery charge. for example a week or more?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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