LEAF CANbus decoding. (Open discussion)

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
I recently picked up a Leaf and will be doing some CAN datalogging and reverse engineering using our J2534 cable, the Openport 2.0. Besides sniffing CAN / ISO15765 data with the PC, I'm going to try to set up stand-alone logging support to SD for the Leaf as well. Unfortunately, we only do CAN on the standard pins, so you would need an adapter cable to log from the other busses.

Colby

GroundLoop said:
If you have an interest in hacking in this area, the Service Manual is a mandatory $20 ante, of course.

There are quite a few Internet primers on CAN-bus itself. ISO and SAE mandate certain behavior for OBD use, but the LEAF isn't necessarily subject to any of that. ISO11898-1 descirbes the physical link.

It's not a complicated LAN. Unfortunately, it has few consumer applications, so test equipment and adapters tend to be proprietary, esoteric, and expensive. Each bus is a differential pair of signals, and no ground is required for some (isolated) adapters. Unshielded twisted-pair wire is generally sufficient for connections. I use standard CAT5 ethernet, and have not used termination when plugging into the DLC.

Both of the CANbus networks operate at 500kbps. This isn't particularly demanding.
(From what I can tell, the Primary CAN is more 'saturated' with messages than the EV CAN.)
The EV CAN contents can (barely) fit into a 230kbps RS-232 stream, so some of the CAN-to-RS232 adapters may work.

The USB-connected adapters are preferred, since they tend to have 1Mbps+ bandwidth available.

Adapter examples are:
  • ValueCAN or NeoIV from Intrepid Systems
  • Acacetus CAN-uVCCM (limited to 56kbps! useless here)
  • Lawicel, both RS-232 and USB available
 
Bad idea. They are separated for a reason - the fundamental being safety. The car would be throwing off diagnostic messages as soon as you add extra traffic like that. Plus looking at traffic levels during business as usual is one thing - but there are different rates at different states so there's no gaurente that non-saturation in your driveway assures safety during some emergency or other diagnostic state


GroundLoop said:
I would love to find the raw 4-wheel TPMS pressures! Supposedly the senders have quite a bit of resolution in their reports, so a display could be useful indeed. You could (indirectly) track temperature that way too.


Has anyone tried CONNECTING two or three of the Can Bus pairs together? Wait -- Hear me out.. :)
CAN is naturally self-arbitrating, and all the existing nodes could broadcast onto the other bus as well.
There would be twice as much traffic, yes, but it's not saturated.
There would be four terminators on the network instead of the needed two, but I don't think the load would be unreasonable.

Then you could use one CANbus receiver board to monitor both CAN + EV-CAN at the same time.

Are the message IDs on all three busses Unique?
I'm thinking this over..
 
I've added traffic. No errors get thrown.

It comes down to latency. Yes it self-arbitrating but there is also the priority of the messages to contend with. The EV CAN bus has a lot fewer messages because they need to be low latency and they are sent quite often. So while I agree it *could* work, assuming there are no conflicting messages, it would be a bad idea. And you also have termination to deal with. Connecting the two busses would mess with the propagation and termination.
 
yes latency (which can be made worse with more nodes/ more traffic). Alot of these processors will start throwing diagnostics/errors as soon as 2 or 3 messages (that they are programmed to deem important) are missed. I'm working on a GM ECU right now which does this. Basically I tried to simplify it all in terms of safety - because I don't want anyone throwing these lines together and possibly causing some dangerous condition. alot of consideration goes into having multiple busses - and not linking them all together in one string that could be corrupted or disabled
 
I can third (or it is 4th) the warning on NOT to tie the CAN Busses together! Not only will this put the electrical specification of the bus out of spec due due the added termination load, but it will definitely affect error rates on the bus, which is critical on the EV bus because that's where the "drive by wire" information is relayed from the VCM to the Inverter and back.

-Phil
 
Although most of the MsgIDs on each CAN bus are unique to that bus, there are a few MsgIDs on each bus that also occur on another bus.

It is unknown at this point if these same-ID messages are just relayed copies of the original message (duplicate data), or if the message data-bytes are different.

Likewise, the relative timing of these Same-ID messages is unknown.
 
Hi everyone, I apologize if I missed any discussion on this topic, but has anyone done any decoding on whether it's possible to enable or disable charging, or alter the charge timers through the CAN bus?

Is the charger and bms unit connected on the EV CAN bus?
 
Not much research that I am aware of.

The Charging Controller needs access to the battery pack information, and
the Timer settings, and date and time information.

Do you want to do some experiments?
 
garygid said:
Not much research that I am aware of.

The Charging Controller needs access to the battery pack information, and
the Timer settings, and date and time information.

Do you want to do some experiments?

Thanks for the reply Gary, Let me know what I can help out with if you have any ideas.

