Linux Format

Build a tablet

Take advantage of the Raspberry Pi’s small size and touchscree­n displays to build your own Android tablet with Christian Cawley.

-

Christian Cawley takes a touchscree­n and a Pi to build a full Android tablet.

The Raspberry Pi’s small size makes it ideal for portabilit­y, yet good, compact power solutions have been thin on the ground. With the arrival of compact Lipo batteries and charging circuits, however, the Pi can finally get out of the house.

Meanwhile, the improved RAM and CPU of later Raspberry Pi models makes it perfect for running a range of very different operating systems. This includes Android, an OS that exists in many forms, from the polished version on your smartphone to the open source AOSP builds.

With a suitable touchscree­n display and a tablet-like case to hold it all together, it doesn’t take much time or effort to build a Raspberry Pi-powered Android tablet.

A bulkier Android

Building an Android tablet with a Raspberry Pi is sadly more about power than it is about profile. As such, relying on a Raspberry Pi Zero model isn’t going to yield favourable results. Instead, find the most powerful model that’s compatible with the intended Android version. The finished device is likely to be a little less svelte than your usual Android tablet.

For the most satisfacto­ry results, Lineageos 15.1, based on Android 8.1.0, is compatible with the Raspberry Pi 3B and 3B+ models (Bluetooth doesn’t work with the latter). Importantl­y, it’s also compatible with the official Raspberry Pi 7-inch Touchscree­n. Developed by Konstakang, this has Bluetooth and Wi-fi connectivi­ty, although you’ll find limitation­s with 1080p and streaming Netflix (compared to Netflix in Kodi). This can also impact some recent games. However, other applicatio­ns, such as browsing, email, ebooks and most Android apps and games will run perfectly well.

For our build we’ve used the Raspberry Pi 3B+ with the official 7-inch Touchscree­n display. Power comes from an Adafruit 1000MAH Lipo battery and Powerboost 1000 charging board, although the battery life is unlikely to last more than an hour. You can use larger batteries, of course.

For this project, you will also need a soldering iron, as well as a dual-state slide switch for power.

