LeafCAN Firmware v2

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.

lincomatic

Well-known member
Joined
Jun 10, 2011
Messages
316
I have been working on V2 of the LeafCAN firmware, and it is currently in alpha testing. By attaching a rotary encoder to the expansion header of the LeafCAN PCB, a whole slew of new information screens are now selectable.

The first screen is the familiar info screen from LeafCAN v1.3:

mainscreen.jpg


The top line from left to right is: kWh remaining/gids/fixed fuel bars, and the bottom line is: pack voltage/SOC%/instantaneous kW. The next screen is an idea lifted from Turbo3's WattsLeft, the DTE (distance to event) screen:

dtel.jpg


The top line shows various miles/kWh values, 2.0/3.0/4.0/5.0/6.0, and bottom line shows the distance in miles to the event, in this case, Low Battery. Pressing the encoder button switches it to miles until Very Low Battery:

dtev.jpg


and pressing the button a third time shows miles until Turtle:

dtet.jpg


The next screen has on the top line: High Precision State of Charge (SOC)%, and on the bottom line, State of Charge in Ah, and possibly a Battery Health indication in %:

soccap.jpg


The next screen shows the 4 battery pack temperature sensors:

batttemp.jpg


The units are selectable between Celcius and Fahrenheit with a press of the button. Finally, the last screen shows the minimum and maximum cell-pair voltages in mV, as well as their difference:

cellvolt.jpg


When an OLED display is installed, I now blank the screen 5 sec after CAN activity ceases. Pressing and holding the button wakes it up again for 5 sec when the car is off.

A bit more detail can be found on my blog: http://blog.lincomatic.com/?p=1094

As always, LeafCAN is completely open-source. If there's anything you don't like, hack it to your tastes!
https://github.com/lincomatic/LeafCAN
V2 is currently in the development branch, and will move to the master branch upon release.

I will be working towards releasing LeafCAN v2.0 in the coming weeks, and will announce its release here.
 
Barbouri sent me a full set of his new hardware: http://www.mynissanleaf.com/viewtopic.php?f=44&t=8673&start=120#p281426
which adds support for controlling a RGB LED in the encoder shaft.
The RGB lighted encoder knob is pretty cool, but I'm still trying to figure out how to best use it. Currently, I have it change color depending on the pack current: green=regen, blue=idle, red=consuming power. This is kind of silly, though.
 
Very, very nice! Alas though, I suspect my older Lincomatic 1.3 is too old to update...

It seems that with so many relatively inexpensive and great meters coming out these days, the window for Phil's Leafscan may have closed...
 
garygid said:
Very nicely done.

Perhaps a button press on the first screen could change
GIDs to 281-based %Gids?

Cheers, Gary

I could do that. My goal is to make a bunch of different main screens so that people can pick one that suits them
 
TomT said:
Very, very nice! Alas though, I suspect my older Lincomatic 1.3 is too old to update...

It seems that with so many relatively inexpensive and great meters coming out these days, the window for Phil's Leafscan may have closed...

AFAIK, All of the hardware that's in the wild is V2 hardware, and is upgradeable to use a rotary encoder without the RGB-lighted shaft. I will post wiring details soon.
 
It looks really good with that nice PCB board. I see that you can change which CAN-bus (of the three) that you are following via the "CAN-SEL." Can you switch CAN-buses while the LeafCAN is on or do you have to do it only while it is off?
 
Good to know! I'm very much looking forward to the new features!

lincomatic said:
TomT said:
Very, very nice! Alas though, I suspect my older Lincomatic 1.3 is too old to update...
AFAIK, All of the hardware that's in the wild is V2 hardware, and is upgradeable to use a rotary encoder without the RGB-lighted shaft. I will post wiring details soon.
 
RaMansell said:
It looks really good with that nice PCB board. I see that you can change which CAN-bus (of the three) that you are following via the "CAN-SEL." Can you switch CAN-buses while the LeafCAN is on or do you have to do it only while it is off?

