Overview
Portable Pi
There are many applications where a portable Raspberry Pi can be really useful. In most general use-cases, it's convenient to have a Raspberry Pi, display and battery contained in a nice package. In this project, we'll put together a portable Raspberry Pi with a battery and display. This project is relatively simple to put together and only requires a few wired connections.
Touch screen UPDATE
New version of enclosure now works with 5" 40-pin TFT Display with Touchscreen and Adafruit DPI TFT Kippah for Raspberry Pi with Touch Support
http://www.adafruit.com/product/1596
http://www.adafruit.com/product/2453
Follow the Kippah Touch tutorial for setting up the software. The 3D printed parts are on thingiverse (labled v2).
Kippah Sauce
This project utilizes the Adafruit DPI Display Kippah "hat-like" board to drive a 5" TFT display without the extra cost and baggage of an HDMI decoder. Kippah gives you nice ultra-fast 18-bit color display. This works great with the 5" displays at 800x480. This display is 'native' so it gets all the graphics accelleration capabilities, instant refresh, etc. you would get from an HDMI display.
PowerBoost 1000C
The PowerBoost 1000C provides 5V @ 1A of regulated power to the Raspberry Pi, Kippah and PAM8302 amplifier. On board charging let's you recharge a lipo battery over microUSB. In this project we are able to comfortably fit a 2500mAh lipo battery in the 3D printed enclosure.
Built-in Audio (Optional)
There's enough room in the enclosure to fit a thin plastic speaker and a mono Class D audio amplifier. We can wire up an audio cable (3.5mm jack) to the amp and plug it into the audio jack on the Raspberry Pi. This portion can be optional, but the keep in mind there's no access to the audio jack on this 3D printed enclosure.
3D Printing
This project enclosure was designed specially to fit the components listed in the sidebar and below. The parts unfortunately will not fit on smaller print beds (like the Printrbot Simple). To print the parts, you'll need access to a printer with a minimum build plate of 100mm x 168mm x 30mm.
No 3D printer? You could send the parts to be printed by a service like 3D Hubs, MakerXYZ or shapeways. You could also try checking out your local hacker/maker space or library.
Prerequisite Guides
Check out the guides below to get a better understanding of the Kippah and the Raspberry Pi 2 or B+ (The enclosure is compatible with both).
Parts
- Adafruit DPI Display Kippah
- Raspberry Pi 2
- Raspberry Pi B+
- 5" TFT display 40-pin
- PowerBoost 100C
- PAM8302 Amplifier
- Thin plastic speaker
- 2500mAh lithium polymer battery
- Slide switch
- Right-angle 3.5mm stereo plug to pigtail cable
- 3/8" to 1/4" Adapter Screw
- Swivel-Head Pan Tilt
Page last edited June 12, 2015
Text editor powered by tinymce.
Circuit Diagram
The Circuit Diagram
The slide switch connects to the EN and GND pins on the PowerBoost1000C.
Connect 5V and GND on the Kippah to the 5V and GND pins on the PowerBoost 1000C.
The Vin and GND pins audio amplifier will connect to a set of positive+ and negative- pins on PowerBoost1000C.
The speaker connects to the positive+ and negatives- audio out pin on the PAM8302 amplifier.
Stereo audio cable plugs into the audio jack on the Raspberry Pi and connects to A+ and A- on the amp.
The 5" TFT display connects to a 40-pin FPC extention connector. An included 40-pin cable connects from the Kippah to the extension to the 5" display.
JST cable from the lipo battery connects directly to the JST port on the PowerBoost1000C.
Page last edited June 12, 2015
Text editor powered by tinymce.
Installation
If you just plug in the DPI Kippah, it won't work on a fresh installation of Raspbian! You must set up the special device tree overlay configuration!
However, its not too bad, check it out below!
Connect Display
The DPI Kippah has a 40-pin TFT connector. This is a semi-standard connector. A majority of 3.5", 4.3", 5.0" and 7.0" dot-clock DPI displays have this 'standard 40-pin' connector.
Check the Downloads page for an example datasheet so you can check if your display is compatible. All Adafruit 40-pin TFT TTL displays work, we do not guarantee any other displays work.
In fact, if you connect a display that does not match the right pinout, you could easily fry the display if the 20V backlight pin ends up connected to a logic pin!
To connect, gently pull on the two black 'ears' on the FPC connector, and plug in the display so the gold/silver metalic pins are facing 'up' away from the PCB.
Update & Upgrade
Start by updating and upgrading your Raspberry Pi to the latest software.
sudo apt-get updatesudo apt-get upgrade
Update configuration
Finally, we'll tell the Pi to use the attached DPI display. The following will work for our 5" and 7" 800x480 displays. Both touch and non-touch displays use the same setup here
Start by editing with
sudo nano /boot/firmware/config.txt
and add the following lines at the bottom
dtoverlay=vc4-kms-dpi-panel,kippah-7inch
For 4.3" TFT use the following:
dtoverlay=vc4-kms-dpi-generic,hactive=480,vactive=272,width-mm=95,height-mm=54
To finish installation, just run sudo reboot
Touch screen support
If you have a DPI HAT with touchscreen circuitry installed and a touch-screen display, you can easily use it for touch screen support
A microUSB cable is required (not included) connect it from the MicroUSB connector on the HAT into one of the Pi's USB port.
No additional drivers are required! The touchscreen should just work. However, you'll likely want to calibrate the screen. We have a calibration helper python script. Start by installing python-pip and pyusb.
sudo apt-get install python3-pip python3-venv python3 -m venv env --system-site-packages source env/bin/activate pip3 install pyusb
Then grab the code and example gradient
cd ~ wget https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/raw/main/ar1100.py wget http://adafruit-download.s3.amazonaws.com/gradient800x480.jpg
If you are running it on a 5" display, continue as is.
If you are running it on a 7" display, edit with nano ar1100.py and change this line:
writeeeprom = CALIBRATED_5IN_800x480;
to
writeeeprom = CALIBRATED_7IN_800x480;
Then run the calibrator with:
cd ~ chmod +x ar1100.py sudo -E PATH=$PATH python ar1100.py
Its normal for the first time you run it, it will complain "Couldn't find generic either" just run it again!
Just hit the up arrow on your keyboard and return, to rerun sudo python ar1100.py
This time it will continue, program the AR1100 with the calibration data, and give you a rainbow display.
When done, hit Escape on your keyboard
Page last edited June 12, 2015
Text editor powered by tinymce.
3D Printing
The parts are optimized to print with no support material. The two enclosure parts are held together with machine screws. They're oriented in center and should be good to print as is.
5ip2-v2-top.stl |
230c Extruder |
about 1hr 20min |
5ip2-v2-bot.stl |
- |
about 1hr and 40min |
sd-cover.stl |
- |
about 5min |
Materials
The parts can be printed in different types of filament. The most common filaments like PLA and ABS will do just fine but you can of course experiement with copperFill, bambooFill, Semiflex, PET and Nylon.
Tolerances
The parts were tested with common printing settings (listed in the table). With a parameter of 2 shells, theres only a few areas where tolerances really matters - the port cutouts and the mounting holes.
Test fit the parts by inserting the top enclosure part over the Raspberry Pi. Check to see if the cutouts fit over the USB and ethernet ports. If the cutout is too tight, you can loosen it with a filing tool.
The standoffs with counter bores should fit the machine screws listed in the BOM. These can be threaded by fastening in the appropriate sized screw.
Bed Leveling
Any parts with large surface require a well leveled build plate. If you're using a heated bed, you can minimize warping. Blue painters tape, build tak, and sticky adhesives can help keep your part flat and adhere to the bed.
Page last edited June 12, 2015
Text editor powered by tinymce.
Assembly
Wiring
First section of the assembly requires measuring wires, cutting, stripping, tinning and soldering. It's a good idea to connect the component and test the circuit before mounting anything to the enclosure.
Testing
With the components wired up, we'll test power to ensure all the connections are solid. We connect the display to the kippah and the Raspberry Pi to ensure the circuit is working properly before mounting.
Mounting
Once the components are wired up, you'll mount sections of the circuit to the enclosure using machine screws. This will keep everything secured in place.
Page last edited June 12, 2015
Text editor powered by tinymce.
Slide Switch
Tin Wires and Switch
Use a pair of helping third hands to secure wires/switch in place. Appy small amount of solder to the tips of the wires and the terminals on the slide switch.
Connect Wires to Switch
Solder both wires to two terminals on the slide switch (one in the center, and another next to that). Cut a piece of shrink tubing and slide that onto the wire to cover it up. Apply some heat to secure the connections.
Page last edited June 12, 2015
Text editor powered by tinymce.
Audio Cable
Measure and Cut
Grab the right-angled stereo plug to pigtail cable and measure up the length you'll need. If you cut it too short, you can always extend by splicing with a longer wire.
Strip It!
You'll want to remove about 10mm of insultation from the audio cable. Use wire cutters or a hobby knife to strip the wire. Carefuly bundle the stranded wire and twist it together to make a uniform wire - this is the ground connection.
Tin Wire
Secure the audio cable to third-helping hands. Apply solder to the ground connection. Trim one of the insulated wires (red or white, doesn't matter these are the 'left' and 'right' channels). We only need one channel and the ground connection. Strip and tin the remaining wire.
Extend Ground
Trim off about half of the tinned ground connection (it's too long). Prep a new piece of AWG30 silicone-coated stranded wire by measuring, cutting and stripping. Solder it to the ground connection.
Insulate Groud
Slide a piece of shrink tubing over the ground connection and apply heat to secure the connection. Cut the ground wire to match the length of the channel wire and tin the tip.
Page last edited June 12, 2015
Text editor powered by tinymce.
Amplifier
Prep Wires
You can lay down the Powerboost 1000C and PAM8302 amplifier on the enclosure to get an idea for how long the power and ground wires need to be. Cut two pieces of 26AWG silicone-coated stranded wires.
Tin Wires
Strip the tips of both wire using wire strippers and secure the wires to third-helping hands. Apply a small amount of solder to tin the tips.
Connect Wires to Amp
Apply solder to the pins on the amplifier. To solder the wires to the pins, hold the tip of the soldering iron to the solder joint and insert the wire.
Solder Audio Cable to Amp
Connect the audio cable to the amp by heating A+ and A- pins with the tip of the soldering iron. Insert the white channel wire to A+ and the ground wire to A-.
Connect Speaker to Amp
Apply solder to the positive and negative pins on the amplifier and insert the + and - wires from the speaker to the amp.
Page last edited June 12, 2015
Text editor powered by tinymce.
Kippah
Prep Wires
Lay Kippah and Powerboost 1000c on the enclosure to get an idea of wire length. A bit of extra slack is OK, you can shorten it later. 26AWG silicone-coated stranded wire is recommend for power.
Tin Kippah and Wires
Strip and tin the two wires then, apply solder to the 5V and GND pins on the Kippah.
Connect wires to Kippah
Appy heat to the solder joints on Kippah and place the tip of the wires to the 5V and GND pads.
Page last edited June 12, 2015
Text editor powered by tinymce.
Powerboost 1000C
Install Switch
Insert the wires from the switch to the cutout near the bottom of the enclosure. Press the switch into the cutout to snap it into place.
Machine Screws
You'll need two #4-40 3/8th flat phillips machine screws to secure the PowerBoost 1000C to the enclosure.
Install Screws
Insert the two screws to the bottom of the enclosure and fasten them in until the tip of the thread pokes through the top of the standoff. Lay the PowerBoost 1000C over the screws and fasten the screws all the through while holding the PCB in place.
Page last edited June 12, 2015
Text editor powered by tinymce.
Mounting Components
Install Amp
Lay the PAM8302 PCB over the standoffs on the enclosure and hold it in place while you fasten a single machine screw to the bottom of the enclosure.
Connect PAM8302 to PowerBoost 1000C
Get the power and ground wires from the PAM8302 amplifier and solder them to the positive and negative pins on the PowerBoost 1000C.
Install Speaker
Insert the thin plastic speaker into the cylindrical cavity. Press it down until it snaps into place. Tolerances should be pretty tight.
Plug Audio Cable
Insert the 3.5mm connector from the audio cable into the audio jack on the Raspberry Pi
Install Raspberry Pi
Lay the PCB over the standoffs with the ports facing the cutout. Line up the mounting holes on the Pi with the holes on the standoffs. Insert four #4-40 3/8 flat Phillips machine screws and fasten them into place from the top of the Pi.
Page last edited June 12, 2015
Text editor powered by tinymce.
Kippah Display
Install 40-pin FPC cable
Open the latch from the Kippah PCB and insert the 40-pin FPC cable. Close the latch to secure it in place.
Install Kippah
Lay the Kippah over the Raspberry Pi and line up with socket with the header pins. Press the PCB down to secure it into place.
Connect Kippah to PowerBoost 1000C
Solder the 5V wire from the Kippah to the 5V pin on the PowerBoost 1000C, then solder ground to ground.
Install Display
Insert the display into the top enclosure part at an angle, with the corners going into the clips.
Mount Display
Careful bend the enclosure back until the clips allow the display panel to fit under the clips. These clips will hold the TFT panel in place.
Connect Extension to Display
Pop open the latch from the 40-pin extension and insert the 40-pin cable from the display to the extension board, then close the latch to secure it in place.
Connect 40-pin cable to Extension
Open the latch from the other side of the extension and insert the extension cable connected to the Kippah into the extension board.
Plug in Battery
Connect the JST cable from the lipo battery to the JST connector on the PowerBoost 1000C.
Page last edited June 12, 2015
Text editor powered by tinymce.
Closing it up
Cable Management
The wiring should be pretty tight, with the exception of the 40-pin FPC cable. You’ll need to fold this cable and make sure it stays inside the case while closing it up.
Ports
Insert the ports on the Raspberry Pi into the cut outs on the top half of the enclosure. If you find the cutouts too tight, you can open them up with a filing tool.
Fasten Shut
Insert #2-56 3/8 flat phillips machine screws into the six counter bores on the bottom of the enclosure. Hold the two half together while fastening the screws. Fasten them in until you feel they’re completely joined.
Portable Kippah Pi
This build is pretty much done! You can optionally insert a tripod screw thread to make it mount to any standard tripod.
Tripod Adapter
Insert the tripod screw into the hole and fasten it with a flat phillips screw driver. Fasten it in until the screw is flush with the surface of the enclosure.
Use and Commence Pi
Boot up the Pi and hook up your favorite keyboard. The 2500mAh battery should give you about 2 hours of use, but it'll vary depending on your application.
What's that orange keyboard?
It's from the Raspberry Pi Kano kit.
Made This? Let us know!
If you made this project, please post a make on our Thingiverse page. It'll let us know you're awesome and we'll feature it on our 3D Hangout show!
Page last edited June 12, 2015
Text editor powered by tinymce.