I have been working on v2 of the LeafCAN firmware, which adds a whole slew of new screens, selectable via a rotary encoder. The rotary encoder is connected to the AD0/1/2 pins on the expansion header of the LeafCAN V2 hardware. The code is currently in alpha testing, and is available in the development branch of the LeafCAN github repository. Be aware that the development branch is for my bleeding edge code, and at any time, the code there may be broken, as I continually checkpoint my code. I will move it to the master branch when it’s ready to be released.
While I was developing the LeafCAN v2 firmware, I received a pleasant surprise in the mail from Barbouri (GregC) of the MyNissanLeaf forum. He designed a PCB with 16×2 OLED display + RGB Led Rotary Encoder support,
and sent me a completely assembled and tested rig. I immediately added support for this new hardware variant into my working LeafCAN v2 firmware code. The RGB knob is cool:
but I am still pondering how best to use it. Currently, I have it blue when the car is idle, red when it’s consuming power, and green during regen.
Below is an overview of LeafCAN v2Alpha3. The various screens are selected by rotating the encoder knob. Some of the screens have different modes, selected via a press of the encoder knob. The first screen is the familiar info screen from LeafCAN v1.3:
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:
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:
and pressing the button a third time shows miles until Turtle:
Thanks to a breakthrough in active can sampling, spearheaded by GregH and TickTock, I was able to implement the following new screens. The first one has on the top line, High Precision State of Charge (SOC)%. The bottom line shows State of Charge (Ah), and possibly a Battery Health %.
The next screen shows the 4 battery pack temperature sensors:
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:
When an OLED is installed, the display now blanks after 5 sec of inactivity on the CAN bus. Pressing and holding the knob for a second wakes the display up for 5 sec. When an LCD is installed, the press/hold turns on the backlight for 5 sec, instead.
I will be working towards finishing LeafCAN v2.0 in the coming weeks, and will announce its release here.
Barbouri and I are also collaborating on a dual-CAN bus version of the LeafCAN hardware, which will be able to monitor the Car-CAN as well as the EV-CAN on the Nissan Leaf. This will open up access to various information which is accessible only via the Car-CAN, such as friction brake actuation, steering angle, etc.
I would also like to point out that GregH has yet another cool Leaf CAN bus dash display in the works (only $80) that is worth checking out. Also, TickTock and garygid are working on the very fancy dual-touchscreen open-source CANary Project. Turbo3 has also figured out how to extract data from the Leaf Car-CAN using a cheap ELM-327 clone dongle and an Android phone. There is currently a flurry of CAN bus hacking on the Leaf.