SOC display for 2011 Nissan Leaf
The first generation Leafs did not show the battery State of Charge accurately on the dash. There's the 12 blue bars on the right by the range estimate but that's all. After 2012 they added a SOC% feature to the main dash. This project replicates that feature.
Most people just use the LeafSpy app on a phone to address this shortcoming. In my case the phone I was using stopped connecting to the Bluetooth dongle I had. I also didn't like faffing about with a phone to get this basic information. The phone needs to be mounted on the dash, it needs to be kept charged, and the user interface on LeafSpy isn't great.
So my goal is to have a SOC display integrated into the dash with no extra fiddling about. It should just turn on when the car does and require zero effort on my part.
This project is based on the CANa Display for Nissan LEAF project which is beautifully simple and straightforward. All I've done is change the code to make it work with a nice OLED display that will fit inside the eyebrow dash. It is powered by the OBD2 port in such a way that it only works when the car is turned on. [Note: the dongles that are used with LeafSpy run 24/7 unless you manually turn them off - which is a security risk.]
[Note: the SOC figure shown on this display is the same as is shown on LeafSpy, which is slightly different from that shown on the dash of the 2013 Leaf! This project displays raw SOC as reported by the EV-Can bus. In my case when I do a full charge it displays 94.8%. Whereas a 2013 Leaf (and newer) will adjust the SOC displayed so that it shows 100% after a full charge - even if you've lost battery capacity. This means you can't see the slow battery degradation reflected in the stock SOC% figure, but you can on the display from this project.]
Note: these links are to Aliexpress - if you want the items to arrive faster search for similar items on Amazon, EBay, TradeMe, Banggood, etc.
Power for the system is provided from the OBD2 port - pin 4 (ground) and pin 8 (switched +12 from battery). Note pin 8 is a switched +12 on the Leaf. The OBD2 standard power is on pin 16 - but it's always on 24/7.
The power goes straight into a step down module that provides 5V for everything; the MCP2515_CAN, the Arduino Pro Mini and the OLED display.
The Leaf EV-CAN signals come via OBD2 pins 12 and 13. The OBD2 standard CAN bus signals are on pins 6 and 14 - which, in the case of the Leaf gives the Car-CAN bus.
The EV-CAN signals go into the MCP2515_CAN module - which is connected to the Arduino via 5-wire SPI.
Arduino code and STL files
The Arduino code is on Github: https://github.com/PaulKennett/LeafSOCdisplay
I've also got some STL files on Github for a 3D printed frame to hold a "standard" 0.96 inch OLED 128x64 display rotated 90 degrees (so that it becomes 64x128 pixels). I'll add more frames as I go. I'm aiming to find the biggest OLED that will fit inside the dash. You can use black electrical tape but a black 3D printed frame looks a wee bit better.
And that's about it. I'm assuming you already know how to get code onto the Arduino.
I chose to install the OLED display over the top of the efficiency trees on the Leaf's "eyebrow" dash. The trees don't serve a critical function so it's no great loss. I stuck a piece of wide black electrical tape over the trees, then used double sided tape to stick the OLED display onto the black tape. (Note: electrical tape is usually easy to remove so you could remove all this if you needed to.)
To install the display inside the dash you'll need to remove the dash and unclip the clear plastic front. See Nissan Leaf Instrument Cluster Removal for an explanation of how to remove the dash.
I also used a craft knife to trim 1mm off edge of the dash to allow the 7-wire ribbon cable to exit cleanly. Clip the dash front back on thread the ribbon cable down past the lower dash.
Next you'll want to remove the lower dash panel, see Nissan Leaf 020 - ETC replacement options. Once that's open you can attach the OLED ribbon to the Arduino and zip-tie the electronic modules (in a plastic box maybe) somewhere where they won't rattle and then connect the OBD2 plug to the socket.
Some pictures to help:
The eye brow dash removed and separated into three parts (they just unclip apart)
Wide black electrical tape over the trees part of the display - try to avoid including any dust particles, or you'll get bumps like I did.
0.96 inch display mountain inside 3D printed frame. Held in place with double sided tape. I also cut out a small segment of the dash edging to let the wires pop out.
Clip the dash back to together and plug the display into a 60 cm long extension cable. Use whatever connectors you can find. Ideally they should clip together so they can't just wiggle loose.
Feed the extension cable down past the steering column and put the dash back in place.
In a right-hand drive Leaf partially remove the right knee panel beside/below the steering column to find your extension cable.
Plug the OBD2 plug in and carefully throw the Arduino and bits in there somewhere and slap the panel back in place. (Or you could spend more time and do a tidy job.)
Turn the car on and enjoy the extra info.
I hope you found this helpful.
Here's the first version with the 0.96 inch OLED 128x96 display oriented in normal "landscape" mode:
This version also used black electrical tape to hold the display in place - which works surprisingly well. The 3D printed frame looks more professional though.
Theoretically 1 Gid = 80 Wh but others say 74.73 Wh