Page 4 of 7

Re: Nissan Leaf BMS

Posted: Fri Jul 17, 2020 1:45 am
by starpancake
okay, so based on hearing that the current sensor is identical between the leaf's 12V and 400V battery, i purchased this: https://www.ebay.com/itm/143647194866 as it is identical to the one on my leaf. saved about $100 :) will let you all know what i figure out the pinout to be. it's 4 pins, but the actual LBC only takes two. maybe there's a backup ground?

another benefit of doing an extender: any capacity i add this way will stay with the car even if i later upgrade the pack. so i could potentially have a 79 kWh leaf if i really got lucky 8-)

Re: Nissan Leaf BMS

Posted: Sun Jul 19, 2020 10:17 am
by prensel
starpancake wrote: Thu Jul 16, 2020 10:47 am do you have any links describing this? i have a grey/black LBC and a white cable, but i don't really know what would cause that kind of burn out. what is the interconnecting cable you mentioned?

i only have this one LBC so if i burn it out my project is toast :/ thanks :)
I believe I posted a full pinout schematics earlier.
It is just a matter of pulling the pins from the male-connector and re-assemble them in the correct order.

Re: Nissan Leaf BMS

Posted: Sun Jul 19, 2020 10:27 am
by prensel
starpancake wrote: Thu Jul 16, 2020 10:39 am i have contactors, 150A fuse hardware, 3-port can bridge, a cabin 12V switch for enabling the aux pack connection, the BMS and the wiring harness. only thing that i'm missing is a current sensor. i'm seeing them on ebay for around $130; does anyone know of a cheaper source? are they just a fat resistor or is there some amplification going on? ultimately i do want current sensing but i'm not sure it's critical just yet.
I'm afraid this will going to be a mess...
First of all the LBC needs more then just the hardware you have. Better try to get hold of the original Leaf contactorbox which is/was located in the batterybox. Did you think about how to handle pre-charge ? The current sensor is also some Leaf specific thingy, not sure if the LBC would accept/read any other current sensor since its not CANbus related. In the other post you mention something about a current sensor between 12V and high voltage battery. Not sure what you mean with that..

Just some words of caution:
Remember you are messing with 380V and that any DC voltage over 100V is DEATHLY and will KILL you instantly when thouching and never release it before you DIE !!
This is not something you want to 'try' and peek or poke and wire everything together like its a 9V block battery.

Re: Nissan Leaf BMS

Posted: Fri Jul 24, 2020 12:01 am
by starpancake
prensel wrote: Sun Jul 19, 2020 10:27 am
starpancake wrote: Thu Jul 16, 2020 10:39 am i have contactors, 150A fuse hardware, 3-port can bridge, a cabin 12V switch for enabling the aux pack connection, the BMS and the wiring harness. only thing that i'm missing is a current sensor. i'm seeing them on ebay for around $130; does anyone know of a cheaper source? are they just a fat resistor or is there some amplification going on? ultimately i do want current sensing but i'm not sure it's critical just yet.
I'm afraid this will going to be a mess...
First of all the LBC needs more then just the hardware you have. Better try to get hold of the original Leaf contactorbox which is/was located in the batterybox. Did you think about how to handle pre-charge ? The current sensor is also some Leaf specific thingy, not sure if the LBC would accept/read any other current sensor since its not CANbus related. In the other post you mention something about a current sensor between 12V and high voltage battery. Not sure what you mean with that..

Just some words of caution:
Remember you are messing with 380V and that any DC voltage over 100V is DEATHLY and will KILL you instantly when thouching and never release it before you DIE !!
This is not something you want to 'try' and peek or poke and wire everything together like its a 9V block battery.
yeah, i agree. sorry to disappoint, i have decided not to pursue the project since i can buy an older liquid-cooled battery electric car with almost 400 km range for very little here in the US. and i would also not be able to sell the leaf if i modified it substantially. safety is also a concern.

if anybody wants a grey/black BMS and the white wiring harness, i will hang on to them or put them on ebay for sale for around $50 each.

