OBD dongles and CAN data

Discussion related to external OBD and other sensors
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

OBD dongles and CAN data

Post by nigelh »

I have an Emerald aftermarket ECU (quite popular for Rover 'K' Series engines in Caterhams, Lotus Elises etc), and was wondering if there would be any way to get live information from it.

Although there is no OBD socket available the ECU is capable of outputting CAN data through a couple of pins in a D-Sub serial connector. The documentation of the Emerald CAN data (here) seems to indicate it is using custom PIDs and returning multiple pieces of data in each return packet.

Do the ELM237 OBD dongles just return raw CAN data from the ECU based on PIDs that LapTimer requests, or do they do some translation internally? I can't find any documentation for the various ELM237 devices that indicates if they can be configured to read/interpret the Emerald CAN data and serve it up to LapTimer in the standard format.

If there's a good chance of being able to get the data into LapTimer I might be interested in getting one of the OBD dongles and trying to create a cable to connect it to the ECU.
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: OBD dongles and CAN data

Post by Harry »

You can find documentation on the ELM327 input / output format here: http://elmelectronics.com/DSheets/ELM327DS.pdf
LapTimer's communication in based on this description. LapTimer does not work on bus level protocols like CAN.

- Harry
Image Image Image Image
hms
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 172
Joined: Fri Aug 12, 2011 11:40 am

Re: OBD dongles and CAN data

Post by hms »

Isn't pin 6 (CAN high) and 14 (CAN low) (ISO 15765-4 and SAE-J2234)
The data sheet references these two pins but says they must be connected to a CAN transceiver ic.
I'd try asking Emerald or going onto a lotus forum, try SELOC.

H
Black S Special goes by the name of Lexie.
JRSC M45, 189.6 bhp JR ARB's, TDR belt tensioner, Steve Heath Rose jointed drop links, Absolutely Shocks GAZ springs and dampers, Alignment by WIM

Image
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

Re: OBD dongles and CAN data

Post by nigelh »

The Emerald CAN data is on pins 1 & 2 of the D-Sub and I believe they are equivalent to pins 6 & 14 on the standard OBD-2 connector, so I'm pretty sure that wiring them together would be easy enough.
As I understand it you can throw pretty much any data onto the CAN bus though, and the software/firmware reading the data needs to use mode and packet/parameter ids to pick out specific data. At the moment it looks to me as though the Emerald data is not using standard OBD-II PIDs, so although I suspect the data could be extracted through one of the ELM327 devices it probably needs to be done differently to the standard OBD data.

The ECU can be integrated into some stand alone data loggers using this CAN connection (AIM & Race Technology products for example), but they have more configurable software for reading/interpresting the data.

SELOC is always good for technical info, but I suspect the answer I'll get on this one will involve spending £1k on some dedicated hardware. Might drop the guys at Emerald an email though.
hms
20 or more Posts ★★★
20 or more Posts ★★★
Posts: 172
Joined: Fri Aug 12, 2011 11:40 am

Re: OBD dongles and CAN data

Post by hms »

I thought the Emerald canbus was as they say in their bumpf 'generic' so wouldn't that mean the data streams were also standard and therefore readable by any canbus compliant obdii reader?
Emerald sounds best place to go!
You may be right about Seloc, but there is a huge amount of info there from it's members.
H
Black S Special goes by the name of Lexie.
JRSC M45, 189.6 bhp JR ARB's, TDR belt tensioner, Steve Heath Rose jointed drop links, Absolutely Shocks GAZ springs and dampers, Alignment by WIM

Image
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

Re: OBD dongles and CAN data

Post by nigelh »

hms wrote:I thought the Emerald canbus was as they say in their bumpf 'generic' so wouldn't that mean the data streams were also standard and therefore readable by any canbus compliant obdii reader?
Emerald sounds best place to go!
H
I'm not sure that's what they mean by generic. The Emerald can be configured to output the data as the 'generic' format or an AIM specific format. The AIM format is used to integrate with AIM dashboard/dataloggers - I believe it is a proprietary format and Emerald do not (probably not permitted to) provide documentation for it.
I think the 'generic' format is just one that Emerald created to support the features of the ECU and were able to openly document allowing others to integrate with it. I could be wrong on this though.

I emailed Emerald for now, so will wait to see what they say.
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

Re: OBD dongles and CAN data

Post by nigelh »

Just adding a bit more info here whilst awaiting a response from Emerald.

I found this post from Harry that gives me an idea of the ELM327 commands currently being used to access ODB data by LapTimer.

I've also found that the OBDLink WIFI is actually based on the STN1100. This provides compatibility with the ELM327 AT command set which is why it works with LapTimer, but also provides an additional ST command set that may provide access to additional CAN data. This might provide a route for accessing the Emerald data.
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

Re: OBD dongles and CAN data

Post by nigelh »

Another small update on this...

I've had confirmation of the wiring, and also OBDLink have confirmed that their products support a 1Mbps CAN link, but this probably requires the use of the STN1100 specific STPBR command rather than the standard ELM327 commands.
Having got a better understanding of what's CAN and what's OBD, I believe that it would be possible to get the OBDLink to talk to the Emerald over CAN, but it would require some new software to get the data - in the case of LapTimer it would have to be either a new sensor type, or possibly a translation layer that adapted a subset of the standard ELM327 commands.

I'm still talking to Emerald, as there MAY be a possibility of integrating some basic OBD2 functionality into the ECU firmware which would remove the need for software changes in applications talking to it.

Harry - given that you have indicated that there have be some changes to the way LapTimer talks to ELM327 devices, it would be useful if you could provide an up to date description of a typical conversation.

Cheers
Nigel
User avatar
Harry
Site Admin
Site Admin
Posts: 10520
Joined: Sun Sep 12, 2010 10:32 am
Location: Siegum, Germany
Contact:

Re: OBD dongles and CAN data

Post by Harry »

There is no fundamental change in the communication to OBD devices. The only thing I changed a year ago is about initializing the ELM chip in a way it doesn't drop connection from time to time.

I'm willing to add some support for what ever you are creating. However, I need a clear design and sample communication sequences from your side. When I started to work with OBD dongles, I used a laptop and this little tool included in Windows... Named "Hyperterminal" or so. It allows you to connect to the serial port representing the BT or Wifi connection to the dongle. You can play around with this to find out what works and what doesn't.

- Harry
Image Image Image Image
nigelh
10 or more Posts ★
10 or more Posts ★
Posts: 14
Joined: Wed Apr 04, 2012 11:52 pm

Re: OBD dongles and CAN data

Post by nigelh »

No problem Harry, I don't use Windows but have suitable alternatives to play around with.

The only reason I thought it might be useful to have an outline of the current command set you use was that it might let me do more of the work for you. If I know what LapTimer does already I can try to follow it as closely as possible to minimise any changes that would be necessary.

I realise that this would be for a limited market and you probably wouldn't want to spend a lot of time on it.
Post Reply