• Guest would you be interested in CUPRA or SEAT valve caps? let us know in the poll

  • Welcome to our new sponsor Lecatona, a brand dedicated to enhancing performance for VAG group sports cars, including SEAT, Audi, Volkswagen and Škoda. Specializing in High Pressure Fuel Pump (HPFP) upgrades.

DIY Sub £50 Digital LCD Arduino boost gauge

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
sorry mate the old vent is buggered, i ripped it apart and cut some big holes in it to put the lcd in it.
spent the day tearing into the clocks to fit the lcd in the space below all the warning lights (i think thats where the trip computer goes - mine doesnt have one).
Im nearly happy with it now and i'll put up a few pics once ive had my tea :)
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
If you ever feel like expanding your display to cover other options, perhaps this might be of use;

http://code.google.com/p/opengauge/wiki/OBDuinoInterface

i looked at all the OBDII stuff when i started out on it but the code looked to complex for me to be staring out on, i wanted something simple i could do a bit of reverse engineering on and play with while i learnt.

Got it to display boost, peak boost with reset and oil temp so far i just need to work out the code to get it to change between screens when i push a button.

If i was doing it again from scratch id use one of the cheaper arduino clones and this display:
http://www.adafruit.com/products/398

162rgblcdposred.jpg


it should match in with the leons display better and its not as long as my serial enabled board so i wouldn't have to chop out so much of the clocks ( it does need 9 wires instead of the serials 3 though)

I'll write out a better parts list and step by step guide tomorrow after i've put my dash back together tomorrow
 
Dec 31, 2007
1,479
0
Reading
Cracking work mate, great look! Good job.

Those screens don't do anything except for on the very early leons - on the later leons the trip computers are where the clock is.
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
ok, so a quick guide from start to finish. I wish i'd taken more photos but ill just have to describe stuff as i go along...

the parts list:

Seeeduino V3.0 (Atmega 328P) Arduino Compatible £17.99
RGB Backlight 16x2 Character LCD - 5V £9.88 (im using a serial board so my codes set up for that but this should be easy to change the code for)
Mini Push Button Switch £0.17
10K Ohm resistor £0.11
all available at proto-pic.co.uk

MPX4250AP pressure sensor from freescale.com if you ask for a sample they'll send you a MPX4250GP for around $6 shipped.
The AP will measure VAC and boost (-14psi to +21psi), The GP will measure upto 36psi boost

that comes to a total of £28.15 + $6 assuming you have some wire on hand (i used some old cat5 networking cable) and a bit of soldering skills:)



The map sensor is analog so will need 3 wires to it, 0v/+5v/signal. the arduino calculates the boost based on the voltage returned to it from the signal wire.
i spliced into the fpr for the boost line following some of the guides on here. then i was just a case of plugging in the map sensor and wiring it up.
i fed my network cable through the bulkhead into the engine bay as im planning to run more sensors into the system at a later date. cat5 is 4 twisted pairs of cable, 3 taken up by the map sensor which leaves 5 left for temp sensors.


i made a cheapo cardboard box arduino to sit in and fitted it in a space behind the instrument cluster

Wired up by Muzza1742, on Flickr

Cardboard box by Muzza1742, on Flickr

The wiring diagram for the boost circuit can be found here:
http://blog.nsfabrication.com/2009/06/29/arduino-based-lcd-boost-gauge-with-resettable-peak-hold/

mines got more wires in than that but its also set up for some other sensors i wanna install at a later date.

If you look through the earlier posts you can see how i cut up the clocks to fit in the lcd. i had to chop out lots of plastic because i brought the serial lcd instead of the parallel one ive listed above. the serial one literally just fits - its touching the oem clock on the right hand side and if i took anymore out on the left hand side the mileage reset button on the clocks would fall out .
The trade off is that the serial one only needs 3 wires 0v/+5v/signal and the parallel need around 9 wires.

Power can be supplied from the back of the stereo for a ground and switched live. The arduino is ok with being supplied with 12v but the be safe i ripped apart an old usb car charger and hardwired it into the circuit so i get a nice even 5v @ 1A.

i cant think of anything else ive missed but its late and im tired, so if anyone wants any more info please just ask.

The codes set up to start the serial interface, pause 1 second, display the splash screen for 4 seconds then show the current boost and peak boost

It also contains my workings out for the temp gauge and some stuff i was doing with a light dependent resistor thats now useless
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
and the code (to many words in the previous post)

int mapsen = 0; // Set MAP sensor input on Analog port 0
int tempsen = 1; // set temp sensor on Analog port 1
float boost = 0; // Set boost value to 0
float mapval = 0; // Set raw map value to 0
float temp = 0; //set temp sensor 1 value to 0
float tempval = 0; //set raw temp sensor value to 0
int pot = 7; // attach ldr to analog port 7
int led = 0; // set brightness val to 0
int potval = 0;
volatile*float peakboost = 0; // Set peak memory to 0