Re: Nissan Leaf BMS

Posted: Fri Jul 24, 2020 6:25 am
by mdrobnak
starpancake wrote: Fri Jul 24, 2020 12:01 am yeah, i agree. sorry to disappoint, i have decided not to pursue the project since i can buy an older liquid-cooled battery electric car with almost 400 km range for very little here in the US. and i would also not be able to sell the leaf if i modified it substantially. safety is also a concern.
Please do share sources :) I'm curious as to what you're referring to for "very little" and that sort of range...

Re: Nissan Leaf BMS

Posted: Fri Jul 24, 2020 9:13 am
by Kevin Sharpe
mdrobnak wrote: Fri Jul 24, 2020 6:25 am
starpancake wrote: Fri Jul 24, 2020 12:01 am yeah, i agree. sorry to disappoint, i have decided not to pursue the project since i can buy an older liquid-cooled battery electric car with almost 400 km range for very little here in the US. and i would also not be able to sell the leaf if i modified it substantially. safety is also a concern.
Please do share sources :)
This is important, please do share the source if possible so that we can break the cycle of abandoned EV development :)

Re: Nissan Leaf BMS

Posted: Sat Aug 15, 2020 5:02 am
by starpancake
Kevin Sharpe wrote: Fri Jul 24, 2020 9:13 am
mdrobnak wrote: Fri Jul 24, 2020 6:25 am
starpancake wrote: Fri Jul 24, 2020 12:01 am yeah, i agree. sorry to disappoint, i have decided not to pursue the project since i can buy an older liquid-cooled battery electric car with almost 400 km range for very little here in the US. and i would also not be able to sell the leaf if i modified it substantially. safety is also a concern.
Please do share sources :)
This is important, please do share the source if possible so that we can break the cycle of abandoned EV development :)
the chevrolet bolt EV is selling for under $15,000 in the US and does 400km rather easily. that's what i'm referring to :)

Re: Nissan Leaf BMS

Posted: Sat Aug 15, 2020 5:10 am
by Isaac96
Yup, here's one for $18,990 -- first hit on Craigslist for my area.
https://sfbay.craigslist.org/nby/ctd/d/ ... 44553.html
Ouch, that's a lot of depreciation.

Re: Nissan Leaf BMS

