How to send commands to ELM327 OBD interface

14296 views
Skip to first unread message

powerampfreak

unread,
Nov 24, 2012, 5:28:47 PM11/24/12
to
Hello!
I'm looking for information how to send commands to the popular ELM327 OBD interface. I want to design a stand alone device that check long term fuel trim values along with some other parameters.
Is there a good guide somewhere how those commands are set up?
Thanks in advance

miso

unread,
Nov 24, 2012, 6:33:15 PM11/24/12
to
It looks like the device you buy is just a packaged version of the chip
and a bit of glue electronics. Is the actual datasheet useful?

> http://www.elmelectronics.com/obdic.html


Jeff Liebermann

unread,
Nov 24, 2012, 6:48:52 PM11/24/12
to
<http://en.wikipedia.org/wiki/ELM327>

List of commands:
<http://www.elmelectronics.com/ELM327/AT_Commands.pdf>

The real product page:
<http://www.elmelectronics.com/obdic.html#ELM327>
(Note that v1.5 chips are all unlicensed clones).

Make your own ODB2 board:
<http://www.elmelectronics.com/obdusers.html>

Ideas and code:
<http://wiki.tinyclr.com/index.php?title=Vehicle_OBD_-_ELM327>
etc.... Google for "elm327 source code".

--
Jeff Liebermann je...@cruzio.com
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558

powerampfreak

unread,
Nov 25, 2012, 3:44:42 AM11/25/12
to
Great guys!
ELM327 is a pre-programmed PIC processor. It communicates by RS-232, so probably I can set up another PIC through the USART and communicate with the ELM.
And possibly use a 2x16 char LCD display to show the parameters. Brill !!!



Jeff Liebermann

unread,
Nov 25, 2012, 12:02:42 PM11/25/12
to
This forum and article might be of some help.
"free OBD2 software with MPG calc"
<http://ecomodder.com/forum/showthread.php/free-obd2-software-mpg-calc-7490.html>

Incidentally, I bought a Mini ELM327 BlueTooth on eBay to play with.
The plan was to leave it plugged into my vehicle OBD2 connector and
have it communicate performance numbers via BT to my Droid X phone
while driving. The plan was ruined when I found myself with a dead
car battery the next morning. It seems that the Mini ELM327 does not
turn off when the ignition key is off, and continues to draw power.
Actually, it drew enough power to get hot enough to partially melt the
blue plastic case. A quick survey of other such devices indicates
similar problems. I had to crack the case to install an on-off
switch.

miso

unread,
Nov 25, 2012, 12:35:32 PM11/25/12
to
I wonder if it was defective? Maybe it latched up.

Otherwise, can you just hyperterminal to it and play around?


Jeff Liebermann

unread,
Nov 25, 2012, 1:13:36 PM11/25/12
to
On Sun, 25 Nov 2012 09:35:32 -0800, miso <mi...@sushi.com> wrote:

>I wonder if it was defective? Maybe it latched up.

Nope. It still works. The eBay vendor was nice enough to sell me
another one for essentially the cost of shipping as he was interested
in the problem. The replacement did the same thing. Mine is similar
to this one:
<http://www.ebay.com/itm/160902620405>
There are several other form factors including one that's even
smaller. I've tried two larger flavors, and they also don't turn off
with the ignition key.

>Otherwise, can you just hyperterminal to it and play around?

Probably you could. BlueGoof nicely emulates a serial COM port so any
terminal emulator should work. However, it might be easier to just
buy an RS-232 ELM327 device. I hope you enjoy typing AT commands.
There are apps to make it easier:
<https://play.google.com/store/apps/details?id=Scantech.Terminal&hl=en>

Michael A. Terrell

unread,
Nov 25, 2012, 1:40:18 PM11/25/12
to

Jeff Liebermann wrote:
>
> On Sun, 25 Nov 2012 09:35:32 -0800, miso <mi...@sushi.com> wrote:
>
> >I wonder if it was defective? Maybe it latched up.
>
> Nope. It still works. The eBay vendor was nice enough to sell me
> another one for essentially the cost of shipping as he was interested
> in the problem. The replacement did the same thing. Mine is similar
> to this one:
> <http://www.ebay.com/itm/160902620405>
> There are several other form factors including one that's even
> smaller. I've tried two larger flavors, and they also don't turn off
> with the ignition key.
>
> >Otherwise, can you just hyperterminal to it and play around?
>
> Probably you could. BlueGoof nicely emulates a serial COM port so any
> terminal emulator should work. However, it might be easier to just
> buy an RS-232 ELM327 device. I hope you enjoy typing AT commands.
> There are apps to make it easier:
> <https://play.google.com/store/apps/details?id=Scantech.Terminal&hl=en>


