ELM ELM327 Manual

ELM ELM327 Manual

Obd to rs232 interpreter

Advertisement

Description
Almost all of the automobiles produced today
are required, by law, to provide an interface for the
connection of diagnostic test equipment. The data
transfer on these interfaces follow several standards,
but none of them are directly usable by PCs or smart
devices. The ELM327 is designed to act as a bridge
between these On-Board Diagnostics (OBD) ports
and a standard RS232 interface.
In addition to being able to automatically detect
and interpret nine OBD protocols, the ELM327 also
provides support for high speed communications, a
low power sleep mode, and the J1939 truck and bus
standard. It is also completely customizable, should
you wish to alter it to more closely suit your needs.
The following pages discuss all of the ELM327's
features in detail, how to use it and configure it, as
well as providing some background information on
the protocols that are supported. There are also
schematic diagrams and tips to help you to interface
to microprocessors, construct a basic scan tool, and
to reduce power consumption.
Applications
• Diagnostic trouble code readers
• Automotive scan tools
• Teaching aids
Block Diagram
Baud Rate
LFmode
RS232Rx
18
RS232Tx
17
PwrCtrl / Busy
16
IgnMon / RTS
15
ELM327DSH
Memory
6
XT1
5
7
RS232
Interface
Power
Control
25
status LEDs
Elm Electronics – Circuits for the Hobbyist
www.elmelectronics.com
OBD to RS232 Interpreter
Features
• Power Control with standby mode
• RS232 baud rates to 500 kbps
• Automatically searches for protocols
• Fully configurable with AT commands
• Low power CMOS design
Vmeasure
J1850 Volts
J1850 Bus+
Baud Rate
J1850 Bus-
4.00 MHz
MCLR
XT2
9
10
1
Command
and
Protocol
Interpreter
ISO 15765-4
SAE J1939
23
26
27
28
Connection Diagram
PDIP and SOIC
(top view)
MCLR
OBD Tx LED
OBD Rx LED
RS232 Tx LED
RS232 Rx LED
Memory
CAN Rx
CAN Tx
LFmode
ISO L
V
ISO K
SS
XT1
V
XT2
V
VPW In
RS232 Rx
ISO In
RS232 Tx
PWM In
PwrCtrl / Busy
IgnMon / RTS
Vmeasure
2
A/D
Converter
ISO 9141-2
ISO 14230-4
24
21
22
12
OBD interfaces
ELM327
DD
SS
SAE J1850
PWM & VPW
3
4
14
13
11
1 of 76

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ELM327 and is the answer not in the manual?

Questions and answers

