Coder Social home page Coder Social logo

opengauge's Introduction

Introduction

The OBDuino is an in-car real-time display of various information, like speed, RPM, instant fuel consumption or average trip fuel consumption as well as others PIDs supported by the car.

Details

The name OBDuino comes from OBD which means On Board Diagnostics and from the development board which is an Arduino (or a clone). Technical info: It is based on an Atmel AVR ATMEGA168P chip that contains 16K of flash, 1K of RAM and 512bytes of EEPROM, an LCD display, 3 buttons, a few $ of electronics components.

The OBDuino connects to the car on its OBD-II plug which is, in general, under the dash. A lot of signals are on this plug as well as battery voltage and ground. Using a standard OBD-II to DB9F cable brings us what we need.

The interface to the car is made with either a Freescale MC33290 for ISO only, a Microchip 2515 for CAN only, or an ELM327 (a third-party pre-programmed PIC) that talks PWM/VPW/ISO/CAN but it is more expensive and can require more hardware work if you want to use all protocols.

OBDuino can display 4 informations at a time, and there is virtual screens to have access to others PIDs. By default there is 3 screens available so it makes 12 PIDs available quickly.

Main Hardware

The Arduino or a clone can be purchased assembled, in a kit, or you can even etch it yourself. Take the flavour you want for serial or USB depending on your PC/laptop configuration (you need the port to program the chip). All the clone should work the same, except the very small one that use 3.3V and 8MHz and even there, it should work too with some adaptation. It costs about $15-$33 depending of your choice.

To play with, you can start with a "big" board like an Arduino Diecimila or a Freeduino SB, and to integrate in the car you can use a Boarduino or an iDuino by after.

The LCD screen used is a 2 rows x 16 characters using a standard HD44780 or compatible chipset, they can be found on eBay for $4, and they exist in almost every colours as well as STN, FSTN and even OLED (although more expensive).

The 3 buttons are momentary push button switches, take the one you want. You also need a 220 ohms resistor and a PNP 2N3906 transistor or equivalent like an NTE159 to drive the LCD brightness, as it can take up to 200mA on some LCD and the pin used to drive brightness is limited to about 20mA. radio-shack has them, or online electronic parts seller like Digikey or Mouser.

With this you have the main hardware and now need the car interface.

Interfaces

The code can use multiple interface (although one at a time), you will need to make the interface specific for your car, see Interface. If your car is sold in north-america and is a 2008+ it uses CAN so you can built the interface using Microchip MCP2515 and MCP2551.

Interface connect to the Arduino on a few pins, depending on your choice, the LCD will be connected differently, see Diagram.

Menu Configuration

Role of the three buttons

realtime display menu display
LEFT rotate screen decrease, select NO
MIDDLE go into menu apply and go to next item
RIGHT rotate brightness increase, select YES
MIDDLE+RIGHT trip reset
MIDDLE+LEFT tank trip reset

Reset trip data (NO/YES)

When you press middle and right button, a screen appear: Select if you want to reset the data and press middle button to ack.

Reset tank data (NO/YES)

When you press middle and left button, a screen appear: Select if you want to reset the data and press middle button to ack.

Configuration menu (accessed by middle button)

LCD Contrast (0-100)

Set the LCD contrast from 0 to 100 in step 10

Use Metric units (NO/YES)

NO=rods and hogshead, YES=SI

Fuel/hour speed (0-255)

Speed from which the display go from L/100 or MPG, to L/h or GPH

Tank size (n.m)

Size of your tank in litres or gallon

Volume Efficiency (0-100%) (MAP only)

For vehicles with a MAP only we have to emulate the MAF. This percentage will needs adjustment after you have checked manually a few tank to approximate better the fuel consumption.

Engine Displacement (0.0-10.0) (MAP only)

For vehicles with a MAP only we have to emulate the MAF. This is the size of the engine, e.g. 2.0 for a 2Liter one.

Configure PIDs (NO/YES)

Choose if you want to configure the PIDs in the various screen.

Scr 'n' Corner 'm' (0x00-0xFF)

(if you have selected YES at the previous item) Select the PID you want to be displayed on screen 'n' in the corner 'm'. A good list of PIDs is on Wikipedia here Some specials PIDs you can access (either by decreasing below 0 or by going far up):

  • 0xF0 - no display, meaning this corner will be blank, can be useful if another PID result is more than 8 characters
  • 0xF1 - Instant fuel consumption
  • 0xF2 - Average fuel consumption of the tank (since last tank reset)
  • 0xF3 - Fuel used in the current tank
  • 0xF4 - Distance done on the current tank
  • 0xF5 - Remaining distance that can be done on the current tank
  • 0xF6 - Average fuel consumption of the trip (since last trip reset)
  • 0xF7 - Fuel used for the current trip
  • 0xF8 - Distance of the current trip
  • 0xF9 - Battery voltage
  • 0xFA - CAN status, for CAN protocol only, display TX and RX errors

opengauge's People

Contributors

deveon95 avatar magister54 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opengauge's Issues

Arduino 1.0.1 onward - will not compile OBDuino 32k

What steps will reproduce the problem?
1. Download 1.0.1 Arduino. 
2. Load code.
3. Click Compile.

What is the expected output? What do you see instead?
"Success" (Compiled image).
"Failure" (Compilation errors).

What version of the product are you using? On what operating system?
Arduino 1.0.1

Please provide any additional information below.
There's numerous compilation issues in the new Arduino 1.0.1 due to changes 
involving PROGMEM.
I've found and managed to get it to compile by modifying it to suit the changes 
required of PROGMEM - see thread here:
http://arduino.cc/forum/index.php/topic,140872.0.html

Unfortunately I've made many changes to the base OBDuino 32k image for my 
purposes (using MUT proprietary protocol).

