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 would also be curious to know how your speed correlated to the downward slopes on the top plot.
 
jimcmorr said:
I am truely impressed! Do the flat spots in the top plot coincide with slow driving or complete stops?

Good job!
Complete stops, car ON. (dropoff at GoodWill)
The other is a long stoplight, I think.

If I can find the Speed and Odometer values, then that would be a natural thing to map to it. GPS too. :)
 
Nice job! I feel a useful SOC meter in my future!

GroundLoop said:
jimcmorr said:
I am truely impressed! Do the flat spots in the top plot coincide with slow driving or complete stops?

Good job!
Complete stops, car ON. (dropoff at GoodWill)
The other is a long stoplight, I think.

If I can find the Speed and Odometer values, then that would be a natural thing to map to it. GPS too. :)
 
In preparation for my CAN-Do (for Windows) program, try this fun program.
If it works, then CAN-Do should work on your system as well, with no "install".

http://www.wwwsite.com/puzzles/sudoku/

I hope to have some version of CAN-Do posted soon, perhaps by Monday.
Cheers, GaryG
 
GroundLoop said:
I think we have a winner for SOC:
A short drive with stops:
short-drive.png

That one little "uptick" at around 1150 is sustained regen? (Go down a hill?)
 
Ok you earned it. lol. No sense in holding back now..

Don't say I never gave you anything. :) (though it's not much)

https://spreadsheets.google.com/spreadsheet/ccc?key=0AuDGAXnbchK0dDc4T05oNE04aVZtUzB6S19DT1RwaHc&hl=en_US&authkey=CJi03v4F

Remember that this is for the old firmware, and some things changed regarding the SOC bars in the new firmware.
 
GroundLoop said:
I think we have a winner for SOC:
Nice work! I assume this is the 5BC you were discussing earlier?

BTW, I have been using the Arduino & Sparkfun combo. Seems to work fine. I have not been able to get the SD card to work for logging data yet. Looking into it some more. Tonight I'll take a look at some of those codes. Thanks again!
 
turbo2ltr said:
Ok you earned it. lol. No sense in holding back now..
Don't say I never gave you anything. :) (though it's not much)

https://spreadsheets.google.com/spreadsheet/ccc?key=0AuDGAXnbchK0dDc4T05oNE04aVZtUzB6S19DT1RwaHc&hl=en_US&authkey=CJi03v4F
Oh cool! I see you've been busy.

And to think, I didn't give you anything. Hopefully I can contribute some additions soon.
 
DarkStar said:
For those too lazy to hunt through Sparkfun for all the components, I created a public wishlist this afternoon that I think has everything you'd want...

http://sprkfn.com/w18677

Now we just need to start coding! :D
Nice. I didn't know you could do that.
Sparkfun is frequently out of stock, though the 4-line LCD display should work fine.
DIYDrones has many of the same bits.

I would caution that the OBDII cable they sell will only give you access to one (out of the three) CAN Bus networks, and the SOC/Battery stuff is likely to be on EV CAN.

From what I can tell in the pictures, the OBDII Cable actually lacks the other pins, so you might not be able to cut it in half and rewire it either. I bought some bare OBD connectors and loose pins years ago. I'll see if I can find a source.
 
GroundLoop said:
DarkStar said:
For those too lazy to hunt through Sparkfun for all the components, I created a public wishlist this afternoon that I think has everything you'd want...

http://sprkfn.com/w18677

Now we just need to start coding! :D
Nice. I didn't know you could do that.
Sparkfun is frequently out of stock, though the 4-line LCD display should work fine.
DIYDrones has many of the same bits.

I would caution that the OBDII cable they sell will only give you access to one (out of the three) CAN Bus networks, and the SOC/Battery stuff is likely to be on EV CAN.

From what I can tell in the pictures, the OBDII Cable actually lacks the other pins, so you might not be able to cut it in half and rewire it either. I bought some bare OBD connectors and loose pins years ago. I'll see if I can find a source.
I added the raw components for the OBD connector and DB9 plug to the wishlist (just add wire and roll-your-own!), as well as their serial-enabled 20x4 LCD. :D
 
GroundLoop said:
I think we have a winner for SOC in the top 10 bits from Identifier 0x5BC:
A charge from 20 to 100%:
20-to-100-charge.png

FWIW, I ran my Arduino + CAN-shield tonight during a charge cycle and got pretty similar results. As in your plot, it shows about 12.5 "counts" per 1000 secs which, if it's amp-hours is too high. But scale that by 0.25 and we have about 68 Ah at the top of your curve and about 13A draw according to the slope of the line. That seems to add up. No?
 
Car wings and the car appear to track:

I charged to 100 percent last night and both carwings and the car showed 12 bars before I left this morning.

At my first stop 24 miles later, I had 9 bars showing on both the car and carwings.