Summary of Contents for ELM ELM327

  • Page 1 • Automatically searches for protocols but none of them are directly usable by PCs or smart • Fully configurable with AT commands devices. The ELM327 is designed to act as a bridge between these On-Board Diagnostics (OBD) ports • Low power CMOS design and a standard RS232 interface.
  • Page 2: Table Of Contents

    Power Control................62 Design Examples Microprocessor Interfaces............64 Example Applications..............65 Modifications for Low Power Standby Operation....... 70 Misc. Error Messages and Alerts............72 Outline Diagrams............... 74 Copyright and Disclaimer............74 Index..................75 Elm Electronics – Circuits for the Hobbyist 2 of 76 ELM327DSH www.elmelectronics.com...
  • Page 3: Pin Descriptions

    Care must be taken to prevent the voltage from going outside of the supply XT1 (pin 9) and XT2 (pin 10) levels of the ELM327, or damage may occur. If it is not used, this pin should be tied to either V or V A 4.000 MHz oscillator crystal is connected between...
  • Page 4 RS232Tx (pin 17) high level, and a time of 1 or 5 seconds (as set by PP 0E bit 1) passes, the ELM327 will perform a This is the RS232 data transmit output. The signal ‘Warm Start’ and return to normal operation. A low to...
  • Page 5: Unused Pins

    Unused Pins When people only want to implement a portion of what the ELM327 is capable of, they often ask what to do with the unused pins. The rule is that unused outputs may be left open-circuited with nothing connected to them, but unused inputs must be terminated.
  • Page 6: Electrical Characteristics

    Conditions Supply voltage, V rate of rise 0.05 V/ms see note 2 normal ELM327 device only - does not Average current, I include any load currents low power 0.15 Input logic levels Pins 5, 6, 7, and 24 only high...
  • Page 7: Using The Elm327

    Using the ELM327 is not as daunting as it first We begin by discussing just how to ‘talk’ to the IC seems. Many users will never need to issue an ‘AT’...
  • Page 8 Microchip Technology has reported that some ICs which use the same EUSART as in the ELM327 may, under very specific (and rare) conditions, insert an extra byte (always of value 00) into the transmitted data. If you are using a terminal program to view the data, you should select the ‘hide control characters’...
  • Page 9: At Commands

    ‘AT’ command, and will be executed upon receipt of a terminating carriage return character. If the command is just a setting change, the ELM327 will reply with the characters ‘OK’, to say that it was successfully completed. AT Command Summary...
  • Page 10 Set Wakeup interval to hh x 20 msec MP hhhhhh Monitor for PGN hhhhhh WM [1 - 6 bytes] set the Wakeup Message MP hhhhhh n “ “ and get n messages Elm Electronics – Circuits for the Hobbyist ELM327DSH 10 of 76 www.elmelectronics.com...
  • Page 11: At Command Descriptions

    ‘dumped’ automatically be updated whenever the header bytes (ie printed) – when you do, the ELM327 sends a length are changed. byte (representing the length of the message in the...
  • Page 12 Sending the CEA hh command causes the the total data length and print it on one line, then show ELM327 to insert the hh value as the first data byte of each line of data with the segment number followed by all CAN messages that you send.
  • Page 13 CAN system at any one time. In order once on, can be turned off at any time by sending AT to limit what the ELM327 views, there needs to be a CEA, with no address. Note that the CEA setting has system of filtering out the relevant ones from all the no effect when J1939 formatting is on.
  • Page 14 12.2V while you measure 11.99 volts, then send the CRA command, simply send AT CRA or AT AR. AT CV 1199 and the ELM327 will recalibrate itself for that voltage (it will actually read 12.0V due to digit CRA hhhhhhhh [set the CAN Rx Addr to hhhhhhhh] roundoff).
  • Page 15 When displayed, the to the ELM327 were received correctly. The default is single DLC digit will appear between the ID (header) E1 (or echo on).
  • Page 16 ‘ELM327 v1.4b’). Software can use this to determine If you send AT IFR S, the ELM327 will use the exactly which integrated circuit it is talking to, without value defined as the Source Address (usually F1, but it having to reset the IC.
  • Page 17 (PGN 00FEEE) with the data format set to JS, you do so (protocols 3 or 4). The full eight bit value is used must send the bytes to the ELM327 as EE FE 00 (this exactly as provided – no changes are made to it (ie no is also known as little-endian byte ordering).
  • Page 18 (pin 16) and will enter the low power (standby) can be supported by the ELM327). If you wish to see mode. The IC can be brought back to normal operation what the value of these bytes were, simply send the through a character received at the RS232 input or a AT KW command.
  • Page 19 To stop the monitoring, simply send any single only command that is used to look for responses to a character to the ELM327, then wait for it to respond particular PGN request. with a prompt character (‘>’), or a low level output on Note that this MP command provides no means to the Busy pin.
  • Page 20 AL command. monitoring, as with the MA command. Beginning with v1.2, the ELM327 does not require Note that if this command is used with CAN a change to AL to allow longer message lengths for...
  • Page 21 2C and 2D Programmable This command enables Programmable Parameter Parameters, and are lost if the ELM327 is reset. If you number hh. Once enabled, any value assigned using want to make your settings persist over power cycles,...
  • Page 22 (with the 10KΩ connected from pin 2 to depending on what you set it to, you may end up Vss), and that the ELM327 supply is a nominal 5V. accepting (ie. acknowledging with an IFR) a message This will allow for the measurement of input voltages that was actually meant for another module.
  • Page 23 In other words, providing a length value is a valid command, and is quite useful for working in the first header byte tells the ELM327 that you wish with 11 bit CAN systems. It actually results in the to use a traditional 3 byte header, where the length is header bytes being stored internally as 00 07 DF.
  • Page 24 Issuing this command will turn off the AR the next time the ELM327 fails to connect to the saved mode, and force the IC to only accept responses protocol, it will again search all protocols for another addressed to hh.
  • Page 25 Issuing AT SW 00 will not change a prior setting for the time between After sending a request, the ELM327 waits a wakeup messages, if the protocol is re-initialized. preset time for a response before it can declare that there was ‘NO DATA’...
  • Page 26 A device identifier string that was recorded with ELM327 will then send them as required, at the rate the @3 command is displayed with the @2 command. determined by the AT SW setting. Note that you do not All 12 characters and a terminating carriage return will have to add a checksum byte to the data –...
  • Page 27: Reading The Battery Voltage

    Reading the Battery Voltage Before learning the OBD Commands, we will show the CV value, as the ELM327 knows that it should be an example of how to use an AT Command. We will between the second and the third digits.
  • Page 28: Obd Commands

    ELM327 OBD Commands If the bytes that you send to the ELM327 do not ELM327, and is not sent to the vehicle. begin with the letters ‘A’ and ‘T’, they are assumed to After sending the command, the ELM327 listens be OBD commands for the vehicle.
  • Page 29: Talking To The Vehicle

    If the engine is running, the response might be: prompt character. Now, you may choose a protocol that the ELM327 should connect with, but it is usually 41 0C 1A F8 easier to simply select protocol ‘0’ which tells the IC to...
  • Page 30 Hopefully this has shown how typical requests are only one response. This may save a considerable made using the ELM327. If you are looking for more amount of time, as the default time for the AT ST timer information on modes and PIDs, it is available from is 200 msec.
  • Page 31: Interpreting Trouble Codes

    ELM327 Interpreting Trouble Codes Likely the most common use that the ELM327 will 6 bytes in the response have to be read in pairs to be put to is in obtaining the current Diagnostic Trouble show the trouble codes (the above would be Codes (or DTCs).
  • Page 32: Resetting Trouble Codes

    Clearing of all of this data is not unique to the respond to a mode 04 command. ELM327 – it occurs whenever any scan tool is used to That is all there is to clearing trouble codes. Once reset the codes. The biggest problem with losing this...
  • Page 33: Bus Initiation

    LED – you will see the periodic ‘blips’ created not provide a checksum byte, as it will be automatically when the ELM327 sends one. If you are curious as to added for you. the actual contents of the messages, you can then You can change these as often as you want, the perform a Buffer Dump to see the bytes.
  • Page 34: Selecting Protocols

    AUTO, SAE J1850 VPW protocol to try first. In these cases, it is best to simply let the ELM327 decide what to use. This is done by Now, the ELM327 will try protocol 2, but will then telling it to use protocol 0 (with either the SP or the TP automatically begin searching for another protocol commands).
  • Page 35: Obd Message Formats

    AT SP 0 again. attempting to connect to an ECU, do not tell the ELM327 to use protocol 0. Instead, tell it to either use OBD Message Formats To this point we have only discussed the contents or the vehicle serial number.
  • Page 36 ‘checksum’ at the end. The the ELM327 will always do this for you. The header J1850, ISO 9141-2, and ISO 14230-4 protocols all use bytes are adjustable however, should you wish to...
  • Page 37: Setting The Headers

    >AT SH E4 10 F1 have enough information to specify the three header bytes (A8 48 and F1). To tell the ELM327 to use these new header bytes, all you need is the Set Header From this point on, all messages that the ELM327 command: sends will use these three bytes for the header.
  • Page 38 What you place in the Pages 48 and 49 provide more details of the J1939 rest of the byte will be ignored by the ELM327 unless message structure. you set it to 0. If it is 0, it is assumed that you are...
  • Page 39 Hopefully this has helped to get you started. As we often tell those that write for help – if you are planning to do some serious experimenting with OBD, you should buy the relevant standards. Elm Electronics – Circuits for the Hobbyist ELM327DSH 39 of 76 www.elmelectronics.com...
  • Page 40: Monitoring The Bus

    MR command then, only the right- tell the ELM327 to begin monitoring. If the bus is quiet, most 3 bits of your MR address are considered and the ELM327 will begin searching for an active protocol, the other 5 bits are ignored.
  • Page 41: Can Messages And Filtering

    - simply send the command with the address that manner. Recall that they are stored internally in the you want to see, and the ELM327 does all the work for right-most 11 bits of the locations used for 29 bit CAN, you.
  • Page 42: Multiline Responses

    AT MA to see cause standard OBD requests to be ignored, and you what the results are. The ELM327 knows that you are may begin seeing ‘NO DATA’ replies. If this happens, trying to filter, and combines the effects of both and you are unsure of why, you may want to reset commands (it will do that for MR and MT as well).
  • Page 43 It seems that two ECUs are responding and the information is getting mixed up. Which ECU do the responses belong to? The only way to know is to Elm Electronics – Circuits for the Hobbyist ELM327DSH 43 of 76...
  • Page 44: Can Message Formats

    When a First Frame byte is always the first of the data bytes, and tells how message is sent as part of a reply, the ELM327 must many data bytes are to follow. If the CAN Auto...
  • Page 45: Restoring Order

    ‘Programmable Parameters’ (pages 54 and 55) for using one protocol, but the saved (default) protocol is more details. a different one. In this case, the ELM327 will close the current session and then change the protocol to the default one, exactly as instructed.
  • Page 46: Altering Flow Control Messages

    Flow Control message, and as of v1.1, we have provided a means to do this. In order to change how the ELM327 For most people, there will be little need to responds when it needs to send a Flow Control manipulate these ‘Flow Control’...
  • Page 47: Using Can Extended Addresses

    The final setup statement that you will need is to 7B0 04 02 10 81 00 00 00 00 tell the ELM327 to send to CAN Extended Address 04: 7C0 F1 02 50 81 00 00 00 00 7B0 04 02 21 A2 00 00 00 00 >AT CEA 04...
  • Page 48: Sae J1939 Messages

    (the SPNs) are defined in the J1939-71 PDU1 Format frame that contains an address, or a document, and manufacturers also have the ability to PDU2 Format frame that does not? The secret lies in Elm Electronics – Circuits for the Hobbyist ELM327DSH 48 of 76 www.elmelectronics.com...
  • Page 49 J1939-81. OBD Service Tools should use either F9 or build more into each system, the amount of FA as their address (the ELM327 uses F9). If you wish information required continues to grow, however, so to change this, you can use the AT TA (tester address) the 500 kbps version of J1939 will be a welcome command, or simply define it with the header.
  • Page 50: Using J1939

    Note that this setting will not be maintained if device on the bus (certainly not the ELM327, as it is by the IC is reset, so if you want a more permanent default a completely silent monitor).
  • Page 51 One new feature of the ELM327 v1.4b is the ability The MP command is very useful for getting to tell the IC how many messages to retrieve when information in a J1939 system, but not all information monitoring for PGNs.
  • Page 52 (if they are written as hex digits), messages to address 00, repeat the request: and the ELM327 will make it work for you. If you do not >00FEEE want the ELM327 to alter the byte order, the feature 6 0E8FF 00 01 FF FF FF FF EE FE 00 can be disabled (by sending an AT JS command).
  • Page 53: The Fms Standard

    This has been a brief description of how to use The first line shows the total number of bytes in the the ELM327 in a typical J1939 environment. If you can message, and the other lines show the segment monitor for information, make global requests as well number, then a colon, and the data bytes following.
  • Page 54: Programmable Parameters

    Programmable Parameters for this version of the Another example shows how you might change ELM327. As an example of how to use them, consider the CAN filler byte. Some systems use ‘AA’ as the PP 01 (shown on page 55) which sets the default state value to put into unused CAN bytes, while the ELM327 for the AT H command.
  • Page 55: Programmable Parameter Summary

    (which appears in numerous places available beginning with version 1.2 of the IC, and can - pins 8 or 19 of the ELM327, pin 5 of the RS232 not be used with any previous versions. connector, one end of most capacitors, or at the OBD...
  • Page 56 IgnMon (pin 15) returns to a high level, before normal operation resumes b0: reserved for future - leave set at 0 J1850 voltage settling time 00 to FF (53 msec) setting = value x 4.096 msec Elm Electronics – Circuits for the Hobbyist ELM327DSH 56 of 76 www.elmelectronics.com...
  • Page 57 1: perform b2: reserved for future - leave set to 0 b1: reserved for future - leave set to 0 b0: reserved for future - leave set to 0 Elm Electronics – Circuits for the Hobbyist ELM327DSH 57 of 76 www.elmelectronics.com...
  • Page 58 (50 Kbps) Notes: 1. The ELM327 does not accept decimal digits for the Programmable Parameters - all values are hexadecimal. 2. Several Programmable Parameters describe options in terms of bits. For all of them, b7 is the msb, and b0 is the lsb.
  • Page 59: Using Higher Rs232 Baud Rates

    38.4 kbps.) As an example, perhaps Products (http://www.maxim-ic.com/). These are all you would like to have the ELM327 use a baud rate of excellent devices that can be used for speeds of up to 57.6 kbps, rather than the factory setting of 38.4 kbps.
  • Page 60 PC sufficient time to change its baud If the Rx is good, rate. When the time is up, the ELM327 then sends the Program sends a ID string (currently ‘ELM327 v1.4b’) to the PC at the...
  • Page 61: Setting Timeouts - At St And At At Commands

    Instead of sending 01 00 for the above request, If a typical vehicle query response time were about the ELM327 will now also accept 01 00 2. This tells the 50 msec, and the timeout were set to 200 msec, the...
  • Page 62: Power Control

    (‘debounce’) to be sure that the low level is a At the end of the delay, all of the ELM327 outputs legitimate ‘key off’ and not just some noise. After it is...
  • Page 63 IgnMon input will cause the some filtering for ignition noise. Typically a circuit like ELM327 to return to full power operation, and perform this works well (note that the Schmitt input on pin 15 a Warm Start reset.
  • Page 64: Microprocessor Interfaces

    ELM327 will wait (indefinitely) for your command. connections are straightforward - transmit connects to If you do not use the RTS input on the ELM327, it receive, and receive connects to transmit, as shown must be connected to a high logic level, as shown below.
  • Page 65: Example Applications

    L line, simply leave pin 22 unused. Figure 8. The J1962 Vehicle Connector The ELM327 controls both of the ISO outputs through NPN transistors Q6 and Q7 as shown. These The male J1962 connector required to mate with a transistors have 510Ω...
  • Page 66 We often receive requests for parts lists to ended one for use by the ELM327. In operation, Q4 is accompany our Example Applications circuits. Since actually used as the difference amplifier. The Q4-D3...
  • Page 67 22KΩ 4.7KΩ Q1 Figure 9. An OBD to RS232 Interpreter R9 10KΩ J1850 Bus + R36* 22KΩ 10KΩ J1850 Bus - 4.7KΩ 100KΩ 4.7KΩ ELM327 pin 14 10KΩ Elm Electronics – Circuits for the Hobbyist ELM327DSH 67 of 76 www.elmelectronics.com...
  • Page 68 AT SP 2 the very first time that the circuit is been reduced to a single 8V regulator as well, since powered. From that point on, the ELM327 will remain there will be no need to switch to 5V. Note that pin 3...
  • Page 69 26 25 0.1µF 470Ω Interface (J1962) 4.00MHz +12V 78L08 27pF 27pF 10KΩ 4.7KΩ 22KΩ 4.7KΩ 10KΩ J1850 Bus + Figure 11. An OBD (J1850 VPW) to USB Interpreter Elm Electronics – Circuits for the Hobbyist ELM327DSH 69 of 76 www.elmelectronics.com...
  • Page 70: Modifications For Low Power Standby Operation

    Note that the circuit base current = 31.9 mA shown needs the ELM327 to provide a high level at pin Without making any wiring changes, you can 3 for a 5V output, and a low for 8V, so an inversion is reduce this current by sending the Low Power needed.
  • Page 71 4.7KΩ 22KΩ Figure 12. 4.7KΩ Q1 Modifications to reduce power R9 10KΩ J1850 Bus + R36* 22KΩ 10KΩ J1850 Bus - 4.7KΩ 100KΩ 4.7KΩ ELM327 pin 14 10KΩ Elm Electronics – Circuits for the Hobbyist ELM327DSH 71 of 76 www.elmelectronics.com...
  • Page 72: Misc. Error Messages And Alerts

    – if it was a noise burst, it may be received to a wiring problem that is giving a continuously active correctly the second time. input. If this is an initial trial with your new ELM327 Elm Electronics – Circuits for the Hobbyist ELM327DSH 72 of 76 www.elmelectronics.com...
  • Page 73 ELM327 Error Messages and Alerts (continued) ERRxx voltage returns to normal, the ELM327 performs a full There are a number of internal errors that might be reset, and then prints LV RESET. Note that this type of reported as ERR with a two digit code following. These...
  • Page 74: Outline Diagrams

    Elm Electronics will not be responsible for any patent infringements arising from the use of these products or information, and does not authorize or warrant the use of any Elm Electronics product in life support devices and/or systems.
  • Page 75: Index

    Number of responses, 51 Resetting, 32 Using, 50-53 Commands, AT Descriptions,11-26 Summary, 9-10 Commands, OBD, 28 Communicating with the the ELM327, 7-8 KeepAlive (Wakeup) Messages, 33 Description and Features, 1 Low Power Operation, Description, 62-63 Modifications, 70-71 Electrical Characteristics, 6...
  • Page 76 Quick Guide for Reading Trouble Codes, 32 Wakeup Messages, 33 Reading the Battery Voltage, 27 Reading Trouble Codes, Quick Guide for, 32 Resetting, Prog Parameters, 55 Trouble Codes, 32 Elm Electronics – Circuits for the Hobbyist ELM327DSH 76 of 76 www.elmelectronics.com...

This manual is also suitable for:

Elm327dsh

Table of Contents

Save PDF