Raspberry Pi3 and Pi Foundation 7” touchscreen

I wanted to have an environment that was totally mobile, i.e. I wanted to control a Raspberry Pi crawler (tank?) from a Raspberry Pi that was untethered.  I had used a laptop to long into the Pi2 on the crawler, configure pairing with a PS3 controller and launching the application for control.  At this point I could now control the tank without any further need of the laptop.  I will now accomplish the same functions as before but I have now replaced the laptop with a Pi3, with 7 inch touchscreen, and onboard power to supply the Pi3 and its connected touchscreen.  I should be able to launch an application that will display two vertical slider bars for forward/reverse and left/right turns while also providing a small viewport for the crawler’s onboard camera.

What you need:

1.  A Raspberry Pi (2 or 3).  I am using a Pi3 because it supports onboard WIFI as well as bluetooth

2. An operating system for the Pi.  I am using Ubuntu Mate 16.  These instructions assume you will be using Ubuntu Mate 16.  Rasparian seems to be the preferred OS but I have always had success with Ubuntu on all my Pi installations.

3.  A 32 gig MicroSD card Class 10.

4.  A 7 inch touch screen.  I recommend Adafruit’s 7” touch screen seen below.  This OS in this image is the Rasparian OS.  As stated I use Ubuntu Mate 16 which will be shown later in this build process.

 

5.  A 3D printer or access to one – a friend or local business.

6.    These files:  Raspberry Pi 7 Inch Touchscreen display case by:   luc_e / CC BY-NC 3.0

This above link will send you to the Touchscreen case and the links following “by:” provide attribution to the individual who designed it.  I downloaded and printed the case noted above but because it does not provide for battery power I could only use 2 of the files as originally designed.  I had to modify one of the parts and generate a battery compartment and a battery compartment lid.  If you are interested I can provide those parts (leave a comment – I will generate a download tar for the modified parts if there is interest) but it would require the use of the exact same battery since other batteries would not be accommodated by the case design.

7.  M3 and M2.5 bolts with nuts – I use hex head but others will work also.

8.  A power bank capable of supply 5V 2.4A output.  Many come with two or more outputs.  Just be sure yours has the 2.4A option.  If interested I am using a:  RAVPOWER – Model RP-BP19 (16750mAh with two outputs:  2.4A and 2.1A.

Lets Get Started

A.  Printing the parts.

The print consists of 5 parts.

  1. front plate
  2. case w/ SD hatch
  3. SD hatch cover
  4. Battery compartment
  5. Battery compartment lid
FRONT PLATE:  Begin the print of the front plate.  This takes about 3 hours with my setup. IMG_0865IMG_0873IMG_0876And finished piece:
IMG_0878
Case w/ SD Hatch Access:  This part is modified from the original design in that I wanted holes in the top to accept M3 botls with nuts and not rely on self tapping screws to afix the lid.  My lid will also be modified to hold a battery.  The original had rounded bases and corners mine does not.  All other attributes remain the same.
Print at this point is almost complete.  What amazed me is the find bridge without sag over the SD micro card access port.  I thought that it would have sagged severely but it did not.  A very satisfactory print for my level experience. IMG_0880
Show bridging material in the holes for the Pi3 power, HDMI, and sound plug.  Also ventilation slots with bridging material on the opposite side.  These material is easily removed and requires minimal intervention. IMG_0904IMG_0912
These sequence of pictures show the case with mounting holes for the battery compartment.  There is a lot of support material below which is easily broken off with needle nose pliers shown in later pictures.  A 3M bolt will pass up through it into the modified lid containing a battery.  What is important in the design is that the mounting holes be far enough away from the case wall edges to allow the placement of a nut.  In these pictures that was a major screw up on my part forcing the reprint of this part and the battery compartment which bolts on. IMG_0913IMG_0914IMG_0925
Showing one of the correct M3 holes with support material. IMG_1094
Early prints of the battery case. IMG_1018IMG_1020IMG_1025
Completed battery case.  The 3 elevated rectangles allow the battery to be raised high enough to clear the 4 bolts which attach the battery case to the Pi3 case below. IMG_1033IMG_1036IMG_1041
Battery compartment (top) attached to Pi3 case below.  This will slide down over the Pi3 (background) and bolt to the touch screen as shown in 2nd picture. IMG_1052IMG_1053
Battery inserted in its case. IMG_1058
lid place on top.  note the button hole and LED cut out. IMG_1064
various angles of assembled unit. IMG_1067IMG_1069IMG_1074IMG_1084IMG_1088IMG_1089

 

B.  Assembling the 7” touchscreen and case.

Here is the 7” touch screen kit:

IMG_0948

There are 3 parts:  (1.)  the actual screen with the screen driver board attached (this is now done in the later productions), (2.) a single flat ribbon cable, and (3.) 4 wires with female ends – you only need 2 wires the way I did it.

slide the front plate over the Touchscreen.  Notice the notch in the bottom of the inside cutout.  It meshes/accommodates the orange ribbons. IMG_0950IMG_0952
with the front plate loosely resting on the touch screen insert the flat ribbon cable.  Notice in the picture that the side with the “blue” writing is up IMG_0964IMG_0966
attach the power wires from the Touchscreen driver plate.  from left to right is black pin pin pin red.  Also attach the Raspberry Pi3 using the 4 supplied screws.  They old the Pi firmly to the driver board.  The screws are M2.5 screws.  Do NOT use the wrong ones because forcing a fit could crack your board. IMG_0969IMG_0972
attach the other end of the ribbon cable to the Pi. IMG_0974IMG_0975
connect the red and black cables from the driver board to the Pi. IMG_0982

 

C.  Software/Application changes:

  1. If your screen is upside down after booting do:  vi /boot/config.txt and add “lcd_rotate = 2” to the end of the file
  2. To ease the login process on a touchscreen device add a “unique” user and enable that user to have “auto login”.  To do this choose “add users” from the setting option and enable to auto login feature.  If you don’t then you will need to use a virtual keyboard at the login in prompt to login.
  3. to enable a virtual keyboard:  go into system setting –>  univeral access –> typing and set “on screen keyboard” to “on”.   The virtual keyboard will now appear.  There is a 4 leaf clover icon in the top desktop title bar which will allow you to toggle it on/off.

 

DONE!!!!

At this point I was ready to boot the Pi3 with it 7” touch screen.  Remember I am using Ubuntu 16 so I was not sure how any of this was going to work.

Here is how it looks:

IMG_0985

Initially the image was upside down and I enabled the virtual keyboard both explained above but shown here.  Not the “clover leaf” icon in the image below to the right of the bluetooth icon.

IMG_0990

For now I am very pleased with this touch screen and with the quality of the 3D print provided provided by the original designer as noted in the CC license posted earlier in this page.

Leave A Reply

Your email address will not be published. Required fields are marked *

*

Bad Behavior has blocked 360 access attempts in the last 7 days.