void setup()
{
**
//*manages*all*the*stuff*for*the*LDR*and*the*brightness

//potval*=*analogRead*(pot);*//reads*LDR*value
//led*=*(potval);*//*ldr*val*from*0*-1023
//if*(potval*>=*1022)*//pot*val*at*50%
//{
Serial.write(0x7c);
Serial.write(157); // full brightness
//}
//else*if*(potval*<=*1000)
//{
//Serial.write(0x7c);
//Serial.write(144);*//*40%*brightness
//}
//*end*of*lcd*stuff

**
attachInterrupt (0, preset, LOW); // defines reset interrupt on D2
Serial.begin(9600); // Open serial port
delay(1000);
Serial.write(254); // SerLCD instruction
Serial.write(01); // Clear display
Serial.write(254); // SerLCD instruction
Serial.write(128); // “Seat Leon” on first line, left align
Serial.print("Seat Leon");
Serial.write(254); // SerLCD instruction
Serial.write(197); // “Cupra 1.8T” on second line, left align
Serial.print("Cupra 1.8T");
delay (4000); // Display splash screen for 2 seconds
Serial.write(254); // SerLCD instruction
Serial.write(01); // Clear display
}



void loop()
{
mapval=*analogRead(mapsen); //Reads the MAP sensor raw value on analog port 0
boost*=*(mapval*(.00488)/(.022)*(0.145));*//Converts raw MAP value to PSI and accounts for atomospheric pressure
tempval*=*analogRead(tempsen); // reads temp sensor
temp*=*(tempval/(2.4));*// temp sensor



Serial.write(254); // SerLCD instruction
Serial.write(128); // “MAP:” at top right of display
Serial.print("BOOST");
Serial.write(254); // SerLCD instruction
Serial.write(141); // “PSI” three digits to the right of “MAP:”
Serial.print("PSI");
Serial.write(254); // SerLCD instruction
Serial.write(192); // “Peak:” at bottom right of display
Serial.print("PEAK");
Serial.write(254); // SerLCD instruction
Serial.write(205); // “PSI” left of peakboost
Serial.print("PSI");

if (boost > peakboost) // If current boost is higher than peak, store in peak memory
{
peakboost*=*boost*;**// Store current boost in peak memory
}

if (peakboost <= 10) // Shifts peak value 1 character to the right if < 10PSI
{
Serial.write(254); // SerLCD instruction
Serial.write(198); // Peak display after “Peak:”
Serial.print(peakboost,1); //peak to 1 decimal
}
else
{
Serial.write(254); // SerLCD instruction
Serial.write(197); // Go to position 22
Serial.write(32); // Load clear bit at position 22
Serial.write(254); // SerLCD instruction
Serial.write(198); // Go to position 22
Serial.write(32); // Load clear bit at position 23
Serial.write(254); // SerLCD instruction
Serial.write(199); // Go to position 22
Serial.write(32); // Load clear bit at position 24
Serial.write(254); // SerLCD instruction
Serial.write(200); // Go to position 22
Serial.write(32); // Load clear bit at position 25
Serial.write(254); // SerLCD instruction
Serial.write(201); // Go to position 22
Serial.write(32); // Load clear bit at position 26
Serial.write(254); // SerLCD instruction
Serial.write(202); // Go to position 22
Serial.write(32); // Load clear bit at position 26
Serial.write(254); // SerLCD instruction
Serial.write(198); // Peak display after “Peak:”
Serial.print(peakboost,1); //peak to 1 decimal
}
if (boost <= 0) //Shifts the MAP value 1 character to the right if < 10PSI
{
Serial.write(254); // SerLCD instruction
Serial.write(133); // boost after “MAP:”
Serial.print(boost,1); //boost to 1 decimal
}
else
{
Serial.write(254); // SerLCD instruction
Serial.write(133); // Go to position 6
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(134); // Go to position 7
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(135); // Go to position 8
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(136); // Go to position 9
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(137); // Go to position 10
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(138); // Go to position 11
Serial.write(32); // Load clear bit at position 4
Serial.write(254); // SerLCD instruction
Serial.write(134); // boost after “MAP:”
Serial.print(boost,1); // boost to one decimal
}



delay(500); // prevents LCD display from ghosting. Lower number refreshes faster, higher number has less ghosting on slow LCD’s
}

void preset() //peak reset if D2 goes low
{
peakboost*=*boost;*//sets peakboost to current boost reading, resetting the peak memory
}
 

killerog

Active Member
Feb 12, 2012
5
0
Never posted here but I might as well start now.

I changed my Mk4 1.2 Ibiza to a Mk4 Ibiza FR a few months back and wanted a boost gauge so am also in the middle of building my own one using almost the same components as you.

One big difference is I am building an arduino clone as well to keep the cost down as much as I can. I did have to put the development of it on hold until I finished my exams a few days ago but I will get some pictures up of what I have made so far when I go back up to uni, and if you lot want keep you update on any progress I make.
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
if i was doing it again id use one of the clones as well, much cheaper than the official stuff and the add on boards are easier to find. i had a hell of a job finding a decent priced protosheild for my mega.
Its out of the car at the min so i can fiddle with the settings and add a menu to select Boost/Temps/Voltage etc and display it on the lcd.
Hoping to get it back in next weekend and get an oil temp sensor fitted when i change to oil in a few weeks.

Id love to see some pics and the progress on yours ( i get bored google arduino boost gauge to see if anyone else has got any ideas i can steal :whistle::) )
 

prittchauhan

Guest
:) Make me one id pay for the parts etc.... and fitting. looks wicked mate!
 
Chris Knott Insurance - Competitive quotes for forum members