ELM327 OBD to RS232 Interpreter Description Features 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 serial interface.
ELM327 Contents The Basics Description................................................................................... 1 Features....................................................................................... 1 Applications..................................................................................1 Block Diagram..............................................................................1 Connection Diagram....................................................................
ELM327 Contents Advanced Features (continued) Programming Serial Numbers....................................................63 Saving a Data Byte.................................................................... 63 The Activity Monitor....................................................................64 Power Control............................................................................ 64 Programmable Parameters........................................................
ELM327 Pin Descriptions MCLR (pin 1) A momentary (>2µsec) logic low applied to this input will reset the ELM327. If unused, this pin should be connected to a logic high (VDD) level. Vmeasure (pin 2) This analog input is used to measure a 0 to 5V signal that is applied to it. Care must be taken to prevent the voltage from going outside of the supply levels of the ELM327, or damage may occur. If it is not used, this pin should be tied to either VDD or VSS.
ELM327 Pin Descriptions (continued) IgnMon / RTS (pin 15) This input pin can serve one of two functions, depending on how the Power Control options (PP 0E) are set. If both bit 7 and bit 2 of PP 0E are ‘1’s, this pin will act as an Ignition Monitor. This will result in a switch to the Low Power mode of operation, should the IgnMon signal go to a low level, as would happen if the vehicle’s ignition were turned off.
ELM327 Pin Descriptions (continued) Example Applications section for more information). If unused, pin 24 must be connected to a logic high (VDD) level. RS232 Rx LED (pin 25), RS232 Tx LED (pin 26), OBD Rx LED (pin 27) and OBD Tx LED (pin 28) These four output pins are normally high, and are driven to low levels when the ELM327 is transmitting or receiving data. These outputs are suitable for directly driving most LEDs through current limiting resistors, or interfacing to other logic circuits.
ELM327 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. Characteristic Minimum Typical Supply voltage, VDD 4.2 5.0 VDD rate of rise 0.05 Average current, IDD normal low power Input logic levels Schmitt trigger input thresholds Maximum Units 5.5 V V/ms 12 mA 0.15 mA low VSS 0.8 V high 3.0 VDD V 4.0 V rising falling 2.
ELM327 Overview The following describes how to use the ELM327 to obtain information from your vehicle. We begin by discussing just how to ‘talk’ to the IC using a PC, then explain how to change options using ‘AT’ commands, and finally we show how to use the ELM327 to obtain trouble codes (and reset them). For the more advanced experimenters, there are also sections on how to use some of the programmable features of this integrated circuit as well. Using the ELM327 is not as daunting as it first seems.
ELM327 Communicating with the ELM327 (continued) question mark. These include incomplete messages, incorrect AT commands, or invalid hexadecimal digit strings, but are not an indication of whether or not the message was understood by the vehicle.
ELM327 AT Commands Several parameters within the ELM327 can be adjusted in order to modify its behaviour. These do not normally have to be changed before attempting to talk to the vehicle, but occasionally the user may wish to customize these settings – for example by turning the character echo off, adjusting a timeout value, or changing the header bytes. In order to do this, internal ‘AT’ commands must be used.
ELM327 AT Command Summary (continued) OBD Commands J1850 Specific Commands (protocols 1 and 2) AL Allow Long (>7 byte) messages IFR0, 1, 2 IFRs off, auto*, or on AMC display Activity Monitor Count IFR H, S IFR value from Header* or Source AMT hh set the Activity Mon Timeout to hh AR Automatically Receive AT0, 1, 2 Adaptive Timing off, auto1*, auto2 BD perform a Buffer Dump BI Bypass the Initialization sequence DP Describe the current Protocol DPN Describe the Protocol by Number H0, H
ELM327 AT Command Summary (continued) CAN Specific Commands (continued) D0, D1 display of the DLC off*, or on FC SM h Flow Control, Set the Mode to h FC SH hhh FC, Set the Header to hhh FC SH hhhhhhhh Set the Header to hhhhhhhh FC SD [1 - 5 bytes] FC, Set Data to [...
ELM327 AT Command Descriptions (continued) AT0, AT1 and AT2 [ Adaptive Timing control ] When receiving responses from a vehicle, the ELM327 has traditionally waited the time set by the AT ST hh setting for a response. To ensure that the IC would work with a wide variety of vehicles, the default value was set to a conservative (slow) value. Although it was adjustable, many people did not have the equipment or experience to determine a better value.
ELM327 AT Command Descriptions (continued) enabled (CAF1), the formatting (PCI) bytes will be automatically generated for you when sending, and will be removed when receiving. This means that you can continue to issue OBD requests (01 00, etc.) as usual, without regard to the extra bytes that CAN diagnostics systems require. Also, with formatting on, any extra (unused) data bytes that are received in the frame will be removed, and any messages with invalid PCI bytes will be ignored.
ELM327 AT Command Descriptions (continued) 11 bit ID filters as well, since they are stored in the same locations internally (entering AT CF 00 00 0h hh is exactly the same as entering the shorter AT CF hhh command). CFC0 and CFC1 [ CAN Flow Control off or on ] The ISO 15765-4 CAN protocol expects a ‘Flow Control’ message to always be sent in response to a ‘First Frame’ message, and the ELM327 automatically sends these without any intervention by the user.
ELM327 AT Command Descriptions (continued) detected. If there should be a significant number of errors (due to a hardware or software problem), the device will go off-line in order to not affect other data on the bus. The AT CS command lets you see both the transmitter (Tx) and the receiver (Rx) error counts, in hexadecimal. If the transmitter should be off (count >FF), you will see ‘OFF’ rather than a specific count.
ELM327 AT Command Descriptions (continued) continually monitor for this type of message for you, following multi-segment transport protocols as required. Note that a combination of masks and filters could be set to provide a similar output, but they would not allow multiline messages to be detected. The DM1 command adds the extra logic that is needed for multiline messages. This command is only available when a CAN Protocol (A, B, or C) has been selected for J1939 formatting.
ELM327 AT Command Descriptions (continued) FI [ perform a Fast Initiation ] One version of the Keyword protocol uses what is known as a 'fast initiation' sequence to begin communications. Usually, this sequence is performed when the first message needs to be sent, and then the message is sent immediately after. Some ECUs may need more time between the two however, and having a separate initiation command allows you to control this time. Simply send AT FI, wait a little, then send the message.
ELM327 AT Command Descriptions (continued) If you send AT IFR S, the ELM327 will use the value defined as the Source Address (usually F1, but it can be changed with PP 06), even if another value was sent in the Header bytes. This is not what is normally required, and caution should be used when using AT IFR S. AT IFR H restores the sending of the IFR bytes to those provided in the Header, and is the default setting. IGN [ read the IgnMon input level ] This command reads the signal level at pin 15.
ELM327 AT Command Descriptions (continued) command now simply calls the CTM1 command. JTM5 [ set the J1939 Timer Multiplier to 5 ] This used to set the AT ST time multiplier to 5, for the SAE J1939 protocol. As of firmware v2.1, this command now simply calls the CTM5 command.
ELM327 AT Command Descriptions (continued) The default setting for the memory function is determined by the voltage level at pin 5 during power up (or system reset). If it is connected to a high level (VDD), then the memory function will be on by default. If pin 5 is connected to a low level, the memory saving will be off by default.
ELM327 AT Command Descriptions (continued) stops monitoring and prints a prompt character. The value ‘n’ may be any single hex digit. MR hh [ Monitor for Receiver hh ] This command is very similar to the AT MA command except that it will only display messages that were sent to the hex address given by hh. These are messages which are found to have the value hh in the second byte of a traditional three byte OBD header, in bits 8 to 15 of a 29 bit CAN ID, or in bits 8 to 10 of an 11 bit CAN ID.
ELM327 AT Command Descriptions (continued) Values passed in this way do not affect those that are stored in the 2C and 2D Programmable Parameters, and are lost if the ELM327 is reset. If you want to make your settings persist over power cycles, then you may wish to store them in the Programmable Parameter for CAN protocols USER1 or USER2. PC [ Protocol Close ] There may be occasions where it is desirable to stop (deactivate) a protocol.
ELM327 AT Command Descriptions (continued) RA hh [ set the Receive Address to hh ] Depending on the application, users may wish to manually set the address to which the ELM327 will respond. Issuing this command will turn off the AR mode, and force the IC to only accept responses addressed to hh. Use caution with this setting, as depending on what you set it to, you may end up accepting (ie. acknowledging with an IFR) a message that was actually meant for another module.
ELM327 AT Command Descriptions (continued) SH xx yy zz [ Set the Header to xx yy zz ] This command allows the user to manually control the values that are sent as the three header bytes in a message. These bytes are normally assigned values for you (and are not required to be adjusted), but there may be occasions when it is desirable to change them (particularly if experimenting with physical addressing).
ELM327 AT Command Descriptions (continued) 8 - ISO 15765-4 CAN (11 bit ID, 250 kbaud) 9 - ISO 15765-4 CAN (29 bit ID, 250 kbaud) A - SAE J1939 CAN (29 bit ID, 250* kbaud) B - USER1 CAN (11* bit ID, 125* kbaud) C - USER2 CAN (11* bit ID, 50* kbaud) * default settings (user adjustable) The first protocol shown (0) is a convenient way of telling the ELM327 that the vehicle’s protocol is not known, and that it should perform a search.
ELM327 AT Command Descriptions (continued) order that scan tools should use. It follows the number order that we have assigned to the ELM327 protocols. In order to provide a faster search, the ELM327 does not normally follow this order, but it will if you command it to with AT SS. ST hh [ Set Timeout to hh ] After sending a request, the ELM327 waits a preset time for a response before it can declare that there was ‘NO DATA’ received from the vehicle.
ELM327 AT Command Descriptions (continued) attempting to connect to one of them. V0 and V1 and the ELM327 will return to the default baud rate setting. [ Variable data lengths off or on ] Many CAN protocols (ie ISO 15765-4) expect to send eight data bytes at all times. The V0 and V1 commands may be used to override this behaviour (for any CAN protocol) should you wish.
ELM327 Reading the Battery Voltage Before learning the OBD Commands, we will show an example of how to use an AT Command. We will assume that you have built (or purchased) a circuit which is similar to that of Figure 9 in the Example Applications section (page 80). This circuit provides a connection to read the vehicle’s battery voltage, which many will find very useful. If you look in the AT Command list, you will see there is one command that is listed as RV [Read the input Voltage].
ELM327 OBD Commands If the bytes that you send to the ELM327 do not begin with the letters ‘A’ and ‘T’, they are assumed to be OBD commands for the vehicle. Each pair of ASCII bytes will be tested to ensure that they are valid hexadecimal digits, and will then be combined into data bytes for transmitting to the vehicle. OBD commands are actually sent to the vehicle embedded in a data packet.
ELM327 Talking to the Vehicle The standards require that each OBD command or request that is sent to the vehicle must adhere to a set format. The first byte sent (known as the ‘mode’) describes the type of data being requested, while the second byte (and possibly a third or more) specifies the actual information that is required. The bytes which follow after the mode byte are known as the ‘parameter identification’ or PID number bytes.
ELM327 Talking to the Vehicle (continued) That is because rpm is sent in increments of 1/4 rpm! To convert to the actual engine speed, we need to divide the 6904 by 4. A value of 1726 rpm is much more reasonable. Note that these examples asked the vehicle for information without regard for the type of OBD protocol that the vehicle uses. This is because the ELM327 takes care of all of the data formatting and translation for you.
ELM327 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) initiation process, while ISO 14230 allows for both a slow method, and a faster alternative. The ELM327 will perform this bus initiation for you, but generally not until a request needs to be sent (but you can force one with the FI and SI commands).
ELM327 Interpreting Trouble Codes Likely the most common use that the ELM327 will be put to is in obtaining the current Diagnostic Trouble Codes (or DTCs). Minimally, this requires that a mode 03 request be made, but first one should determine how many trouble codes are presently stored.
ELM327 Resetting Trouble Codes The ELM327 is quite capable of resetting diagnostic trouble codes, as this only requires issuing a mode 04 command. The consequences should always be considered before sending it, however, as more than the MIL (or ‘Check Engine Light’) will be reset.
ELM327 Selecting Protocols The ELM327 supports several different OBD protocols (see Figure 2, at right). As a user, you may never have to choose which one it should use (since the factory settings cause an automatic search to be performed for you), but while experimenting, you may want to specify a protocol to be used. For example, if you know that your vehicle uses the SAE J1850 VPW protocol, you may want the ELM327 to use only that protocol, and no others.
ELM327 Selecting Protocols (continued) based on any active inputs that are present. If you need to follow the SAE J1978 order, you should send the ELM327 an AT SS command first, or step through each protocol with the TP command. The automatic search works well with OBDII systems, but may not be what you need if you are experimenting.
ELM327 OBD Message Formats To this point we have only discussed the contents (data portion) of an OBD message, and made only passing mention of other parts such as headers and checksums, which all messages use to some extent. On Board Diagnostics systems are designed to be very flexible, providing a means for several devices to communicate with one another.
ELM327 OBD Message Formats (continued) encapsulated within a message, with ‘header’ bytes at the beginning, and a ‘checksum’ at the end. The J1850, ISO 9141-2, and ISO 14230-4 protocols all use essentially the same structure, with three header bytes, a maximum of seven data bytes and one checksum byte. The ISO 15765-4 (CAN) protocol uses a very similar structure (see Figure 4), the main difference really only relating to the structure of the header.
ELM327 Setting the Headers (continued) causing a ‘NO DATA’ result. In these cases, you may want to adjust the timeout value, perhaps first trying the maximum (ie use AT ST FF). Many vehicles will simply not support these extra addressing modes. The other, and more common method of obtaining information is by physical addressing, in which you direct your request to a specific device, not to a functional group.
ELM327 Setting the Headers (continued) addressing, and to DA if using physical addressing. The next two bytes are as defined previously for the other standards – ‘yy’ is the receiver (or Target Address), and ‘zz’ is the transmitter (or Source Address). For the functional diagnostic requests, the receiver is always 33, and the transmitter is F1, which is very similar to ISO 14230-4.
ELM327 Multiline Responses There are occasions when a vehicle must respond with more information than one ‘message’ is able to show. In these cases, it responds with several lines which the receiver must assemble into one complete message. One example of this is a request for the 17 digit vehicle identification number, or VIN. This is available from newer vehicles using a mode 09, PID 02 request (but was not initially a requirement, so many older vehicles do not support it).
ELM327 Multiline Responses (continued) might occasionally be ‘mixed up’ in a CAN system. We ask the vehicle for the Calibration ID (09 04) and are presented with the following response: >09 04 013 0: 49 04 1: 32 38 013 0: 49 04 2: 00 00 1: 32 38 2: 00 00 01 35 36 30 39 34 39 41 43 01 00 39 00 35 00 35 00 36 00 34 00 30 00 31 41 43 00 00 which is quite confusing.
ELM327 CAN Message Types The ISO 15765-4 (CAN) standard defines several message types that are to be used with diagnostic systems. Currently, there are four that may be used: SF FF CF FC - the Single Frame the First Frame (of a multiframe message) the Consecutive Frame ( ‘ ‘ ) the Flow Control frame The Single Frame message contains storage for up to seven data bytes in addition to what is known as a PCI (Protocol Control Information) byte.
ELM327 Multiple PID Requests The SAE J1979 (ISO 15031-5) standard allows requesting multiple PIDs with one message, but only if you connect to the vehicle with CAN (ISO 15765-4). Up to six parameters may be requested at once, and the reply is one message that contains all of the responses. For example, let us say that you need to know engine load (04), engine coolant temperature (05), manifold pressure (0B), and engine rpm (0C) on a regular basis.
ELM327 CAN Receive Filtering - the CRA Command When receiving CAN data, the ELM327 actually retrieves every message from the CAN bus, and then decides whether or not to display it, based on criteria that you or the firmware set. The ‘CAN Receive Address’ or CRA command may be used to define this criteria for you, in one simple step. As an example, assume that the only messages that you wish to see are those that have the CAN ID 7E9.
ELM327 Using the CAN Mask and Filter Filtering of CAN messages (that is, deciding which to keep and which to reject), is usually handled most easily with the CRA command. The CRA command only allows for definition to the nibble level, however if you need more selectivity (to the bit level), you must program the mask and filter. Internally, the ELM327 configures an ‘acceptance filter’ with 1’s and 0’s based on the type of message that it wishes to receive (OBD, J1939, etc.).
ELM327 Monitoring the Bus Some vehicles use the OBD bus for information transfer during normal vehicle operation, passing a great deal of information over it. A lot can be learned if you have the good fortune to connect to one of these vehicles, and are able to decipher the contents of the messages. To see how your vehicle uses the OBD bus, you can enter the ELM327’s ‘Monitor All’ mode, by sending the command AT MA from your terminal program.
ELM327 Restoring Order There may be times when it seems the ELM327 is out of control, and you will need to know how to restore order. Before we continue to discuss modifying too many parameters, this seems to be a good point to discuss how to ‘get back to the start’. Perhaps you have told the ELM327 to monitor all data, and there are screens and screens of data flying by. Perhaps the IC is now responding with ‘NO DATA’ when it did work previously. This is when a few tips may help.
ELM327 Using Higher RS232 Baud Rates A serial interface has always been provided with our ELM OBD products, largely due to its versatility. Older computers, microprocessors and PDAs can all interface easily with it, as can USB, Bluetooth, ethernet and WiFi modules. It is simply one of the most versatile interfaces available. Originally, our users almost exclusively used the traditional RS232 interface to connect our integrated circuits to their computers.
ELM327 Using Higher RS232 Baud Rates (continued) The sequence begins with the PC making a request for a new baud rate divisor, with the BRD command. For example, to try the 57.6K rate that was previously discussed, the controlling PC would send: AT BRD 45 If the ELM327 firmware is a very old version, it will not support this command and will return with the familiar ‘?’ response. If it does support the command, it will respond with ‘OK’, so the software knows whether to proceed or not.
ELM327 Setting Timeouts - AT ST and AT AT Commands Users often ask about how to obtain faster OBD scanning rates. There is nothing that we can do about how fast (or slow) a vehicle is to respond, but we can optimize how the ELM327 handles the responses.
ELM327 SAE J1939 Messages The SAE J1939 CAN standard is being used by many types of heavy machinery – trucks, buses, and agricultural equipment, to name a few. It uses the familiar CAN (ISO 11898) physical interface, and defines its own format for data transfer (which is very similar to the ISO 15765 standard that is used for automobiles). The following will discuss a little of how data is transferred using the J1939 standard.
ELM327 J1939J1939 SAE Support Messages (continued) (continued) the values assigned to the PDU Format field. If the PDU Format value begins with ‘F’ (when expressed as a hexadecimal number), it is PDU2. Any other value for the first digit means that it is a PDU1 Format frame, which contains an address. To summarize, PDU1 format frames are sent to a specific address, and PDU2 frames are sent to all addresses. To further complicate matters, however, PDU1 frames may be sent to all addresses.
ELM327 Using J1939 This section provides a few examples which show how to monitor an SAE J1939 data bus, and how to make requests of devices that are connected to it. To begin, you will need to configure the ELM327 for J1939 operation, at the correct baud rate. Protocol A is predefined for J1939 at 250 kbps, which is what most applications require. To use protocol A, send: >AT SP A Protocols B and C may also be used with J1939, if you wish to experiment with other baud rates.
ELM327 Using J1939 (continued) To see the exact same response, you can also Monitor for PGN 00FECA (which is the code for DM1): >AT MP 00FECA Note that the ELM327 requires that you send hex digits for all data, as shown above (and as used by all other protocols). Many of the PGN numbers are listed in the J1939 standard as both a decimal and a hex number, so choose the hex version. You will likely find in your testing that the PGNs you encounter often begin with a 00 byte as above.
ELM327 Using J1939 (continued) can directly request PGNs using numbers as they are written on the page (if they are written as hex digits), and the ELM327 will make it work for you. If you do not want the ELM327 to alter the byte order, the feature can be disabled (by sending an AT JS command). The ELM327 always assumes that when you start making requests of this type, you do not know what devices are connected to the J1939 bus.
ELM327 Using J1939 (continued) 02: 00 00 01 5F 05 02 31 03: 6D 05 03 03 FF FF FF if the headers are off. Note that multiframe messages always send eight bytes of data, and fill in unused byte positions with FFs. With the headers off, a multiline response looks very similar to the multiline responses for ISO15765-4. The first line shows the total number of bytes in the message, and the other lines show the segment number, then a colon, and the data bytes received.
ELM327 The NMEA 2000 Standard We are occasionally asked about support for the NMEA 2000 marine standard. Elm Electronics does not provide specific support for this protocol, but our ELM327 integrated circuit is very capable of working with it. While the physical connectors may look quite a bit different than those used for J1939, the CAN interface and the data format is almost identical to that of the J1939 standard.
ELM327 Altering Flow Control Messages ISO 15765-4 (CAN) provides for only eight data bytes per frame of data. Of course, there are many cases where the data which needs to be sent is longer than 8 bytes, and CAN has made provision for this by allowing data to be separated into segments, then recombined at the receiver. To send one of these multi-line messages, the transmitter in a CAN system will send a ‘First Frame’ message, and then wait for a reply from the receiver.
ELM327 Using CAN Extended Addresses Some vehicles with CAN interfaces use a data format that is slightly different from what we have described so far. The data packets look very similar, except that the first byte is used for the receiver’s (ie target’s) address. The remaining seven bytes are used as described previously. We refer to this type of addressing as ‘CAN Extended Addressing’, and provide support for it with the AT CEA command. Perhaps an example would best describe how to use it.
ELM327 CAN Input Frequency Matching Most modern vehicles have a CAN network connected to pins 6 and 14 of the OBD connector. At one time, however, the use of these pins was left to the vehicle manufacturer, and a number of different systems were connected to them. In order to prevent the disruption of any connected systems while the ELM327 is searching for a protocol (it sends out requests during a search), the ELM327 now performs several tests on these wires. Prior to firmware version 2.
ELM327 Programming Serial Numbers A number of our customers have asked for ways to uniquely identify a product that uses our ELM327 integrated circuit. While this is often a request for a means to store a ‘serial number’, people have also asked for a way to store dates, and version codes, too. The @2 and @3 commands were created to assist with this. If you send the command AT @2 to a new ELM327 integrated circuit, you will receive an error.
ELM327 The Activity Monitor The ELM327 contains some firmware that is used to monitor the OBD input pins (ie pins 11, 12, 13, and 24). These routines continually ‘poll’ the inputs, looking for any active levels on them. Of course, we don’t want to look at a pin while we are sending, so there is also some logic to block those inputs during a send, to filter the levels, and also to provide timing. Collectively, these routines are known as the Activity Monitor.
ELM327 Power Control (continued) to cause the ELM327 to shift to Low Power operation, if there is no OBD activity for some time. If you follow the logic path, you will see that b7 and b5 of PP 0F must both be ‘1’, as well as b7 of PP 0E in order to allow this switch to occur. The default time that it allows before switching is set by b4, unless you have set a value with the AT AMT command. Setting the Activity Monitor Timeout to 00 blocks all the Activity Monitor outputs.
ELM327 Power Control (continued) described for the other methods. When connecting to pin 15, care should be taken to not allow excessive current (ie >0.5 mA) to pass through the internal protection diodes. Typically all that is required is a series resistor, but adding a capacitor helps to filter out ignition noise (note that the Schmitt input on pin 15 allows the use of large value capacitors). A second resistor ensures a discharge path for the capacitor, while raising the threshold voltage.
ELM327 Power Control (continued) easily accomplished by sending a space or @ character, if the baud rate is 57.6 kbps or less. If using higher baud rates, you may wish to consider temporarily shifting to a lower baud rate and sending a character, or possibly see if your software can generate a ‘break’ signal for you. The break signal is not always the same length, but is typically several msec long (ie much longer than 128 µsec), and can often be sent by USB through USB to RS232 conversion devices.
ELM327 Programmable Parameters The ELM327 contains several memory locations that retain their data even after power is turned off. Every time the IC is reset, these locations are read and used to change the default settings for such things as whether to display the headers, or how often to send ‘wakeup’ messages. Because they define the operation of the ELM327, we refer to these memory locations as the Programmable Parameters.
ELM327 Programmable Parameters (continued) rate, or the Carriage Return character, for example, and forget what you have set them to. The Carriage Return value that is set by PP 0D is the only character that is recognized by the ELM327 as ending a command, so if you change its value, you may not be able to undo your change. In this case, your only recourse may be to force all of the PPs off with a special hardware trick.
ELM327 Programmable Parameter Summary (continued) PP 0C Description Values RS232 baud rate divisor when pin 6 is high (logic 1) baud rate (in kbps) = 4000 ÷ (PP 0C value) 00 to FF Default Type 68 P (38.4) For example, 500 kbps requires a setting of 08 (since 4000/8 = 500) Here are some example baud rates, and the divisor to be used: Baud Rate (kbps) PP 0C value hex (dec) 19.2 D0 (208) 38.4 68 (104) 57.6 45 (69) 115.2 23 (35) 230.4 11 (17) 500 08 (8) Notes: 1.
ELM327 Programmable Parameter Summary (continued) PP 0E Description Values Default Type D5 D Power Control options (continued) b1: Ignition delay 0: 1 sec 1: 5 sec delay after IgnMon (pin 15) returns to a high level, before normal operation resumes b0: reserved for future - leave set at 0 0F Activity Monitor options 00 to FF (11010101) Each bit controls an option, as follows: b7: monitor master control must be 1 to allow b3 to b6 0: disabled b6: allow wake from Low Power 0: no wakes on shift f
ELM327 Programmable Parameter Summary (continued) PP 16 17 18 19 1A 1B 1C Description Values Default ISO/KWP baud rate (AT IB default setting) Note: 4800 baud can not be a default - set it with AT IB 48 00 = 96 FF = 10 ISO/KWP wakeup message rate (AT SW default setting) setting (in msec) = (PP 17 value) x 20.48 00 to FF ISO/KWP delay before a fast init, if a slow init has taken place setting (in msec) = 1000 + (PP 18 value) x 20.
ELM327 Programmable Parameter Summary (continued) PP 2A Description CAN Error Checking (applies to protocols 6 to C) Values 00 to FF Default Type 3C D (00111100) Each bit of this byte controls an option, as follows: b7: ISO15765 Data Length 0: accept any 1: must be 8 bytes b6: ISO15765 PCI = 00 0: allowed 1: not allowed b5: Search after ERR94 0: normal 1: CAN is blocked b4: Search after LV RESET 0: normal 1: CAN is blocked b3: Wiring Test 0: bypass 1: perform Processing 7F xx 78’s: b2: enabled (CAN
ELM327 Maximum CAN Data Rates We are occasionally asked what the maximum data rate is that the ELM327 can handle. This is often after someone has tried to monitor all data using the default settings and has received a ‘BUFFER FULL’ error. It is difficult to say exactly what the maximum rate is, however, as several factors are involved.
ELM327 Maximum CAN Data Rates (continued) processed. You can see from the figure that even for a 500 kbps message with an 11 bit ID, the ELM327 finishes with time to spare. Since ISO15765-4 specifies that messages must be 8 data bytes in length (filler bytes are added as needed) these times do represent the typical situation, with a 40% bus load. Actually, from these numbers the ELM327 should be able to handle 100% bus loading (which is not a practical situation).
ELM327 Microprocessor Interfaces A very common question that we receive is ‘Can I connect the ELM327 directly to my own circuit, or must I use the interface shown?’ Certainly you may connect directly to our ICs, and you do not need to use an RS232 or USB interface. There are a few items to consider, however. The ELM327 is actually a microprocessor that contains a standard UART type interface, connected to the RS232 Tx and Rx pins.
ELM327 Microprocessor Interfaces (continued) the default setting for PP 0E turns these hand-shaking signals off, so you will need to change that in order to use them. We are often asked about connecting the ELM327 to 3.3V logic, which is quite popular. Many hope that they can just insert a resistor or two and have it work.
ELM327 Example Applications The SAE J1962 standard dictates that all OBD compliant vehicles must use a standard connector, the shape and pinout of which is shown in Figure 8 below. The dimensions and pin connections for this ‘Type A’ connector are fully described in the SAE J1962 standard. 1 8 9 16 Figure 8. The J1962 Vehicle Connector The circuit that you build with the ELM327 will be required to connect by way of a matching male J1962 connector.
ELM327 Example Applications (continued) what you are doing while testing. The final OBD interface shown is in the bottom left corner, and is used for the two J1850 standards. The J1850 VPW standard needs a positive supply of up to 8V while the J1850 PWM needs 5V, so we have shown a two level supply that can provide both. This dual voltage supply uses a 317L adjustable regulator as shown, controlled by the pin 3 output. With the resistor values given, the selected voltages will be about 8.0V and 5.
ELM327 CAN-L 14 6 CAN-H R22 100Ω C7 560pF 50V Vbat n.c. R23 100Ω R24 4.7KΩ 8 C8 560pF 50V 7 6 5 MCP2551 1 U2 2 3 16 Battery Positive +5V 4 Vbat +5V 7805 D1 L5 C1 0.1µF 50V 5 Signal Ground C6 0.1µF U3 +12V C5 0.1µF R31 470Ω Vbat R19 510Ω R17 510Ω 15 ISO-L U5 R16 2.2KΩ Q6 7 ISO-K 1 (DCD) 4 (DTR) 6 (DSR) +5V R18 2.2KΩ Q7 R20 47KΩ 7 (RTS) 8 (CTS) R32 4.
ELM327 Example Applications (continued) Semiconductors D1 = 1N4001 D2, D3, D4 = 1N4148 L1, L2, L3, L4 = Yellow LED L5 = Green LED Q1, Q3, Q5, Q6, Q7 = 2N3904 (NPN) Q2, Q4 = 2N3906 (PNP) U1 = ELM327 U2 = MCP2551 or MCP2561 U3 = 7805 regulator (5V 1A) U4 = 317L adjustable regulator (100 mA) U5 = FTDI DBP-USB-D5-F usb module Misc X1 = 4.000MHz crystal DB9M connector for OBD cable? IC Socket = 28 pin 0.
ELM327 Example Applications (continued) the rest. We do caution that the MAX3222E does seem to place some extra demands on the 5V power supply. It should work fairly well with the 7805 regulator that we show in Figure 9, but if you have chosen a lower current device like the 78L05 or LP2950, you may experience occasional ‘LV RESET’s. If you do, we recommend adding two capacitors to the circuit of Figure 9.
ELM327 Example Applications (continued) value that is stored in Programmable Parameter 0C, then enable it: 3.3V Interface >AT PP 0C SV 23 OK +3.3V > AT PP 0C ON OK Rx Tx 3.3V common That is all that is needed to semi-permanently change the ELM327. We say semi, because it stays in effect through power downs, and resets, but you can change it again if you wish.
ELM327 Modifications for Low Power Standby Operation If you wish to semi-permanently install your ELM327 circuit in a vehicle, current consumption quickly becomes an issue. A typical ELM327 circuit draws about as much current as a dome lamp, so can not be left on for long without the vehicle’s engine running. When it is not needed, the ELM327 may be placed in a low power ‘standby’ mode in which it consumes very little current.
ELM327 Modifications for Low Power Standby Operation (continued) 4.7uF tantalum capacitor for stability (and it helps with transient capability too). Leaving U4’s pin 3 solidly connected to circuit common, we now find that the current is about: current after mod #3 = 1.1 mA and, if we tie pin 3 of the LP2951 to pin 16 of the ELM327, the LP current becomes: current after mod #4 = 0.9 mA We can suggest one more change at this point. The MCP2551 shown draws about 0.
ELM327 Modifications for Low Power Standby Operation (continued) CAN-L 14 2 6 CAN-H R22 100Ω C7 560pF 50V R24 4.7KΩ 8 C8 560pF 50V 7 6 5 5 MCP2561 1 U2 Vbat Vbat n.c. R23 100Ω 2 3 4 D1 + C1 0.1µF 50V 2.2µF 50V R17 510Ω 15 ISO-L + C5 0.1µF R18 2.2KΩ 7 (RTS) 8 (CTS) R32 4.
ELM327 Error Messages and Alerts The following shows what the ELM327 will send to warn you of a condition or a problem. Some of these messages do not appear if using the automatic search for a protocol, or if the Programmable Parameter bits disable them. ? This is the standard response for a misunderstood command received on the RS232 input. Usually it is due to a typing mistake, but it can also occur if you try to do something that is not appropriate (eg.
ELM327 Error Messages and Alerts (continued) ISO 15765-4 format. Try resending the command again – if it was a noise burst, it may be received correctly the second time. ERRxx There are a number of internal errors that might be reported as ERR with a two digit code following. These occur if an internally monitored parameter is found to be out of limits, or if a module is not responding correctly. If you witness one of these, contact Elm Electronics for advice.
ELM327 Error Messages and Alerts (continued) ELM327 will print the word STOPPED. If you should see this response, then something that you have done has interrupted the ELM327. Most people see it because they have not waited for pin 15 to go high, or for the prompt character (‘>’) to be displayed before starting to send the next command. Note that short duration pulses on pin 15 may cause the STOPPED message to be displayed, but may not be of sufficient duration to cause a switch to Low Power operation.
ELM327 Version History We are often asked about the differences between the various ELM327 integrated circuits. The following summarizes some of these for you: v1.0 Features: -Multi-protocol chip supports SAEJ1850 PWM, SAEJ1850 VPW, ISO9141-2, ISO14230-4, and ISO15765-4 OBDII protocols. -Communicates with a PC at 9.6 or 38.
ELM327 Version History (continued) New AT Commands: @2, @3, CRA, D0, D1, JE, JS, KW, MP, RA, RTR, S0, S1, SP00, V0, V1 New Programmable Parameters: 2A v1.3a New Features: -Added wiring checks to detect when the J1962 CAN pins are used for other functions New AT Commands: FE New Programmable Parameters: none v1.
ELM327 Outline Diagrams The diagrams at the right show the two package styles that the ELM327 is available in. The first shows our ELM327P product in what is commonly called a ‘300 mil skinny DIP package’. It is used for through hole applications. The ELM327SM package shown at right is also sometimes referred to as 300 mil, and is often called an SOIC package. We have chosen to simply refer to it as an SM (surface mount) package. The drawings shown here provide the basic dimensions for these ICs only.
ELM327 Index A F Absolute Maximum Ratings, 6 Activity Monitor, 64 Altering Flow Control Messages, 60 Applications, Example, 78-83 AT Commands, 10 AT Command Descriptions, 12-28 Summary, 10-12 Alerts, Error Messages and, 87-89 Features, 1 Figure 9, 80 Filter and Mask, CAN, 47 Flow Control Messages, Altering, 60 FMS Standard, 58 Frequency Matching, CAN, 62 H Headers, setting them, 39-41 Higher RS232 Baud Rates, 50-51 History, Version, 90-91 B Battery Voltage, Reading the, 29 Baud Rates, Using Higher RS232,
ELM327 Index (continued) N S NMEA 2000, Standard, 59 Number of Responses, J1939, 56 OBDII, 32, 52 Saving a Data Byte, 63 Selecting Protocols, 36-37 Serial Numbers, Programming, 63 Setting the Headers, 39-41 Setting Timeouts (AT & ST commands), 52 Specify the Number of Responses, 32, 52, 56 Summary, AT Commands, 10-12 Programmable Parameters, 69-73 O OBD Commands, 30 OBD Message Formats, 38-39 Order, Restoring, 49 Ordering Information, 92 Outline Diagrams, 92 Overview, 8 T Talking to the Vehicle, 31-32 T