Holding all of this together is a 3D-printed case. Several examples are available, mostly for the Pi and its dedicated touchscree­n. While you can engineer your own solution here, this project uses the design by Drvegetabl­e on Thingivers­e (http://bit.ly/lxf2583dca­se). Keep an eye on the notes of your chosen printable. You may need to purchase additional screws, for example.

If you don’t have a 3D printer, various services are available to provide 3D-printing services by mail. In fact, there’s an option on the Thingivers­e site to arrange this. The case shown here was produced by 3Dhubs and cost under £28.

Thingivers­e offers a price-comparison tool so you can find a printer close to you, with star ratings to help choose. Printers will typically waive the delivery charge if you can pick the product up from their premises.

Download and install Lineageos

Start off by downloadin­g Lineageos (see Quick tip), which will need unzipping. It’s a compact download – less than 500MB – but expands to 4GB once unzipped. As such, you’ll need a larger-than-usual micro SD card. A 16GB card is the minimum you should consider. Currently, Lineageos will not run from SSD.

Write the extracted IMG file to the formatted micro SD card. The simplest way to do this is to use the crossplatf­orm Etcher tool from Balena.io (http://bit.ly/ Lxf258-etcher). With the micro SD card inserted in your PC’S card reader, run Etcher, and browse the extracted IMG file under ‘Select image’. With this chosen, confirm the micro SD card is detected under ‘Select drive’, then click Flash to commence. Etcher can be slower than other solutions, but the results are almost always reliable. Note that the resulting Lineageos image will have four partitions.

Once complete, close the app and remove the micro SD card. With Lineageos installed it’s ready to run, but you’ll need to hook up the Raspberry Pi 3 and the touchscree­n display first.

The following assumes you’re using the official Raspberry Pi Touchscree­n display. This typically comes

pre-assembled, but if not, follow the provided instructio­ns to attach the display adaptor.

Next, place a dry, folded towel on your work area. This is to protect the touchscree­n display, which you should place face down. Insert one end of the ribbon cable with the blue strip face down against the board. Secure the cable, then connect the other end to the Raspberry Pi. Here, the silver side should be facing away from the port, towards the USB ports. Remember to secure the catch to keep the cable in place.

Two options are available for powering the touchscree­n. The first is the easiest and is ideal for testing purposes: a Y adaptor that splits the power from the Pi’s mains adaptor. The second option, a version of which is used later in the tablet project, is the use of four wires that ship with the touchscree­n. These are connected to 5V, Ground, SCL and SDA on the display board. On the Pi, these cables connect to GPIO pins 3, 4, 5 and 6, although 3 and 5 are no longer required as they’re duplicated by the ribbon. Specifical­ly, the 5V cable should be connected to 5V pin 4, the GND to GND pin 6. With this configurat­ion, simply connect the power cable to the Raspberry Pi.

Now is a good time to power up the Pi and set up Lineageos. The first boot will take a while, but once running you’ll need to set the region, date, time and connect to your local wireless network. You also have the option to set a PIN, pattern or password to unlock the device, as you would with a standard Android tablet. It shouldn’t take long to get to the home screen, where you’ll notice the absence of the usual apps. Use a thirdparty app marketplac­e such as Slideme or the Amazon app store instead – you’ll be able to download the APK files via the Android browser.

When you’re done, connect a keyboard and hold F5 to display the power options, and Power Off. Disconnect both devices from the power and each other – it’s time to build the tablet!

Build your tablet

According to the specificat­ions of your 3D-printed case, construct the chassis for your tablet, placing the Pi, touchscree­n, Powerboost board and battery as required. Hook up the components as the build permits.

Wiring isn’t difficult. Connect the Raspberry Pi 5V pin 4 to the 5V pin on the display board, and the GND pin 9 to the GND pin on the display.

Next, connect a wire to Pin 2 (5V) on the Pi’s GPIO and another to Pin 6 (GND). Solder the other end of the 5V wire to the ‘+’ connector on the Powerboost, and the wire from Pin 6 to the ‘–’ connector.

One last piece of soldering is required. Solder the slide switch to the EN and GND pins on the Powerboost board. While this switches off the Android tablet via the Powerboost, keep in mind that there is a Raspberry Pi inside. Keep unexpected shutdowns to a minimum, using the method explained earlier for the best results.

You can now connect the battery to the Powerboost board, secure the back cover and enjoy your Raspberry Pi tablet. With the Powerboost board attached, it’s smart to rely on the charging port as the board will power the Pi while charging the battery.

You may be able to upgrade this project to the Raspberry Pi 4 in future. Of course, this will require a few modificati­ons to the case to accommodat­e it.

 ??  ??
 ??  ?? There’s a Raspberry Pi 3, battery and Powerboost board inside this Android tablet. Oh, and a touchscree­n too, but you knew that already.
There’s a Raspberry Pi 3, battery and Powerboost board inside this Android tablet. Oh, and a touchscree­n too, but you knew that already.
 ??  ?? OUR EXPERT Christian Cawley has worked for over ten years as a tech blogger and has been covering the Raspberry Pi since it launched. He does not like actual raspberrie­s. Or pies.
OUR EXPERT Christian Cawley has worked for over ten years as a tech blogger and has been covering the Raspberry Pi since it launched. He does not like actual raspberrie­s. Or pies.
 ??  ?? With some basic soldering to connect a Powerboost charger and power switch to your Raspberry Pi tablet, you can take it anywhere – even the toilet!
With some basic soldering to connect a Powerboost charger and power switch to your Raspberry Pi tablet, you can take it anywhere – even the toilet!
 ??  ?? Your tablet may be a bit bukier than other Android tablets.
Your tablet may be a bit bukier than other Android tablets.

Newspapers in English

Newspapers from Australia