Show Posts
Pages: [1]
1  Development / Other Hardware Development / Re: My home-brew Arduino OBD-II connection kit on: July 28, 2013, 03:11:47 am
First of all, download and read the ELM327 docs at the Elm Electronics site.

They made the Industry Standard decoder firmware for a PIC18 microcontroller that they called ELM327. It can talk to a car's ECU computer over most of the protocols in use, and convert them into a common ASCII form. OBD is the standard connector, with different car makes and models using different protocols over different pins on the connector. Software vendors then created allegedly specialized monitoring packages using the ELM327 for this or that car, at hefty prices. Companies in Asia then copied the ELM327 firmware and started selling clones using the PIC18 or other microcontrollers, presented through various interfaces: USB, Bluetooth, Serial, WiFi. These are available on e-bay at low prices. Some are better than others. I just got a working $15 unit with a USB plug that can be used with any computer that can virtualize a device USB connection as a COM port. There are many teaser PC programs available that allow you to read a handful of parameters (so you buy their full package), but a terminal program works too.

What Stanley is offering is an ELM327-compatible OBD-II interface, with a cable bearing TTL compatible serial data, so it can be directly connected to e.g. Arduino I/O pins. It's then a simple serial connection that any Arduino buff can use to query, store and display the desired car parameters, with Stanley providing some useful example code.

The place to start is understanding the base AT commands to control the ELM327, and then the deeper OBD "PID"s that can be used to request this or that specific parameter from the engine. OBD is mostly a "read-only" monitoring system, but not entirely. One of the clearer PID lists is on Wikipedia:

You can use a terminal program to get your bearings. For Instance typing the ATI command (followed by Carriage Return) will probably evoke a reply like "ELM327 v1.5", though ELM never made a version 1.5. Once the interface is mated with the OBD connector on the car, you can type ATRV and read the battery voltage. Yes, there is a simple command to clear the annoying Engine Warning Light and wipe ALL the associated logs and diagnostic data, in one fell swoop, so I won't tell you what that is.

@DaveyRavey's request is more difficult. The ELM327s convert some quite knarly protocols into clear ASCII. To mimic an ECU talking from the car side of the OBD connector entails fully understanding and then emulating one of these protocols, complete with its specific modulations scheme, handshakes and error handling. Many of these protocols use the old annoying (and ineffective) "security through NDA and obfuscation" technique to waste your time.
2  Community / Bar Sport / Re: I'm not a troll but.... on: November 01, 2012, 04:25:19 am
Gentlemen, gentlemen. If concurrency without interrupts or convoluted schedulers is desired, humbly suggest you look at the Propeller chip/boards (at It's 32 bit with 8 cores that run truly in parallel at 80 Mhz. You no longer have to program it in SPIN or assembly, as there's a new Win/Mac/linux C/C++ IDE (coded in C w/ Qt not slow Java). Break up problems into parallel tasks between the 8 cores. All Prop pins are general purpose. On a Prop if you need a UART, you load up UART code into a core, let 'er rip, read and write data via shared memeory. Need VGA out? Dedicate a core, add a few resistors. The chip is $7. There are also Arduino shield compatible Boards, like the ASC+ (with a lot of goodies) at $49. Nice.
Pages: [1]