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.
Working on a new *calibrated* braking guage (previously was just qualitative since I didn't know the scalars to convert to kW). I am implementing the following power formulas based on empirical data from my logs (all have units of kW):

availableRegen = cc260.1 * 1
motorkW = cc180.23 * cc176.23 * 0.0000345
targetBraking = cc1cb.23 * cc176.23 * 0.0000345 (noticed that the targetBraking message seems to have units equivalent to motor amps(torque))
appliedRegen = cc1d5.01 * cc176.23 * 0.00002875 (targetBraking scaler divided by 1.2)
friction = cc292.6 * cc176.23 * 0.0019 (this is the energy being expended in kW in the mechanical brakes - at least what the Leaf seems to think)

Here an example stop with the above scalars applied (Y axis is kW). AppliedRegen appears to have a slight lag over the actual power into the battery but otherwise these track pretty well (here as well as the rest of the log - zooming into one for clarity). In this example, it looks like I was "coasting" in ECO at the beginning (foot off both pedals so was getting the ECO regen equal to the available regen), then applied the brake after briefly touching the accel.
 

Attachments

  • regenkW.jpg
    regenkW.jpg
    50.8 KB · Views: 162
TickTock said:
JeremyW said:
I wonder if this message is there while charging. If so it would be interesting to see it change during L2 or quick charging!
CARCAN is not active during charging (unless you open a door or do something to wake it up). THis message is on the carcan.
Doh! I forgot about that. There must be an equivalent message on the EV can bus since the Lithium battery controller is most likely the final say in how much the pack can take (and it's located on that bus). I'm interested in this message not only while driving but for those of us adding additional chargers. We're currently just ramping down when the main OBC starts tapering which works so far with one additional charger but I'm not sure if that's the best plan with say two additional units.

I'm out of town for two days otherwise I'd listen for that message during charging after waking the car-can up with the unlock button. :)
 
Could use some help with CarWings CAN messages.

I believe it has already been reported that message 0x68C is the wake-up CarWings message. It is a single byte of 0x00 and wakes up the EV-CAN.

The other message is 0x56E and seems to be CarWings status/state. Again a single data byte message. This message repeats every 100 msecs on the EV-CAN when it is awake.

My best guess at the mean of the data byte is:

0x4E Climate control being turned on
0x56 Climate control being turned off
0x66 Remote charge start.
0x46 Status request (When the Leaf is being driven you will also see this value)
0x86 Idle (?)

Perhaps others can verify what I think I have found.
 
The TCU is only on the EV bus so this makes sense. I will verify tomorrow the 68c messages, Jim. Also the TCU wakes up the VCM via a logic line, so it's not only the can message waking up the bus.
 
JeremyW said:
The TCU is only on the EV bus so this makes sense. I will verify tomorrow the 68c messages, Jim. Also the TCU wakes up the VCM via a logic line, so it's not only the can message waking up the bus.
Only 2011/2012 have the dedicated logic line to wake up VCM. Later years use the EV-CAN bus.

My Leaf is a 2011 so has dedicated lines. However, I am installing a WattsLeft meter on Friday into a 2014 Leaf and will try to take some traces to see if I can capture any new messages.
 
Well that's good news for 13+ owners! I've been studying the 12 manual a bit too much I guess :oops:

You can wake the ev can bus for 15 minutes by hitting timer override. Might be a good way to test 68c messages on the older leafs.
 
Turbo, I'm seeing 603 on the CAR can bus just after 68c happens on the EV bus. Same 1 byte of 0x00. I think this may only happen when the car is on... Or perhaps it's a single blip on the bus when the car is off. I can't quite tell from my current logs.
 
Turbo3 said:
Could use some help with CarWings CAN messages.

I believe it has already been reported that message 0x68C is the wake-up CarWings message. It is a single byte of 0x00 and wakes up the EV-CAN.

The other message is 0x56E and seems to be CarWings status/state. Again a single data byte message. This message repeats every 100 msecs on the EV-CAN when it is awake.

My best guess at the mean of the data byte is:

0x4E Climate control being turned on
0x56 Climate control being turned off
0x66 Remote charge start.
0x46 Status request (When the Leaf is being driven you will also see this value)
0x86 Idle (?)

Perhaps others can verify what I think I have found.

Confirmed all of the above. Also noticing before a 0x66, there will be one 0x46 message.
 
Here's something fun (re: carwings)...

4E in hex is 78 in decimal. Guess what the default temperature is for carwings... 78 degrees F!

Someone should try unplugging the tcu and sending something like 40 to see if it will run the A/C to a colder temperature.

Or maybe it's not that easy...
Code:
hex	binary	state
86	10000110	idle
46	01000110	status
4E	01001110	cc on
56	01010110	cc off
66	01100110	remote charge
Looks like there are just simple bit flags... from the highest bit: idle, VCM wake-up logic line status, remote charge, cc off, cc on, unknown, unknown, 0. The unknowns could be 12v supply voltage voltage ok and "within cell coverage"

Edit: I had 66 as 01100111 when it should be 01100110. So remote charge does not require two bits.
 
JeremyW said:
Here's something fun (re: carwings)...

4E in hex is 78 in decimal. Guess what the default temperature is for carwings... 78 degrees F!

Someone should try unplugging the tcu and sending something like 40 to see if it will run the A/C to a colder temperature.

Or maybe it's not that easy...
Code:
hex	binary	state
46	01000110	status
86	10000110	idle
4E	01001110	cc on
56	01010110	cc off
66	01100111	remote charge
Looks like there are just simple bit flags... from the highest bit: idle, "doing something", remote charge, cc off, cc on, unknown, unknown, remote charge. The unknowns could be 12v supply voltage voltage ok and "within cell coverage"

Not sure why remote charge requires two bits. Wonder what happens if you send 65 or 47?
...sure would be wonderful to discover that one of those "unknown" bits is a "remote charge off" bit. :)
 
