Join Today
Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 54
  1. #21
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Little update

    My MAP sensor (MPX4250AP) arrived so have added that to the test setup.

    Pinout for the sensor (mainly as a reminder for me as I forget these things)


    For reference, current lcd pinout and connection to Arduino is
    1 (ground) - Gnd
    2 (power) - +5V
    3 (contrast) - Pin 9
    4 (LCD RS) - Pin 12
    5 (LCD R/W) - Gnd
    6 (LCD Enable)- Pin 11
    11 (Data 4) - Pin 8
    12 (Data 5)- Pin 7
    13 (Data 6)- Pin 6
    14 (Data 7)- Pin 5


    Have been playing with the lcd layout code a bit. Much neater now and displays inHg when the manifold is under vacuum.



    Currently trying to code the bargraph to reverse when under vacuum. Once that is done I can mount it properly and fit it to the car

    Also a problem with the local atmospheric pressure. As we all know it can fluctuate depending on conditions at the time so the values can be out by a small amount. I'm hoping to tap into the barometric sensor to get a local reference value.
    Last edited by Dangerous Dave; Sunday 19th May 2013 at 12:11.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  2. #22
    Senior Member
    OH DEAR
    t5 pete's Avatar
    Join Date
    Jul 2008
    Location
    barnsley s.yorkshire
    Posts
    12,470
    Thanks
    2,138
    Thanked 3,711 Times in 2,752 Posts
    looking good bomb it will be nice to see it fitted

  3. The Following User Says Thank You to t5 pete For This Useful Post:

    Dangerous Dave (Sunday 19th May 2013)

  4. #23
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Next stage in the development...

    I purchased a box to house the arduino, sensor and connectors.
    http://www.ebay.co.uk/itm/261168658631

    I also bought a prototyping board for the Arduino (or prototyping shield) to make it easier to mount the sensor and any wiring.
    http://www.ebay.co.uk/itm/321122319580

    Then I butchered an old modem/router to get two RJ45/ethernet connectors. I cut a 3 metre ethernet/cat5e cable in half and soldered the wires to the lcd so the connectors can be used to for quick removal from the box.

    Everything soldered up and hot glued into the box, holes cut for the lcd connectors, MAP sensor and usb connector.




    I connected it into the car but when plugged into the car usb adapter it just presented a garbled display. I traced the problem to the lcd contrast control (which was being done by the arduino). This was solved by just using a resistor to control the contrast instead of the arduino controlling it.

    The display has been changed a little with separate boost and vacuum bars (gave up trying to get a negative bar sorted)

    Unfortunately something must have pressed against the lcd screen at some point in the build process as there is a smudge/blemish on the right hand side. This doesn't stop it working so won't bother getting a new one yet.

    So I tested it this morning with the car stationary, road test will be done soon. The refresh rate is a little fast as the decimal is changing too fast and 'ghosting' so will need changing in the code and the vacuum bargraph needs to have a higher value to stop it wrapping onto the top line. (Video in HD too )


    More to come
    Last edited by Dangerous Dave; Saturday 15th June 2013 at 12:24.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  5. The Following 2 Users Say Thank You to Dangerous Dave For This Useful Post:

    Biff (Saturday 15th June 2013),PHIL V70R (Friday 21st June 2013)

  6. #24
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Well tried my best to get a good video, but going to need something better than the crude gaffer tape rig I made LOL

    Anyway, short but you get the gist (youtube have done their best to steady the picture). Another revision of the display, taken out the vacuum bargraph as its not really needed and added a scale. Also increased the frame rate so the bar refreshes faster (quarter of a second just wasn't fast enough)

    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  7. The Following 2 Users Say Thank You to Dangerous Dave For This Useful Post:

    craigoodwood (Friday 21st June 2013),M-R-P (Friday 21st June 2013)

  8. #25
    Senior Member
    228k and still not broke it!

    Join Date
    Jul 2011
    Location
    Poole, Dorset
    Posts
    23,213
    Thanks
    6,548
    Thanked 7,752 Times in 5,648 Posts
    Nice mate. can you set it to show "distance to petrol station" too? You're gonna need it driving like that lol.
    19t, greens, 3" inlet, 3" downpipe with race cat, V70R catback, autotech map...

    310.2bhp / 333ft/lb

    2016 Swedish Day UK "Best Modified Swede"
    SOLD

    Got an old discovery now.

  9. The Following User Says Thank You to M-R-P For This Useful Post:

    Dangerous Dave (Friday 21st June 2013)

  10. #26
    Whiny Old Git
    Aching bones :(
    claymore's Avatar
    Join Date
    Aug 2009
    Location
    Shrewsbury
    Posts
    9,069
    Thanks
    4,385
    Thanked 4,999 Times in 3,015 Posts
    So, how soon are these going to be available for sale?
    PIC][/SIGPIC]
    aaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaa

    Facebook^^^^^^^^^^^^^^^^ Old T-5 Kompressor Thread^^^^^^^^^^^^^^^ New TT-10 Kompressor Thread

  11. #27
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Quote Originally Posted by M-R-P View Post
    Nice mate. can you set it to show "distance to petrol station" too? You're gonna need it driving like that lol.


    Quote Originally Posted by claymore View Post
    So, how soon are these going to be available for sale?
    LOL, I don't think it will make a very good commercial product with its bits salvaged from old routers and hot glued stuffed into every orifice

    I'll have to see what it would cost to get all the bits new.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  12. #28
    Senior Member
    This user has no status

    Join Date
    Jul 2008
    Posts
    846
    Thanks
    126
    Thanked 178 Times in 140 Posts
    Can help with vac bars as I did hem for my DIMBoost project, which passed the trackday test yesterday.

    I actually removed the vac vars after coding it.

    Anyway if you post the sender analogue output ranges, volts and vac then I'll help you with the maths.

  13. The Following User Says Thank You to Dream3r For This Useful Post:

    Dangerous Dave (Saturday 22nd June 2013)

  14. #29
    Senior Member
    Kawasaki T5. Built by a Swede,
    Driven by a turnip!
    T5RatherAmusin's Avatar
    Join Date
    May 2013
    Location
    SW Wales
    Posts
    1,522
    Thanks
    303
    Thanked 391 Times in 333 Posts
    have a digigauge in my vent with the bar.
    much easier for quick glancing to see what it hits than looking a a bloody needle!

  15. The Following User Says Thank You to T5RatherAmusin For This Useful Post:

    Dangerous Dave (Saturday 22nd June 2013)

  16. #30
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Quote Originally Posted by Dream3r View Post
    Can help with vac bars as I did hem for my DIMBoost project, which passed the trackday test yesterday.

    I actually removed the vac vars after coding it.

    Anyway if you post the sender analogue output ranges, volts and vac then I'll help you with the maths.
    Cool I got rid of the vac bar as its not really needed and the reading is given anyway.

    The sensor is zeroed in a vacuum so starts at 20kpa and finishes at 250kpa, at atmospheric pressure (100kpa) it outputs ~1.75 volts

    Will be posting the code soon.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  17. #31
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Here's the code I'm using. The base code I found on a website with a similar project build, most of it has been changed.

    Code:
    // Dangerous Dave's Boost Gauge Project
    // Reads boost from MPX4250AP on Analog 0.
    // Converts vacuum readings to inHg.
    // Displays peak boost
    
    // include libraries
    #include <LiquidCrystal.h>
    #include <LcdBarGraph.h> 
    
    float rawval = 0; // Setup raw sensor value
    float kpaval = 0; // Setup kPa value
    float boost = 0; // Setup boost value
    float barboost = 0; // Setup value for boost bar
    float vac = 0; // Setup vacuum value
    float peak = 0; // Setup peak value
    
    LiquidCrystal lcd(12, 11, 9, 8, 7, 6); // set LCD interface pins
    byte lcdNumCols = 20; // number of columns in the LCD
    
    LcdBarGraph lbg1(&lcd, 20, 0, 1);  // setup bargraph with width 20 starting at column 0 on row 1
    
    byte five[8] = { B01110, B01000, B01110, B00010, B01110, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    byte ten[8] = { B10111, B10101, B10101, B10101, B10111, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    byte fifteen[8] = { B10111, B10100, B10111, B10001, B10111, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    
    void setup() // Start setup
      {
      lcd.createChar(5, five); // Create custom character defined above
      lcd.createChar(6, ten); // Create custom character defined above
      lcd.createChar(7, fifteen); // Create custom character defined above
      lcd.begin(20, 4); // set the LCD's columns and rows
    
    // Setup static characters on the lcd
    lcd.setCursor(2,2);
    lcd.print("Boost:");
    lcd.setCursor(3,3);
    lcd.print("Peak:");
    lcd.setCursor(14,3);
    lcd.print("psi");
    lcd.setCursor(4,0);
    lcd.write(5);
    lcd.setCursor(9,0);
    lcd.write(6);
    lcd.setCursor(14,0);
    lcd.write(7);
    } // End setup
    
    void loop() // Start loop
    {
    // some base calculations to get pressures
    rawval = analogRead(0); // Read MAP sensor raw value on analog port 0
    kpaval = (rawval*(0.005)/(0.022)+20); // Calculate kpa value from raw value for debugging
    boost = ((rawval*(0.005)/(0.022)+20)*(0.145)-14.5); // Calculate psi from raw value ***(calculations need proving)***
    barboost = (rawval-357); // Calculate boost value for the bargraph ***(not exact, needs investigation, currently uses higher raw value for a smoother bar but is not exact)
    
    if (boost >= 0) // Set condition for bargraph to show above zero (negative numbers cause LCD crash)
      {
      lcd.setCursor(9,2);
      lcd.print(boost,1); // Prints the boost figure
      lcd.setCursor(14,2);
      lcd.print("psi "); // Prints 'psi' with a space after it to clear the 'g' off 'inHg'
      lbg1.drawValue(barboost, 500); // Draw bar graph from the analog value read with a maxvalue of 500
      }
    
    if (boost < 0)
      {
      lcd.setCursor(9,2);
      lcd.print(vac,1); // Prints the vacuum figure
      vac = boost*-2.036025; // Used 'minus' 2.036025 so that the figure printed wont have a minus symbol in front of it
      lcd.setCursor(14,2); 
      lcd.print("inHg"); // Changes the units to 'inHg' on the lcd
      lcd.setCursor(0,1);
      lcd.print("                  "); // clears the boost bar if any characters are left after going below 0
      }
    
    if (boost > peak) // If current boost is higher than peak, store new value
      {
      peak = boost ;  // Store new peak value in peak memory
      }
    
    lcd.setCursor(9,3);
    lcd.print(peak,1); // Prints the peak value
    } //end loop
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  18. #32
    Senior Member
    This user has no status

    Join Date
    Jul 2008
    Posts
    846
    Thanks
    126
    Thanked 178 Times in 140 Posts
    Can't read the code at the moment I'm in Brizzle.

    If you read up on m=y+b that's all you need. I'll need the max voltage for vac, ie the range to help though.

    Quote Originally Posted by bomb192uk View Post
    Here's the code I'm using. The base code I found on a website with a similar project build, most of it has been changed.

    Code:
    // Dangerous Dave's Boost Gauge Project
    // Reads boost from MPX4250AP on Analog 0.
    // Converts vacuum readings to inHg.
    // Displays peak boost
    
    // include libraries
    #include <LiquidCrystal.h>
    #include <LcdBarGraph.h> 
    
    float rawval = 0; // Setup raw sensor value
    float kpaval = 0; // Setup kPa value
    float boost = 0; // Setup boost value
    float barboost = 0; // Setup value for boost bar
    float vac = 0; // Setup vacuum value
    float peak = 0; // Setup peak value
    
    LiquidCrystal lcd(12, 11, 9, 8, 7, 6); // set LCD interface pins
    byte lcdNumCols = 20; // number of columns in the LCD
    
    LcdBarGraph lbg1(&lcd, 20, 0, 1);  // setup bargraph with width 20 starting at column 0 on row 1
    
    byte five[8] = { B01110, B01000, B01110, B00010, B01110, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    byte ten[8] = { B10111, B10101, B10101, B10101, B10111, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    byte fifteen[8] = { B10111, B10100, B10111, B10001, B10111, B00000, B00100, B00100 }; // Setup custom LCD character for bargraph legend
    
    void setup() // Start setup
      {
      lcd.createChar(5, five); // Create custom character defined above
      lcd.createChar(6, ten); // Create custom character defined above
      lcd.createChar(7, fifteen); // Create custom character defined above
      lcd.begin(20, 4); // set the LCD's columns and rows
    
    // Setup static characters on the lcd
    lcd.setCursor(2,2);
    lcd.print("Boost:");
    lcd.setCursor(3,3);
    lcd.print("Peak:");
    lcd.setCursor(14,3);
    lcd.print("psi");
    lcd.setCursor(4,0);
    lcd.write(5);
    lcd.setCursor(9,0);
    lcd.write(6);
    lcd.setCursor(14,0);
    lcd.write(7);
    } // End setup
    
    void loop() // Start loop
    {
    // some base calculations to get pressures
    rawval = analogRead(0); // Read MAP sensor raw value on analog port 0
    kpaval = (rawval*(0.005)/(0.022)+20); // Calculate kpa value from raw value for debugging
    boost = ((rawval*(0.005)/(0.022)+20)*(0.145)-14.5); // Calculate psi from raw value ***(calculations need proving)***
    barboost = (rawval-357); // Calculate boost value for the bargraph ***(not exact, needs investigation, currently uses higher raw value for a smoother bar but is not exact)
    
    if (boost >= 0) // Set condition for bargraph to show above zero (negative numbers cause LCD crash)
      {
      lcd.setCursor(9,2);
      lcd.print(boost,1); // Prints the boost figure
      lcd.setCursor(14,2);
      lcd.print("psi "); // Prints 'psi' with a space after it to clear the 'g' off 'inHg'
      lbg1.drawValue(barboost, 500); // Draw bar graph from the analog value read with a maxvalue of 500
      }
    
    if (boost < 0)
      {
      lcd.setCursor(9,2);
      lcd.print(vac,1); // Prints the vacuum figure
      vac = boost*-2.036025; // Used 'minus' 2.036025 so that the figure printed wont have a minus symbol in front of it
      lcd.setCursor(14,2); 
      lcd.print("inHg"); // Changes the units to 'inHg' on the lcd
      lcd.setCursor(0,1);
      lcd.print("                  "); // clears the boost bar if any characters are left after going below 0
      }
    
    if (boost > peak) // If current boost is higher than peak, store new value
      {
      peak = boost ;  // Store new peak value in peak memory
      }
    
    lcd.setCursor(9,3);
    lcd.print(peak,1); // Prints the peak value
    } //end loop

  19. #33
    Senior Member
    trying hard to look busy!
    jdavis's Avatar
    Join Date
    Dec 2008
    Location
    Doncaster, South Yorkshire
    Posts
    2,491
    Thanks
    1,050
    Thanked 579 Times in 486 Posts
    Bomb that looks great! Interested!
    It's a 5 Cylinder Orchestra!
    R.I.P. Kyebosh (Alan) you're memory lives on!

  20. #34
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    The calculations in the code are pretty close as the boost was spiking to 20+ psi, so I adjusted the BCS duty cycle so the ecu could control the boost better.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  21. #35
    Senior Member
    This user has no status

    Join Date
    Jul 2008
    Posts
    846
    Thanks
    126
    Thanked 178 Times in 140 Posts
    Cool if you are happy then I don't need to help

    The VAC bars on a 16x2 display were a PITA as the car is always in vac when driving normally!

    Here is a video of the VAC bars in action on a 16x2 display, albeit the DIM display but it's still 16x2.


  22. #36
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Awesome bud Is that using arduino?

    If you want to post some calculations/code I can do some different variations of the display.
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  23. #37
    Senior Member
    This user has no status

    Join Date
    Jul 2008
    Posts
    846
    Thanks
    126
    Thanked 178 Times in 140 Posts
    Quote Originally Posted by bomb192uk View Post
    Awesome bud Is that using arduino?

    If you want to post some calculations/code I can do some different variations of the display.
    Not sure what you mean? Code for?

    Yeah it's using atmega and canbus controllers.

  24. #38
    Senior Member
    This user has no status

    Join Date
    Jul 2008
    Posts
    846
    Thanks
    126
    Thanked 178 Times in 140 Posts
    Also ditch that map sensor and use the prosport one. It's got a builtin voltage regulator and also, it is a barometric one so you don't need an external reference to offset the boost sensor readings.
    Last edited by Dream3r; Monday 24th June 2013 at 21:42.

  25. #39
    New Identity
    Back in an AWD....Oh the grip!
    Dangerous Dave's Avatar
    Join Date
    Dec 2006
    Location
    West Midlands
    Posts
    8,921
    Thanks
    2,491
    Thanked 2,582 Times in 2,051 Posts
    Quote Originally Posted by Dream3r View Post
    Also ditch that map sensor and use the prosport one. It's got a builtin voltage regulator and also, it is a barometric one so you don't need an external reference to offset the boost sensor readings.
    Yeah, I bought the wrong one, should have bought the MPX4250GP which is the gauge pressure version which references against the local atmosphere. How much does the prosport one cost?
    1996 Olive Green 850 AWD - Follow the Project - Forged rods, 19T, big blue injectors, 960 TB, 3.25" MAF, Ostrich, 608 binary, arduino data display, active exhaust control with Focus RS tips, 320mm front brake conversion.
    1996 Nautic Blue 850 AWD - Failed its MOT, now it's a donor for the green thing.
    2004 Sapphire Black S60 D5 - The new daily hack.

  26. #40
    Senior Member
    trying hard to look busy!
    jdavis's Avatar
    Join Date
    Dec 2008
    Location
    Doncaster, South Yorkshire
    Posts
    2,491
    Thanks
    1,050
    Thanked 579 Times in 486 Posts
    That looks great in the DIM. I want!
    It's a 5 Cylinder Orchestra!
    R.I.P. Kyebosh (Alan) you're memory lives on!


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.
     
ipv6 ready