<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Michael,<div><br></div><div>OK. This looks like an extension to standard OBDII over CAN. See:</div><div><br></div><div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><a href="http://en.wikipedia.org/wiki/OBD-II_PIDs#CAN_.2811-bit.29_Bus_format">http://en.wikipedia.org/wiki/OBD-II_PIDs#CAN_.2811-bit.29_Bus_format</a></div><div><a href="http://mbed.org/cookbook/OBDII-Can-Bus">http://mbed.org/cookbook/OBDII-Can-Bus</a></div></blockquote></div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">send: 7E4 8 06 2C FE 43 69 43 68 00</div></blockquote><br></div><div>OBDII extension:</div><div><ul class="MailOutline"><li>06 is the number of bytes in the message</li><li>2C is a custom mode</li><li>FE 43 69 43 68 00 would normally be the OBDII PID code, but here we don't know as it is custom</li></ul></div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">send: 7E4 8 03 AA 04 FE 00 00 00 00</div></blockquote></div><div><br></div><div>Similarly, 03 is the length, AA 04 FE is the message.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">return: 7EC 8 02 6C FE AA AA AA AA AA</div></blockquote></div><div><br></div><div>02 is the length, 6C FE is the message. The rest is garbage.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">return: 5EC 8 FE 4A 6F 00 00 00 00 00 [repeat 160 times]</div></blockquote></div><div><br></div><div>I think this is just the raw message (not OBDII). It is completely different from an OBDII over CAN reply.</div><div><br></div><div>It is not unusual for the physical controller ID to be a fixed offset from the OBDII response ID. In standard OBDII over CAN, the offset is often 8. Here, we're seeing an offset of 0x0200.</div><div><br></div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Idea:</div><div>car is off. -> no data on can bus.</div><div>car is off and charging -> can bus wakes every ~30 MInutes up. You can see in my Logs.</div><div>When the can bus is awake (it gets valid SOC Data for example), the Module send the initialization sequence and then the demand sequence.</div><div>It can send the demand sequence every 10seconds until the the can bus go sleep.</div><div>When there are no valid values in 5EC (the rest is valid) (temperature is zero, we normally don't have -40°C), the module sends the initialization sequnece again.</div></div></blockquote></div><div><div><div><br></div><div>I think this is a fine approach.</div><div><br></div><div>For your convenience, I've added a hook function vehicle_fn_ticker10() to the vehicle layer. You can hook into that to get a callback once every 10 seconds.</div><div><br></div><div>I suggest you wrap this logic around a "if (sys_features[FEATURE_CANWRITE])" so that you only do this if canwrite is on. Don't write to the can bus unless it has been opened in active mode (otherwise the system will loop waiting for the bus to be writable, then watchdog timeout as it never does).</div><div><br></div><div>Other than that, the charging / not-charging state can be maintained in the way you suggest. You should also be able to detect charging is stopped (charging -> not-charging) and check the SOC% to decide whether to alert or not. I think "twizy" Michael does something similar, so you may want to see how he does it and do it the same way.</div><div><br></div><div>The temperature is a nice bonus. I wonder what other fun stuff is hiding :-)</div><div><br></div><div>Regards, Mark.</div><div><br></div><div>On 30 Dec, 2012, at 12:50 AM, <a href="mailto:mikeljo@me.com">mikeljo@me.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>Johannes find some interesting stuff:</div><div><br></div><div><div>send: 7E4 8 06 2C FE 43 69 43 68 00</div><div>return: 7EC 8 02 6C FE AA AA AA AA AA</div><div>Set Configuration to get Voltage and Current</div><div><br></div><div>send: 7E4 8 03 AA 04 FE 00 00 00 00</div><div>return: 5EC 8 FE 4A 6F 00 00 00 00 00 [repeat 160 times]</div><div><br></div><div>Byte 1 (4A) Current</div><div>Byte 2 (6F) Voltage</div><div>Calculation:</div><div>I = Byte 1 * 0.2 in Ampere</div><div>U = Byte 2 / 2 in Volt</div><div><br></div><div>And continue:</div><div><br></div><div>Sending this two sequenzes <span style="background-color: rgb(255, 255, 255); font-family: arial, sans-serif; font-size: 13px; white-space: nowrap; ">immediately </span></div><div>7E4 8 10 08 2C FE 43 69 43 68</div><div>7E4 8 21 80 1F 00 00 00 00 00</div><div><br></div><div>gives with this:</div><div>send: 7E4 8 03 AA 04 FE 00 00 00 00</div><div>return: 5EC 8 FE 4A 6F 64 00 00 00 00 [repeat 160 times]</div><div><br></div><div>Byte 1 and 2 same as before, and in Byte 3 Temperature in °C</div><div>T = (Byte 3 / 2 ) - 40</div><div>This is the Temp. in raw. in Byte 4 could be Temp filtered. Still searching the Sequence for this.</div><div><br></div><div><br></div><div>Strom: 0x4A * 0,2 = 14,8A</div><div>Spannung: 0x6F * 2 = 222V</div><div>Temperatur: (0x64 / 2) - 40 = 10°C</div><div><br></div><div>Current and Temperature are ok. I think the Voltage must have an Offset (8 or 9) too. Cause my Voltage is around 230V.</div><div><br></div><div>It seems that the config send only once (every x Minutes, or so) and the "give me data" ID (7E4 8 03 AA 04 FE 00 00 00 00) every time you want to get it.</div><div>Then you get ~160 times the requested Values in ID 5EC.</div><div><br></div></div><div>Idea:</div><div>car is off. -> no data on can bus.</div><div>car is off and charging -> can bus wakes every ~30 MInutes up. You can see in my Logs.</div><div>When the can bus is awake (it gets valid SOC Data for example), the Module send the initialization sequence and then the demand sequence.</div><div>It can send the demand sequence every 10seconds until the the can bus go sleep.</div><div>When there are no valid values in 5EC (the rest is valid) (temperature is zero, we normally don't have -40°C), the module sends the initialization sequnece again.</div><div><br></div><div>Bye</div><div>Michael J.</div><div><br></div><div><br><div><div>Am 28.12.2012 um 01:41 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</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; "><div><br></div>Can he provide the logs from the moment the DashDAQ is connected? Perhaps 10 seconds without charging, then start the charge and continue to monitor for 1 minute.<div><br></div><div>It seems possible that this is enabled by turning on a monitoring mode, but unexpected. This sort of thing would normally just be transmitted as part of the normal message stream.</div><div><br></div><div>Regards, Mark</div><div><br><div><div>On 27 Dec, 2012, at 11:58 PM, <a href="mailto:mikeljo@me.com">mikeljo@me.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Am 27.12.2012 um 01:11 schrieb Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Now, on to the other messages (I spoke about yesterday in the other thread). I'll try to drum up some interest in the forums to see if anyone can help with the decodes. It would be good if you could do the same.</span></blockquote></div><br><div>And here some first results from tachy:</div><div><br></div><div><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">CANUSB mit DashDAQ kombiniert bringts! Ich habe soeben den Code für das Ladegerät (Ladestrom/Ladespannung) rausbekommen:</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 3 Ladestrom Einheit 0.2 A (Bsp: 14.2 A = 47h)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 4 Ladespannung Einheit 2 V (Bsp: 222V = 6Fh)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><br></div><div><br></div><div>He works with a DashDAQ and a CANUSB, both connected with a ODB2 Y-Cable.</div><div>So he find the Charging Current und Charging Voltage:</div><div><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 3 Charge Current Unit 0.2 A (Example: 14.2 A = 47h)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "><span style="color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); ">5EC Byte 4 Charge Voltage Unit 2 V (Example: 222V = 6Fh)</span><br style="margin: 0px; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(236, 243, 247); "></div><div><br></div><div>Fast enough?</div><div><br></div><div>BUT!!! This IDs doesn't exist in my Logs. i Think the DasDaq send a Command to get this ID.</div><div><br></div><div><br></div><div>Bye</div><div>michael</div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br><a href="http://lists.teslaclub.hk/mailman/listinfo/ovmsdev">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev</a><br></blockquote></div><br></div></div>_______________________________________________<br>OvmsDev mailing list<br><a href="mailto:OvmsDev@lists.teslaclub.hk">OvmsDev@lists.teslaclub.hk</a><br>http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br></blockquote></div><br></div></body></html>