Original issue reported on code.google.com by [email protected] on 8 Jan 2013 at 9:37

Compilation problems with obduino32k

Trying to compile the code for obduino32k, I'm getting a long list of errors.

The first error was :
"obduino32K:365: error: 'byte' does not name a type"
so I put in:
#include "WConstants.h"

But this only leads to further errors, the next one being:
"obduino32K:1016: error: expected constructor, destructor, or type conversion 
before '(' token"

It looks like it's not expecting to be compiled through the Arduino IDE -- any 
pointers?

- - -

SVN version, using Arduino 0022 with Arduino UNO

Original issue reported on code.google.com by [email protected] on 13 May 2011 at 2:39

Enabling ELM breaks code

What steps will reproduce the problem?
1. Uncomment #define ELM in order to enable ELM support

What is the expected output? What do you see instead?
Several required variables are not defined (because they are defined in an 
#ifndef ELM section) and therefore compilation fails.

What version of the product are you using? On what operating system?
SVN revision, Arduino 0022, Arduino Duemilanove

Original issue reported on code.google.com by [email protected] on 13 May 2011 at 3:27

Option for multiple buttons on A0 pin

Hey guys,

I've just got the following board in but it uses 5 buttons on 1 analog pin, is 
there any easy way to edit the script so it will work with these buttons?

http://dx.com/lcd-keypad-shield-for-arduino-duemilanove-lcd-1602-118059
The bored is a clone of 
http://www.robotshop.com/content/PDF/dfrobot-arduino-shields-manual.pdf


Original issue reported on code.google.com by [email protected] on 7 Apr 2012 at 2:34

elm_write is wrong

What steps will reproduce the problem?

void elm_write(char *str)
{
  while(*str!=NUL)
    Serial.print(*str++);
}

What is the expected output? What do you see instead?
"ATWS" expected. "ATWSTWSWSS" is produced. Serial.write sends one char. print 
sends the whole string.


What version of the product are you using? On what operating system?
I just verifed this is still in the code as of v 179 9/26/2010

Please provide any additional information below. Either eliminate the 'while' 
line or change the print to write.


Original issue reported on code.google.com by [email protected] on 26 Sep 2010 at 10:27

Add a timeout for the menu system.

What steps will reproduce the problem?
1. Enter Menu

What is the expected output? What do you see instead?
After inactivity of a minute or so the device should return to a home screen



Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:17

fix MIL polling

obduino.pde, line 1397:

for(i=0;i<nb/3;i++) // each received packet contain 3 codes

If nb is 1 or 2, nb/3 will be evaluated to 0 and the code will not read the error codes.

Quick fix is to change the line for:

for(i=0;i<(nb+2)/3;i++) // each received packet contain 3 codes

to receive the right number of error codes

The fix has been tested on a STM32 discovery board and an Toyota Echo 2005. You saved me the trouble of going to the garage, thanks!

SD Card Logging

What steps will reproduce the problem?
1. Feature not implemented yet.

What is the expected output? What do you see instead?
Add support for logging the data collected from the car for future analysis.

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:28

Screen prob with GDM1602a

What steps will reproduce the problem?
1. start up

What is the expected output? What do you see instead?
I can't see anything on the screen. Half the time I only get a few arrow
<-- (in 1 box not 3), the other half of the time I don't get anything at
all. The arrows only appear when I soft reset the Arduino with the buttons

What version of the product are you using? On what operating system?
Linux, Ubuntu 9.10 up-to-date
Arduino package 18
Obduino32K downloaded through svn today

Please provide any additional information below.
I'm using a GDM1602a screen, I normally use it with the LiquidCrystal. I
tested it to confirm that I've connected the screen correctly. Since I'm
not that experienced I was wondering if it's possible to adjust the source
to use LiquidCrystal? Or is there a reason I shouldn't do that? 

Original issue reported on code.google.com by [email protected] on 13 Feb 2010 at 9:43

Attachments:

Proper handling of init reply to detect ISO protocol

What steps will reproduce the problem?
1. Code not implemented yet.

What is the expected output? What do you see instead?
Based upon the response message of the ECU for the ISO slow init function,
the device should be able to determine what protocol the car uses.  

This response should be use to determine message header structure for
either ISO 9141 or ISO 14230.

Since the same code can be used for initializing both protocols, the device
can be compatible with more cars, without needing to recompile.

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:49

Device does not retrieve or clear engine trouble codes

What steps will reproduce the problem?
1. Device will only report if their are errors when Engine MIL is on.

What is the expected output?
Device should indicate the trouble code and give the ability to clear it.

Next Step:
Research on the proper messages to send to ECU to accomplish this.


Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:07

Add Fake PID to track max values

What steps will reproduce the problem?
1. Feature not implemented yet.

What is the expected output? What do you see instead?
Add a PID that cycles through max values for the car.
Such as:
Best Tank MPG or L/100km
Highest MPH
Longest Trip
Highest RPM
Other fun stats.


Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:31

Error Handling/CRC Checks

What steps will reproduce the problem?
1. Code not implemented

What is the expected output? What do you see instead?
Device should process the CRC byte in messages and re-request data if an
error is detected.


Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:37

Add Aero-Drag Calculation

What steps will reproduce the problem?
1. Feature not Implemented Yet

What is the expected output? What do you see instead?
A report of Aerodynamics for evaluating different body mods.

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:25

Add a "Dirty Flag" when device has been disconected from power.

What steps will reproduce the problem?
1. Code not implemented yet.

What is the expected output? What do you see instead?
If the device is disconnected from power a "dirty flag" should be added to
indicate that remaining distance to empty may be inaccurate, for example.

This could be done with a "*" next to the value, maybe?

Original issue reported on code.google.com by [email protected] on 30 Aug 2009 at 9:52

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.