GM Volt Forum banner

1 - 20 of 36 Posts

·
Registered
Joined
·
847 Posts
Discussion Starter #1
Hi,

I just bought an OBD2 USB adapter ("ElmScan 5" from Amazon for $30). It uses the ELM327 chip (careful; there are apparently Chinese knock-offs out there). Most people just buy it and use the software that comes with it, or use other pre-made software. However, you can also use it with a terminal program (typing in commands), or write software for it, which I did.

The Volt has 2 OBD2 connectors. I was able to use the one on the driver's side, but couldn't get anything from the one on the passenger's side (it could be a protocol the adapter doesn't understand, or my programming!). I know that there is a SWCAN bus, but there do not seem to be any reasonably priced adapters for SWCAN yet (although it seems like existing adapters could be changed at little cost to handle SWCAN).

Normally, OBD2 works by sending commands to request data ("I want to know the RPMs of the engine", "Here you go!"). However, I used the ELM327's "Monitor All" (MA) mode, which lets you see all the data on the CAN bus. Actually, most, as the Volt uses a 500kbps CAN bus, and the ElmScan is limited to 500kbps -- but it sends ASCII with other information attached, rather than binary, which can cause the buffer to overflow, so you lose a bit. But there are reasonably priced ($50) adapters out there that overcome that.

The MA mode shows output like this:

451000000000000
096BFF00A120000<DATA ERROR
09739800A
09800000A0080000A16
0C700000000
23872<DATA ERROR
...


According to the CAN specs, the first 3 characters are the hexadecimal ID for whatever is sending the data (451, 096, 097, 098, 0C7, 238 in this case).

After about a week, I've found that there are a bit over 100 of the CAN ID's. With that knowledge, I now have it recording all data (that I can later play back, much faster if needed, to see which numbers are changing and how), that can all appear real-time on a screen (3 columns each with about 35 rows, showing the 3-digit CAN ID and up to the maximum 16 characters of data). Some update really fast, others slowly. Some numbers never change, some rarely change, others change many times per second. Some make no sense, some are obvious (e.g. the VIN).

One catch is that you cannot use the MA mode while also requesting data, so you have to stick with whatever you can listen to on the bus. And without SWCAN, it looks like you cannot get thinks like GPS data, changing volume of the radio, door locks, etc.

But, I've been able to decode a number of things so far, such as the VIN (in 2 packets), MPH (which is actually encoded as 1/100MPH, so if you are going 1.23MPH it would be stored as 123), shifter (PRNDL), accelerator position, and I *think* I may have found the battery SOC (which would also allow for current power in watts, and instantaneous kWh/100 miles).

My main goal has been to find a way to track multiple routes and see which one is most efficient in using energy (for example, a slightly longer route may use less energy than a shorter route, if it is less hilly and a more advantageous speed limit). For this purpose, it looks like I may have enough data.
 

·
Super Moderator
Joined
·
6,225 Posts
Cool work!

Have you seen this post and entire thread.

http://gm-volt.com/forum/showthread.php?5328-Volt-Diagnostic-Tool&p=90997#post90997

WOT stated this in it:
Finally, there IS some General Motors OBD2 MODE 6 and CAN data published into the public domain that might assist you in your efforts located here:http://service.gm.com/gmspo/mode6/
I put the data I got from the Scanguage here:
So-what-will-the-Volts-OBD-show-on-a-product-like-ScanGuage
http://gm-volt.com/forum/showthread.php?5784-So-what-will-the-Volts-OBD-show-on-a-product-like-ScanGuage&p=63472#post63472
 

·
Super Moderator
Joined
·
6,225 Posts
According to the CAN specs, the first 3 characters [12 bits] are the hexadecimal ID for whatever is sending the data (451, 096, 097, 098, 0C7, 238 in this case).
Where were you looking for CAN specs?

The CAN protocol supports two message frame formats, the only essential difference being in the length of the identifier. The “CAN base frame” supports a length of 11 bits for the identifier (formerly known as CAN 2.0 A), and the “CAN extended frame” supports a length of 29 bits for the identifier (formerly known as CAN 2.0 B).
I found this: http://www.specifications.nl/can/protocol/can_UK_protocol.php
and this: http://www.gaw.ru/data/Interface/CAN_BUS.PDF
and this: http://www.can-cia.org/index.php?id=164
 

·
Registered
Joined
·
847 Posts
Discussion Starter #4
Finally, there IS some General Motors OBD2 MODE 6 and CAN data published into the public domain
I still need to look at it some more, but it looks like most of that won't be too useful for the type of data I'm looking for. But for figuring out trouble codes, it provides a lot of information. And reading between the lines, it may provide clues as to how data may be transmitted.