Or the USB version to use with a laptop:

http://www.ebay.com/itm/150954172607

miso

unread,
Nov 26, 2012, 12:42:15 AM11/26/12
to
Actually, I need the Nissan/Infinti proprietary connector. Maybe a
converter exists, but the damn SEO brings up catalytic converters when I
do a search.

Jeff Liebermann

unread,
Nov 26, 2012, 12:46:55 AM11/26/12
to
On Sun, 25 Nov 2012 21:42:15 -0800, miso <mi...@sushi.com> wrote:

>Actually, I need the Nissan/Infinti proprietary connector. Maybe a
>converter exists, but the damn SEO brings up catalytic converters when I
>do a search.

<http://www.amazon.com/OBD2-Connector-Diagnostic-Adapter-NISSAN/dp/B0053NS0CY>
<http://www.ebay.com/itm/220853326527>
Found in a few seconds with Google searching for "OBD2 Nissan
adapter".

miso

unread,
Nov 26, 2012, 3:18:50 AM11/26/12
to
Well close. The Infiniti socket is 16 pins and so is standard ODBII. But
this is a 14 to 16 pin adapter.

And I thought only Apple uses GD proprietary connectors.

The shop manual calls the ODBII scanner the GST (general scanner tool),
just to make the manual harder to read I suppose.

BTW, if you never did it, for like $20 or so, there are websites that
let you download the official manuals. I suppose there are pirated
manuals as well, but $20 seems fair considering what cars cost. You get
a one day subscription to the service. it is really intended for repair
shops.

josephkk

unread,
Nov 27, 2012, 3:41:42 AM11/27/12
to
On Sun, 25 Nov 2012 09:02:42 -0800, Jeff Liebermann <je...@cruzio.com>
wrote:

>On Sun, 25 Nov 2012 00:44:42 -0800 (PST), powerampfreak
><powera...@hotmail.com> wrote:
>
>>Great guys!
>>ELM327 is a pre-programmed PIC processor. It communicates by RS-232, so probably I can set up another PIC through the USART and communicate with the ELM.
>>And possibly use a 2x16 char LCD display to show the parameters. Brill !!!
>
>This forum and article might be of some help.
>"free OBD2 software with MPG calc"
><http://ecomodder.com/forum/showthread.php/free-obd2-software-mpg-calc-7490.html>
>
>Incidentally, I bought a Mini ELM327 BlueTooth on eBay to play with.
>The plan was to leave it plugged into my vehicle OBD2 connector and
>have it communicate performance numbers via BT to my Droid X phone
>while driving. The plan was ruined when I found myself with a dead
>car battery the next morning. It seems that the Mini ELM327 does not
>turn off when the ignition key is off, and continues to draw power.
>Actually, it drew enough power to get hot enough to partially melt the
>blue plastic case. A quick survey of other such devices indicates
>similar problems. I had to crack the case to install an on-off
>switch.

There is something weird about this, a PIC eating enough power to flatten
a 12 V, 50 Ah or more battery in a few hours??? Hot enough to melt the
case??? Where in hell is all that energy going?

???-)

Jim Thompson

unread,
Nov 27, 2012, 10:34:23 AM11/27/12
to
And someone with no knowledge that vehicles DO have "accessory" power
that goes off when the ignition switch is off :-)

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.

Michael A. Terrell

unread,
Nov 27, 2012, 10:39:20 AM11/27/12
to
On the OBDII diagnostic port?
Message has been deleted

josephkk

unread,
Nov 28, 2012, 4:14:09 AM11/28/12
to
On Mon, 26 Nov 2012 00:18:50 -0800, miso <mi...@sushi.com> wrote:

>Well close. The Infiniti socket is 16 pins and so is standard ODBII. But
>this is a 14 to 16 pin adapter.
>
>And I thought only Apple uses GD proprietary connectors.