Posted: Mon Aug 17, 2020 1:59 am
by starpancake
yeah, i meant the 2017. one over 100k miles was going for $14,200, but someone snatched it up before me :(

not that $15k isn't 'a lot' of money, but in the context of things, bolt would have 3x the range of my "hacked up" leaf, with a full trunk, all the safety interlocks in place, liquid-cooled battery for rapid charging, 100 more horsepower, five years newer drivetrain, lots of warranty left, a better interior and features, lower overall degradation (longer battery lifetime), faster charging, a better+more common CCS connector (vs chademo) and it'd be not really much more than 2.5x the price of the leaf and upgrade. so that really killed the idea of the leaf project for me (i don't love the car too much.)

ended up selling the leaf for around $4k, actually!

Re: Nissan Leaf BMS

Posted: Mon Oct 26, 2020 9:42 pm
by prensel
Picked up working on the Leaf BMS since a few days.
I have the full Nissan Leaf battery pack shoveled into the Think City (A306) as a replacement for the original Zebra battery.
I'm using the Nissan contactorbox and simplified SimpBMS to control the box and mimic the Zebra traffic to allow the Think to drive, charge and control the the dash.

Looking into the CAN traffic I noticed the LBC is sending out max charger limit in 0x1DC which starts at about 40kW when half charged and tapers to 0kW when nearing the maximum cell voltage of 4135mV. I'm using this value to adjust the chargers output so it dynamically 'follows' the LBC. During charging the SOC value in 0x55B is the same as the SOC value when requested as 'group 0x01' from 0x7BB.

I've read in the Nissan documentation that the LBC does a open voltage measurement on starting up and determines the SOC value from that point on and aparently adjusts this value with the current flowing in/out the battery.

Re: Nissan Leaf BMS

Posted: Mon Oct 26, 2020 9:46 pm
by johu
Wow, that Think must have some serious range now!

Yes I also use the charge limit for regen and charging. Also the discharge limit for throttling at low SoC. Below 20% or so the charge limit reaches 70 kW on mine :)

Had the same impression about SoC measuring. Sometimes there are little jumps in SoC after the car was stationary for a while.

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 11:54 am
by prensel
How does (if it does) the LBC sync the actual SOC ?

I probably have mixed up and used another LBC on my pack then it had originally on it and now when i'm fully charging upto 4135mV the SOC stops at 89.6%. The LBC sets the chargelimit to zero Amps but the SOC is not adjusted as 'full', 100%.
Discharging to say 40% and recharging to 'full' 4135mV is again about the same 89.6%.

Can I adjust this or do I need to drive it to near empty 0% ?

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 2:05 pm
by johu
Got a similar problem, LBC doesn't belong to the pack. In the beginning the most I could reach was like 94.5% meanwhile I can hit 96.5% after many, many cycles, some down to 4%. Very magic stuff going on inside I suppose.

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 3:18 pm
by Extremetaz
Yeah it's an asymptotic curve, as you approach the true SOC the rate at which you approach drops off exponentially.
It's a not a problem in any practical sense after a couple of thousand km though.

In my first swap I took out a pack at 63%SoH and replaced it with a pack at 92% according to its own LBC read using Leafspy.
Once I swapped in my car's LBC it took about 5000km before it read ~89%SoH and that's the best it ever did.

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 4:03 pm
by prensel
Okay so just driven it near empty, 5% SOC and lowest cell just under 3000mV.

Just under 3000mV the Think went in limb mode, flashing 'power limit' light etc., I could barely make it back home.
Now at least I know what the Think specific inverter variable "sys_voltageMinDischarge" is for :-)
I had this set to lowest cell * 96 and when the inverter sees that voltage it goes limbo... sort of..

Strangely enough the LBC says I can pull about 40kW from the pack... I don't think that is correct.
But it says 5% SOC and lowest cell is just under 3000mV so it is there any more capacity available unbder 3000mV ?
Can I safely adjust my lowest cell voltage to 2750mV ?
It's charging now so i'll see where it ends on what SOC when the LBC says "stop charging"...,

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 4:54 pm
by johu
The LBC power limit is very dynamic, pretty much a voltage control loop. So it may say 40 kW at standstill but as soon as you pull current and the lowest cell approaches 2.5 V the limit will drop rapidly.

I set my inverter limit to 250V and rely on the LBC limit (it is translated to throtmax)

Re: Nissan Leaf BMS

Posted: Thu Oct 29, 2020 5:30 pm
by prensel
johu wrote: Thu Oct 29, 2020 4:54 pm The LBC power limit is very dynamic, pretty much a voltage control loop. So it may say 40 kW at standstill but as soon as you pull current and the lowest cell approaches 2.5 V the limit will drop rapidly.

I set my inverter limit to 250V and rely on the LBC limit (it is translated to throtmax)
Okay, on average of 2600mV per cell.
I've seen on different packs the Leaf cells drifting from each other when they get on their lower voltage ranges.
So a total of 250V could mean some cells are much lower than 2600mV and others much higher..

Do you have failsafe kinda thing just in case one cell goes total flat to 0mV (i had this once before) ?
like "if (cellMin <= 2500 || totalVolt <= 250) { drop_contactors} " ?

Re: Nissan Leaf BMS

Posted: Wed Nov 04, 2020 2:45 pm
by johu
Now, I have a "white" BMS here that is lacking its current sensor. Since the supply to the sensor is 5V I assumed 2.5V to be 0A. But it's not. I connected a Tamura L01Z400S05 (400A range) and the LBC reported -102A. So I connected my calibration source and found the LBC to read 0A at 3.166V. At 2.5V it reports -100A and at 3.83V it reports +100A. So 6.6 mV/A.
So to use the Tamura 400A sensor one would need to convert the offset to 3.166V and the gain from 3.75 mV/A to 6.66 mV/A (gain 1.776)