I put the data I got from the Scanguage here:
So-what-will-the-Volts-OBD-show-on-a-product-like-ScanGuage
http://gm-volt.com/forum/showthread.php?5784-So-what-will-the-Volts-OBD-show-on-a-product-like-ScanGuage&p=63472#post63472
That is definitely useful. I haven't even started looking at what the generic OBD2 PIDs will produce.

Where were you looking for CAN specs?
I didn't look too far (you found some great reference sources there!). I was mainly looking at the very basic information, such as 11-bit versus 29-bit addressing. Fortunately, the OBD2 interface takes care of most of the CAN details, and I can just look at the output.

The one catch is trying to find a way to read the SWCAN bus (the data is sitting there on the OBD2 interface, but I don't know if there is any way to read it with the adapter I'm using). That one uses the 29-bit addressing, and I believe would be for messages classified as something like "non-essential functions".

The interesting thing is that none of the data is encrypted in any way (at least any of the data I've encountered). For example, there's one byte that goes from 00 to FE when you press all the way down on the accelerator. If you're monitoring the ID 1A1, you're going to notice that very easily.

I'll be posting more about the IDs I am able to decode.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #6
Just to give everyone an idea of where I'm at, you can check out http://www.evtools.info/kanc.htm . It takes raw data and turns it into something a bit more palatable to the average person.

It's a Google Map that has a marker (one for every ten latitude/longitude updates on the CAN bus), and lets you see the route you took, along with basic information (battery SOC, MPH, engine RPM (0 if off), watts used).

More than anything, it's really a 'proof of concept' hinting at what might be possible.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #7
Questions to answer

Here are a list of some questions I hope to answer with the data I have been collecting:

o How does the efficiency (kWh/100 miles) change at different speeds? Especially when the second motor engages ~70MPH?
o How does the efficiency of the regen change at various speeds when going downhill?
o How does the efficiency of going at a constant speed compare to having to stop in the middle (e.g. at a traffic light)?
o In Mountain Mode, are the higher engine RPMs more or less efficient than the normal lower RPMs?
o How much extra energy is used in a 'jackrabbit' start versus slow acceleration?
o Which is more efficient (at various speeds), air conditioning or having the windows open?
 

·
Registered
Joined
·
2,632 Posts
o How does the efficiency (kWh/100 miles) change at different speeds? Especially when the second motor engages ~70MPH?
The DashDAQ looks like it'll be really good at answering questions like this, especially the first (when I can get to crunching all the data) BUT...

It looks like you have the same problem in New Hampshire (did I get that right?) I have here in San Diego. D*ng difficult to find a tract of flat roadway for repeatable testing! And are you about to go off-line for repeatable testing due to winter? Of course, that should open up all sorts of other testability options for you. There's a whole separate section of PIDs for HVAC operation...

As to different speed efficiencies, the DashDAQ calls out each motor's speed (RPMs), torque, current, and voltage (though I've never seen either motor's voltage differ from the battery's). I've seen Motor A engaged all the way down to 45 MPH or so, and I've seen it still disengaged up into the 80s.

I don't know if the PID ordinals I get from the DashDAQ (in decimal) match up to the ordinals you're seeing on the CAN tool. Would if help if I post the list again (or send you a PM) of what I'm seeing there?
 

·
Super Moderator
Joined
·
6,225 Posts
Just to give everyone an idea of where I'm at, you can check out http://www.evtools.info/kanc.htm . It takes raw data and turns it into something a bit more palatable to the average person.

It's a Google Map that has a marker (one for every ten latitude/longitude updates on the CAN bus), and lets you see the route you took, along with basic information (battery SOC, MPH, engine RPM (0 if off), watts used).

More than anything, it's really a 'proof of concept' hinting at what might be possible.
That is TOO cool. Helpful to zoom in and changing the map to terrain.

No doubt you are thinking of different options/icons to use for:
a) speeds (24-30,31-35,36-40,41-45,etc)
b) SOC (gradient coloring? and green,yellow,red shades)
c) ICE on/off (as even in CS mode the ICE may turn off)
d) etc
 

·
Registered
Joined
·
847 Posts
Discussion Starter #10
The DashDAQ looks like it'll be really good at answering questions like this, especially the first (when I can get to crunching all the data) BUT...
I'm actually in Massachusetts (the Google Maps I posted was from a trip to New Hampshire), but yes, it's tough finding a good spot for repeated testing. My hope is to simply collect enough data that I can crunch it to produce a lot of useful results with just standard driving, but it's too early to tell right now. If elevation data from GPS is available (as latitude/longitude is), that could be extremely helpful (the software could figure out automatically where the car was driven in flat areas, check for constant speed, etc.).

I haven't found the motor torques yet; if I get those, it would help out a lot.

I believe the DashDaq numbers are unique to DashDaq (the numbers in the 1500-1700 range that I saw posted here). The ID numbers I get from CAN range from 150 to 1927.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #11
That is TOO cool. Helpful to zoom in and changing the map to terrain.

