• Featured User: kurt

    Ohh_avatar

    Open-source hardware project hosting is my passion. I spend most of my free time building neat gadgets or planning what I'll build next. I love building things, and I want to make Open Hardware Hub a place that inspires others to build, ...

    Learn More

  • Updates 2013 February 18

    It's been a while, hasn't it? Well, that's ok because we've got a lot of updates to talk about. Most of these have been effective on the site fora couple weeks now. A few may or may not be active when this article gets posted, but they'll certainly be applied in the ...

    Find Out More

Arduino CAN-BUS OBD Gas Gauge


Download this project


author

By: winneymj

My inspiration for developing this gas gauge was after purchasing a new car (Scion Xa) and wondering what MPG I was getting. After much research on ODBII protocols (Scions support CAN-BUS), and looking into open source software that already existed (OBDuino32K) I delved into my first Arduino project.
This project has taken me over a year to put together from building my own CAN-BUS shield, learning to design a circuit board, soldering SMD parts and then building my own enclosure so I could mount it in my car.

Download project description w/o images
Download project description w/ images

Files

Download all project files

Bill of Materials

Qty Part # Description Schematic ID Source
1 MCP2551 High-speed CAN Transceiver
1 MCP2515 Stand-Alone CAN Controller with SPI Interface
1 De9bddf7a48e75dae6428f71cffdcee28f0bf244 Arduino Pro Mini 328 It's blue! It's thin (0.8mm)! It's the Arduino Pro Mini! SparkFun's minimal design approach to Arduino. This is a 5V Arduino running the 16MHz bootloader (select 'Arduino Duemilanove w/ 328' within the Arduino software). Source
1 18325f590f3ee2530d6399ca5cb192e036874d3e OBDII Connector - OBD2 OBDII EOBD J1962 Connector Adaptor - Right Angle Source
2 0.1uF Capacitor 0.1uF Capacitor Source
2 22pF Capacitor 22pF Capacitor Source
2 1/4W 5% 10K Resistor 1/4W 5% 10K Resistor - Generic from Radio Shack
1 1/4W 5% 220 Resistor 1/4W 5% 220 Resistor - Generic from Radio Shack
1 2N3906 Transistor - Generic from Radio Shack
1 1ff9c241caf43e8ea2faa9b4a8008e39fde516a2 LCD Standard LCD 16x2 + extras - white on blue Has header pins and potentiometer Source
3 9c9e956af719bebb0bfc011e04c95ac740afc567 switch Tactile & Jog Switches TACT SWITCH 12X12MM Source
3 9634481494f3200e505b0ae372f607bfb22ff6c2 cap Switch Hardware 12X12 RND BLK CAP - This one is black but other colors are available. Source
2 D3eebebfd12b32787852ff8f0bad6cb21b6d8c56 Pin Header Break-away 0.1" 36-pin strip male header Source
1 Ea769c35d6785537a3cc9e8254d625607030ec5e Crystal Crystal 20 MHZ Source
1 9eaeda6eb19f9e8e3bb7b7be72e2e7fd197e2483 enclosure Build your own or buy an enclosure.
2 1f1efbb7a1c2062e421380cd39546cdfd3b008bf Pin Header Headers & Wire Housings R/A PCB HDR 4P TIN FRICTION LOCK Source
2 97422a08a1f21b8972e0dd3d29d02081e552347e Female Pin Header Headers & Wire Housings HSG 4P WITH LKG RAMP Source
8 1d80b37b131ed4a9dcedc2a75da0d78d01e5619f Crimp Terminal .100" CRIMP TERMINALS Source
1 cable (3 ft) 4 core 22 awg stranded cable. Taken from an old broken keyboard.
1 Ad2b0183f2d096e96acaf0dd57c3be6c29c7e008 FTDI Basic breakout FTDI Basic Breakout - 5V Source
1 Circuit Board Circuit Board - Custom Circuit Board, sized to match the LCD circuit board size. See attached Eagle files for details.
loading total from bomfire.com...

Download BOM w/o images
Download BOM w/ images

Steps

6. Fit into enclosure

The LCD and attached circuit board was such a tight fit that I did not need a much in the way of glue, but I did take advantage of a hot glue gun to hold cables tightly and the protoboard in place that held the 3 buttons.

Dcim_114canon_img_1277_jpg

7. Download libraries

Download the attached software.
The MCP2515.rar and OBDIICanbus.rar code must be extracted to the Arduino/library file path.
The obduino32K_with_buttons.ino can be place anywhere and then opened via the Arduino GUI.

build and upload to the Arduino mini pro. You will need a FTDI Basic USB breakout board too allow you to connect to and program the Arduino.
The main software is based on the opengauge OBDuino32K that can be found at http://code.google.com/p/opengauge.

I made some modifications to the code to handle CAN-BUS protocol. I Reworked the button handling as I found it to be a little sensitive.

Download steps w/o images
Download steps w/ images

Show all steps

Revisions



1 - Initial project release




blog comments powered by Disqus
Back