Shop OBEX P1 Docs P2 Docs Learn Events
Propeller-based vehicle OBD data reader and logger — Parallax Forums

Propeller-based vehicle OBD data reader and logger

HughHugh Posts: 362
edited 2010-01-19 19:43 in Robotics
This is a brief overview of an OBD reader I have put together using a Propeller: the prop uses RS232 to communicate with an ELM327 OBD to RS232 converter. The user can scroll through a variety of data that is supported by my car and acceleration data from a 3 axis Sparkfun accelerometer.

Four parameters can be recorder to an SD card (one parameter every second or so) or accelerometer data many times a second.

015.jpg

Acceleration and 'cornering' bargraph

016.jpg

Coolant temperature

017.jpg

Lambda Ratio

018.jpg

Engine Load

020.jpg

Airflow

021.jpg

Manifold pressure

022.jpg

RPM

023.jpg

Speed

024.jpg

Ignition Advance





More details to follow...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.

Post Edited (Hugh) : 11/17/2009 6:23:35 AM GMT
1024 x 282 - 25K
1024 x 268 - 27K
1024 x 272 - 26K
1024 x 274 - 27K
1024 x 269 - 26K
1024 x 277 - 28K
1024 x 268 - 26K
1024 x 273 - 25K
1024 x 273 - 27K
1024 x 271 - 27K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-16 20:33
    Please add a subject to your thread before you add anything else. Use the pencil icon in the upper right-hand corner of your first message.
  • P!-RoP!-Ro Posts: 1,189
    edited 2009-11-17 00:56
    Very nice, I could see making that...could you also make it figure out ways to speed up the vehicle for better racing? lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PG
  • HughHugh Posts: 362
    edited 2009-11-17 12:09
    Pi Guy said...
    Very nice, I could see making that...could you also make it figure out ways to speed up the vehicle for better racing? lol

    Yep, the genius who tunes the software in my car uses the logged data to assess the effects of changes before making new ones - we have·designated a·'British Standard Hill' for testing on my way home from work.

    The acceleration data is very useful for working-out what changes to tyres, suspension, driving-style, etc., have on cornering and braking - I can also see every bump in the road as a spike in the data!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • HughHugh Posts: 362
    edited 2009-11-17 18:37
    Chris Savage (Parallax) said...
    Hugh, do you have a schematic or code to post? There really isn't enough information for anyone to be able to build any part of this currently.

    I hope to have some soon - I just need to get more familiar with Eagle Schematic 5.6.0...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • Alex41Alex41 Posts: 112
    edited 2009-11-21 23:09
    I'm interested in this too.
    I work on mileage enhancement for vehicles with an on board electrolyzer for combustion enhancement. (better mileage)

    I'd be especially interested if the prop could be programmed to do certain things based upon data received from the OBD Port. I don't see why not.

    Alex

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed, then skydiving is not for you.
  • HughHugh Posts: 362
    edited 2009-11-24 20:41
    Please find 'as is' code attached.

    It's not pretty, but I'm still learning...

    (Today's mystery: I have had to comment out everything to do with the accelerometer since even starting the 'ADC' object stops the SD card mounting. It worked yesterday!)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • HughHugh Posts: 362
    edited 2010-01-02 20:08
    OK. I am nearly there with the schematic, but have been more occupied with "interesting" things - namely adding a Parallax GPS module and adding the position to the logged data. The attached is the engine RPM on the way back from the shops....

    I have to own up to some post-processing to produce the KML file from simple Lat/Long data, but it has a few people salivating over the possibilities for tuning their cars for track days, etc.,. By recording (and then post-processing) 3-axis accelerometer data I've already helped someone improve their track times by tweaking their braking technique. I love the Propeller!



    smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
    1428 x 953 - 255K
    gps3.jpg 255.5K
  • HughHugh Posts: 362
    edited 2010-01-03 21:11
    This is a GE plot of the lateral (cornering) acceleration in a slightly different format and without any smoothing...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
    915 x 609 - 157K
    gps5.jpg 156.7K
  • Gunstar1Gunstar1 Posts: 18
    edited 2010-01-17 22:50
    Thanks for the work Hugh.

    I now have an ELM322 and am currently getting it bread boarded.· I have been working on a Nitrous Oxide (NOS)·controller and was looking for a way to trigger it within a settable·RPM window and at Wide Open Throttle.· From your screen captures it showed me that this was the solution I was looking for.

    For those that want more info on exactly what this does and what is needed to get it up and running...
    The chips are from Elm Electronics http://www.elmelectronics.com/obdic.html· (Hugh used their 327 which works with most cars, I only needed a GM compatible chip so I got the 322)
    The chips themselves need an oscillator crystal (different crystal depending on chip) as well as common transistors, resistors and capacitors (example circuits are in the datasheets, also look around their website for extra infomation).·
    To make things easier, an OBD2 cable is needed as well (http://www.obd2cables.com/products/obd-cables/obd-ii-cables/).

    The Elm chip talks to the·microcontroller via serial connection sending and receiving·mostly hex.· Depending on what you ask for you can read current data as well as read and clear·trouble codes.·

    An example in the 322·datasheet to get·current data (mode 1) for the engine coolant temperature (PID 5) you transmit the equivalent of·hex values·"01 05" and a carriage return "0D".· The response you receive would be something like "41 05 7B".· The first 2 hex values are basically repeating what you asked of it (41 is the response back to an 01... 05 is 05).· The last hex·"7B" is the temp in C·plus 40 degrees (for sub zero measurements).· So 7B is 7 x 16 + 11 = 123, then the offset for subzero... 123 - 40 = 83.· So your current Engine Coolant Temp is 83 C.

    Post Edited (Gunstar1) : 1/17/2010 11:07:02 PM GMT
  • mikedivmikediv Posts: 825
    edited 2010-01-18 00:29
    Hey I am not trying to be a dick or anything but the completed project section has really been degrading Every time I come here to see a new Finished Project they rarely are .. No Knock to you Hugh so please don't take offense but the completed projects should be just that
    Project Schematic, Code, Docs, whatever it takes to actually build the completed project. I thought "maybe I am wrong" The purpose of this section was so the rest of us could actually build and get working the project the person was sharing with us??
    Maybe I am wrong and again Hugh please don't take offense but when I see a really good project and I think yours is and come here to see how to build it I am often disappointed Just my 2 cents but I think Parallax should insist on only posting finished projects here that can the rest of us can really build from the specs. Or why bother ?????
  • HughHugh Posts: 362
    edited 2010-01-18 08:22
    Mike,

    I agree and I hold up my hand as being guilt by omission.

    Having completed some schematics I thought it good engineering practise to validate them, the best method being to make another project using the schematic. Finding someone to take the schematics and produce a few PCBs has been less easy (and more expensive) than I thought.

    I will post the most recent code and a schematic this evening - the latter will have to be on an 'as is' / 'sold as seen' / 'don't blame me' ·basis though....!

    Hugh

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • HughHugh Posts: 362
    edited 2010-01-19 19:43
    The schematic (Eagle and *.png image) is DRAFT.
    Latest code attached. I know its not the most efficient code ever written! smilewinkgrin.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
Sign In or Register to comment.