-
Featured User: kurt
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, ...
-
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 ...
Arduino CAN-BUS OBD Gas Gauge
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
- canbus.brd - Eagle Board file
- canbus.sch - Eagle schematic file
- MCP2515.rar - MCP2515 Arduino Library
- OBDIICanbus.rar - OBDII CAN-BUS library
- obduino32K_with_buttons.ino - OBDII Can Bus main code
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 | 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 | 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 | LCD | Standard LCD 16x2 + extras - white on blue Has header pins and potentiometer | Source | ||
3 | switch | Tactile & Jog Switches TACT SWITCH 12X12MM | Source | ||
3 | cap | Switch Hardware 12X12 RND BLK CAP - This one is black but other colors are available. | Source | ||
2 | Pin Header | Break-away 0.1" 36-pin strip male header | Source | ||
1 | Crystal | Crystal 20 MHZ | Source | ||
1 | enclosure | Build your own or buy an enclosure. | |||
2 | Pin Header | Headers & Wire Housings R/A PCB HDR 4P TIN FRICTION LOCK | Source | ||
2 | Female Pin Header | Headers & Wire Housings HSG 4P WITH LKG RAMP | Source | ||
8 | Crimp Terminal | .100" CRIMP TERMINALS | Source | ||
1 | cable (3 ft) | 4 core 22 awg stranded cable. Taken from an old broken keyboard. | |||
1 | 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. |
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.
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
Revisions
1 - Initial project release
blog comments powered by Disqus
Back