Page 1 of 7

Nissan Leaf BMS

Posted: Sat Nov 02, 2019 8:10 pm
by johu
In this thread I want to discuss using the Leaf BMS in your conversion.
Some info is also here: https://openinverter.org/wiki/Nissan_Leaf_BMS

So I have connected the Leaf BMS to the motor CAN bus of my Touran and it is giving me a charge power limit of 0kW and a discharge limit of 4.5kW. The Reason: "LCB malfunction". Anyone know where to find additional error info?

Re: Nissan Leaf BMS

Posted: Sun Nov 03, 2019 6:56 pm
by JaniK
It seems that is propably the same problem that appears when people have changed 30kwh packs to 24kwh leafs. The car and battery pack know when they are not the same. There are can emulators and some error message deleting mods available for leaf battery upgrades.

I would think the info would be here, do not know if they want to share it though.. they can pair 30kwh pack to 24kwh leaf vcm and get rid of The errors..

https://evsenhanced.com/services/hv-bat ... -upgrades/

Re: Nissan Leaf BMS

Posted: Sun Nov 03, 2019 8:21 pm
by doobedoobedo
There's also the guy from the Netherlands

Youtube https://www.youtube.com/channel/UC6s6hz ... yECKV0TiCw
website https://muxsan.com/

Re: Nissan Leaf BMS

Posted: Mon Nov 04, 2019 7:10 am
by JaniK
Yes, good stuff, thanks for the link @doobedoobedo .

muxsan.com has this info:
"CAN repeater for main battery/VCM interface Finished October 2018"

Maybe their extender pack can be compared to your 2x leaf pack system and thats easily adopted.

Re: Nissan Leaf BMS

Posted: Mon Nov 04, 2019 8:32 am
by johu
Ah it seens that is all about coupling a new battery to an original Leaf. But there is no Nissan VCM in my setup.
The BMS still delivers all the values so if I can't get rid of the trouble codes I'll just govern power limits myself

Re: Nissan Leaf BMS

Posted: Mon Nov 04, 2019 1:18 pm
by Kevin Sharpe
johu wrote: Mon Nov 04, 2019 8:32 am Ah it seens that is all about coupling a new battery to an original Leaf. But there is no Nissan VCM in my setup.
The BMS still delivers all the values so if I can't get rid of the trouble codes I'll just govern power limits myself
One option would be to use Wolf's upgraded Leaf BMS hardware... he replaces the controller chip and publishes a lot of the information (not sure if it's open source). I think his truck is using two Leaf packs split into four and reconfigured for 190V.

Also worth remembering that the original Leaf BMS works fine if you parallel battery modules. We built a 48kWh pack using two 24kWh packs and a single BMS.

Re: Nissan Leaf BMS

Posted: Mon Nov 04, 2019 8:24 pm
by jkelly77
My son got the Leaf BMS working great on our car, and he added an arduino and some code to make it all very usable, including custom voltage cutoffs. Maybe some of this will be helpful. https://www.electricboxster.com/components

Re: Nissan Leaf BMS

Posted: Mon Nov 04, 2019 9:29 pm
by johu
Thanks, good inspiration.
I'm running an STM32 in my car (in fact, a rev2 mainboard). It talks to the VW CAN bus and now also to the Nissan LBC. Source code here: https://github.com/jsphuebner/stm32-car

Re: Nissan Leaf BMS

