Go Down

Topic: Arduino Interface with OBD-II (Read 12864 times) previous topic - next topic

HappyTron

Hello Everyone,

I have come across a lot of methods and ways to interface the micrcontroller with the OBD, but nothing seems to work. Maximum number of people are using the PIC microcontrollers.

I am totally confused between many IC choices - MCP2551, MCP2515, STN1110, ELM327, MC33290

I am aware all these offer different protocols to interface with the OBD port.

Which one do you guys suggest is the best and the easiest to use with Arduino?

pylon

The STN1110 is a ELM327 clone with some extended features. I'm using it to access the OBD-II of my car. MCP2551 is just a CAN controller so you cannot access the OBD-II signals but a lot of cars have some CAN signal on the OBD-II connector, so it depends on what you want to do which ones you have to use. What do you want to achieve?

HappyTron

Basically, I want to make a data logger.

It would log all the details of the car like: Fuel Input Level, RPM, Vehicle Speed etc.

I did connect an ELM327 to USB cable to my computer and using a thirdparty software was able to see all of these.

I have a few question:
Can the ELM327 or the STN1110 directly act as the interfacing device between OBD and Arduino?
Also, if MCP2551 is the CAN controller, means it won't work with ELM327 protocol right?
Where does the MCP2515 come into play, I have seen some circuits in which both 2551 and 2515 are used.
Which is the most reliable IC to use for maximum number of new/old cars?

Thank you.

pylon

If you want to get just OBD-II standard data take an ELM327 (or compatible). It knows all standard protocols defined for the OBD-II and is able to provide that to a microcontroller in a easily manageable way.
Some newer cars have some or all internal CAN buses also wired to the OBD-II connector. Usually these buses hold data like entertainment controls, air conditioning and the like. To access these stuff, an ELM327 won't help you as it's designed for the OBD-II protocols and doesn't know much about the rest of data available in modern cars.

McNeight

I hate to reawaken a dead thread, but this information is not completely accurate...

OBD-II includes 5 different signalling protocols:

  • SAE J1850 PWM

  • SAE J1850 VPW

  • ISO 9141-2 (K-Line)

  • ISO 14230 KWP2000 (Keyword Protocol 2000)

  • SAE J1939 / ISO 15765 CAN



Which protocol was used depended on the manufacturer of your vehicle. Both the ELM327 and the STN1110 are able to use all five protocols, so that they will talk to any vehicle with an OBD-II port.

However, here in the US, all cars manufactured after 2008 are required to have a CAN interface to OBD-II. There are sometimes multiple CAN buses, with a high speed bus (500kbps) used for engine information and a medium speed (125-250 kbps) bus used for entertainment controls and air conditioning. I use a SeeedStudio CAN shield to pull OBD-II information from my 2009 Ford Focus. It's a bit primitive compared to some of the nicer tools out there, but I've learned quite a bit about CAN in the process.

And to answer the questions listed:

  • Yes, the ELM327 or the STN1110 can directly act as the interfacing device between OBD and Arduino

  • No, the MCP2551 (or MCP2515) won't work with ELM327 protocol

  • The MCP2515 is the CAN controller chip, similar to a UART for a serial port. The MCP2551 is the CAN transceiver chip, similar to the MAX232 for a serial port. The MCP2515 will generate the correct signals as far as timing is concerned, but they will be at the wrong (TTL) voltage. The MCP2551 takes in the signals from the MCP2515 and converts them to a voltage that the rest of the CAN bus understands

  • For new cars in the US, all you technically need is CAN. For the maximum number of new and old cars, either the ELM327 or STN1110 are your best bet



-Neil

backpacker3


I hate to reawaken a dead thread, but this information is not completely accurate...

OBD-II includes 5 different signalling protocols:

  • SAE J1850 PWM

  • SAE J1850 VPW

  • ISO 9141-2 (K-Line)

  • ISO 14230 KWP2000 (Keyword Protocol 2000)

  • SAE J1939 / ISO 15765 CAN



Which protocol was used depended on the manufacturer of your vehicle. Both the ELM327 and the STN1110 are able to use all five protocols, so that they will talk to any vehicle with an OBD-II port.

However, here in the US, all cars manufactured after 2008 are required to have a CAN interface to OBD-II. There are sometimes multiple CAN buses, with a high speed bus (500kbps) used for engine information and a medium speed (125-250 kbps) bus used for entertainment controls and air conditioning. I use a SeeedStudio CAN shield to pull OBD-II information from my 2009 Ford Focus. It's a bit primitive compared to some of the nicer tools out there, but I've learned quite a bit about CAN in the process.

