<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>From what RScott has written, the can bus you are on looks to have what we want. I understand everything stops when car is turned off. But, can you try recording while charging and see if it still stops?</div></div></blockquote><div><br></div>Yes, it stops too when it is charging.</div></div></div></blockquote></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div></div><div>This may be an issue. One of the primary used features of OVMS is the ability to monitor the charge, and get alerted if it stops. I guess it is less of an issue with the Volt/Ampera (due to the ICE backup engine), but still required, I guess.</div><div><br></div><div>Can you do some more testing around this. See what happens if you abort a charge early? Perhaps leave it running and see if it starts/stops periodically.</div><div><br></div><div>In the meantime, I'll work on the skeleton. Based on RScott's work, it shouldn't take long.</div><div><br></div><div>The main challenge is going to be converting milliarcseconds to OVMS format latitude/longitude, on an 8 bit microprocessor!</div><div><br></div><div>Anyone here want to help out with an algorithm for that?</div><div><br></div><div><div>Tesla stores it as a long, and looks like 2048*3600 times the latitude or longitude value. We'll need to convert Volt/Ampera milliarcseconds to that Tesla long format, to keep things simple.</div></div><div><br></div><div>The current function for converting Tesla Roadster latitude/longitude to a string format (for the protocol) is:</div><div><br></div></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" face="'Andale Mono'">// Format a Latitude/Longitude as a string</font></div><div><font class="Apple-style-span" face="'Andale Mono'">// <dest> must have room to receive the output</font></div><div><font class="Apple-style-span" face="'Andale Mono'">void format_latlon(long latlon, char* dest)</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  {</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  float res;</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  long lWhole; // Stores digits left of decimal</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  unsigned long ulPart; // Stores digits right of decimal</font></div><div><font class="Apple-style-span" face="'Andale Mono'"><br></font></div><div><font class="Apple-style-span" face="'Andale Mono'">  if (latlon < 0)</font></div><div><font class="Apple-style-span" face="'Andale Mono'">    {</font></div><div><font class="Apple-style-span" face="'Andale Mono'">    *dest++ = '-';</font></div><div><font class="Apple-style-span" face="'Andale Mono'">    latlon = ~latlon; // and invert value</font></div><div><font class="Apple-style-span" face="'Andale Mono'">    }</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  res = (float) latlon / 2048 / 3600; // Tesla specific GPS conversion</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  lWhole = (long) ((float) res); // As the PIC has no floating point support in printf,</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  // we do it manually</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  ulPart = (unsigned long) ((float) res * 1000000) - lWhole * 1000000;</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  sprintf(dest, (rom far char*)"%li.%06li", lWhole, ulPart); // make sure we print leading zero's after the decimal point</font></div><div><font class="Apple-style-span" face="'Andale Mono'">  }</font></div></div></div></div></blockquote><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Is it as simple as Tesla using 2048 as the factor, and Volt/Ampera using 1000?</div><div><br></div><div>Some log data for that, with real latitude+longitude to compare, would be really helpful to confirm whatever we do here.</div><div><br></div><div>Regards, Mark.</div></div></div><div><br></div>P.S. Michael: what color is your Ampera? I'll put a picture in the App for you, so you have something to make you feel good about all this work ;-)<div><br><div><div>On 30 May, 2012, at 2:43 AM, Michael Jochum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi mark,<div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Probably best to continue the discussion on the ovmsdev mailing list, as others there are interested in progress (especially dpeillow and Marcus).</div></div></blockquote>Yes. answer to the list.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>What you have below is a 'cyclic' log. Good for identifying unique messages (by ID) seen on the bus. Can you see if canhack has a normal logging mode to just log all messages with a time stamp?</div></div></blockquote><div><br></div>i will do my best.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>What type of PC do you use? Linux, Mac or Windows?</div></div></blockquote><div><br></div>For this first i use a PC with XP.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>From what RScott has written, the can bus you are on looks to have what we want. I understand everything stops when car is turned off. But, can you try recording while charging and see if it still stops?</div></div></blockquote><div><br></div>Yes, it stops too when it is charging.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>I think that as a starting point we should target a limited amount of information, to just try to get something working and see how feasible this is. Specifically, I suggest:</div><div><br></div><div><ol class="MailOutline"><li>SOC% (CAN ID #206)</li><li>GPS Latitude and Longitude (CAN ID #32A)</li><li>Vehicle Speed (CAN ID #3E9)</li><li>VIN (unknown CAN ID, but supposedly there)</li></ol></div><div><br></div><div>From the document at:</div><div><br></div><div><a href="http://www.EVtools.info/ChevyVoltOBD2CAN.html">http://www.EVtools.info/ChevyVoltOBD2CAN.html</a></div><div><br></div><div>these should be:</div><div><br></div><div><table border="" style="font-family: Times; position: static; z-index: auto; "><tbody><tr><th>CAN ID</th><th>Location</th><th>Data</th><th>Units</th><th>Notes</th></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td></td></tr><tr><td>206</td><td>Bytes 1-2</td><td>Battery SOC</td><td>.250kWh</td><td>Units possibly .244kWh</td></tr><tr><td>32A</td><td>Bytes 1-4</td><td>GPS Latitude</td><td>Milliarcseconds</td><td> </td></tr><tr><td>32A</td><td>Bytes 5-8</td><td>GPS Longitude</td><td>Milliarcseconds</td><td> </td></tr><tr><td>3E9</td><td>Bytes 1-2</td><td>Speed</td><td>1/100 MPH</td><td>55MPH would be 5500 (0x157c)</td></tr></tbody></table><div><br></div></div><div>Looking at your capture, you have:</div><div><br></div><div><ul class="MailOutline"><li><span class="Apple-style-span" style="font-family: monospace; ">206      3   69 C3 00</span><span class="Apple-style-span" style="font-family: monospace; "> </span></li></ul></div></div></blockquote><div><br></div>at this time the battery was charging. i think ist was between 30 and 40 %.</div><div>you must know that the lowest usable Battery power is at 30% an full is at 90%.</div><div>i will got the next log when the battery is full</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ul class="MailOutline"><li><span class="Apple-style-span" style="font-family: monospace; ">32A      8   00 00 00 00 00 00 00 00 </span></li><li><span class="Apple-style-span" style="font-family: monospace; ">3E9      8   00 00 00 00 00 00 00 00</span></li></ul></div><div><br></div><div>Probably your car was stationary or in the garage without GPS signal?</div></div></blockquote><div><br></div>it was stationary in front of my house with clear view to the sky.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>RScott's sample data is:</div><div><br></div><div><ul class="MailOutline"><li><div>11:48:49.885: 206 628600</div></li><li>11:48:54.955: 206 5FCA00</li><li>11:48:49.636: 3E9 0BAC01AC0B3C019E [Speed 29.88MPH]</li><li>11:48:49.870: 3E9 0C3B01C20BED01B4 [Speed 31.31MPH]</li></ul></div><div><br></div><div>Can you try to capture:</div><div><br></div><div><ol class="MailOutline"><li>The SOC% in your car, as displayed by the car itself, and matching capture of ID #206.</li></ol></div></div></blockquote>is coming</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ol class="MailOutline" start="2"><li>Drive down a stretch of road at a constant speed, while logging. Then, get the approximate latitude and longitude of your position and speed you were at, and matching capture of ID #32A and ID #3E9.</li></ol></div></div></blockquote>i only have two hands. :-)</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ol class="MailOutline" start="3"><li>Put the car in the open air, so it has a good GPS signal. Then, get the exact latitude and longitude of your location, and matching capture of ID#32</li></ol></div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><ol class="MailOutline" start="3"><li>The VIN number of your car.</li></ol></div></div></blockquote></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Based on that, we should be able to setup OVMS to capture this and transmit it on to the OVMS server/apps.</div></div></blockquote>yes<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Do you want me to create the framework for this in can_voltampera.c? Maybe easier for me to create the first few messages, and then for you to adjust and fix, as I know the code so well.</div></div></blockquote>ok, so it looks good.<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>This is looking really promising. Your 104 captured IDs seem to match RScott's 105 almost exactly, and most of what we need has already been discovered.</div></div></blockquote>Good. </div><div><br></div><div>Bye</div><div>michael</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Regards, Mark.</div><div><br><div><div>On 29 May, 2012, at 6:03 AM, Michael Jochum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Mark,<br><br>i did the first try to get a CAN Log from my Volt. It works. I got a first small output. Didi it with CANHACK. Unfortunately the Log is not so formated that a Program can read it. A human can. Still waiting for your script.<br>But, ... we have a problem! 10 seconds after the car is shut down the is no more traffic on this CAN bus. 12V are still there.<br>But there are three (3) more CAN Buses in this car. Really!<br>Two at the OBD2 Connector driver side and two at the OBD2 Connector Passenger side.<br>I will made me some adapter to get access to this Signals. Hope they still alive after shutdown the car.<br><br>Here is the small Log: (i think this is NOT a time based log. it seems that this is a log from all seen messages)<br><br><br>Bye<br>Michael<br><br></div></blockquote></div><br></div></div></blockquote><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div></div></div></div><br></div></div></blockquote></div><br></div></body></html>