Posted: Wed Nov 27, 2019 7:56 pm
by johu
So I found that the interlock status is on the CAN bus (1DB# Byte 3 Bit 3). No matter whether the safety gadget is plugged in or not it doesn't change state (always 0). So I guess I should check wiring. I downloaded the supposed shunt states according to this: https://docs.google.com/spreadsheets/d/ ... edit#gid=7 and they all display 0.
DTC jumps between 9 and 10. Still can't make any sense of it as DTCs in the service manual are more like 3000. And no, it not just the low byte.

EDIT: Could be P0A0D: Interlock error . The 09 doesn't make a whole lot of sense, but hey.

Re: Nissan Leaf BMS

Posted: Thu Nov 28, 2019 7:22 pm
by johu
So I think I'm one step further to solving the interlock issue.
The LBC that came with the original pack looks like this
The "original" BMS that came with the pack. LV connector grey, one cell tap connector black
The "original" BMS that came with the pack. LV connector grey, one cell tap connector black
The one that SciroccoEV sent me looks like this
Replacement LBC: all connectors white
Replacement LBC: all connectors white
I had to go to work on the logic connector to make it fit. I found that odd.

So now I put the original BMS back in (with a blown BMS chip) and observed the interlock bit. And indeed, when the safety disconnect is plugged in it shows "1" and "0" otherwise. The new BMS always shows "0". Does anyone know the pin map of the "all white connectors" LBC?

Re: Nissan Leaf BMS

Posted: Tue Dec 10, 2019 6:33 pm
by johu
Magically the Nissan BMS now no longer displays the interlock error. The interlock bit is still low on the CAN bus but DTC is gone. Hmm. Not sure how to figure out whether it balances. People on the web seem a bit unsure. For the Leaf BMS fanboys: I'm reading group 6 but it seems to return all zeros.

Well it's not all magic, I actually traced the interlock signal. It is a 3.3333333Hz 50/50 PWM on the source. It is then routed via the various interlock switches back to the LBC, through a transistor to the MCU. Behind the transistor the signal was swinging between 4.5 and 5V which didn't seem right. So I beefed up the base voltage divider. Now a nice 0-5V swing is generated. Not sure what the deal is.

Anyway I'm getting a meaningful charge and discharge limits now. It's about 1°C outside and when I started I had a 3kW charge limit and a 75kW discharge limit. Just by waiting a bit it climbed to 6kW/90kW.

Re: Nissan Leaf BMS

Posted: Sun Dec 29, 2019 10:56 am
by prensel
I have a few of these Nissan LBC's and want to use them for 48S8P packs instead of the original 96S4P setup..
Since the Leaf battery is actually halved in two 48S4P 'packs' I was thinking of paralleling both 48S wirings on the LBC end and simulatie a full 96S pack.
Would this work ?

Re: Nissan Leaf BMS

Posted: Sun Dec 29, 2019 11:09 am
by prensel
johu wrote: Thu Nov 28, 2019 7:22 pm Does anyone know the pin map of the "all white connectors" LBC?
Does this help you ?
leaf_bms_schematic.jpg
LeafBMS.PNG
Leaf-LBC-pinout.pdf
(21.12 KiB) Downloaded 386 times

Re: Nissan Leaf BMS

Posted: Tue Dec 31, 2019 6:32 am
by evcar
I've been running my 2013 Leaf BMS on a 48S battery pack for a few months now. So far it's been working well and reports all the cell voltages properly.

Re: Nissan Leaf BMS

Posted: Wed Jan 01, 2020 7:07 pm
by prensel
evcar wrote: Tue Dec 31, 2019 6:32 am I've been running my 2013 Leaf BMS on a 48S battery pack for a few months now. So far it's been working well and reports all the cell voltages properly.
Did you parallel connect the BMS wires of the two banks of 48S ?

Re: Nissan Leaf BMS

Posted: Thu Jan 02, 2020 4:23 am
by evcar
prensel wrote: Wed Jan 01, 2020 7:07 pm
evcar wrote: Tue Dec 31, 2019 6:32 am I've been running my 2013 Leaf BMS on a 48S battery pack for a few months now. So far it's been working well and reports all the cell voltages properly.
Did you parallel connect the BMS wires of the two banks of 48S ?
Correct, I did parallel the two banks.

Re: Nissan Leaf BMS

Posted: Wed Jan 15, 2020 5:10 pm
by johu
Thanks for the diagram. So I think thats I hooked it up. Still don't see any balancing, neither on the supposed CAN message nor does the delta between max and min voltage (70mV) decrease.
Only side effect so far: I found my LFP 12V battery dead discharged after leaving the 12V input of the BMS connected permanently :(

Re: Nissan Leaf BMS

Posted: Thu Jan 16, 2020 10:44 am
by prensel
Yesterday I did the famous 'blue smoke' trick on one of the (all white ports) LBC's by accidently connecting the rear 48S battery stack WITHOUT the interconnecting cable causing some fumes and burned diodes :-(

I have created a conversion cable for connecting a second 48S stack to the last 2 connectors that normally connects the two side battery stacks.

Looking at the diagram and comparing with the wiring loom I discovered some unregistered wiring on the LBC. Presumably these are for the 'winter edition 'Nissan Leaf for enabling pack-pre-heating for Scandinavian countries.

Re: Nissan Leaf BMS

Posted: Thu Jan 16, 2020 11:14 am
by johu
That sucks, I know what it looks like :( The diodes is what you see but most of all the custom Nissan ICs are toast.

Yes I have this as well. It's an 8-way connector and goes to a basic relay with some fancy logic in it. I have the relay but left it disconnected. I think my battery came from Norway.
There is also a mysterious 16-way connector on the loom that doesn't fit anywhere. It has some sort of shielded cable in it.

Re: Nissan Leaf BMS

Posted: Thu Jan 16, 2020 7:36 pm
by prensel
I've noticed a difference between the 'white' and 'grey' versions of the LBC wiring on connector LB11 (top left).
The grey wiring loom has empty slots at pin 4, 11, 16,17,18,19,20,21,22,23,24.
The white wiring loom has empty slots at pin 2, 7,11,14,18,19,22,23,24.
The 'present/interlock' signal is (according the schema) populated between pin 8 and 21.
So pluggin in the white loom in grey LBC (and vice versa) doesnt fully work.

According schema (white LB11 connector) pins are as follows
1 CAN High
2
3 GND
4
5 Charge mode +12V
6 Ignition mode +12V
7 Current sensor GND
8 Interlock output
9 Current sensor voltage
10 Current sensor signal
11
12 +12V Bat
13 CAN Low
14
15 GND
16 GND
17
18
19
20
21 Interlock input
22
23
24

Re: Nissan Leaf BMS

Posted: Thu Jan 16, 2020 9:19 pm
by prensel
And the wiring loom with grey connector is as follows:

1 CAN High (LB1 pin1)
2 GND1 (LB1 pin8)
3 GND3 (LB1 pin6)
4
5 CHG IGN (LB1 pin31)
6 interlock
7 IGN (LB1 pin4)
8 interlock
9 current sensor Voltage
10 current sensor Signal
11
12 +12V Bat (LB1 pin5)
13 CAN low (LB1 pin2)
14 GND2 (LB1 pin7)
15 current sensor Ground
16
17
18
19
20
21
22
23
24

Re: Nissan Leaf BMS

Posted: Fri Jan 17, 2020 6:11 am
by evcar
One method I used to verify that the BMS was hooked-up correctly was with a bluetooth dongle and the LeafSpy app. There's an option in the app to only perform BMS communications. Using the app, you can see all the output data from the BMS. Here are some details:
http://www.electricvehiclewiki.com/wiki/leaf-spy-pro/

I have been wanting to read the balancing signals manually over can-bus, but never got around to doing it. But I do see on LeafSpy that the cells are balanced periodically when the BMS is active.

I believe the all-white connector BMS are from 2011-2012 models, and the ones with white/grey/black connectors are from 2013-2016. I've attached the wiring diagram from the 2013 BMS that I used in my car.

Re: Nissan Leaf BMS

Posted: Fri Jan 17, 2020 8:30 am
by prensel
Great, thats valuable information (diagram) for the grey connector version LBC's.

So now we know why Johu gets a different result on the interlock signal when using the white or grey LBC on the same loom because they changed the pins from 8-21 on white to 8-6 on grey.

Re: Nissan Leaf BMS

Posted: Fri Jan 17, 2020 12:56 pm
by johu
Oh you're right! That is really strange. When I remove the connection between 6 and 8 the BMS sets the discharge limit to 4.5kW and I think it displays some error. But now I see they just tie pin 6 to 12V - permanently or on ignition? When is pin 5 activated?

Re: Nissan Leaf BMS

Posted: Fri Jan 17, 2020 3:35 pm
by prensel
I see that according diagram pin5 is enabled by the VCU and i guess when you plug the charging connector it enables the BMS in 'charge' modus and probably onyl then starts to balance ?