Giter VIP home page Giter VIP logo

obd_gauge's Introduction

OBD_Gauge

A simple Arduino-powered automotive gauge to display readings from various car sensors. The readings that are currently implemented are:

  • Air/Fuel Ratio (AFR)
  • Air Intake Temperature (°F)
  • Oil Temperature (°F)
  • Battery Voltage (V)
  • Coolant Temperature (°F)
  • Fuel Pressure (kPa)
  • Engine RPM (rpm)
  • Vehicle Speed (mph)
  • Engine Load (%)
  • Throttle Position (%)
  • MPG and Average MPG (mpg)

This project was developed for and tested on a 2013 Scion FR-S, other vehicles may have different sensor setups and ECU calculations for readings.

DEPENDENCIES

HARDWARE

This project uses an ESP8266 NodeMCU, a 2.42" 128*64 SPI OLED, and a Freematics OBD-II UART Adapter.

Pin RST -> Button 1 -> GND
Pin D1 (330Ohm pulldown resistor) -> Button 2 -> 3.3V
Pin D4 -> DC on OLED
Pin D5 -> SCL (SCK) on OLED
Pin D6 -> RES (MISO) on OLED
Pin D7 -> SDA (MOSI) on OLED
Pin D8 -> CS on OLED
3.3V & GND to VCC & GND on OLED
Pin TX -> RX on OBD-II UART Adapter
Pin RX -> TX on OBD-II UART Adapter
5V and GND is provided from OBD-II UART Adapter for Arduino and OLED

LIBRARY MODIFICATIONS

I found that the OBD2UART library with the ESP8266 board select Serial1 for UART communication - which, normally, would be fine BUT the SPI display uses the Serial1 pins and effectively makes the display go crazy. Therefore, Serial should be used for for UART communication - so I changed line 17 in OBD2UART.h to:

#define OBDUART Serial

I also didn't like the Adafruit splash screen on each reboot - so I removed it by deleting these lines (# 470 - 476) in Adafruit_SSD1306.cpp:

if (HEIGHT > 32) {
   drawBitmap((WIDTH - splash1_width) / 2, (HEIGHT - splash1_height) / 2,
            splash1_data, splash1_width, splash1_height, 1);
} else {
   drawBitmap((WIDTH - splash2_width) / 2, (HEIGHT - splash2_height) / 2,
            splash2_data, splash2_width, splash2_height, 1);
}

REFERENCES

  • A user named robot on the FT86CLUB forums inspired this project with his post and his code.

obd_gauge's People

Contributors

notchum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.