Raspberry Pi and Megasquirt Dash Project
Project Overview
Project Goals
The primary goals of this project are the following.
- Fully customizable LCD display with variable displays
- Display realtime engine, transmission and vehicle parameters
- Offer method of tuning without a laptop
- Offer method for onboard vehicle audio and video playback
- GPS mapping and real time GPS navigation
Hardware Overview
This project consists of five main pieces of hardware.
- 7″ Tontec touchscreen LCD display (800×480 pixels)
- Raspberry Pi B+, 1gb model
- Megasquirt MS3XÂ Stand alone PCM
- Autometer Pro Comp 3 3/8″ Mechanical 160mph Speedometer
- Autometer Pro Comp 2 5/8″ 0-90 ohm Fuel Level Sensor
Software Overview
The Raspberry Pi is running the latest distribution of Raspbian, which is a Debian based OS specifically written for the Raspberry Pi. The Tuning software and virtual gauges are ran in Tunerstudio by EFI Analytics. The operating system has been tweaked with a focus on fast boot times. You can find more information about cutting boot times here.
Cluster Construction and Parts List
The build started with the stock instrument cluster, featuring a speedometer, tachometer, fuel gauge, coolant gauge, oil pressure gauge and voltage gauge. The following supplies were also used.
- 12″x24″x1/8″ ABS plastic
- 12″x12″x1/4″ ABS plastic
- 2 x 6mm Green LEDs
- 1 x 6mm Blue LEDS
- 3 x 6mm Red LEDS
- 4Â x 8/32″x1″ Allen head machine screws
- 4 x 8/32″x7mm Nuts
- 4 x 8/32″ Washers
Start with a sheet of 1/8″ ABS plastic.
Disassemble the instrument cluster completely until you are left with only the white support frame. Carefully remove the gauge needles and limit pins from the stock gauges. It is not necessary to mark their position. Remove the gauge overlay from the clear plastic backer. It is glued, but will come off if you pull slowly, being careful not to tear the overlay.
Using the overlay, trace on to the backside of the sheet of 1/8″ ABS (or whatever material you choose). Trace carefully as there are three locating pins that the panel must sit in. The blue tape helps hold the piece to the plastic. Whatever method works for the material used. Cut out the new gauge face. If you are using ABS as I did, you can use a jig saw, band saw, scroll saw or even a Dremel set to medium speed.
Test fit the new panel. Making sure to assemble the black trim ring. Some minor fitting may be required.
Once you have your gauge layout, or screen layout selected. You can begin to layout your marks on the panel. You can use the left and right alignment pins as locating references and mark a line across the center of the panel. This will give you an even and straight point of reference. Just as with cutting the panel out, you have several options to cut the gauge/screen holes. Hole saws make it far easier to cut out for the gauges. However, even a cheap hole saw in the standard size can run you upwards of $20-$25 each. For something you might only use once or twice, that’s a bit steep. If you are using metal, you may have no choice. However if you are using plastic, such as ABS. You can use a cheap hole cutter such as this. They require patience and care, but will get the job done just as well.
Now you can mount your gauges, install your indicator LEDs or anything else you wish. Below you can see my gauges installed, as well as the turn indicators and high beam indicator LEDs installed.
Now you have to mount the display. This will entirely depend on the screen you selected. Some displays have mounting tabs, others do not. The one I choose to use did not. I chose to mount the display sandwiched between the gauge panel and a supporting back piece made out of 1/4″ ABS. It it held in place by 4 5mmx25mm allen head bolts epoxied to the back of the gauge panel.
The display I chose has a separate driver board that allows VGA, HDMI and Composite video inputs. To mount the board I chose to hot glue the board to the back of the piece of ABS that retains the display.
Due to the size restraints of the cluster I am using. I installed a 90 degree adapter. The 12v input for the driver board also clears the housing. I am planning on using a second back piece, similar to the cardboard piece the factory used. However in this piece there will be a female HDMI port, female USB port (for the touch overlay) and a ethernet port. I will be using typical CAT 6 networking cable, and using one of the twisted pairs (CAT 5 and 6 make use of 3 pairs of twisted pair wires) to power the display as well as future upgrades. The low amperage of the display will allow power transfer without overloading the small gauge wire.
Here is a video of the display in action using Tunerstudio gauge designer in demo mode.
Wiring Diagram for how MS3 hooks to Raspberry Pi?
The Pi connects to the MS in several ways. You can use a simple USB cable, it’s the most reliable option. Or you can use a serial to USB connector. Or you can purchase the EFI Analytics bluetooth adapter and connector to it wirelessly. I have successfully gotten all three options to work. If you have an old laptop, you can even just use a simple serial cable.
Silly question, but what’s the purpose of the Raspberry Pi device? Are programming it to be an ECM that controls the Megasquirt?
The Pi runs the tuning software for the megasquirt standalone ECU. Allowing it to display live data with the digital gauges as well as tune the ECU.
What are your boot times like? How long from power on to gauge display (not necessarily displaying info, just gauges being displayed)? Have you tried it with a pi 3? Would you be willing to share your tweaked os .img?
Usually around 25-30 seconds.