I think you could probably do it on the fly without problems, but I prefer not to connect/disconnect things while the bus is hot.

BTW, sorry, but the nomenclature is a bit confusing between hardware and software versions.

V1 hardware didn't have software control of the backlight. There were only 2 boards made.
V2 hardware is what ChrisH was selling, and AFAIK, is the most common version in the wild. It has software backlight control, and the components are laid
out to allow a thinner assembly.
There are also other variants of V2 by Barbouri, which I think he calls V2oX where o means OLED support, and X is a version number

The firmware runs on all versions of the hardware, as long as the proper configuration is set I the #defines
V1.x firmware supports only one screen of information
V2.x firmware supports a rotary encoder to select among multiple screens of information
 
So far so good with the latest beta. Very quick bug fix.

TomT, I am running my SOC just like yours. I moved the SOC to the dash and the OLED completely washed out. It was fine in the cubby in front of the shifter but not really convenient to read.
 
This is where I am running mine and I'm very happy with it in this location. It works well both day and night.

2vx16qu.jpg


GlennD said:
TomT, I am running my SOC just like yours. I moved the SOC to the dash and the OLED completely washed out. It was fine in the cubby in front of the shifter but not really convenient to read.
 
TomT, I think with all of the additional screens that is the best location. In your case I think the encoder should go above the display but it is so small it can go where ever you want.

My first encoder was wrong and took 2 clicks per screen but the ones I ordered from China seem to be the right ones.
 
Yep, I'm thinking on top would be best too. That way it would be easy to manipulate with your left hand.

GlennD said:
TomT, I think with all of the additional screens that is the best location. In your case I think the encoder should go above the display but it is so small it can go where ever you want.
My first encoder was wrong and took 2 clicks per screen but the ones I ordered from China seem to be the right ones.
 
TomT said:
Yep, I'm thinking on top would be best too. That way it would be easy to manipulate with your left hand.

GlennD said:
TomT, I think with all of the additional screens that is the best location. In your case I think the encoder should go above the display but it is so small it can go where ever you want.
My first encoder was wrong and took 2 clicks per screen but the ones I ordered from China seem to be the right ones.

I have mine in the same location, but with a suction mount on the windshield. How are you attaching yours?
 
I took a long trip to the swap meet today. The low battery warning came on almost perfectly. With my MXV tires I was averaging 4.1 and the battery woman woke up as the 40 display hit 0. I made it back with 3 miles on the GOM and a tenth mile until very low battery.

I know it is a borrowed feature but I find it very useful.
 
I'm getting REAL anxious to get all the new features and may just bite the bullet and do it before the release version of 2.0 comes out... I haven't seen anyone mention any problems with the 2.0 beta... :lol:
 
Sorry for the holdup.. there's a problem with a relay clicking during charging that I need to fix.. AFAIK, it happens on 2012+ and 2011 cars which have had a particular charging system update. Mine hasn't been updated yet, so it doesn't click, so I can't investigate a fix. The current workaround is to make sure the display is not on a screen that does active sampling while charging. The main screen that looks like the V1 screen will not cause the clicking.

I'm hoping to get my car to the dealer next week to get the update.
 
OK, thanks for the update! I'll try and be patient! :D

lincomatic said:
Sorry for the holdup.. there's a problem with a relay clicking during charging that I need to fix.. AFAIK, it happens on 2012+ and 2011 cars which have had a particular charging system update. Mine hasn't been updated yet, so it doesn't click, so I can't investigate a fix. The current workaround is to make sure the display is not on a screen that does active sampling while charging. The main screen that looks like the V1 screen will not cause the clicking.

I'm hoping to get my car to the dealer next week to get the update.
 
The older firmware that Sam and I have did not click. After my upgrade I can clearly hear the relay clicking. I just turn to the main page before charging.
 
Back
Top