[Ovmsdev] Volt/Ampera CAN Logs
R. Scott Perry
spamfree4 at rscott.org
Thu May 31 21:34:39 HKT 2012
Hi everyone,
I'm the RScott from gm-volt.com, and I wrote the page at evtools.info
about the Volt and OBD2 data (which I haven't updated in quite some
time). I've read the recent posts to the list about the Volt, and
thought I would provide information here in response.
First, if it would be helpful, I have written a program for Windows to
record data from an OBD2 scanner. It is designed to work with scanners
that use the ELM327 chip (or are compatible). It saves the timestamp,
and saves the data in the format "11:48:45.829: 206 639600". It is run
from a command prompt, and not very user friendly.
For the SOC, the "206 3 69 C3 00" capture indicates CAN ID 206, with 3
bytes of data. The SOC data only uses the first two bytes, so this
would be 0x69C3, or 27075d. Dividing by 4,000 gets 6.769kWh in the
battery, or about 42% of the total battery capacity, which should be 4
bars on the display.
http://gm-volt.com/forum/showthread.php?5328-Volt-Diagnostic-Tool&p=91868#post91868
correlates the SOC number here with the bars displayed.
The VIN can be constructed by taking the number "1" and converting the
CAN IDs 4E9 and 514 to ASCII. So with "4E1 4255313032363839" and "514
4731524436453436", you would end up with 42 55 31 30 32 36 38 39 47 31
52 44 36 45 34 36, where 42 is ASCII for B, 55 is U, etc.
The latitude/longitude conversion is almost the same as what you have
for the Tesla, with two exceptions -- changing the 2048 to 1000, as
noted, and the accounting for negative numbers is different. It seems
that the number the Volt supplies is a 31-bit signed integer. The
easiest way to handle that, I think, would be to add "latlon = latlon <<
1;" before checking for <0, and then "latlon = latlon >> 1;" afterwards.
Running the code you have with those two changes seems to work fine.
The bad news is that I have checked all my log files (I have been
logging almost all the time I have driven for about 8 months now), and
the CAN ID 32A (latitude/longitude) has never shown all zeroes. If the
GPS data is unobtainable, I believe the car reports the most recent
reading. The GPS data comes from the OnStar system, so I am thinking it
may only provide the data if the OnStar service has been activated,
which could be a problem for owners outside of U.S/Canada.
For charging, all I have found so far are some numbers that appear to
show electricity flow to/from the battery. If they are positive,
electricity is going to the battery; if negative, electricity is leaving
the battery. But this will also be positive if the gas engine is on and
charging the battery, as well as if the car is going downhill and the
regenerative braking is being used.
-Scott
More information about the OvmsDev
mailing list