TickTock said:
...sure would be wonderful to discover that one of those "unknown" bits is a "remote charge off" bit. :)
Sure would! My big thing is controlling pre-cool or pre-heat instead of 78 degrees all the time. Or anything new, really. Eventually I'll try unplugging my TCU... Perhaps a new screen for the CANary?? ;)

I'm playing around with CAN-Do an I'm sort of "cheating" using my Brusa to get temperature measurements. Looking back on some of the early work of the CAN bus discussion it was thought that msg 55A had some sort of battery temperature in it. Well we know now that you have to query for that but I did find byte 1 (or byte 2 in CAN-Do :roll: ) contains temperature of ether the inverter casing or IGBT's or maybe DC/DC or *something* right under the hood because it tracks my external temperature sensor I have right next to the Brusa under the hood almost exactly during charging. My brusa has no connection to the 12v bus so it is not on when the car isn't charging so I can't compare drive temps.
 

Attachments

  • brusavs55A.jpg
    brusavs55A.jpg
    31.4 KB · Views: 102
I forgot about a screenshot I took of leaflink when I was connected to a quick charger:

IMG_1226.PNG

So there's that "state" that we haven't covered yet. :)
 
Jeremy also mentioned in a PM that byte0 of msgID:260 appears to be Available Power similar to byte1 being Available Regen. It appears he is right. I plotted it on a log where I hit turtle (at 5 gids) and it did seem to drop with the dropping Power Bubbles. Good find, Jeremy! In the graph below, AP is byte0 and AR is byte1.
 

Attachments

  • ARAP.jpg
    ARAP.jpg
    81.6 KB · Views: 88
I was hoping it would give us a bit better resolution of power available as you get down that low. It looks like does to an extent but right as you hit turtle I can see that you still get pushed of a cliff so to speak! :( The best way to see what shape you are in when down that low is still probably pack voltage. Preferably something like the leaf DD has. Feature coming soon to the CANary. ;)
 
Again tonight going through the old EV CAN message thread reading about 55A... Sure were chomping at the bit for battery temps back then. ;) Looking at the service manual section for the motor (TMS or traction motor system), there are three sensors available on the monitoring screen of the consult. They are motor temperature, Inverter 2, and Inverter 4. There are actually 5 temperature sensors, presumably you must query the inverter for the others. There's also one lone motor temperature sensor.

So as far as the 55A message, what's what? Well....

From my previous knowledge and help from my Brusa's external temp sensor I'm pretty sure the byte 1 message is the inverter control board temperature sensor. There is a pcb that sits just under the cover on the 11/12's inverter that manages the communication and command to the actual IGBT driver board. Since my external temperature sensor is just resting on my "new" inverter cover (see the brusa thread for more info on that), I've got reason to believe that this sensor is located on that board. During drive there's some heat from the capacitor array below the board but I'm not sure how much since my Brusa is not powered during drive.

So that's one down two to go...

Here's a graph during a 45 minute drive at ~60mph thanks to Gary from the other thread:
d236-drive35.png

Note D2 here is assuming D1 is the lowest byte, so it should read D1 if you assume D0 is the lowest byte (i.e. 0-7 or 1-8 bytes depending on your convention)

Charging
d236-charge.png


From these we can see that "D3" varies quite a bit during a drive, and I suspect this is the IGBT heat sink temperature.
"D5" is pretty stable during drive but goes above the others during charging. I suspect this is the motor temperature, because it's the last one in the cooling system chain and should have a fair amount of thermal mass. Perhaps at the last bit of Gary's log he opened the garage door or the hood of the leaf which caused the coolant loop to cool slightly. Also during the "cool drive" the water cooled components are significantly lower than the controller (which gets the heat from the radiator thrown at it).

For more info on the inverter including glorious teardown pics, see this PDF.

The coolant loop for the leaf goes Radiator-Pump 1- Pump 2- Charger-DC/DC-Inverter-Motor.
 
Update to carwings stuff... I made an error in the binary chart. It should read:
Code:
hex	binary	state
86	10000110	idle
46	01000110	status
4E	01001110	cc on
56	01010110	cc off
66	01100110	remote charge

So remote charge does not flag two bits, just one (I had posted 67- 01100111). It may be that the system is only set for 5 states and that's it... I will try unplugging the TCU and sending some other stuff though. I'm not exactly optimistic that we will get additional functionality.

OVMS (once programmed for these states) might just be a faster, more informative carwings. You could get things like SOC, GIDs, battery temperature, and other goodies that are available while the EV CAN bus is active.

The 2013's do allow changing the climate set temperature from the nav unit. If anyone with a '13 or newer SV/SL could log the CAN buses around the time that you make a change, that would be most appreciated! :) It may be that the command works on 2011/2012's but is not in the nav software of our leafs.

Can you tell that I want to come out to a cooler car in the summer? ;)
 
Back
Top