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.
planet4ever said:
turbo2ltr said:
any chance you have something like adblock installed?
I do, but only on Firefox. It also fails with Internet Explorer, Google Chrome, and Safari (all under Windows 7). Beside, PING from a DOS window can't resolve the URL, either.

Ray
Works fine for me. I'd complain to the ISP, or use an alternate DNS server.
 
Today I added a "Dashboard" to show "instruments" (just values and progress-bars for now) that display "decoded" CAN data.

Going through the 6 million record EV-CAN log file in a minute or so, I have a much-faster-than-real-time "playback" of a 6-hour charging session, from 2 bars to 12 bars.

From the 0x5BC message on the EV-CAN buss, I show SOC (raw, and percentage), original e-fuel bars and capacity bars (as bars and decimal), and the "remaining charging times" (low 4 bits of D7, and D8) for the four 240v/120v, 80%/100% conditions (as h:mm).
(Thanks "turbo" for the hints!)

At the moment the e-fuel bar changes (a bar On or Off), the dashboard displays that moment's SOC (raw and percentage).

So, this is my start of displaying the CAN-info, and I will try to get a slightly cleaned up version of this program (and the test EV-CAN log file, old firmware) posted (zipped) on my web site tomorrow for others to use/test/view.
(should run on XP, Vista, and Win7)
 
We are using the $55 AVR-CAN Development Board(s), which use the Atmel AT90CAN128-16 mHz CAN/Processor chip to decode the CAN Messages.

Currently, using our firmware for the Atmel uP, a checksum and ten bytes of data come out of the board, and appear at virtual Comm Ports in the PC.

My CAN-Do program can connect to this live data stream, log it, and display the "dashboard"

We should be able to demo the system at the next SoCal Gathering, on 11 June 2011 at Cerritos Nissan.

With 3 of these boards, one can monitor/read/log the car's three CAN busses (EV, Car, AV). Later we will find a way to monitor the QC-CAN buss as well.

With a fully populated and wired Pass-through CAN connector and a molded-on "T" cable (which we wire to three DB-9 connectors, one for each of the 3 development boards), a compiler, some source code, and a uP loader, we have a 3-Buss interface system for about $200.

