Jump to content

digital afr


andybp

Recommended Posts

I was going to get fancy with this and get it to do all sorts of clever things but at the end of the day all I actually wanted was an AFR meter that looked pretty OEM and

since installing my link ecu my trip computer no longer works which I knew was going to happen so no big deal actually ideal for my AFR gauge

I pulled it apart to measure up to see what display I could use it comes apart easy 2 screws an 6 clips

 

IMG_20171015_195937.jpg.e78cd3a9023c5ff96a438f212b8f4037.jpg

 

the display I decided to use was this 1.3" oled i2c display cost about £4 from china

 

IMG_20171015_202024.jpg.d8e821da4a104872015201baca89cac7.jpg

 

combined with an arduino nano controller which has an onboard voltage regulator so will runn directly off 12 Volts

 

IMG_20171015_202113.jpg.3a9bcfa663d842ed01eec0df2914193d.jpg

 

this is it running the I2c interface on the display means it only needs four wires to connect to it

the program was really simple 

 

#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>

U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

void setup(void) {


  u8g2.begin();  
}
int val = 0; 
int afr = 0; 
uint8_t m = 100;

void loop(void) {
  char m_str[4];
  strcpy(m_str, u8x8_u8toa(m, 3));
  u8g2.firstPage();
  do {
    u8g2.setFont(u8g2_font_logisoso62_tn);
    u8g2.drawStr(67,35,".");
    u8g2.drawStr(0,63,m_str);
  } while ( u8g2.nextPage() );
  delay(10);
  val = analogRead(0);
  afr =val/10.23;
  m = afr+100; 
}

 

IMG_20171015_202322.jpg.7eb2e4227d2a45286b99851762614fcf.jpg

 

all I need to do now is get the soldering iron out connect it to a switched 12v supply and the 0-5v signal from my wideband controller and I can put my gauges back in.

I'll update this post with the final pictures obviously

:)

  • Like 2
Link to comment
Share on other sites

I'm happy the programme was simple for you, must just be me that looked at that and though - "his keyboard has had a funny 5"  :lol:

 

As always a great solution looks to be on the horizon :thumbs:

  • Like 1
Link to comment
Share on other sites

10 hours ago, Keyser said:

I'm happy the programme was simple for you, must just be me that looked at that and though - "his keyboard has had a funny 5"  :lol:

 

As always a great solution looks to be on the horizon :thumbs:

I wasn't going to put the program in but I thought someone might like to give it a try who hasn't any programming experiance cost me about £6 in parts so if you have an aftermarket ecu chances are the trip computer will no longer work and it will look pretty OEM

 

IMG_20171016_172011.jpg.e7a592cf6b498819ec1d85f2d0ac65fb.jpg

 

:)

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...