Introduction: 3D Printed In-Dash GPS Navigation - Raspberry Pi 3.
Waaaay back in 2009, when I was first tinkering with my Silver Jimny¹, one of the first modifications to the interior was the removal of the passenger airbag so I could fit in a laptop. The Laptop served as my navigation system.
It has been over 7 years since then and with the explosion in technology, the proliferation of and my own involvement in 3D Printing now seems like the perfect time to update.
I have always been a fan of the Raspberry Pi and I have many Pi based projects under my belt already. On my desk for some months now has been the Raspberry Pi 7" Capacitive LCD. This is the perfect project for a new RPi 3 & the LCD!
Project Brief | What I would like to do is remove the shabby wooden shelf where the Laptop, long since failed, used to sit and to try and enclose the gap so it looks like the LCD is designed to fit perfectly into the dash, as if it came from the factory like that. I'll need to add power, a switch and I'd like a USB socket so I can plug things into the RPi is I need to. I'd also like a small wireless keyboard on hand which can be kept in the glove-box below.
¹ This is where I get my username from!
Please vote for me in the Design Now: 3D Printing Contest by clicking on the Vote! icon on the top right of this page.
Step 1: Parts & Tools.
- 123D Design.
- E3D's BigBox 3D Printer.
- SpoolWorks Black Edge Filament.
- SpoolWorks Scaffold Soluble-Support Filament.
- Allen Keys, (Amazon Affiliate Link).
- Soldering Iron, (Amazon Affiliate Link).
- Wire Cutters, (Amazon Affiliate Link).
- Craft Knife, (Amazon Affiliate Link).
- Raspberry Pi 3 + SD Card.
- Raspberry Pi 7" LCD.
- Small Wireless Keyboard (Optional), (Amazon Affiliate Link).
- 10cm USB A to Micro B cable, (Amazon Affiliate Link).
- Power Switch.
- USB Panel Mount Socket.
- DC DC Converter USB 5V 3A Output.
- 8 x M4 16mm Screws, (Amazon Affiliate Link).
- 8 x M4 Hex Half Nuts, (Amazon Affiliate Link).
- 4 x M2 6mm Self-Tapper Screws, (Amazon Affiliate Link).
- Short Length of Cable.
- Suzuki Jimny¹
- Just about any USB GPS will work, I used a mouse-style GPS. Consult the elinux.org website for a list.
- The STL, STP and .123dx files are available from | thingiverse.com
The Thingiverse repository includes a blank cover with no cut-out for an LCD. Use this if you want to model your own cover for use with a different LCD/SBC combo.
¹ My vehicle is a RHD 2002 model, double check your dash matches up before you print!
Please help support my work here on Instructables and on Thingiverse
by using the following affiliate links when making purchases. Thanks :)
Step 2: Ahead of the Curve.
The important thing here is to get the curve of the dash, luckily there is only a single curve and no sweep....
Action 1 | Remove the old wooden shelf. If you still have the airbag fitted click through to my original laptop install for instructions on how to remove it | silverjimny.co.uk
Action 2 | Using a scrap of cardboard, draw the shape of the curve.
Action 3 | Using a ruler and some guess-work recreate the shape in 123D Design.
Action 4 | Print a test piece.
Action 5 | Test the piece against the cardboard.
Action 6 | Make corrections.
Action 6 | Reprint.
Action 7 | Check the piece matches the dash profile.
Action 8 | Measure the length of the opening, which is 300mm. The maximum print size for a BigBox!
Step 3: Design.
Now we have the required curve and opening-length we can begin to make the cover...
Action 1 | Elongate the curve to 300mm, the size of the opening.
Action 2 | Model the Raspberry Pi LCD and create an opening in the cover where it will be positioned. I have guessed at the angle I would like the LCD to be in relation to the passenger.
Action 3 | Fill-in the area around the LCD, add in a frame around and behind the screen.
Action 4 | Model in a sun-screen to help shade the screen from direct light and to prevent any reflections of the LCD on the windshield during night driving.
Action 5 | Add-in holes for the Panel-Mount USB connector and Power Switch.
Action 6 | Put-in holes for the mounting screws and add mounting points for the DC DC Converter. I went with clamp-style fixing to hold the cover into the dash. I didn't want to have unsightly screws visible or messy holes to drill.
Action 7 | Two brackets at the back of the cover hold the LCD into the frame. No glue or sticky-backed plastic is required.
Action 8 | Orientate the completed cover for printing. I have chosen to print the cover with the back facing downwards with the intention that any support will be behind the cover and not visible when fitted to the dash.
Action 9 | Export the STL.
Step 4: Slicing the Model.
There are many slicers available but there is one which I find works the best, Simplyify3D. It's not free but it is definitely worth the money!
Action 1 | Import the model into S3D.
Action 2 | Using S3D's support generation algorithms add support for the cover.
I'm using SpoolWorks Scaffold Soluble Support. Scaffold is simply amazing and allows for the production of any geometry without any limitations on design. As the name suggests it will dissolve overnight in water.
There is an excellent post on E3D's blog explaining in detail how Scaffold works | http://e3d-online.com/Scaffold-Support-Material
The cover is printed at 0.25mm layer height with a 0.4mm nozzle and 15% infill. There are three perimeters, top layers and bottom layers. I'm using 10% infill and 5 solid layers for the soluble-support.
We have developed a Ram/Purge Oozeless print system for use with E3D's V6 Hotends. It is entirely G-Code driven so it will work with any multi-extrusion V6 based printer!
There is a repository on GitHub which has the BigBox S3D profiles with the Ram/Purge script. It will be simple enough to adapt it you your printer | https://github.com/BigBox3D/Simplify3D
Action 3 | Click the Prepare to Print! button.
Action 4 | Wait a few moments while S3D slices the model and generates the G-Code.
Action 5 | Check through the generated G-Code using S3D's preview mode. I like to have the display set to use different colours for features and view layer by layer. It is a great way to spot any issues with the code.
Action 6 | Click Save Toolpaths to Disk, if you use OctoPrint or want to run from an SD Card.
Step 5: Printing.
The model is 300mm wide which is at the BigBox's advertised X-Axis maximum. I have done a little bit of cheating and stretched it out to 304mm by altering the firmware and adjusting the endstop switches. I did this so the raft can fit onto the bed. 304mm is about the largest volume that you can get where both extruders can reach the same spot on the printbed.
According to S3D the print time is 23 hours and 50 minutes. The print will use 477g of filament.
While the print is running it is the perfect time to sort out the software.....
Step 6: Software.
One of the major components to any navigation system is the software package. I am using the Raspberry Pi 3 and would ideally like to use Android, which isn't possible just yet. There are plenty of other boards out there which do support Android but none are available now with a matching capacitive screen. I'm hoping that as time goes on a version of Android will be available for the Raspberry Pi.
I am running the Raspbian Jessie Lite distribution. Navit runs in a desktop environment and the Lite version does not have an desktop installed by default. There is a handy post on the Raspberry Pi forums with a step-by-step guide on how to install a lightweight desktop | www.raspberrypi.org/forums/
This is an updated and expanded guide based on the Compiling for the Raspberry Pi guide written by Angelus88 as featured on the Navit Wiki | http://wiki.navit-project.org/index.php/Raspberry_Pi
Either connect via SSH to your Raspberry Pi or type these directly into the terminal console. I am assuming you have already followed the guide above for installing a desktop.
Action 1 | Install dependencies.
sudo apt-get install subversion imagemagick libdbus-1-dev libdbus-glib-1-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libimlib2-dev librsvg2-bin libspeechd-dev libxml2-dev ttf-liberation libgtk2.0-dev
Action 2 | Install compiler dependencies.
sudo apt-get install gcc g++ cmake make zlib1g-dev libpng12-dev librsvg2-bin
Action 3 | Install SDL GFX dependencies.
sudo apt-get install libsdl-image1.2-dev libdevil-dev libglc-dev freeglut3-dev libxmu-dev libfribidi-dev
Action 4 | Install Open GL dependencies.
sudo apt-get install libglc-dev freeglut3-dev libgl1-mesa-dev libfreeimage-dev
Action 5 | Install QT dependencies.
sudo apt-get install libqt4-dev
Action 6 | Install GPSd support.
sudo apt-get install gpsd libgps-dev gpsd-clients python-gps
Action 7 | Install Text-To-Speak support.
sudo apt-get install espeak
Action 8 | GIT install.
sudo apt-get install git
Action 9 | Download Navit.
Make sure you are in your home directory
git clone https://github.com/navit-gps/navit.git
Action 10 | Change directory
Action 11 | Configure
cmake ~navit -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/
Action 12 | Enable CSV support for POIs
cmake --enable-map-csv ~/navit
Action 13 | Compile (for Raspberry Pi 2/3)
Action 14 | Wait a little while.....
It shouldn't be much more than a few minutes.
Action 15 | Before you begin
Navit uses XML files to configure the display and itself. I have edited a borrowed XML file for the Onscreen Display functions and set it all up for use with the Raspberry Pi's 800x480 LCD. The attached navit.xml and navitOSD.xml files need to be copied into the Navit directory. Right-Click on the navitOSD.xml file linked below and select copy link address.
wget [paste link here]
rename to navitOSD.xml
Repeat for navit.xml (overwrite the original file if needed).
Alternatively if you are reading this from your Raspberry Pi desktop simply download the files to the navit directory (~/navit/navit).
Action 16 | Maps
Lastly you'll need to get a map for your area. The Navit wiki best explains how to do this and provides a helpful app for downloading the maps from OpenStreetMap.
Action 17 | Raspbian Jessie systemd service fix.
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
Action 18 | Start gpsd
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
To can check that gpsd is running
CTRL-C to exit.
Action 19 | Navit Load Up
Make sure you are in the Raspberry Pi desktop environment, open a terminal window and navigate to the Navit directory.
Navit will now load.
Optional | OBD-II
The Raspberry Pi 3 features on board Bluetooth. A great add-on project for the dash is real-time engine-monitoring which can be run when you're not navigating. There is a great Instructable showing you how to setup the OBD-II system using Bluetooth | https://www.instructables.com/id/OBD-Pi
Step 7: Post-Processing.
As I am sure you have already figured out, SpoolWorks Scaffold Soluble-Support will dissolve in water. Before we to that stage it is best to remove as much as possible in the usual way.
Action 1 | Remove as much Scaffold as possible by hand. Some will pick away and some will simply snap off.
Action 2 | Fill a suitable container with water.
Action 3 | Insert the cover into the water.
Action 4 | Wait, overnight.
Action 5 | Rinse off what you can, replace the water and leave to soak a little longer.
Action 6 | Clean off the remaining support using a soft brush or scourer pad.
Action 7 | Dry off the water.
Step 8: Checks & Assembly.
Having checked and double-checked the measurements before committing to printing I was confident the parts would all fit together, but there is always a little bit of uncertainty.
Thankfully everything fitted into the cover as expected and the cover fits the opening in the dash perfectly too!
Connecting up the DC DC Converter to the switch is simple enough and requires only two wires. Connecting the DC DC Converter to the Raspberry Pi couldn't be easier, simply plug in the USB A to Micro USB cable between the two and you're done.
After assembly the new dash component is ready for installation. If you are the cautious type now would be a good time to check it works. I like living on the edge and I will wait until it is installed!
Step 9: Install & Power-On.
Just two wires connect to the switch, positive and negative.
Action 1 | Plug the negative and positive cables onto the switch.
Be exceptionally careful not to get the polarity wrong as this will fry both the DC DC Converter and the Raspberry Pi!
Action 2 | Put the cover into place in the dash.
Action 3 | Secure the cover with M4 16mm bolts and the printed clamps. Access is possible from inside the glove-box. Install them all before doing the final tightening.
Action 4 | Turn on the power switch.
Action 5 | Wait for boot-up
Action 6 | Load navit
Action 7 | Navigate!