No doubt you are thinking of different options/icons to use for:
a) speeds (24-30,31-35,36-40,41-45,etc)
b) SOC (gradient coloring? and green,yellow,red shades)
c) ICE on/off (as even in CS mode the ICE may turn off)
d) etc
The trick is figuring out a way to display the maximum amount of data, without overloading the person looking at it. I started with lines instead of markers, but those don't display information well (but are less cumbersome than tons of markers). You can change the color and width, but displaying information (such as speed) with color isn't as easy as I thought it would be.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #12
My latest endeavor with the data is identifying points along routes, and checking to see which of several ways between those points is most efficient (e.g. the normal, faster route versus the scenic route). I've still got a lot of work to do, but the first one looks like it produced very useful results.

Leaving my house, I usually go a different way than when coming back home, for a stretch of about .8-.9 miles. Looking at the data, it looks like I would be slightly more efficient switching the route I come back (.96kWh versus .85kWh), but switching the route that I take leaving would make a very big change (.31kWh versus .56kWh). It looks like I could save .36kWh for most trips I take by changing that one small part of the route that I take, adding an extra 1-1.5 miles of range to the battery.

Again, I've got a lot more work to do with this, but I was amazed at how much difference there was between two different routes that do not seem very different (the terrain, speed limits, and number of stops are similar).
 

·
Super Moderator
Joined
·
6,225 Posts
The trick is figuring out a way to display the maximum amount of data, without overloading the person looking at it. I started with lines instead of markers, but those don't display information well (but are less cumbersome than tons of markers). You can change the color and width, but displaying information (such as speed) with color isn't as easy as I thought it would be.
I figured it would be a selectable option. You can see how this guy is using gradient coloring to represent efficency.
http://www.voltstats.net/Stats/OwnerMap
 

·
Registered
Joined
·
2,632 Posts
I believe the DashDaq numbers are unique to DashDaq (the numbers in the 1500-1700 range that I saw posted here). The ID numbers I get from CAN range from 150 to 1927.
I dunno. You seem to have access to a lot of data I don't on the DashDAQ, and your number range completely encompasses the DashDAQ's range... For example, do PIDs 1632, 1634, 1593, and 1591 look interesting to you? Those would be Motor B current, voltage, speed, and torque, respectively.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #15

·
Registered
Joined
·
847 Posts
Discussion Starter #16
I dunno. You seem to have access to a lot of data I don't on the DashDAQ, and your number range completely encompasses the DashDAQ's range... For example, do PIDs 1632, 1634, 1593, and 1591 look interesting to you? Those would be Motor B current, voltage, speed, and torque, respectively.
The big difference is that DashDAQ requests the information, whereas I'm just listening to what the car is sending out whenever it sends it. I think there is a ton of information that you can request, if only you know how to do it (which DashDAQ does; not only does it have the Volt info, I believe it also has generic Chevrolet info as well). I believe there are only 102 CAN IDs that are used by the Volt (on the 500kbps bus, at least), although some of them provide multiple pieces of information. I can figure out some of what the car is sending, but I think there are way too many options for what you can request (and some could potentially do things, such as locking doors, that makes experimenting a bit risky). FWIW, I don't have any CAN IDs from 1,424 to 1,903.

It's possible that GM didn't give some of the information that I've found to the DashDAQ people (either because they consider it proprietary, or perhaps there are varying licenses or whatever).
 

·
Registered
Joined
·
847 Posts
Discussion Starter #17
As I sift through all the data, I've found that I need to take more and more notes on everything.

I'm starting a page at http://www.EVtools.info/ChevyVoltOBD2CAN.html that covers what I've discovered so far (I'd simply post here, but would need to keep editing posts all the time). The most useful information:

The 105 CAN IDs:

Code:
096 097 098 0AA 0B1 0B9 0BA 0BB   0BC 0BD 0C1 0C5 0C7 0C9 0D1 0D3
0F1 120 12A 130 135 137 139 140   148 160 17D 182 185 186 1A1 1A3
1C3 1C4 1C5 1C6 1DF 1E1 1E5 1E9   1EB 1ED 1EF 1F1 1F3 1F4 1F5 1FB
200 202 204 206 214 222 224 226   228 230 236 238 287 2C3 2C7 2F1
2F9 32A 348 34A 3C1 3C9 3CB 3D1   3DC 3DD 3E3 3E9 3ED 3F1 3F9 3FB
3FC 451 4C1 4C5 4C7 4C9 4CB 4D1   4D7 4D9 4E1 4E9 4F1 500 514 52A
530 589 770 772 773 778 77D 77F   787
And the data I've discovered so far:

0C9 Byte 5 Accelerator 0 (0%) to 254 (100%)
0F1 Byte 2 Brake 0 (0%) to Unknown (254?) Typical pressure on brake pedal generates about 30.
135 Byte 1 Drive Position 0=Park, 1=Neutral, 2=Drive/L, 3=Reverse
1A1 Byte 8 Accelerator 0 (0%) to 254 (100%)
1C3 Byte 8 Accelerator 0 (0%) to 254 (100%)
1EF Bytes 3-4 Gas Engine RPM RPM
1F5 Byte 4 Shift Position PRNDL 1=Park, 2=Reverse, N=Neutral, D=Drive, L=Low
206 Bytes 1-2 Battery SOC .250kWh Units possibly .244kWh
32A Bytes 1-4 GPS Latitude Milliarcseconds
32A Bytes 5-8 GPS Longitude Milliarcseconds
3E9 Bytes 1-2 Speed 1/100 MPH 55MPH would be 5500 (0x157c)

And at some point soon, I hope to be able to provide the program I wrote to collect the data, to allow others the ability to start recording their driving. The neat thing is that the program records all data on the primary CAN bus, so once you've collected the data, it can be used later after new information is discovered (for example, I don't think elevation is sent on the primary CAN bus, but if it is, you will have the ability to use that information later, since it will get recorded).
 