Then, three RS232 (115 k-baud) to USB "adapters" (less than $5 each), a Windows laptop (try sales at Fry's Electronics, or TigerDirect.com), and some VB6 for Windows software (my CAN-D0 program?), one has a real-time "dashboard" display, a CAN-message logger, and a CAN "analysis" tool, all in one program that WE can modify as needed.
 
N-Channel CAN buss Monitor System (N = 1, 2, 3, or 4)

1. I intend to order some AVR-CAN boards tomorrow, about $60 each, you need N of them
2. the "ODB2" connector, pass through, with molded cable and all pins wired (about $25). You need just one.
3. RS232-to-USB adapters, 115k max speed, with drivers on disk. You need N of them.
4. about $5 to $10 for shipping the package insured, if needed.

For select people (perhaps friendly, nearby, and with cash) I will consider ordering more than I need.
 
One other "option" is to use bluetooth. There are BT obd devices - don't know about just can.

With BD we can use either laptop or smartphone to monitor. May be that is possible with even USB ...
 
With 3 bluetooth devices to monitor the LEAF's 3 CAN busses simultaneously, the interference might be a problem.

Also, the BT might not be fast enough for reliable data transfer at the LEAF's 500k-bit CAN bus rate.

And, many are designed strictly for ODB2 messages, not CAN, I believe.

But, if you find something that works, please let us know.
 
garygid said:
With 3 bluetooth devices to monitor the LEAF's 3 CAN busses simultaneously, the interference might be a problem.

Do we really need all 3 busses ? If the interest is mainly in SOC - scanning the right bus should suffice, right ?
 
Is anybody interested in trying my CAN-Do VB6 for Windows "work-in-progress" program?

If you are, then I will attempt to get it posted today.

You can test to see if a typical VB6 program will run on your Win OS by downloading, unzipping, and trying to run my Sudoku puzzle program.

The "sample" data file with my CAN-Do program is a log of the EV-CAN buss during a 6-hour L2 charge.

Running CAN-Do, you can actually watch the "bars" and SOC climb during the time-lapse (high speed) playback.
 
Yes, for SOC, it appears that monitoring the EV-CAN buss is sufficient.

Adding a small display to the Atmel development board and displaying the SOC should be relatively easy.

The three (should be "easy") mods to the present firmware (we have the source, a compiler, and a loader) are:
1. watch the messages for the "5BC" message,
2. extract the SOC part, and
3. send the needed characters to the display.

Who wants to select a suitable easy-to-read display?
 
garygid said:
Turtle at 0.4 kWh, not 4 kWh, right?

4 KWh was "battery low". I don't think we actually have 4 kwh of usable energy when we hit battery low - I got about 18 miles. So, probably 3 to 3.5 KWh.

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 turtle mode range seems to be variable - but none have reported more than 2 miles, AFAIK.

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".
Now, Battery Low and the last bar disappearing are close to each other. Also they may change a bit depending on whether you stop the car around that time. I got battery low just before I switched off the car. 10 minutes later when I switched it back on, the last bar was gone. After that drove for 18 miles before getting turtle - all the while with no bars showing.

That means, we can think of Leaf as having 14, if not 14.5, bars. Since the usable capacity seems to be about 21 to 22 kwh, this mean each bar represents between 1.45 to 1.57 kwh. Let us say 1.5 kwh. Seems to track with what I was getting - about 7 miles a bar when the going was around 5 m/kwh.
 
I do not like driving with NO INDICATION of the "remaining" charge, so I have not had the firmware uodate done (yet). I guess that is what Nissan was counting on, to keep some "sick" cars away from their "lacking" low end.

However, it means that the "healthy" cars either give up 15 "miles of range" (substantial usable charge), OR drive "blind".

I guess a reasonably good SOC gauge will be useful to many, but it STILL CAN BE DECEPTIVE (as in the "sick" cars) if the low-end energy estimate is too optimistic, and disappears WAY TOO QUICKLY.
 
garygid said:
I guess a reasonably good SOC gauge will be useful to many, but it STILL CAN BE DECEPTIVE (as in the "sick" cars) if the low-end energy estimate is too optimistic, and disappears WAY TOO QUICKLY.

By sick you mean some cars that have a cell or two that are substantially lower capacity.. and when in turtle mode will force the BMS to do an emergency abrupt shutdown?

I would suspect if that happened it would light up the dash to go visit the dealer. A properly designed system would never let you get that low.
 
garygid said:
I do not like driving with NO INDICATION of the "remaining" charge, so I have not had the firmware uodate done (yet). I guess that is what Nissan was counting on, to keep some "sick" cars away from their "lacking" low end.

However, it means that the "healthy" cars either give up 15 "miles of range" (substantial usable charge), OR drive "blind".

There will be some variability - there is no free lunch here - this is not like Lake Wobegon where all the cars are above average ;-) I prefer that no one gets stranded, since that will hurt EV in general.
 
evnow said:
Now, Battery Low and the last bar disappearing are close to each other. Also they may change a bit depending on whether you stop the car around that time. I got battery low just before I switched off the car. 10 minutes later when I switched it back on, the last bar was gone.
That was also my experience last Friday. I got battery low, then powered off half a mile later. When I powered back up a couple of minutes later the last bar was gone. Today I also got battery low, but three miles from home. When I got home I still had the last bar showing! That was about 1½ freeway miles and 1½ miles in town (40 mph to 25 mph with three stops at lights or stop sign).

Ray
 
I finally got my CAN-Do program (VB6 for Windows) on-line.
I ran an earlier version on XP Home, and this v1.2.3 on Vista-32 bit.

Get the program, and a test CAN-Log file from:

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

Download the zipped "exe" file, unzip into any folder, and try to run the program.
If that works, download the large (19 MB zipped) EV-CAN Log file.
It is usually most convenient to unzip the CAN-Log file into the same folder.

Run the progam, BROWSE to open the CAN-Log file, and click the "Read Bin" Button.
Enjoy the (speeded up) 6-hour "playback", which takes about 30 seconds here.
Cheers, GaryG
 
Problem: I parked, and now an e-fuel Bar, there before, is now gone:

A given bar will appear and disappear at a different SOC
if the battery pack is charging or discharging.

Think of it this way:

1. When discharging, the bar goes OFF when it is "empty".
If ON, a bar stays ON, no matter if that bar is 25% or 75% full.

2. When charging, an OFF bar does not go ON until it is about half full.

3. When (re) starting the car, the bars "fill" (like during charging), and
a 75% full bar will appear, but a 25% full bar will not.

At least that's my theory.
 
Back
Top