lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

LeafCAN Firmware v2

Sun May 05, 2013 11:03 pm

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:

Image

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:

Image

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:

Image

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

Image

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 %:

Image

The next screen shows the 4 battery pack temperature sensors:

Image

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:

Image

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.
Last edited by lincomatic on Mon May 06, 2013 10:23 am, edited 3 times in total.

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: LeafCAN V2

Sun May 05, 2013 11:09 pm

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.
Last edited by lincomatic on Mon May 06, 2013 8:57 am, edited 1 time in total.

User avatar
garygid
Gold Member
Posts: 12417
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: LeafCAN V2

Mon May 06, 2013 7:00 am

Very nicely done.

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

Cheers, Gary
See SOC/GID-Meter and CAN-Do Info
2011 LEAF, sold in 2015
2010 Prius, 2014 silver Tesla S
Nissan EVSE, mod to 240/120v 16A
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
TomT
Posts: 10564
Joined: Sun Aug 08, 2010 12:09 pm
Delivery Date: 01 Mar 2011
Leaf Number: 000360
Location: Foothills of Granada Hills, CA
Contact: Website

Re: LeafCAN V2

Mon May 06, 2013 7:55 am

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...
59,991 miles/12 bars/289 Gids/68.54 AHr/101% SOH/101.64% Hx 7May15 w/ new Lizard (barely made the warranty).
71,770 miles/12 bars/256 Gids/59.04 AHr/88% SOH/87.92% Hx 3Mar16 at lease return.

Now driving a 2016 Volt Premier. Model 3 reserved.

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: LeafCAN V2

Mon May 06, 2013 8:48 am

garygid wrote: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

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: LeafCAN V2

Mon May 06, 2013 8:50 am

TomT wrote: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.

RaMansell
Posts: 1
Joined: Sat May 11, 2013 8:48 pm

Re: LeafCAN Firmware v2

Sat May 11, 2013 9:03 pm

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?

User avatar
TomT
Posts: 10564
Joined: Sun Aug 08, 2010 12:09 pm
Delivery Date: 01 Mar 2011
Leaf Number: 000360
Location: Foothills of Granada Hills, CA
Contact: Website

Re: LeafCAN V2

Sat May 11, 2013 9:06 pm

Good to know! I'm very much looking forward to the new features!

lincomatic wrote:
TomT wrote: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.
59,991 miles/12 bars/289 Gids/68.54 AHr/101% SOH/101.64% Hx 7May15 w/ new Lizard (barely made the warranty).
71,770 miles/12 bars/256 Gids/59.04 AHr/88% SOH/87.92% Hx 3Mar16 at lease return.

Now driving a 2016 Volt Premier. Model 3 reserved.

lincomatic
Posts: 312
Joined: Fri Jun 10, 2011 10:01 am
Delivery Date: 06 Apr 2011
Leaf Number: 3819

Re: LeafCAN Firmware v2

Sun May 12, 2013 1:51 am

RaMansell wrote: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

GlennD
Forum Supporter
Posts: 1163
Joined: Sun Dec 18, 2011 7:14 pm
Delivery Date: 20 Jul 2013
Leaf Number: 410357
Location: Anaheim

Re: LeafCAN Firmware v2

Sun May 12, 2013 12:35 pm

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.
2012 Cayenne Red SL traded for:
2013 Pearl White SL Premium
Traded for a Cirrus White 2014 Mercedes B (totaled)
2016 Urano Gray eGolf SEL w/ drive assist
Loved the VW but it sat too low for my old body
Back to a Cirrus White 2017 B250E

Return to “LEAF CANBus”