ELM323 OBD (ISO) To RS232 Interpreter: Description Features
ELM323 OBD (ISO) To RS232 Interpreter: Description Features
ELM323 OBD (ISO) To RS232 Interpreter: Description Features
Description Features
Since the 1996 model year, North American • Low power CMOS design
automobiles have been required to provide an OBD
• Crystal controlled for accuracy
(On Board Diagnostics) data port for the connection
of test equipment. This port is used to obtain • ISO 9141-2 and ISO 14230-4 protocols
emissions-related diagnostics information, and in
• Configurable with AT commands
some cases can also be used to obtain real-time
vehicle operating parameters. • Standard ASCII character output
The ELM323 is a 14 pin integrated circuit that, • Four high current LED drive outputs
with only a few external components, is able to
convert between the OBD data format and the
standard RS232 serial data format. This allows
virtually any personal computer or PDA to
Connection Diagram
communicate with a vehicle using only a standard
PDIP and SOIC
serial port and a terminal program. If desired, (top view)
hobbyists can even create their own custom ‘scan
tool’ by adding an interface program.
Please note that while this integrated circuit has VDD 1 14 VSS
undergone significant changes recently, it is still
XT1 2 13 OBDK
considered to be an experimenter’s circuit. It does
support a great many of the ISO9141 and ISO14230 XT2 3 12 OBDL
(KWP2000) protocol vehicles, but not all of them,
LFmode 4 11 OBDIn
due to the many interpretations of these standards
that are to be found in use. RS232Rx 5 10 OBDTx
RS232Tx 6 9 OBDRx
Applications RSRx 7 8 RSTx
3.58 MHz
Timing and
LFmode 4 Control
13 OBDK
RSRx 7 10 OBDTx
RSTx 8 9 OBDRx
Pin Descriptions
VDD (pin 1) RS232Tx (pin 6)
This pin is the positive supply pin, and should always This is the RS232 transmit or data output pin. The
be the most positive point in the circuit. Internal signal level is compatible with most interface ICs,
circuitry connected to this pin is used to provide and there is sufficient current drive to allow
power on reset of the microprocessor, so an external interfacing using only a PNP transistor, if desired.
reset signal is not required. Refer to the Electrical
Characteristics section for further information. LED Drive Outputs (pins 7, 8, 9, and 10)
These four pins are driven to low levels when the
XT1 (pin 2) and XT2 (pin 3) ELM323 is transmitting or receiving RS232 or OBD
A 3.579545 MHz NTSC television colourburst crystal data. Otherwise, they are at a high level. Current
is connected between these two pins. Crystal capability is suitable for directly driving most LEDs
loading capacitors (typically 27pF) will also normally through current limiting resistors. If unused, these
be connected between each of these pins and the pins should be left open-circuited.
circuit common (Vss).
OBDIn (pin11)
LFmode (pin 4) The OBD data is input to this pin, with a high logic
This input is used to select the default linefeed mode level representing the active state of the OBD K line.
after a power-up or system reset. If it is at a high No Schmitt trigger input is provided, so the OBD
level, then by default messages sent by the ELM323 signal should be buffered to minimize transition
will be terminated with both a carriage return and a times for the internal CMOS circuitry.
linefeed character. If it is at a low level, lines will be
terminated by a carriage return only. This behavior OBDL (pin 12) and OBDK (pin 13)
can always be modified by issuing AT L0 or AT L1 These are the active high output signals which are
commands (see the section on AT Commands). used to drive the OBD bus, using external NPN
transistors. Data transfer normally occurs only by the
RS232Rx (pin5) K line, but the standards require that the L line be
A computer’s RS232 transmit signal can be directly implemented as well in order to properly initialize the
connected to this pin from the RS232 line as long as bus. See the Example Applications section for more
a current limiting resistor (typically about 47KΩ) is details.
installed in series. (Internal protection diodes will
pass the resistor current safely to the supply VSS (pin 14)
connections, protecting the ELM323.) Internal signal Circuit common is connected to this pin. This is the
inversion and Schmitt trigger waveshaping provide most negative point in the circuit.
the necessary signal conditioning.
Ordering Information
These integrated circuits are available in either the 300 mil plastic DIP format, or in the 150 mil SOIC surface mount
type of package. To order, add the appropriate suffix to the part number:
300 mil Plastic DIP...................................ELM323P 150 mil SOIC........................................ ELM323SM
Electrical Characteristics
All values are for operation at 25°C and a 5V supply, unless otherwise noted. For further information, refer to note 1 below.
Notes:
1. This integrated circuit is produced with a Microchip Technology Inc.’s PIC16C505 as the core embedded
microcontroller. For further device specifications, and possibly clarification of those given, please refer to the
appropriate Microchip documentation (available at http://www.microchip.com/).
2. This spec must be met in order to ensure that a correct power on reset occurs. It is quite easily achieved
using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as
may be obtained through direct connection to solar cells, or some charge pump circuits.
3. Device only. Does not include any load currents.
4. This specification represents the current flowing through the protection diodes when applying large voltages
to the RS232Rx input (pin 5) through a current limiting resistance. Currents quoted are the maximum that
should be allowed to flow continuously.
5. Nominal data transfer rate when the recommended 3.58 MHz crystal is used as the frequency reference.
Data is transferred to and from the ELM323 with 8 data bits, no parity, and 1 stop bit (8 N 1).
Overview
The following describes how to use the ELM323 to programmable features of this product as well.
obtain a great deal of information from your vehicle. To Using the ELM323 is not as daunting as it first
some, the following information will be overwhelming, seems. Many users will never need to issue an ‘AT’
and for others it will not be nearly enough. command, adjust timeouts or change the headers. For
We begin by discussing just how to talk to the IC most, all that is required is a PC or a PDA with a
using a PC, then go on to explain how to change terminal program (such as HyperTerminal or ZTerm),
options using ‘AT’ commands, and finally go on to and knowledge of one or two OBD commands, which
actually use the ELM323 to obtain trouble codes (and we provide in the following…
reset them). For the more advanced experimenters,
there are also sections on how to use some of the
AT Commands
Several parameters within the ELM323 can be command, so the user knows that it has been
adjusted in order to modify its behaviour. These do not executed.
normally have to be changed before attempting to talk Some of the following commands allow passing
to the vehicle, but occasionally the user may wish to numbers as arguments in order to set the internal
customize the settings; for example by turning the values. These will always be hexadecimal numbers
character echo off, adjusting a timeout value, or which must be provided in pairs. The hexadecimal
changing the header bytes. In order to do this, internal conversion chart in the OBD Commands section may
‘AT’ commands must be issued. prove useful if you wish to interpret the values. Also,
Those familiar with PC modems will immediately one should be aware that for the on/off types of
recognize AT commands as a standard way in which commands, the second character is a number (1 or 0),
modems are internally configured. The ELM323 uses the universal terms for on and off respectively.
essentially the same method, always watching the The following is a summary of all of the AT
data sent by the PC, looking for messages that begin commands that are recognized by the current version
with the character ‘A’ followed by the character ‘T’. If of the ELM323, listed alphabetically. Users of previous
found, the next characters will be interpreted as versions of this product (v1.x) should note that their
internal configuration or ‘AT’ commands, and will be ICs will not support all of the functions shown.
executed upon receipt of a terminating carriage return
character. The ELM323 will usually reply with the
characters ‘OK’ on the successful completion of a
AR [ Automatically set the Receive address ] received on the OBD connection. This command
Responses from the vehicle will be acknowledged shows the entire OBD buffer contents as a length byte
and displayed by the ELM323, if its internally stored followed by 11 data bytes. Since not all of the data
receive address matches the address that the bytes are likely to be relevant, be sure to check the
message is being sent to. With the Auto Receive mode value contained in the length byte before interpreting
in effect, the value used for the receive address will be the data. The format of the data returned by this
chosen based on the current header bytes, and will command will follow the data mode in effect at the time
automatically be updated whenever the header bytes (Packed Data or Formatted Data) so you may want to
are changed. adjust that before viewing the data.
The value that is used for the receive address is
determined based on several factors. If the IC is D [ set all to Defaults ]
connected to a KWP2000 (ISO14230) system, the
third byte of the header will always be used as the This command is used to set all of the options to
receive address. If the IC is connected to an ISO9141 their default or ‘factory’ settings, as listed in these
system, the receive address will depend on the pages. This lets you experiment with different settings,
contents of the first header byte. If the first byte shows but be able to quickly restore them all to the original
that the message uses physical addressing, the third settings using only one command.
byte of the header will be used for the address, To summarize the changes, E will be on, H will be
otherwise (for functional addressing) the second off, and L will be set according to the level at pin 4.
header byte, increased in value by 1, will be used. The Auto Receive mode (AR) will be selected, data will
Auto Receive is turned on by default. be transmitted in the standard formatted way (as if
chosen by FD), and both the ‘NO DATA’ timeout and
the period between bus idle (wakeup) messages will
BD [ OBD receive Buffer Dump ] be reset to their default values. As well, the header
There may be times when a bus initialization is not bytes will be set to the prescribed values for OBDII
successful, or perhaps the OBDRx LED flickers but operation, and the receive address will be adjusted
nothing is sent on the RS232 connection. In these accordingly. If the bus had been initiated, it will remain
cases, it may be an advantage to see just what was active.
AT Commands (continued)
E0 and E1 [ Echo off (0) or on(1) ] L0 and L1 [ Linefeeds off (0) or on(1) ]
These commands control whether or not Whether or not the ELM323 transmits a linefeed
characters received on the RS232 port are character after each carriage return character is
retransmitted (or echoed) back to the host computer. controlled by this option. If an ATL1 is issued, linefeed
To reduce traffic on the RS232 bus, users may wish to generation will be turned on, and for AT L0, it will be
turn echoing off by issuing ATE0. The default is E1 off. Users may wish to have this option on if using a
(echo on). terminal program, but off if using a custom interface
(as the extra characters transmitted will only serve to
slow the vehicle polling down). The default setting is
FD [ send Formatted Data ]
determined by the level at pin 4 when the IC is reset
This command requests that all of the vehicle’s (power-on or AT Z), or when the default values are
responses be returned as standard ASCII characters restored (AT D).
(which are readable with virtually all terminal
programs). Byte values are sent as a pair of ASCII
MA [ Monitor All messages ]
characters, each representing a hexadecimal digit,
with a space character sent between each pair as a Using this command places the ELM323 into a
separator. Every line will end with a carriage return bus monitoring mode, in which it displays all messages
character and (optionally) a linefeed character, as it sees them on the OBD bus. This continues
ensuring that each response appears on a new line. indefinitely until stopped by activity on the RS232
This is the default output mode. input. To stop the monitoring, one should send any
single character then wait for the ELM323 to respond
with a prompt character (‘>’). Waiting for the prompt is
FI [ perform a Fast bus Init ]
necessary as the response time is unpredictable,
Issuing this command forces the ELM323 to varying depending on what the IC was doing when
perform a fast (KWP / ISO14230) bus initialization interrupted. If, for instance, it was in the middle of
sequence, regardless of the present state of the bus. printing a line, it will first complete the line then return
Note that the bus does not need to be manually to the command state, then issue the prompt
initalized with this command, as it will be performed character. If the ELM323 was simply waiting for OBD
automatically by the ELM323 when required. (It will input, it would return immediately. The character which
first try a slow initialization, and if it is not successful, it stops the monitoring will always be discarded, and will
will then attempt a fast initialization sequence.) not affect subsequent commands.
This command has been provided as a
convenience, and should be used with caution. No
H0 and H1 [ Headers off (0) or on(1) ]
periodic ‘wakeup’ messages are sent by the ELM323
These commands control whether or not the while monitoring the bus in this mode, so if the bus
header information is shown in the responses. All OBD had been initialized before this command was invoked,
messages have an initial (header) string of three bytes the vehicle connection will likely ‘go to sleep’ and will
and a trailing check digit, which are normally not have to be re-initialized. The ELM323 will not be aware
displayed by the ELM323. To see this extra that the connection was lost, however, and will likely
information, users can turn the headers on by issuing have to be reset with an AT SW 00, or an AT Z
an ATH1. The default is H0 (headers off). command.
AT Commands (continued)
response bytes that were received from the vehicle. SI [ perform a Slow bus Init ]
There will be no added space characters, and no
Issuing this command forces the ELM323 to
trailing carriage returns or linefeed characters inserted
perform a slow (5 baud) bus initialization sequence,
between messages. This provides a very compact
regardless of the present state of the bus. Note that
format for data transfer.
the bus does not have to be manually initialized with
Note that the length byte only represents the total
this command. If it is not active when a command is
number of data bytes following, and does not include
issued to the vehicle, the ELM323 will automatically try
itself. Also, if there was a data (checksum) error, this
a slow initialization, and if that is not successful, will
length byte will have its most significant bit set, making
then attempt a fast initialization.
it appear that the length is greater than 128. If you
ignore the most significant bit (or subtract 128 from the
value), the other 7 bits will still provide a valid byte SR hh [ Set the Receive address to hh ]
count for the remainder of the message.
Depending on the application, users may wish to
When the vehicle does not provide a response to
manually set the address for which the ELM323 will
a query (a ‘NO DATA’ condition), the response has no
display responses. Issuing this command will turn off
data bytes, but still sends a length byte with value ‘0’.
the AR mode, and force the IC to only accept
responses from the vehicle that are addressed to hh,
SH xx yy zz [ Set the Header to xx yy zz ] ignoring all others.
This command allows the user to control the
values that are sent as the three initial (header) bytes ST hh [ Set Timeout to hh ]
in each message. The value of hex digits xx will be
After sending a request, the ELM323 waits a
used for the first or priority/type byte, yy will be used
preset time before declaring that there was no
for the second or target byte, and zz will be used for
response from the vehicle (the ‘NO DATA’ response).
the third or source byte. These values will remain in
Depending on the application (and priority of the
effect until set again, or until restored to the default
request), users may want to modify this timeout period
values with the AT D, or AT Z commands.
to allow more or less time. The ST command is used
For ISO9141 vehicles, the default header values
to do that.
are 68 6A F1, while for ISO14230 (KWP2000), they
The actual time allowed before a timeout occurs is
are Cn 33 F1, where n represents the number of data
(approximately) 4 ms x the byte value passed as the
bytes in the message. Note that when assigning
hexadecimal argument. Passing a value of FF thus
header bytes for ISO14230 systems, whatever value
results in a maximum time of about 1020 ms. Note that
you provide for ‘n’ will be ignored by the ELM323, and
a setting of 00 (zero) is not allowed, and will be
the appropriate value will automatically be calculated
replaced internally with the default setting value – hex
and inserted just before sending each message.
32 (decimal 50) resulting in a timeout value of
A feature has been added to this version of the IC
200 milliseconds.
to allow experimenting with the header bytes, while not
affecting the periodic ‘wakeup’ messages. That is, a
separate set of header bytes can be used for the SW hh [ Set Wakeup to hh ]
periodic wakeup messages and for those used by the
Once a data connection is made with a vehicle,
standard requests. This is accomplished by first
there needs to be data flow every few seconds, or the
assigning header bytes (or leaving them as the default
connection will ‘go to sleep’. The ELM323 will
ones) then initializing the OBD bus. Whatever header
automatically generate ‘wakeup’ messages in order to
bytes are being used when the bus is initialized will be
maintain this connection whenever the user is not
‘locked in’ at that point and used for all of the periodic
requesting any data. (The responses from these
messages until the IC is reset (or the AT SW 00 is
messages are always ignored, and not seen by the
used to turn them off). Issuing the AT SH command
user.)
after the bus has been initialized will only affect the
The time between these periodic ‘wakeup’
requests that follow, and will have no effect on any of
messages can be adjusted in 20 msec increments
the periodic wakeup messages.
using the AT SW hh command, where hh is any
AT Commands Summary
hexadecimal value from 00 to FF. The maximum
possible time delay of 5.10 seconds thus occurs when
a value of FF (or decimal 255) is used. The default
setting is 7D (or decimal 125) which provides a
nominal delay of 2.5 seconds between messages.
Note that the value 00 (zero) is treated as a very
special case, and must be used with caution. It is used
to stop all periodic messages, by telling the ELM323
internally that the bus is no longer active. This can be
convenient if the vehicle has timed out (perhaps when
using the AT MA command) and you wish to inform ELM323 AT Commands
the ELM323 of that without performing a full reset. general
Issuing AT SW 00 will not change the previous setting
D set all to Defaults
for the time between wakeup messages.
Attempting to communicate with the vehicle after I show the ID string
issuing AT SW 00 will result in the ELM323 perfoming Z reset all
a bus initialization sequence. <CR> repeat last command
bus control
Z [ reset all ] FI Fast Init
This command causes the chip to perform a SI Slow Init
complete reset as if power were cycled off and then on SW hh Set Wake (hh*20ms)
again. All settings are returned to their default values,
and the chip will be put in the idle state, waiting for responses
characters on the RS232 bus. E1/0 Echo on/off
H1/0 Headers on/off
L1/0 Linefeeds on/off
Figure 1 shows all of the current ELM323 AT FD use Formatted Data
commands in one convenient chart. In order to help PD use Packed Data
with the understanding of these, we have grouped the ST hh Set Timeout (hh*4ms)
commands into four functional areas, but this has no
bearing on how they need to be used – it is only for requests
clarity. You may find this chart to be useful when BD Buffer Dump
experimenting with the IC. MA Monitor All
SH xx yy zz Set Header
AR Auto Receive
SR hh Set Rx address
Bus Initiation
Both the ISO 9141-2 and ISO 14230-4 (KWP2000)
standards require that the vehicle’s OBD bus be
initialized before any communications can take place.
The ISO 9141 standard allows for only a slow (2 to 3
second) process, while ISO 14230 allows for both the
slow method, and a faster alternative. In either case, need to initialize
once the bus has been initiated, communications must the bus
take place at least once every five seconds, or the bus
will revert to a low-power ‘sleep’ mode.
The ELM323 takes care of this bus initiation and
the periodic sending of ‘keep-alive’ or ‘wakeup’
Try a slow init
messages for you – it is automatic and requires no
input from the user. The ELM323 will not perform the
bus initiation until the first message needs to be sent,
however, and it will do so by first attempting the slow
method, and if that fails then trying the fast. During the receive
automatic initiation process, the following message will a
be displayed: yes response
BUS INIT: ... ?
no
with the three dots appearing as the slow initiation
process is carried out. This will be followed by either KWP
no
the expression ‘OK’ to say it was successful, or else or Try a fast init
an error message to indicate that there was a problem. ISO
(The most common error encountered is in forgetting ?
to turn the vehicle’s key to ‘ON’ before attempting to
talk to the vehicle.)
Once initiated, the ELM323 does what is required yes receive
yes
to keep the bus alive, without any intervention from the a good
user. If you have installed monitoring LEDs, you will be response
able to see that automatic messages are being sent ?
every few seconds in order to create bus activity.
no
If the user does not wish to use the two step Lock/set the
automatic bus initiation process, they can specify that keep-alive headers
only the Slow Initiation, or only the Fast Initiation, be print ERROR
attempted, by issuing the commands AT SI or AT FI
respectively. Note that the three dots are only printed
during a slow initiation, so if AT FI is issued, they will print OK
not appear.
The chart at the right shows the automatic bus
initiation process in more detail:
Bus is alive so
resume activities
OBD Commands
If the bytes received on the RS232 bus do not would be sent to the ELM323 by way of the RS232
begin with the letters ‘A’ and ‘T’, they are assumed to port. The ELM323 would store the characters as they
be OBD commands for the vehicle. Each pair of ASCII are received, and when the third character (the
bytes will be tested to ensure that they are valid carriage return) was received, would begin to assess
hexadecimal digits, and will then be combined into the other two. It would see that they are both valid hex
single data bytes for transmitting to the vehicle. digits, and would convert them to a one byte value
OBD commands are actually sent to the vehicle (decimal value is 166). Three header bytes and a
embedded in a data packet. The standards require checksum byte would be added, and a total of five
that three header bytes and an error checksum byte bytes would be sent to the vehicle. Note that the
be included with every message, and the ELM323 carriage return character is only a signal to the
adds these extra bytes to your command bytes ELM323, and is not sent on to the vehicle.
automatically. The initial (default) values for these After sending the command, the ELM323 listens
header bytes are usually adequate for most requests, on the OBD bus for messages, looking for ones that
but if you wish to change them, there is a method to do are directed to it. If a message address matches,
so (see the Advanced Data Retrieval section). those received bytes will be sent on the RS232 port to
When receiving data from a vehicle, the extra the user, while messages received that do not have
header bytes are not normally displayed by the matching addresses will be ignored (but still available
ELM323. Occasionally vehicles will have more than for viewing with the AT BD command).
one module responding to a request, though, and it The ELM323 will continue to wait for messages
may be useful to see the extra header bytes in order to addressed to it until there are none found in the time
determine which ECU module responded. (The third that was set by the AT ST command. As long as
byte of the response is the address of the sender). To messages are received, the ELM323 will continue to
view these extra header bytes, simply issue an AT H1 reset this timer. Note that the IC will always respond
internal command, to turn the header printing on. with something, even if it is to say ‘NO DATA’,
Most OBD commands are only one or two bytes in (meaning that there were no messages at all
length, but some can be three or more bytes long. The addressed to it).
ELM323 is capable of sending as many as seven data
bytes (14 hexadecimal digits), the maximum number
allowed by the standards. Attempts to send either an Hexadecimal Decimal
odd number of hex digits, or too many digits will result Number Equivalent
in a syntax error – the entire command is then ignored 0 0
and a single question mark printed. 1 1
Hexadecimal digits are used for all of the data 2 2
exchange with the ELM323 because it is the data 3 3
format used in the relevant SAE standards. It is
4 4
consistent with mode request listings and is the most
5 5
frequently used format used to display results. With a
little practice, it should not be very difficult to deal in 6 6
hex numbers, but some people may want to use a 7 7
table such as Figure 3, or keep a calculator nearby. 8 8
All users will be required to manipulate the results in 9 9
some way, though – combining bytes and dividing by 4 A 10
to obtain rpm, dividing by 2 to obtain degrees of B 11
advance, etc., and may find a software front-end to be
C 12
more helpful.
D 13
As an example of sending a command to the
vehicle, assume that A6 (or decimal 166) is the E 14
command that is required to be sent. In this case, the F 15
user would type the letter A, then the number 6, then
would press the return key. These three characters Figure 3. Hex to Decimal Conversion
Error Messages
When hardware or data problems are contain enough bytes to be a valid message (which
encountered, the ELM323 will respond with one of the can occur if the signal is interrupted during a data
following short messages. Here is a brief description of transmission).
each:
<DATA ERROR
BUS BUSY The error checksum result was not as expected,
The ELM323 tried to send the mode command or indicating a data error in the line pointed to (the
initialize the bus, but detected too much activity to ELM323 still shows you what it received). There could
insert a message. This could be because the bus was have been a noise burst which interfered, or a circuit
in fact busy, but is often due to wiring problems that problem. Try re-sending the command.
result in a continuously active input at OBDIn.
NO DATA
FB ERROR The IC waited for the period of time that was set
This message is sent when a ‘feedback’ error is by AT ST, and detected no response from the vehicle.
detected. When the K Line is first energized, a check It may be that the vehicle had no data to offer, that the
is made to ensure that the signal is seen at OBDIn. If it mode requested was not supported, or that the vehicle
does not appear there, this message is displayed. was attending to higher priority issues and could not
Check your wiring before proceeding. respond to the request in the allotted time. Try
adjusting the AT ST time to be sure that you have
DATA ERROR allowed sufficient time to obtain a response.
There was a response from the vehicle, but the
information was incorrect or could not be recovered. In ?
the case of a bus initialization, this error signifies that This is the standard response for a misunderstood
the format bytes received were not as required, so command received on the RS232 bus. Usually it is due
initiation could not continue. If the error occurs during to a typing mistake.
normal operation, it means that the response did not
>ATZ
to be sure the IC is reset and responding
>0100
to be sure the car is responding
>0101
to see how many codes are present
(look at the second digit of the 3rd byte)
>03
to see the codes
Ignore the first byte and read the others in
pairs. The table on page 10 helps.
>04
to reset the codes
Example Applications
The SAE J1962 standard dictates that all OBD connections would be 2(RxD), 5(SG) and 3(TxD).
compliant vehicles must provide a standard connector RS232 data from the computer is directly
near the driver’s seat, the shape and pinout of which is connected to pin 5 of the IC through only a 47KΩ
shown in Figure 4 below. The circuitry described here current limiting resistor. This resistor allows for voltage
can be used to connect to this J1962 plug without swings in excess of the supply levels while preventing
modification to your vehicle. damage to the ELM323. A single 100KΩ resistor is
The male J1962 connector required to mate with a also shown in this circuit so that pin 5 is not left floating
vehicle’s connector may be difficult to obtain in some if the computer is disconnected.
locations, and you could be tempted to improvise by Transmission of RS232 data is via the PNP
making your own connections to the back of your transistor shown connected to pin 6. This transistor
vehicle’s connector. If doing so, we recommend that allows the output voltage to swing between +5V and
you do nothing that would compromise the integrity of the negative voltage stored on the 0.1µF capacitor
your vehicle’s OBD network. The use of any connector (which is charged by the computer’s TxD line). Using
which could easily short pins (such as an RJ11 type the computer’s own supply guarantees that the RS232
telephone connector) is definitely not recommended. voltage levels will be compatible. Note also that the
The circuit of Figure 5 on the next page shows ELM323’s pin 4 has been tied to VDD, so that by
how the ELM323 would typically be used. Circuit default linefeed characters will be sent whenever a
power is obtained from the vehicle (via OBD pins 16 carriage return is sent.
and 5) and, after some capacitive filtering, is presented The four LEDs shown (on pins 7 to 10) have been
to a five volt regulator. (Note that a few vehicles have provided as a visual means of confirming circuit
been reported not to have a pin 5. On these, you use activity. Resistors are shared among Tx and Rx LEDs
pin 4 instead of pin 5.) The regulator powers several as they will not be on at the same time (the ELM323 is
points in the circuit as well as an LED (for visual not capable of true multitasking). The OBD bus may
confirmation that power is present). be in an initialization phase while data is being sent or
The remaining two connections to the vehicle received on the RS232 bus, though, so separate
(OBD pins 7 and 15) are for the two data lines resistors are shown for these two groups.
prescribed by the ISO 9141 and ISO 14230 standards. Finally, the crystal shown connected between pins
To meet the standards, the ELM323 controls both lines 2 and 3 is a common TV type that can be easily and
through the NPN transistors shown, with the pullup inexpensively obtained. The 27pF crystal loading
resistors connected to their collectors. The 510Ω value capacitors shown are typical only, and you may have
for these resistors is specified in the standards, and to select other values depending on what is specified
substituting for a larger value would only increase rise for the crystal you obtain.
times, likely making the circuit inoperable. Reducing This completes the description of the circuit. While
the value could cause circuit damage, so try to keep it is the minimum required to talk to an OBD equipped
as close as possible to the 510Ω. Note also that 1/2W vehicle, this is a fully functional circuit. You may want
resistors should be used (and that 1/4W 240Ω + 270Ω to expand on it, though, providing more protection from
resistors work well, too). faults and electrostatic discharge, or providing a
Data is received from the K Line of the OBD bus different interface for the RS232 connection to the
and inverted by the PNP transistor shown before being computer. Then perhaps a Basic program to make it
applied to pin 11 of the ELM323. This transistor raises easier to talk to the vehicle, and a method to log your
the threshold voltage to about 4V from the inherent findings…
2.5V with the CMOS input of the ELM323. This helps
to increase noise immunity while reducing transition
times at the input pin, because of the amplification.
A very basic RS232 interface is shown connected 1 8
to pins 5 and 6 of the ELM323. This circuit ‘steals’
power from the host computer in order to provide a full 9 16
swing of the RS232 voltages without the need for a
negative supply. The RS232 pin connections shown
are for a 25 pin connector. If you are using a 9 pin, the Figure 4. Vehicle Connector
OBD
Interface
16 78L05 +5V
(Battery
Positive)
0.01µF 0.1µF Notes: -
750Ω NPN transistors are
5 2N3904 or similar
(Signal ‘Power On’
Ground) - PNP transistors are
LED
2N3906 or similar
+5V +5V
510Ω
(K Line)
330Ω 330Ω
7
2.2KΩ
Status
LEDs
14 13 12 11 10 9 8
+5V
10KΩ
323
+5V
10KΩ +5V
1 2 3 4 5 6 7
RS232
3.58MHz Interface
10KΩ
4.7KΩ 3 (RxD)
27pF 27pF
4.7KΩ
0.1µF
47KΩ 7 (SG)
2 (TxD)
16 78L05 +5V
(Battery
Positive)
0.01µF 0.1µF
5
(Signal
Ground)
+5V
10KΩ 14 13 12 11 10 9 8
2 (TxD)