·
Registered
Joined
·
847 Posts
Discussion Starter #18
Just to give everyone an idea of where I'm at, you can check out http://www.evtools.info/kanc.htm . It takes raw data and turns it into something a bit more palatable to the average person.
I've got another version up at http://www.evtools.info/kanc2.htm.

This one is different -- instead of lots of markers, it shows the path (like you'll see in Google Maps if you ask for directions, except these are generated on the GPS data from the Volt). The path is in red where you are using energy, green when you are gaining energy (regen). Both are darker the more electricity used/generated. This one also shows speed, miles in the segment, kWh used in the segment, and kWh per 100 miles (which varies a lot from segment to segment). In this map, you'll see lots of regen, as much of it is downhill.

This one gives you a better idea visually of a route, and where the most efficient and inefficient sections are. I'm working my way to having multiple trips compiled together, to compare different ways of getting from one point to another.

I do have another version of the original that has better markers (color-coded with the speed on them), but I'm still working on that.
 

·
Super Moderator
Joined
·
6,225 Posts
I've got another version up at http://www.evtools.info/kanc2.htm.

This one is different -- instead of lots of markers, it shows the path (like you'll see in Google Maps if you ask for directions, except these are generated on the GPS data from the Volt). The path is in red where you are using energy, green when you are gaining energy (regen). Both are darker the more electricity used/generated. This one also shows speed, miles in the segment, kWh used in the segment, and kWh per 100 miles (which varies a lot from segment to segment). In this map, you'll see lots of regen, as much of it is downhill.

This one gives you a better idea visually of a route, and where the most efficient and inefficient sections are. I'm working my way to having multiple trips compiled together, to compare different ways of getting from one point to another.

I do have another version of the original that has better markers (color-coded with the speed on them), but I'm still working on that.
Very cool. It is even cooler when you turn "MAP->terrain" on! And then zoom in (+) gets cooler yet!
Can you put direction of travel or odometer every 1/8 miles or something? Just thinking out loud as I was trying to guys based on green/red of you direction. I can tell if I zoom in on terrain and see the topo lines/numbers.
 

·
Registered
Joined
·
847 Posts
Discussion Starter #20
I guess it's time for an update.

I'm getting a bit too intimate with the numbers; I really ought to take a break. I've found a number that is sent a couple times a minute that appears to be the number of seconds that have elapsed since the car was built. More importantly, I've found the elevation, to go along with latitude/longitude.

I'm not quite sure where I'm headed with all this. The first thing I want to do is make the 'recorder' piece available to anyone who wants it (that hooks up the $30-or-so OBD2 adapter to a laptop/netbook, to record all data that goes over the bus). That way, anyone interested can start recording data ASAP.

As for what to do with the data, I keep doing more, exploring, but haven't gotten as far as I had hoped (as I'm also busy decoding all the data I can, as well as doing some non-Volt things too!). I've added a tool that displays all the log files, letting you see where you went, the length of the trip, the "Bird's Eye" mileage and kWh per 100 Bird's Eye miles (e.g. to better determine which route is more efficient). I've also added code to extrapolate data, so that you can get, for example, speed readings every 1/100 or 1/1000 second (extrapolated, so it isn't exact), which overcomes the problem of getting different data at different times. I'm hoping to get it so that it will keep track of every point along a route (perhaps every foot or 10 feet or so), and store data about that point (average speed, kWh used, elevation, etc.), leading to more ideas about what to add. I'm also thinking of adding a webserver that would let you interface with it and Google Maps (like the 2 I've posted about here).

I'm wondering, too, if all new GM cars have so much data so easily accessible, or if this is new for the Volt.
 
1 - 20 of 36 Posts
Top