Arduino Powered Dash Display
Arduino Powered Dash Display
This is intended to be a tutorial and overview of the custom cluster that I made for my S13 with
Toyota 1UZ-FE engine and Nissan JK40C transmission. The mounting surface of the cluster is
a mild steel sheet cut to somewhat fit and screwed in place. The turn signal and high beam
LEDs are connected straight to the factory cluster harness with 220k ohm resistors so that they
wont be blindingly bright. Refer to your FSM to know which factory harness wires to
use. Seeing as the coolant temperature sensors are different between the KA24 and 1UZ, I
decided it would be nice to have a different temperature gauge using a GM coolant sensor. I
also wanted to pull the speed signal straight from a GPS since my transmission doesnt have a
speed sensor and the car does not have ABS. I have since then added a few other features
that Im sure will come in handy. The screen is fed and updated by an Arduino board and does
not communicate with the Speedhut tachometer or engine ECU. The number of devices you
wish to control or monitor is limited on how many I/Os your Arduino has. This guide will aid you
in building your own setup but it will be necessary to know basic electrical concepts and how to
solder. It would be beneficial to read a little about Arduino before trying to understand exactly
what all is going on. Im no great programmer and had zero experience with Arduino before
starting this project so I purchased a few books on learning Arduino that covered basic C++
coding. Its extremely important to test every circuit you build using a breadboard to make sure
it works as you intended before soldering all your components together.
You can play around with it like this by following simple online tutorials.
Features
Password protected engine start with hard-coded password
Turbo timer with programmable count time
Display values such as speed, various temperatures, battery voltage, fuel level and fuel
pressure.
Programmable coolant temperature warning lamp.
Expandable and adaptable to whatever you want to control or display.
4D Systems uLCD-43DT-AR
This is the most expensive part at $170 for the starter kit.
http://www.4dsystems.com.au/product/uLCD_43DT_AR/
4D Systems offers other screens as well. I chose the 4.3 so it would fit nicely into my S13 dash.
The 4D Systems website is extremely helpful and has tutorials in their appnotes about most
everything you will need to program the display. Follow the instructions for connecting it to an
Arduino host.
http://www.4dsystems.com.au/appnotes
Parts List
Most of these parts can be found on Amazon.com.
Arduino Mega 2560
4D Systems uLCD-43DT-AR
Assorted resistors from 10 ohms to 1M ohms
Adafruit Ultimate GPS Breakout - 66 channel w/10 Hz updates - Version 3 (for better
satellite acquisition be sure to get the optional active antenna)
Thermistors (coolant temperature sensors)
0-100 PSI pressure transducer compatible with fuel/oil
Tools
Wire crimpers
Wire cutters
Wire strippers
Fine tip soldering iron w/ rosin-core solder
Beer
To ensure that your Arduino Mega 2560 will read inputs and control outputs correctly, youll
need to make sure you wire up each sensor or component to the correct I/O. If you wish to use
a different I/O, you will need to change the code accordingly.
Warning LED
The warning LED should be connected in series with at least a 220 ohm resistor from pin 22 to
ground. If this is too bright, use a higher ohm resistor. The LED will blink at a rate of 500ms
(half a second) when coolant temperature rises above a predetermined value. The temperature
you wish to set as warning temperature can be changed by changing the highlighted number
below. Temperature is in degrees F.
#define TEMPERATURE_WARNING_DEGREES 200
A thermistor is a type of variable resistor. The variable resistor in the diagram above is a photocell used for measuring light but the concept is the same. Most of the automotive coolant
temperature sensors that were so familiar with have a negative temperature coefficient which
means that as temperature goes up, their resistance goes down. The analog inputs on the
Arduino board reads voltage, not resistance, so its important to add a pull-down resistor after
the sensor you want to read. Otherwise, the voltage drop across the thermistor will be 5v no
matter what the thermistor resistance is. There are calculations to find the optimal pull-down
resistor but an easy way to remember it is that it should be somewhere close to the resistance
range that the sensor will see most often. If you would like to know more about them check out
this website. http://www.resistorguide.com/pull-up-resistor_pull-down-resistor/
A 470 ohm resistor works well for this application. The change in resistance due to change in
temp for thermistors is not linear, however, so there is a formula we must use to accurately read
them. We will be using the Steinhart-Hart formula to help us find this curve. To begin we will
need to take three ohm readings of the thermistor at three different temperatures (0 degrees C,
50 degrees C and 100 degrees C are good temperatures to use) and put them in to the online
thermistor calculator here.
http://www.thinksrs.com/downloads/programs/Therm%20Calc/NTCCalibrator/NTCcalculator.htm
This will give you three coefficients that you may plug into the Steinhart-Hart formula found in
the code.
Here is a link for more information on reading a thermistor with Arduino.
http://playground.arduino.cc/ComponentLib/Thermistor2
Below is what the code should look like for the math part of reading an NTC thermistor.
//coolant temp
double Thermistor 1(int RawADC) {
double Temp;
Temp = log(460*((1024.0/RawADC-1)));
Temp = 1 / (0.001297009539 + (0.0002603415040 * Temp) + (0.0000001554845962 * Temp *
Temp * Temp));
Temp = Temp - 273.15;
// Convert Kelvin to Celsius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celsius to Fahrenheit
return Temp;
}
The highlighted numbers are the three coefficients (A, B and C) that I am using for my coolant
temperature sensor. These are different for the oil temp sensor. I have calculated for a 470
ohm pull-down resistor as can be seen above in green (this number can be altered slightly to
make the reading more accurate). I chose to use GM coolant temp sensors for both my coolant
and oil temps simply because they are pretty common and not very expensive.
Coolant temp sensor part number: BWD WT5132.
Oil temp sensor part number: Delphi TS10075
Here is a video to show you how it works.
https://www.youtube.com/watch?v=7GeF5PFtqS0
GPS
Wiring up the GPS is pretty straight forward. Serial connections are: Arduino TX to GPS RX
and Arduino RX to GPS TX. Getting the speed data is not so easy. This link may help you with
that. Dont worry, this part gets confusing fast so be patient.
https://learn.adafruit.com/adafruit-ultimate-gps/downloads?view=all
Youll need to use Serial1 for the GPS since the Serial0 port is used by the 4D Systems display
shield.
Heres another video. The update rate is 5Hz.
https://www.youtube.com/watch?v=JVEO6vmohhU
5V Relay Shield
The 5v relay from Sainsmart is the one Im using if I remember correctly. It must be pulled low
to energize, not high like most automotive relays. Use it to control +12v to something required
to start the car like clutch safety switch, fuel pump or main relay. If you wish to use the built in
turbo timer function then it will need to supply power with the key off to the main relay or relay
box that supports the fuel pump, ecu, injectors and ignition coils.
http://www.sainsmart.com/arduino-pro-mini.html
Connecting to Power
The Arduino board should be powered through a step-down DC-DC converter wired to constant
+12v (battery) with a fuse and latching button switch. Anytime power is removed the Arduino
board will turn off and anything that it was currently doing (like the turbo timer) will
stop. Password input will be required anytime power is restored. In the way my particular code
is written, the turbo timer will begin counting when the voltage input at pin A12 is removed. The
turbo timer count time may be changed with the number below (in seconds) from 0 to the
amount of time it would take for your car to run out of gas.
#define TURBO_TIMER_SECONDS 4
My timer counts for 4 seconds after the Key-Off condition is true at which time the controller will
turn the relay off and kill the engine. If the relay is not supplying a signal to the main relay or
relay box which in turn supplies power to everything required to run the engine, this function will
not work.
The password may be modified here by changing the number highlighted in yellow.
#define MY_PASSWORD "1234"
A voltage divider is pretty simple and can be made with just a few resistors. You will need one
in order to measure 12-14.2 volts with the Arduino boards 0-5v analog input. Lets round up
14.2v to a solid 15v for simplicity. Now we need to divide it by three so that the max voltage
applied to the analog input will not be greater than 5v. To do this we need three resistors with
the same resistance. Use a 10k ohm resistor for all three. Then we need to tap in between R2
and R3 for the signal voltage back to the analog input. Use a multimeter to test that the voltage
is equal to or below 5v. The switched voltage supply needs to be from the key switch or some
other switched source than the one supplying power to the DC-DC converter. If it is the same
source then the 5v relay will not de-energize unless power to the converter is removed.
Screen brightness is adjusted via a 10k potentiometer. The direction you turn in to control the
brightness can by reversed by switching the red and black wires. If you know how a throttle
position sensor works then this should make sense.