EDIT: here's what you would need:

Re: Nissan Leaf BMS

Posted: Fri Nov 06, 2020 7:58 pm
by Jelle IV
These BMS's seem quite cheap on Ebay and somewhat doable to work with. Are there any specific reasons for not using them with other battery packs than the Leaf ones? I read that it also works with less that 96s packs. Can anyone confirm?

I happen to have bought two 60s Kokam packs from this client of Damian's and I am looking for an affordable BMS. Could anyone tell if the Nissan Leaf BMS would be suitable (in combination with Tesla SDU)?

Another option would be the openinverter BMS, however it is not available yet, right? Although, it may be wise to exclusively reuse commercial (/tested) EV-parts, considering the harsh EMC-requirements here in the Netherlands.

Re: Nissan Leaf BMS

Posted: Fri Nov 06, 2020 9:36 pm
by Isaac96
Leaf BMS does not work with less than 96, barring significant modifications.

Re: Nissan Leaf BMS

Posted: Fri Nov 06, 2020 11:10 pm
by prensel
Isaac96 wrote: Fri Nov 06, 2020 9:36 pm Leaf BMS does not work with less than 96, barring significant modifications.
Or 48 cells and connect the two strings of the Leaf BMS in parallel.

Re: Nissan Leaf BMS

Posted: Mon Nov 09, 2020 11:29 am
by prensel
Since using the Leaf LBC and controlling my charger on the values that the LBC transmits i've noticed that:

- from 1% - 20% SOC the LBC sets the kW on charge to non-zero value, mostly on 55kW.
Then at round 20% SOC it (always) sets the kW charge to zero, so my charger stops :-(

Replugging and restarting the charge process continues charging upto about 85% SOC without any issues.
- Around 85% SOC it tapers the kW charging power from 55kW down and finally to zero kW, so my charger stops.

At that point the lowest cell is about 4080mV and the highest cell is about 4135mV.
I can restart and it will charge but very quickly it tapers again to 0kW.

So, I'm guessing it does some sort of measurements at these 20% and 85% SOC points to see where its at.
Or at 85% it probably does some shunting (maybe at 20% too but I havent checked that actually) and temporarely stops charging current

So whats a good stopping variable on charging ?
Obviously not the kW charging power request as it goes to zero too often and too early...

Re: Nissan Leaf BMS

Posted: Mon Nov 09, 2020 3:37 pm
by Extremetaz
johu wrote: Wed Nov 04, 2020 2:45 pm So I connected my calibration source and found the LBC to read 0A at 3.166V.
I haven't monitored the serial on mine but have found that limp mode kicks in as soon as the first cell drops below 3.2V - so the above fits with my experience.

Re: Nissan Leaf BMS

Posted: Mon Nov 09, 2020 3:40 pm
by Extremetaz
prensel wrote: Mon Nov 09, 2020 11:29 am - from 1% - 20% SOC the LBC sets the kW on charge to non-zero value, mostly on 55kW.
Then at round 20% SOC it (always) sets the kW charge to zero, so my charger stops :-(
Can't explain that - that's strange.
prensel wrote: Mon Nov 09, 2020 11:29 am - Around 85% SOC it tapers the kW charging power from 55kW down and finally to zero kW, so my charger stops.
At that point the lowest cell is about 4080mV and the highest cell is about 4135mV.
I can restart and it will charge but very quickly it tapers again to 0kW.
This is normal and correct behaviour - are you familiar with Li charging strategies?
Bottom line, the bulk of the charge is done at (broadly speaking) constant current, with the voltage at whatever it needs to be to support same.
Once the voltage reaches the termination voltage level for the cell/module/pack charging switches to constant voltage - and here is where your tapering starts (again, broadly speaking).
There are other factors which play into it, but that's the basic premise.

Re: Nissan Leaf BMS

Posted: Mon Nov 09, 2020 5:16 pm
by Isaac96
IIRC the Leaf only charges its cells to ~4.10 or so, that would explain the shutoff at that voltage.