At my next stop which was 44 miles in, I had 6 bars showing on both carwings and the car.

When I got to my house, I had 16 miles showing as remaining range and both carwings and the car showed 3 bars.

mogur said:
I have a lot of driving to do today and will be coming home pretty much empty, so I'll grab some data points through the day and report back on what I find.

GroundLoop said:
The hint would be that the dash on the car and the dash on Carwings agree regarding the number of bars. If they were computed separately from raw SOC, you might see discrepancies on some cars that have or don't-have the update, right?
 
sparky said:
As in your plot, it shows about 12.5 "counts" per 1000 secs which, if it's amp-hours is too high. But scale that by 0.25 and we have about 68 Ah at the top of your curve and about 13A draw according to the slope of the line. That seems to add up. No?
Good eye, sparky. Not sure what the units are yet. I want to run a battery down to turtle and see where that starts the graph at some point.

Another option is to run the ~4kW heater and see how fast it decreases.

The 0.25 factor lines up nicely with it being an 8+2 bit value, since that would put Ah in the byte value.
 
In what would have been a suicide act for an ICE car, I sat in my garage with the car on, heater going full-blast with AC as well.

I was hoping it would draw steady power (by ECO display), but it seemed to waver between 3.0 and 4.5kW.
Here's the number of seconds, and the value:
Code:
5 100
53 99
190 98
248 97
297 96
361 95
417 94
461 93
486 92
530 91
588 90
637 89
685 88
724 87
And the plot:
heater.png


If we assume the heater averages 4 kW (which is a really bald-faced guess), then that makes about 54 Watt-hours per "tick" of the can value.

The charger runs the value up to 281(decimal). I haven't seen the low end (turtle), but if we scale 0 to 281 as "24kWh", that's 85.4Wh per tick. So it's in the same order of magnitude.
 
I just got my CAN-Do v121 program to draw graphs of the data byte values of any single selected data byte (1-8) of any selected message ID.

I will add scaling and bit masking, and some axis values later, and perhaps some grid lines.

Message ID 5BC data byte 3 has values 0x22 to 0x2C, so it looks like it (mask 0x0F) represents the # of bars. This message also has a 12-bar message sprinkled throughout ... which MIGHT be the Pack's "capacity".

Note: we believe that only the number of bars, not the SOC, gets sent to Carwings.

Tomorrow I will look at turbo's spreadsheet to see if I am correct.
THANKS turbo, I will try to see that you get some reward for your efforts.

I hope to get a version of CAN-Do, and a test log file of almost 6 million EC-CAN messages, during a 6-hour 16A "L2" charging from 2 bars to 12 bars.
 
Carwings definitely only gets the number of bars.

The bar message in byte 3 of 5BC is the old bar message. If you have the new firmware, it is no longer used. I didn't document the message in the new firmware but it wasn't hard to find. (it's not on the EVCAN bus)

The max value of the byte you are looking at for capacity moves. My car started out with 271. After 3 months of breaking int he battery it goes up t0 280.

Some data
231 = 80% charge (I havent tested if this number drifted, I would think not but would be interesting to know)
48 = battery warning
24 = very low battery warning
5 = turtle

These number don't change based on firmware.

I wouldn't mind releasing my CANmon software, but I wrote it in VB6 and it has some dependencies so it probably wont work for most people..
 
turbo2ltr said:
The max value of the byte you are looking at for capacity moves. My car started out with 271. After 3 months of breaking int he battery it goes up t0 280.

Some data
231 = 80% charge (I havent tested if this number drifted, I would think not but would be interesting to know)
48 = battery warning
24 = very low battery warning
5 = turtle

Interesting. Almost as if the number shows actual KWH (multiplied by 10). Perry or someone even talked earlier about battery warning coming on when 4 kwh is left.

These number don't change based on firmware.

Hmmm ... are you saying turtle was showing 5 and still shows 5 ? Even though according to reports turtle has more miles left now ?
 
Turtle at 0.4 kWh, not 4 kWh, right?

But a max of around 28 kWh seems a bit high, but that is just scaling. One might use 0 to 280 as 0% to 100% for those that want a percentage.

If these "bars" (in Data Byte 3) are no longer used, maybe they are the "old-bars"?

If the display did use these, and now uses something else, did the display-head firmware change?

There are no substantially different reports about the nunber of miles in turtle mode, I think. There were 100 yards (on a relatively new, perhaps not-well-equalized car?) to several miles before the Update, and basically the same "several miles" reported after. Or am I wrong?

The difference is that the new-bars disappear faster, so the Low Battery warning no longer appears when 2 bars are showing.
The Very-Low warning, and Turtle Mode now seem to happen with no bars showing (when you are in the new, now-hidden "reserve".
 
Back
Top