[Ovmsdev] Leaf 2016 30Kwh flapping SOC

Mark Webb-Johnson mark at webb-johnson.net
Wed May 2 20:00:04 HKT 2018


Are we sure we have the right cables? Remember that on the Nissan Leaf specific cable, the two buses are switched. On the new OBDII generic cables, we have both buses available.

Regards, Mark

> On 2 May 2018, at 7:55 PM, Tom Parker <tom at carrott.org> wrote:
> 
> On 02/05/18 01:08, ovms wrote: 
>> case 0x50d:   //Changed this from 5bc. 50d is the instrument SOC
>>     {
>>       uint16_t nl_gids = ((uint16_t) d[0] << 2) | ((d[1] & 0xc0) >> 6);
>>       if (nl_gids == 1023)
>>         {
>>         
>>         break;
>>         }
>>       uint16_t max_gids = MyConfig.GetParamValueInt("xnl", "maxGids", GEN_1_NEW_CAR_GIDS);
>>       float km_per_kwh = MyConfig.GetParamValueFloat("xnl", "kmPerKWh", GEN_1_KM_PER_KWH);
>>       float wh_per_gid = MyConfig.GetParamValueFloat("xnl", "whPerGid", GEN_1_WH_PER_GID);
>>  
>>       m_gids->SetValue(nl_gids);
>>       StandardMetrics.ms_v_bat_soc->SetValue(nl_gids / 4);  //Changed this so the value is divided by 4.
>>  
>>  
>> SOC now shows exactly the same in the app as the instrument-panel does, and is not flapping. (I know the instrument-panel is different from the true SOC)
> 
> I wasn't able to reproduce this. On my car and in the CAN bus captures I've got, there is no 0x50d frame on the EV bus. Now that I'm back in the house, I see that 0x50d is present on the Car CAN bus, but I don't have any data on what's there.
> 
> My notes indicate that 0x55b on the EV bus contains the state of charge, and I've implemented this at https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/master...carrott:nissan-leaf-soc-instrument?expand=1 <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/compare/master...carrott:nissan-leaf-soc-instrument?expand=1> along with a configuration option to choose how to show the SOC.
> 
> However 0x55b doesn't work how I expected on my 2016 24kWh car, I see 
> 
> xnl.v.bat.gids                           140
> xnl.v.bat.soc.instrument                 56.3%
> xnl.v.bat.soc.newcar                     49.8221%
> 
> but the instrument cluster displays 52%. Could it be displaying 56.3 - 5 = 51.3 rounded up to 52?
> 
> Should I be looking at 0x50d on the car bus to faithfully display what the instrument cluster displays? I'll check tomorrow.
> 
> Assuming we get this working, should we default to using the instrument cluster state of charge, or the "new car" state of charge? I'm guessing we should go with the instrument cluster value, which is a change from previous behavior on the leaf but is in keeping with Mark's "re-implement the broken calculations by the car".
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180502/ddc91c24/attachment.htm>


More information about the OvmsDev mailing list