I have Value CAN 3 with an evaluation version of Vehicle Spy right now that allows me to make a CAN gateway. I'm thinking of physically splicing the CAN wires going into individual components to determine exactly which message ID's gets sent out. One problem I'm afraid of is accidently tripping DTC's if my CAN gateway fails, which will report a Uxxxx CAN communication loss on the LEAF. Does anyone know whether this will, for whatever reason, would cause damage to the vehicle even after removing the CAN gateway afterwards?
 
Tapping into the existing CAN wires is basically the same as listening at the OBD
connector. Cutting the wires and trying to insert a bi-directional "isolator" is risky,
since one does not know what external messages to ACK to. Since the LEAF's CAN
bus works at 500k baud, the "isolator" has to be very quick in passing the message
bits through the isolator.

With task-specific hardware, I guess it could be done, but it seems non-trivial.

If you try it, be very careful.
 
I am fairly certain that 55b is the actual SOC in D1&D2:

55b:D1[7:0]<<2+D2[7:6]>>6 = SOC % X 10.

I get exactly 80.0 on an 80% charge and 95.1-95.6 on a 100% charge. This suggests that this is actually what is used to dtermine the stop point on an 80% charge. I was wondering if anyone who hasn't seen the southwest loss impact could take a look. I'm curious if it shows > 95% for a new battery or if 95% is the target. Since 80% scales with the battery capacity degradation I would expect the 95% too as well but maybe less precisely since they use pack volts to stop instead of SOC.
 
TickTock said:
I am fairly certain that 55b is the actual SOC in D1&D2:

55b:D1[7:0]<<2+D2[7:6]>>6 = SOC % X 10.

I get exactly 80.0 on an 80% charge and 95.1-95.6 on a 100% charge. This suggests that this is actually what is used to dtermine the stop point on an 80% charge. I was wondering if anyone who hasn't seen the southwest loss impact could take a look. I'm curious if it shows > 95% for a new battery or if 95% is the target. Since 80% scales with the battery capacity degradation I would expect the 95% too as well but maybe less precisely since they use pack volts to stop instead of SOC.

My car has 12K miles on it, but I'll try this out on my LeafCAN this weekend.
 
lincomatic said:
TickTock said:
I am fairly certain that 55b is the actual SOC in D1&D2:

55b:D1[7:0]<<2+D2[7:6]>>6 = SOC % X 10.

I get exactly 80.0 on an 80% charge and 95.1-95.6 on a 100% charge. This suggests that this is actually what is used to dtermine the stop point on an 80% charge. I was wondering if anyone who hasn't seen the southwest loss impact could take a look. I'm curious if it shows > 95% for a new battery or if 95% is the target. Since 80% scales with the battery capacity degradation I would expect the 95% too as well but maybe less precisely since they use pack volts to stop instead of SOC.

My car has 12K miles on it, but I'll try this out on my LeafCAN this weekend.

Lincomatic, send me the code and I will try it also... I have 17k and 1 bar down. Full charge gets me 223 Gids...
 
June 2 I had 281 Gids. The summer has not been kind to me. I now charge 100% to around 95%. My 80% started at 82.5 and it is now 78.4%

This is within the range I expected so I can live with it.

Lithium batteries degrade and that is a fact! I read on the Tesla forum that they expect 70% after seven years. Motorola considers the radios I work with to have a defective battery at less than 80% capacity.
 
GlennD said:
June 2 I had 281 Gids. The summer has not been kind to me. I now charge 100% to around 95%. My 80% started at 82.5 and it is now 78.4%

This is within the range I expected so I can live with it.

Lithium batteries degrade and that is a fact! I read on the Tesla forum that they expect 70% after seven years. Motorola considers the radios I work with to have a defective battery at less than 80% capacity.
Am I right in assuming your stated percentages are gids/281?
 
TickTock said:
I am fairly certain that 55b is the actual SOC in D1&D2:

55b:D1[7:0]<<2+D2[7:6]>>6 = SOC % X 10.

I get exactly 80.0 on an 80% charge and 95.1-95.6 on a 100% charge. This suggests that this is actually what is used to dtermine the stop point on an 80% charge. I was wondering if anyone who hasn't seen the southwest loss impact could take a look. I'm curious if it shows > 95% for a new battery or if 95% is the target. Since 80% scales with the battery capacity degradation I would expect the 95% too as well but maybe less precisely since they use pack volts to stop instead of SOC.

OK, I'll play. My LEAF is not so young ~ 18kmi and 20 mos old. Still have 12 bars. I'm in Southern Cal foothills.
I checked the CAN bus data (55B) with your scale factor for "SOC" above when it had 9 bars; then charged to 80% then charged to 100%

Began at 9 bars; "Gids" = 189; "SOC" = 72.1%
Charged to "80%"; 10 bars; "Gids" = 219; "SOC" = 80.0%
Charged to "100%"; 12 bars; "Gids" = 252; "SOC" = 94.2%

Sorry, guess I can't tell you if > 95% is likely with newer pack. But, results seem reasonable to me.
I'll be interested in trying this when the weather cools down.
 
Back
Top