Raspberry Pi 4B 3D Printed Tablet

10,603

135

12

Introduction: Raspberry Pi 4B 3D Printed Tablet

The concept of the project is to develop a 3D printable, Raspberry Pi based tablet. All parts (components) must be easy to obtain and readily available. It must have a battery, and it must be the primary source of power (meaning, it will charge up with a cable plugged in, but must have enough power to run without it.) It must be able to operate perfectly fine without a keyboard (meaning, everything in the user interface should work without an issue even if you don't have a keyboard and mouse plugged in.)

Note: This project uses the Raspbian OS for now, until I can find a more suitable "touch-first" solution.

Features

  • SBC: Raspberry Pi version 4B+ (4Gig RAM)
  • Display: 7 inch LCD Display (with touch)
  • Power Supply: PiJuice UPS (with 5000 mAmp battery)
  • Camera: 1080p Camera (front-facing)
  • Sound & Speakers: Sound Card, powers 2 speakers, and 2 microphones, and provides an audio jack for headphones.
  • Accelerometer: Gyro/Accelerometer - to orientate the screen. (with python)
  • Cooling: Fan connected to a fan-speed controller (speed is controlled in python)
  • USB: Breakout USB
  • Buttons:
    • Power Button
    • Volume Up/Down rocker
  • LEDs:
    • Charge
    • Power and activity LED light is redirected (using nylon) to the case.
  • Backplate:
    • Bamboo wood back, with laser etched decal

Full project details:GitHub

Note: If you don't have a laser attachment, then either leave that step out, or ask a friend (gcode supplied)

Supplies

  • Raspberry Pi 4B+ (Or 3B+, If you use an A format board you can skip out removing the network and USB blocks) Amazon
  • 7" Official Raspberry Pi LCD Display (with touch) Amazon
  • PiJuice UPS PiSupply
  • PiSupply 5000 mAmp Battery PiSupply
  • Official Raspberry Pi 1080p Camera (Optional: extended length ribbon cable) Amazon
  • Waveshare Audio HAT (Sound Card) Waveshare
  • 2 speakers (8Ohm, 1Watt) Amazon
  • MPU-6050 Accelerometer and Gyroscope Amazon
  • HW-517 PWM Fan Speed Controller Amazon
  • 30mmx30mmx7mm FanAmazon
  • 128Gig SD Card (Minimun 16Gig)
  • 3 Press ButtonsAmazon
  • Breakout USB 2.0Amazon
  • Color Wires
  • 18AWG (or less) Cable
  • 3MM wood (of any kind - but I used bamboo)

Step 1: The How to Video

Please Note: The video consists of a very detailed recording of all the steps I took to complete this project. Please watch the video or follow the steps below to make this project your self.

Step 2: Preparing the Components

In this step you will need to make some modifications to the parts that you have ordered. This is mainly to take the bulky parts like screw boxes and USB boxes etc, off the PCB, as we will be soldering the cables to the board.

  1. Raspberry Pi: Strip off the USB blocks and the network block (do not unsolder, use a cutter, to take the metal enclosure off, and cut the plastic away). Also remove all the GPIO pins except the top 6 (according to the wring diagram)
  2. LCD: Remove the USB block from the PCB, and remove two of the 12mm pins at the back.
  3. PiJice: Remove the clear plastic battery holder. Remove the black plastic insulator for the GPIO pins, and then cut (don't unsolder) the GPIO leaving only the top 6 pins (3 on the right, 3 on the left).
  4. HW-517: Remove the screw blocks (unsolder)
  5. wm8960: Remove the black plastic insulator for the GPIO, and the speaker cable block and screws, then cut the GPIO according to the wring diagram.
  6. Fan: Remove the heatsink

Step 3: 3D Printing

You can download all the files you need below. There is also a copy at Thingiverse, so you can use the 3D printing service if you don't have one.

3D printing Tip:

There is something about the Creality printer that will save you a lot of failed builds... Their glass surface is terrible to print on, and even though the build plate may be heated, it offers almost no adhesion and I generally don't use a brim or anything... how come? I clean the glass with pure alcohol, and then use normal paper glue Pritt Stick. It's a non-toxic glue that when heated (like from the bed) is very sticky, and bonds the PLA to the build plate. Then when the print is done and the build plate is cool, it just pops off easily. If you are in a rush, you can wash it off with water. (you would need to wash the glass off in any case after each print)

Step 4: Post-Printing

Glue each layer together with a fast bonding super glue or something equivalent. The layers should sit neatly on top of each other. Layer 1 and 2 have little catches that help to align the layer.

Take the plastic nuts that came off the PiJuice, and glue then into the provided spaces in Layer 2

Now that it is glued, you can sand the case to make it look perfect!

In order to get your case look perfect, you will need to sand. I use the following:

  1. Rough sand with a 100 grit, so all the layer lines are removed. Any outward facing plastic looks grey and is quite rough, but there are no visible layer lines, or fluffy bits of plastic.
  2. Smooth sanding - with a 400 to 800 grit sandpaper, start to work the fat surfaces smoother and smoother until it makes no difference if you are sanding, the PLA will still look slightly scratchy.
  3. Brasso - Use a metal rubbing compound like Brasso, to give the plastic a perfectly smooth finish.
  4. Finally spray one coat of Flat Black spray paint. You can use any (I used Rust-oleum) so long as it bonds to plastic.

Step 5: Wiring the Components

Use the wiring diagram to wire up all the components so that each component is wired with its corresponding colour coded cable. Once you have done this, you can insert the individual boards into the case, and join the wires together.

Step 6: Laser Etching the Wood Backplate

This step will require you to have the laser attachment to your printer, like the Ender 2. This uses the PWM of the fan speed controller as the power controller for the laser. When the fan is full, then the laser is full, and if the fan is say 10% then the laser is burning only slightly into the wood. The result is to be able to "etch" into a surface like wood. The gcode I used is provided - it sets the height of the laser to 50mm, so be sure to make the focus of the laser correct at 50mm.

Optional: You can also make your own design if you like, but then you will have to go to this site: http://nebarnix.com/img2gco/

The wood needs to be cut to 112mm x 230mm, and you will need to sand the corders to fit into Layer 3

Step 7: Installing Software

Go to https://raspberrypi.org/ click Download, click Raspbian

  • Unzip the downloaded file to your desktop, and use Etcher to flash the .img file to the SD Card.
  • Take the SD card out of your PC, and insert in into the SD Card slot of the Raspberry Pi.
  • Start the tablet by pressing the power button on the side of the case for 2 seconds.
  • The first time it starts, it will automatically resize the partition to fill the SD Card.

After that, it will restart, and you should be in the Raspbian OS welcome screen.

  • Click Next
  • Click Next Again
  • You can skip the password setting for now
  • You can dismiss the option about the black border
  • Select the wireless network of your router, and enter the password. You will need to have inserted a USB keyboard at this point as there will be no onscreen keyboard.
  • Skip the update at the next screen (we can do that later)
  • You're Done

Now we need to set some settings so that we can access the tablet remotely.

  • Click the Raspberry Pi Icon (top left)
  • Go to Preferences
  • Go to Raspberry Pi Configuration
  • Click on Interfaces Tab
  • Enable: SSH and Camera, I2C, SPI
  • Click Ok, to confirm and let it reboot

The rest of the work can be done in a remote terminal in your normal PC:

  • Using Putty (on Windows) or Terminal (on Mac), log into the raspberry pi tablet as:
    • ssh pi@raspberrypi.local
    • Default password is raspberry
  • Then issue the following commands:
  • It now reboots, log back in, and you can stay as pi
    • sudo nano /boot/config.txt
    • Inside nano, make the following changes:
      • find #hdmi_drive=2 and remove the # (uncomment) and change this value to 1
      • find dtparam=audio=on and add a # in front (comment it out)
      • Add a new line with hdmi_ignore_edid_audio=1
    • Ctrl s (to save)
    • Ctrl x (to exit)
    • sudo reboot
  • Now let it reboot, log back in and do the following:
    • sudo su
    • apt-get install libasound-dev
    • python -m pip install --upgrade pip setuptools wheel
    • pip install pyalsaaudio
    • exit
  • You are now back as pi user, now get the project from GitHub

Now you need to build the 3 services that make the screen rotate, volume go up and down, and the fan come on and off.

  • sudo nano /lib/systemd/system/PiTabAudio.service
[Unit]
Description=Pi Tablet Audio Service
After=multi-user.target
Conflicts=getty@tty1.service

[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/Raspberry-Pi-Tablet/Services/audio.py
StandardInput=tty-force

[Install]
WantedBy=multi-user.target
  • sudo systemctl daemon-reload
  • sudo systemctl enable PiTabAudio.service
  • sudo systemctl start PiTabAudio.service
  • sudo systemctl status PiTabAudio.service
  • sudo nano /lib/systemd/system/PiTabScreen.service
[Unit]
Description=Pi Tablet Screen Service
After=multi-user.target
Conflicts=getty@tty1.service

[Service]
User=pi
Group=pi
Type=simple
ExecStart=/usr/bin/python /home/pi/Raspberry-Pi-Tablet/Services/screen.py
StandardInput=tty-force

[Install]
WantedBy=multi-user.target
  • sudo systemctl daemon-reload
  • sudo systemctl enable PiTabScreen.service
  • sudo systemctl start PiTabScreen.service
  • sudo systemctl status PiTabScreen.service
  • sudo nano /lib/systemd/system/PiTabFan.service
[Unit]
Description=Pi Tablet Fan Service
After=multi-user.target
Conflicts=getty@tty1.service

[Service]
Type=simple
ExecStart=/usr/bin/python /home/pi/Raspberry-Pi-Tablet/Services/fan.py
StandardInput=tty-force

[Install]
WantedBy=multi-user.target
  • sudo systemctl daemon-reload
  • sudo systemctl enable PiTabFan.service
  • sudo systemctl start PiTabFan.service
  • sudo systemctl status PiTabFan.service
  • sudo reboot

Now we can install the PiJuice tools and services:

  • sudo apt-get install pijuice-gui

That's all folks!

Step 8: The Final Product

You should be all done now and can test the various features.

I found some nice black screws that fitted nicely into the plastic nuts that we glued into the corners. I drilled out the holes a bit so the nut head is sunk in a bit.

Raspberry Pi Contest 2020

Runner Up in the
Raspberry Pi Contest 2020

Be the First to Share

    Recommendations

    • Robots Contest

      Robots Contest
    • Micro:bit Contest

      Micro:bit Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    12 Comments

    0
    derrbodhi
    derrbodhi

    8 months ago

    I need to 3D print the bottom too.

    0
    Hoblin
    Hoblin

    1 year ago

    Man, you definitely should learn how to solder. Cracking components with pliers is not the right way to remove them =)

    0
    InnovateAsterisk
    InnovateAsterisk

    Reply 1 year ago

    Thanks for the feedback. I was considering explaining this further in the video, but was pushed for time, as it is... it’s 1hour 20min, so here is the full story: Raspberry have an “A” format board, like the 3A etc. These are without NIC and only have a single USB... this would have been perfect, but the 3A only has 500mb RAM, and there is no 4A. 500mb of ram is simply not enough especially since one of the objectives of this project is to make it “touch first”, this means it would need to be graphically intensive. So the only option become to use the 4B but then take out the big components at the one side of the board. I first tried with unsoldering... but it was a mess, and one or two of the tracks in the PCB got damaged, this was especially the case with the PiJuice (I think I mention that I the video). After a few different tries, cutting the case of the components, and the inside plastic left the board in perfect condition, and even left some metal pins sticking out so you could solder more wires to it. I really believe this to be the most disappointing part of this build, but the resulting board is in the best possible condition after, and hey... super slim right?! Does it really matter how it got like that ;-)

    0
    mindwave
    mindwave

    Reply 1 year ago

    INNOVATIVE: I completely understand. My soldering was never great, so when i starte dmy RASPI4 tab I sent my board to someone who advertised the service on ETSY. he did a GREAT job and I got JUST what I asked for, unfortunately a death in the family and a move have prevented me from finishing it, but im c;lose. HOWEVER if I do another one, which im sure I will. I will probably learn/practice enough to do it myself. because I had the guy take off the ethernet jack and 1 YSB2 and 1 USB3 jack. if i did it myself I would remove those as well and then wire in some extensions so I still have 2 full size jacks available....

    0
    Hoblin
    Hoblin

    Reply 1 year ago

    Soldering iron just not the right tool for such work. You can solder these components with it but for unsoldering you need hot air which will melt all points at the same time.

    0
    EvanS76
    EvanS76

    Question 1 year ago

    So I was interested in building one of these but when I went to try and buy the PiJuice HAT I saw that it was discontinued. Is there another product you’d recommend that would work in its place?

    0
    InnovateAsterisk
    InnovateAsterisk

    Answer 1 year ago

    There is a link in the parts lists to the pi supply web site. From what I saw you can buy from them directly. The PiJuice is quite important, because I hunted around quite a bit to find a battery management system that could deliver 3Amp if it needed too. The documented max is 2.5Amp, but it was able to frequent reach 3Amp. Of course this does drain the battery quicker.

    0
    EvanS76
    EvanS76

    Reply 1 year ago

    Yes, but when I went there it says that it’s sold out. If you go anywhere else online it either says that it’s sold out or discontinued. So is there an alternative?

    EA5F92D0-6055-4019-B620-ADBF0BC7C28B.jpeg2A77E836-8D2F-40B4-BA3E-21AB64B960A7.jpeg
    0
    InnovateAsterisk
    InnovateAsterisk

    Reply 1 year ago

    Ah, I see. Well technically the project only works with the PiJuice, because the PCB clips and the holes in the case line up with the PiJuice board. However... for the sake of putting “something” together you could try any Li-PO (Lithium Polymer) charger. I can across this: https://geekworm.com/products/raspberry-pi-ups-hat-2 and although I did try it, the specs seemed to fine.

    0
    Penolopy Bulnick
    Penolopy Bulnick

    1 year ago

    That is really impressive! Nicely done :)

    0
    InnovateAsterisk
    InnovateAsterisk

    Reply 1 year ago

    Thank you, Happy to share :)
    I have entered it into the contest.