Arduino Forum

Development => Other Hardware Development => Topic started by: stanleyhuang on Mar 04, 2012, 08:17 pm

Title: My home-brew Arduino OBD-II connection kit
Post by: stanleyhuang on Mar 04, 2012, 08:17 pm
After many researches and attempts (http://www.arduinodev.com/arduino-talk-with-car-through-obd-ii/) to connect an Arduino with my car through the OBD-II connector and having some successful works of car dashboard gadget, I've finally made a kit which enables those who want to playing with Arduino and their cars to jump start quicky.

I am maintaining an arduino library for the adapteras an open-source project (http://github.com/stanleyhuangyc/ArduinoOBD). It provides Arduino developers an easy-to-use APIs to connect to and retrieve realtime data from a vehicle, which include:


The adapter can be easily used with Arduino or other MCU boards, providing 5V power supply (up to 500mhA current, with reverse protection), so a wire getting power from somewhere else is not needed. This helps to make the gadget you made looks tidy. The only interface to the car of the adapter is the OBD-II connector.

(http://www.arduinodev.com/wp-content/uploads/2012/03/P1040905.jpg)

(http://www.arduinodev.com/wp-content/uploads/2012/03/obdkit1.jpg)

By having access to these data, the Arduino can compute, store or show the realtime vehicle status in any unique way.
Here is a fancy dashboard gadget I made for my car (with video).
(http://www.arduinodev.com/wp-content/uploads/2012/02/arduino_rgb_matrix_rpm_indicator.jpg) (http://www.arduinodev.com/arduino-obd-data-indicator-rgb-matrix/)

If you are interested in my Arduino OBD-II connection kit, please see here for more details (http://www.arduinodev.com/hardware/obd-kit/).
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: robtillaart on Mar 04, 2012, 11:04 pm

Familiar with this site - http://www.obd-codes.com/- ?

still on my wish list :)
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: dbuond01 on Mar 30, 2012, 09:25 pm
Does the kit come with an Arduino board?  I have an Arduino Uno and it doesn't look like the harness will work with it. I guess I would just have to take the 4 wires out of the harness and wire them to the appropriate pins?  What board is best to use with your adapter?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: justjed on Apr 13, 2012, 03:00 am
Looks like it's plugged into an Iteaduino (http://iteadstudio.com/store/index.php?main_page=product_info&cPath=50_51&products_id=467). A Uno would be fine. Yes, you'd need to connect to VCC, GND, TX, and RX on your Uno, which aren't located in a 4-dip row as you see in the Iteaduino.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: toyoya-ltd on Apr 14, 2012, 06:13 am
i am going to buy one for my wife's car. it will hopefuly prove how bad she drives.  :smiley-eek:
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: utsavdrolia on Apr 20, 2012, 01:45 am
Hi Stanley!
I would really like to buy your adapter but had a few questions about it.
1. It supports all protocols? And has the ELM327 autosearch mode (for non-CAN compliant cars)?
2. I want to add to your library by adding more AT commands - So does the adapter support all AT commands?
3. Can you let the power line be at 12v instead of 5v? I'd like the 12v to power other components on my arduino shields and let arduino's power converter deal with the 12v.

Thanks.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: jilani63 on Aug 23, 2012, 01:38 am
@Stanleyhuang
I'm writing a similar application. I want to display the gear number in which the car is in but i'm having problem to get the pid or any relevant pids.
Can you provide me any formulas and any material or links which will help me. how where are you getting the gear number ?

cheers.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: yakirg on Sep 06, 2012, 02:36 pm
Stanly's website is down ...
I have bought the adapter, and I just got it ... and I can't find any documentation on how to connect it!!

Anyone used his adapter?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: Chagrin on Sep 06, 2012, 11:51 pm
I did not see any problems with his web site.

The library itself is hosted on Sourceforge: http://sourceforge.net/projects/obdcon/
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: skyjumper on Sep 08, 2012, 02:57 am
Where did you find the enclosure?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: cmendes0101 on Oct 13, 2012, 06:31 pm
I think this is awesome.

I've always used an OBDII reader on my car but always hassle with having to drag my laptop around or using up my phone, which also means I have to plan ahead and didn't have a seamless way with out sitting in the car getting everything started before driving. Should record everything even on quick trips around town without me doing anything or watching a screen.

I hope to give this a shot!
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: DaveyRavey on Nov 02, 2012, 12:59 pm
Hi, I'm looking to do the opposite, I have an aftermarket ECU which I can get data out of from via a serial cable but I'd like to make this available to the ODB port for the ELM to read so a standard ODB code reader/ODB software will work, is this likely to be possible with the experience you've gained from doing your project?

Thanks
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: RudiAhlers on Jun 19, 2013, 08:35 am
This looks like a great project and could be very useful.

As matter of interest, where do you find the different codes / commands for the car, if you for instance want to "check all the systems", or adjust the CO2, or something like that?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: Peakdesign on Jul 28, 2013, 10:11 am
First of all, download and read the ELM327 docs at the Elm Electronics site.

http://elmelectronics.com/obdic.html#ELM327

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:

http://en.wikipedia.org/wiki/Table_of_OBD-II_Codes

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.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: foster182 on Aug 02, 2013, 02:11 am
Hi, i'm looking at getting into a project like this.
I own a japanese import car which is not obd2 compliant.
It uses some jobd protocol.

I'm just curious will this connection help me to read information coming from the ecu.
Also how with a obtain information coming from the ecu, would i just use the tx and rx pins?

Thanks.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: krossk2 on Sep 07, 2013, 06:07 pm
Hello,
congratulations for a job well done!
Also I have created a dashboard OBDII but I used another microcontroller, the NXP LPC1768.
I'd like to have your opinion, HERE (http://www.youtube.com/watch?v=dlPym-JC7wo) you can find the video demo! :)
Hello and congratulations again!
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: rcwang128 on Feb 11, 2014, 02:15 am
I have ordered one. How long it takes for shipping to U.S.?  Thanks.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: robtillaart on Feb 11, 2014, 10:09 pm
@Dario Gogliandolo
looks pretty good!
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: System_Error_117 on Apr 18, 2014, 12:55 am
Really nice product, I think....

I've purchased two of these things thinking the first might be defective as I couldn't get any sort of clear readings out of it even when I connected the UART lines to an oscilloscope.

I'm an electronics engineer and I don't see any issues on my end, I can't even get the simple LED program to work for engine RPM over 2000.

I've tried it on a 1999 and a 2000 Firebird with no results. But cars OBD ports work fine with all other scanners.

Really is a shame, would love to figure it out finally
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: polymorph on Jul 01, 2014, 09:50 pm
Any news on this?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: penjoseph on Nov 15, 2014, 08:39 am
I was able to communicate with my car using Stanley Huang's (Freematics) OBD adapter - 2008 Hyundai Accent\Verna CRDi (turbo diesel).

The OBD CAN bus data is displayed on 20x4 LCD using Arduino Mega 2560 &  OBD UART version adapter.

(http://img.photobucket.com/albums/v663/eapen/Verna/ArduinoOBD_zps47e09cf7.jpg)

Left side
Engine rpm
Fuel Rail Pressure in kpsi
Boost in psi
Voltage at ECU

Right side
Intake Air temperature in celsius
Coolant water temperature in celsius
Load in %
Commanded EGR in %
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: penjoseph on Nov 15, 2014, 09:17 am
Coded a RPM based dual stage LED shift light. The LED shift light is programmed to 'blink' between 2800-3800rpm, more than 3800rpm it remains 'on'. Its a direct injected turbo diesel hence the rev range is limited unlike gasoline.

Dual Stage RPM Shift Light (https://www.youtube.com/watch?v=AAC37NuUEsc)
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: Randcook on Nov 25, 2014, 07:32 pm
The solution is to put your seat belt on
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: Dave9n3 on May 26, 2016, 11:39 am
Sorry to bump an old thread but am i able to use this alongside another OBD2 connection, i require another connection in order for me to log variables on my ecu for home tuning.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: catasbox on Mar 03, 2017, 07:39 pm
Hello.
I need necessary hardware to control the Light Module on an 2006 BMW, especially to activate the brake lights.
Can this be done by any of Telematics Kits?
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: YellowGTM on May 05, 2017, 06:21 pm
I don't recommend buying this product as the support is abysmal at best.

I've tried emailing support directly as well as using their dedicated forum and haven't received a reply
in over a month.

If you go to the forum you will see hundreds of questions without replies from the developer.

I had to figure out the problem myself which was a misdirected reference to the folder than contains
the .h and .cpp files.

This was also communicated to other members on the Freematics forum and the designer, without any
acknowledgement.
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: fernandomoriera on Feb 08, 2018, 07:10 pm
Please let me know where it would be possible to download the Arduino source code for obd2 diagnostics and let me know please if it contains also the fault codes
Mail you answer please to my mailbox:  chaikovsky401@gmail.com
Thank you very much for your collaboration
   
 JEOVANNY VITERI 
 
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: tao13 on Aug 24, 2018, 02:17 pm
Hi
Thios adapter works on K-line or on canH /canL?
Many thanks
Title: Re: My home-brew Arduino OBD-II connection kit
Post by: liupe on Jan 04, 2019, 03:25 am
Hi Stanley,

Are you a chinese in ShangHai ?  i am a shanghai guys . i looked car No. 沪XXXXXX in your upload picture :-) .

so far i am trying to find a solution that use OBD reader to get vehicle information then base on the

information to do something.  so i need a output like when the engine rpm is over 3000 then trigger the

output to do something ..    is that easy to come true ?