And to answer the questions listed:

  • Yes, the ELM327 or the STN1110 can directly act as the interfacing device between OBD and Arduino

  • No, the MCP2551 (or MCP2515) won't work with ELM327 protocol

  • The MCP2515 is the CAN controller chip, similar to a UART for a serial port. The MCP2551 is the CAN transceiver chip, similar to the MAX232 for a serial port. The MCP2515 will generate the correct signals as far as timing is concerned, but they will be at the wrong (TTL) voltage. The MCP2551 takes in the signals from the MCP2515 and converts them to a voltage that the rest of the CAN bus understands

  • For new cars in the US, all you technically need is CAN. For the maximum number of new and old cars, either the ELM327 or STN1110 are your best bet



-Neil



So if my car has SAE J1850 VPW I need either the ELM327 or STN1110  which would connect to the OBD II port then to the arduino? I have a 2002 pontiac sunfire that I'm trying to make an OBDUino for but I've been stumped on figuring out if I need the ELM or not. So if I was using an Arduino Uno I would use one of the two interfaces to read the data from my car right?

McNeight

Right.

An example of how to hook everything up is using the SparkFun OBD-II UART, which uses the STN1110, with their OBD-II to DB9 Cable and following their hookup guide.

There are other methods, but for your vehicle this is probably the easiest and quickest way to get your Arduino talking to it.

-Neil

backpacker3

#7
Jun 08, 2014, 09:40 pm Last Edit: Jun 09, 2014, 02:11 am by backpacker3 Reason: 1
The UART is a bit expensive for me by the time I get that plus the uno and the LCD plus buttons and the other bits I could buy a scangauge 2 I was hoping that the arduino route would be cheaper.  Would you mind looking at my thread with the parts list I've come up with so far?  His is the link to it http://forum.arduino.cc/index.php?topic=245477.0 I hope it's ok to post it here.

Edit was to correct the link sorry for posting the wrong one.

spoums

Hello,
I prefer digging up this old thread instead of creating a new one.
I have some questions concerning the OBD and arduino.

First of all why do I need a microcontroller like those mentioned above between the obd and the arduino?
Can't the arduino do all the work? I get that it would be much harder but is it possible?

I would like to make a stand alone multi tool OBD reader and maybe a logger too.
What concerns me the most is the data rate. I would like to have the fastest display rate possible at a LCD.
Which parts limit this rate? There is the car's ECU data rate for the OBD, microcontroller's rate and the display data rate.
Is that correct?

For example if I want to have a LCD showing some info (6-9 at the same time) reading from the OBDII.
It is my understanding that if my car uses a SAE J1850 PWM protocol this provides data up to 41.6kB/sec.
How many samples per second can I have for every value I want to display?

I'm sorry if my questions are dumb but I'm trying to understand how exactly OBD and arduino work together.

Cheers Spiros.

Sklontz

Hello,
I prefer digging up this old thread instead of creating a new one.
I have some questions concerning the OBD and arduino.

First of all why do I need a microcontroller like those mentioned above between the obd and the arduino?
Can't the arduino do all the work? I get that it would be much harder but is it possible?

I would like to make a stand alone multi tool OBD reader and maybe a logger too.
What concerns me the most is the data rate. I would like to have the fastest display rate possible at a LCD.
Which parts limit this rate? There is the car's ECU data rate for the OBD, microcontroller's rate and the display data rate.
Is that correct?

For example if I want to have a LCD showing some info (6-9 at the same time) reading from the OBDII.
It is my understanding that if my car uses a SAE J1850 PWM protocol this provides data up to 41.6kB/sec.
How many samples per second can I have for every value I want to display?

I'm sorry if my questions are dumb but I'm trying to understand how exactly OBD and arduino work together.

Cheers Spiros.
just to dig it up one more time, i have an elecfreaks can bus shield currently sending OUT data to a CAN bus device and im attempting to have it pull data from a J1850 PWM vehicle and transmit it INTO the CAN device. Did you ever figure out your answer to this?

and on the off chance if you didn't, would any of you know if i am able to just wire my uart off of my can bus shield to transmit and receive the j1850 pwm and then relay that information using the CAN H and CAN L protocols?

Go Up