• 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

ReDBull

Every day's a school day.
Nov 21, 2006
2,991
14
Lincoln
I think it looks great but I have no idea what the hell you're going on about!?!? More power to you. I should of listened in DnR lessions at school. I did make a lovely chess board though...
 

killerog

Active Member
Feb 12, 2012
5
0
The basic menu system I have in mine at the moment uses 1 button. User presses the button a count value goes up and depending on the value of the count a different screen is shown. The count is then reset when it reaches what ever the max number of screens I want is.

Ill post the code up if I can find it on my laptop, but well be next weekish before I am back up uni so I can take any pictures.
 

killerog

Active Member
Feb 12, 2012
5
0
Well I did make a nice post with pictures and details of my gauge but it seems I cant post images until I have 15 posts :( And I have no intention of randomly spamming posts until I reach that number. So for the time being I will just have to put off posting my project.
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
Well I did make a nice post with pictures and details of my gauge but it seems I cant post images until I have 15 posts :( And I have no intention of randomly spamming posts until I reach that number. So for the time being I will just have to put off posting my project.

if you wanna upload the pics somewhere and send me the links ill post them for ya.

worked out the code for my ds18b20 one wire temp sensor yesterday and its all set up but i'm not happy with the speed it reports change in temp. might go back to analog temp sensors
 

jaf2212

Active Member
Apr 27, 2011
202
0
Chesham, Bucks
Posted on behalf of killerog

killerog said:
Here are the images, few of both the screen and arduino clone board.

boost1.jpg


This image shows the screen in its housing, only has a temp paint job to test colour so ignore the terrible finish. Has two buttons, one to change screen and one to change/reset a setting on the current screen. The screen its self has an RGB back light which is not on in the picture but it allows me to set the back light to almost any colour, so should be able to match any colour used in a car.

boost2.jpg


The second image shows the PCB I made for the the buttons/screen.

boost4.jpg


Next image shows the arduino clone board I made. It only has the require inputs/outputs to cut down cost. The "jumper" you see plugged in allows the selection of 5v source, Either the car or a USB input.

boost5.jpg

Final image is that of the housing holding the arduino clone board.


I haven't been able to find my program yet, so I will either redo it or keep looking. I can also go into more detail into the two boards I have built if people are interested.
 
Last edited:

killerog

Active Member
Feb 12, 2012
5
0
At the moment just boost pressure. The pcb I have designed only has one analog input exposed for the pressure sensor. In the future I can expand the number of inputs for what ever sensors I can use. So things like temp sensors etc.

My knowledge of cars is quite slim past fitting a stereo so I have no real idea of what I can accessed easily, so that part will be a bit of a learning exercise but I have jaf to help with that part.
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
lol yeah boost pressure was all i started out wanting to monitor, now I'm eyeing up gps breakout boards and looking into obd2 monitoring now ive gotten more familiar with all the code that goes with it
 

cstark

Guest
Hey there. Nice project! Your post convinced me to go ahead and dive into this. I had been researching quite a while and wasn't sure if I could take on something like this with no electronics experience or programming besides from Visual Basic. After going through Adafruit's tutorials though, it was so simple (for the most part...the formula I kept finding for the MPX4250AP sensor wasn't working correctly for me).

But I saw that you are always looking for other projects out there. I put up a write up here if you want to check mine out: cstark27.blogspot.com

I'm still trying to find the perfect screen as I haven't liked either ones I've got but oh well.
 

cupra_r_ick

Active Member
Jan 29, 2011
1,076
3
i have no idea about that stuff, but if some one is willing to make me one that does oil temp...... ££££££
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
Hey there. Nice project! Your post convinced me to go ahead and dive into this. I had been researching quite a while and wasn't sure if I could take on something like this with no electronics experience or programming besides from Visual Basic. After going through Adafruit's tutorials though, it was so simple (for the most part...the formula I kept finding for the MPX4250AP sensor wasn't working correctly for me).

But I saw that you are always looking for other projects out there. I put up a write up here if you want to check mine out: cstark27.blogspot.com

I'm still trying to find the perfect screen as I haven't liked either ones I've got but oh well.

i know what you mean about the lcd screens, sunlights a bitch on them. if i could get a decent looking oled for where ive placed mine id be all over it
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
lol as much as mine works its still a work in progress for me and im always playing with it. im not sure i could knock out a retail quality unit
for oil temp your probably looking at £20 for the arduino, another £20 for the lcd, a couple of quid for wires and stuff, probably £5-£10 if you want a protosheild to mount it on, £10 for a 1/8npt temp sensor and £10 for the adapter to fit it into the leon sump (m14).
So your looking at £70ish for all the bits. All those prices are guesses btw
 

killerog

Active Member
Feb 12, 2012
5
0
Had a bit of a delay with mine, stupid board I use to the program the ardinuo decided to stop working so I had to wait for a replacement.

I have redesigned my main board to use two Ethernet cables (Good idea you had there) to connect to my screen instead of 13 lose wires. They kept coming lose making testing a pain and I couldn't see them staying in the correct place in a normal car let alone one with suspension like that in the FR. I will get some pictures up of the new board when my mate has finished work so he can upload them again.


Here is the code I currently have running on my board. Has a basic menu system, reads the current boost, is able to save the current peak boost value to the EEPROM and change the colour of the LCD backlight.

Code:
#include <LiquidCrystal.h>
#include <EEPROM.h>

LiquidCrystal lcd(3, 2, 5, 6, 7, 8);

//Button input pins
const int buttonPin1 = 8;
const int buttonPin2 = 12;

//Led output pins
const int ledPin1 = 9;  //Blue    
const int ledPin2 = 10; //Green 
const int ledPin3 = 11; //Red

//Analog input pins
const int analogPin = 0;

//Global varibles
int startingBoostRaw = 0;
int startingBoostKPA = 0;
int boostValueRaw = 0;
int boostValueKPA = 0;
float boostValuePSI = 0;
int boostValueBar = 0;
int peakBoostKPA = 0;

int screenNumber= 0;
int buttonState1 = 0;
int buttonLastState1 = 0;
int buttonState2 = 0;
int buttonLastState2 = 0;

int addr = 0;

void setup() 
{
  //Set up LCD and show starting message
  lcd.begin(16, 2);
  lcd.noCursor();
  lcd.print("SEAT Ibiza FR"); 
  
  //Set up backlight
  analogWrite(ledPin1, 255);
  analogWrite(ledPin2, 255);
  analogWrite(ledPin3, 255);  //RED
  
  //Set up pins
  pinMode(buttonPin1,INPUT);
  pinMode(buttonPin2,INPUT);
  
  int reseted;
  
  //Has the program been run already? 
  //Get "bool" value from memory
  reseted = EEPROM.read(1);
  
  
  if (reseted == 0) //If no the set the peak boost value to 0.
  {
   peakBoostKPA = 0; 
   EEPROM.write(1,1);
  }
  else  //else Get peak boost value from memory
  {
    peakBoostKPA = EEPROM.read(addr);
  }
  

  startingBoostRaw = analogRead(analogPin); //Get the starting pressure value (may not work in car)
  startingBoostKPA = (startingBoostRaw*(.00488)/(.022)+20); //Converts raw MAP value to kPa
  //Start the serial port
  Serial.begin(9600);
  
  delay(5000); // Delay to show the starting message 

}

void loop() 
{
  
  delay(100);
  
  //Read button states
  buttonState1 = digitalRead(buttonPin1);
  buttonState2 = digitalRead(buttonPin2);
  
  if (buttonState1 != buttonLastState1)
  {
    if (buttonState1 == HIGH)
    {
      screenNumber++;
      if (screenNumber >= 3)
      {
        screenNumber = 0;
      }
    }
  }
  buttonLastState1 = buttonState1;

  BoostCal();

  if (screenNumber == 0)
  {
    Screen1();
  }

  if (screenNumber == 1)
  {
    Screen2();
  }

  if (screenNumber == 2)
  {
    Screen3();
  }
} 


//Works out the current boost value
void BoostCal()
{
   boostValueRaw = analogRead(analogPin);//Read analog pin in
   boostValueKPA = (boostValueRaw*(.00488)/(.022)+20) - startingBoostKPA; //Converts raw MAP value to kPa
   boostValuePSI = (boostValueKPA * (.14503773773020923)) ;
    
   if (boostValueKPA > peakBoostKPA) // if the new KPA value is higher then the peak value write it to the EEPROM
   {
     EEPROM.write(addr, boostValueKPA);
   }
    
    //Do other conversions
    
   Serial.println(boostValueRaw);
   Serial.println(boostValueKPA);
   Serial.println(boostValuePSI);
}

void Screen1()
{
  lcd.clear();
  lcd.print("Value:");
  lcd.print(boostValuePSI);
  lcd.setCursor(0,1);
  lcd.print("Peak:");
  lcd.print(boostValueRaw);
  
  Serial.println("Screen1");
  
   buttonState2 = digitalRead(buttonPin2);
   
    if (buttonState2 != buttonLastState2)
  {
    if (buttonState2 == HIGH)
    {
      peakBoostKPA = 0;
    }
  }
  buttonLastState2 = buttonState2;
}

void Screen2()
{
  lcd.clear();
  lcd.print("Screen 2");
  
  Serial.println("Screen2");
}

void Screen3()
{
  lcd.clear();
  lcd.print("Screen 3");
  
  Serial.println("Screen3");
}
 

LEE69

Stage 2 Revo'd
Dec 10, 2004
21,262
74
C\UK\Devon\Torquay
lol as much as mine works its still a work in progress for me and im always playing with it. im not sure i could knock out a retail quality unit
for oil temp your probably looking at £20 for the arduino, another £20 for the lcd, a couple of quid for wires and stuff, probably £5-£10 if you want a protosheild to mount it on, £10 for a 1/8npt temp sensor and £10 for the adapter to fit it into the leon sump (m14).
So your looking at £70ish for all the bits. All those prices are guesses btw

The oil temp can be read from the obd port my LC 180 does it.
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
Had a bit of a delay with mine, stupid board I use to the program the ardinuo decided to stop working so I had to wait for a replacement.

I have redesigned my main board to use two Ethernet cables (Good idea you had there) to connect to my screen instead of 13 lose wires. They kept coming lose making testing a pain and I couldn't see them staying in the correct place in a normal car let alone one with suspension like that in the FR. I will get some pictures up of the new board when my mate has finished work so he can upload them again.

yeah i had plenty of setbacks on mine to, its all worth it though :)


I didnt think the odb2 would give me oil temp? that saves me a lot of messing about though. i saw a ODBII uart adapter on arduinodev.com for $50 (30ish quid) that'll give me access to all the odb data and allow me to use it in my sketch without to much head scratching
 

Muzza1742

Daily Driver
Dec 8, 2011
156
1
Stoke
i think your right, i might just buy a cheap elm327 odb reader off ebay and hack it about to connect to my arduino. i cant find any info on reading the kkl chips in the vag-com leads with a 'duino so it looks like back to an analog sensor for oil temps
 
Lecatona HPFP (High-pressure Fuel Pump Upgrades)