Bwahahahahah. Large companies have been using proprietary connectors
since there were connectors, well over 100 years. How could you possibly
be that naive?

josephkk

unread,
Nov 28, 2012, 4:19:48 AM11/28/12
to
On Tue, 27 Nov 2012 08:34:23 -0700, Jim Thompson
<To-Email-Use-Th...@On-My-Web-Site.com> wrote:

>On Tue, 27 Nov 2012 00:41:42 -0800, josephkk
><joseph_...@sbcglobal.net> wrote:
>
>>On Sun, 25 Nov 2012 09:02:42 -0800, Jeff Liebermann <je...@cruzio.com>
>>wrote:
>>
>>>On Sun, 25 Nov 2012 00:44:42 -0800 (PST), powerampfreak
>>><powera...@hotmail.com> wrote:
>>>
>>>>Great guys!
>>>>ELM327 is a pre-programmed PIC processor. It communicates by RS-232, so probably I can set up another PIC through the USART and communicate with the ELM.
>>>>And possibly use a 2x16 char LCD display to show the parameters. Brill !!!
>>>
>>>This forum and article might be of some help.
>>>"free OBD2 software with MPG calc"
^^^^^


>>><http://ecomodder.com/forum/showthread.php/free-obd2-software-mpg-calc-7490.html>
>>>
>>>Incidentally, I bought a Mini ELM327 BlueTooth on eBay to play with.
>>>The plan was to leave it plugged into my vehicle OBD2 connector and
>>>have it communicate performance numbers via BT to my Droid X phone
>>>while driving. The plan was ruined when I found myself with a dead
>>>car battery the next morning. It seems that the Mini ELM327 does not
>>>turn off when the ignition key is off, and continues to draw power.
>>>Actually, it drew enough power to get hot enough to partially melt the
>>>blue plastic case. A quick survey of other such devices indicates
>>>similar problems. I had to crack the case to install an on-off
>>>switch.
>>
>>There is something weird about this, a PIC eating enough power to flatten
>>a 12 V, 50 Ah or more battery in a few hours??? Hot enough to melt the
>>case??? Where in hell is all that energy going?
>>
>>???-)
>
>And someone with no knowledge that vehicles DO have "accessory" power
>that goes off when the ignition switch is off :-)
>
> ...Jim Thompson

This is on the OBD2 connector, which does not depend on the ignition
switch position. Please pay attention properly.

?-)

Jim Thompson

unread,
Nov 28, 2012, 10:44:07 AM11/28/12
to
On Wed, 28 Nov 2012 01:19:48 -0800, josephkk
It doesn't? When I get smog-checked, they plug into the OBD2, then
turn the key!!!

linnix

unread,
Nov 28, 2012, 11:09:25 AM11/28/12
to
>
> >There is something weird about this, a PIC eating enough power to flatten
> >a 12 V, 50 Ah or more battery in a few hours??? Hot enough to melt the
> >case??? Where in hell is all that energy going?
>
> I have had one of these clone ELM bluetooth units for about a year 1.5
> version, no signs at all of overheating, gets slightly warm in use as
> you wd expect, I dont leave it plugged in doing nothing though....!
> Maybe OP has been unlucky in his units, but it seems to be a known
> problem, look on Amazon comments etc.
>

It's just bad designs/programmers. Poorly design products can kill any battery. Don't they know about low-power/idle/standby modes? Perhaps they do and will be ready to sell you an upgrade with a premium price.

tm

unread,
Nov 28, 2012, 12:21:27 PM11/28/12
to

"Jim Thompson" <To-Email-Use-Th...@On-My-Web-Site.com> wrote in
message news:88ccb85462kjpn3cr...@4ax.com...
The 12 volts on the ODB2 connector is directly to the battery. It is on all
the time.

linnix

unread,
Nov 28, 2012, 12:53:08 PM11/28/12
to
And they know nothing about activity timer? All smartphones are connected to the batteries all the time, but not on all the time.

lang...@fonz.dk

unread,
Nov 28, 2012, 4:21:41 PM11/28/12
to
On 28 Nov., 16:44, Jim Thompson <To-Email-Use-The-Envelope-I...@On-My-
Web-Site.com> wrote:
> On Wed, 28 Nov 2012 01:19:48 -0800, josephkk
>
>
>
>
>
>
>
>
>
> <joseph_barr...@sbcglobal.net> wrote:
> >On Tue, 27 Nov 2012 08:34:23 -0700, Jim Thompson
> ><To-Email-Use-The-Envelope-I...@On-My-Web-Site.com> wrote:
>
> >>On Tue, 27 Nov 2012 00:41:42 -0800, josephkk
> >><joseph_barr...@sbcglobal.net> wrote:
>
> >>>On Sun, 25 Nov 2012 09:02:42 -0800, Jeff Liebermann <je...@cruzio.com>
> >>>wrote:
>
> >>>>On Sun, 25 Nov 2012 00:44:42 -0800 (PST), powerampfreak
> >>>><powerampfr...@hotmail.com> wrote:
>
> >>>>>Great guys!
> >>>>>ELM327 is a pre-programmed PIC processor. It communicates by RS-232, so probably I can set up another PIC through the USART and communicate with the ELM.
> >>>>>And possibly use a 2x16 char LCD display to show the parameters. Brill !!!
>
> >>>>This forum and article might be of some help.
> >>>>"free OBD2 software with MPG calc"
> >         ^^^^^
>
> >>>><http://ecomodder.com/forum/showthread.php/free-obd2-software-mpg-calc...>
>
> >>>>Incidentally, I bought a Mini ELM327 BlueTooth on eBay to play with.
> >>>>The plan was to leave it plugged into my vehicle OBD2 connector and
> >>>>have it communicate performance numbers via BT to my Droid X phone
> >>>>while driving.  The plan was ruined when I found myself with a dead
> >>>>car battery the next morning.  It seems that the Mini ELM327 does not
> >>>>turn off when the ignition key is off, and continues to draw power.
> >>>>Actually, it drew enough power to get hot enough to partially melt the
> >>>>blue plastic case.  A quick survey of other such devices indicates
> >>>>similar problems.  I had to crack the case to install an on-off
> >>>>switch.
>
> >>>There is something weird about this, a PIC eating enough power to flatten
> >>>a 12 V, 50 Ah or more battery in a few hours???   Hot enough to melt the
> >>>case???  Where in hell is all that energy going?
>
> >>>???-)
>
> >>And someone with no knowledge that vehicles DO have "accessory" power
> >>that goes off when the ignition switch is off :-)
>
> >>                                        ...Jim Thompson
>
> >This is on the OBD2 connector, which does not depend on the ignition
> >switch position.  Please pay attention properly.
>
> >?-)
>
> It doesn't?  When I get smog-checked, they plug into the OBD2, then
> turn the key!!!
>

The ECU which they talk to isn't on unless you turn the key

OBD2 connector has KL30, the ECU wake-up/shut-down based on KL15



-Lasse

dilin...@gmail.com

unread,
Apr 21, 2018, 7:10:02 AM4/21/18
to
Hi Im really and hardly loooking for creating an android app that communicates with my elm327 clone. Its my final year project and im really confused of the commands.

Is there any tutorial or anyone please help me bros..I wanted the command set. I have read the datasheet of elm and it feels very confusing for me. Please help

Unknown

unread,
Apr 21, 2018, 12:24:33 PM4/21/18
to
Have you looked at these websites?

http://dthoughts.com/blog/2014/11/06/obd-scanner-using-elm327/
https://burakalakusen.wordpress.com/2011/07/27/to-get-obd2-data-via-elm327-c/
https://en.wikipedia.org/wiki/OBD-II_PIDs
https://archive.org/details/gov.law.sae.j1979.2002

Please let us know if you don't get any mileage out of them.

73,

--
Don Kuenz, KB7RPU

Genius is nothing but a greater aptitude for patience. - de Buffon

Mark Sargeant

unread,
Sep 16, 2021, 3:03:15 PMSep 16
to
Lasse,

Based on your expertise, with the EV coming into the market we have been having an issue waking the EVs to obtain readings. Have you seen or encountered this, and do you know of a solution?

Mark

Another idiot on google groups

unread,
Sep 16, 2021, 4:50:19 PMSep 16
to
After nine years, do you really think Lasse is still waiting around for
your question to their posting?

Reply all
Reply to author
Forward
0 new messages