# Leaf module based 150V 65Ah battery pack...



## Weisheimer (May 11, 2009)

That is one impressive feat there Wolf...

And you have temperature monitoring and battery monitoring by your upgrade of the original battery monitor system.

Nice work!


----------



## WolfTronix (Feb 8, 2016)

Yup, I replaced the Nissan's microcontroller with my own:










Now I have full control over the BMS hardware:
Cell Voltages.
Cell Balancers.
Current Sense.
Total stack voltage.
12V Auxiliary battery voltage.
I/O for the heaters.
CAN bus.
Temp Sensors.
Isolation monitor.
High Voltage Interlock.
EEPROM.
Miscellaneous I/O (Ignition switch, Watch dog timer, etc...).

Trying to have the Truck back on the road before Spring.


----------



## CKidder (Dec 12, 2009)

Building an adapter board and putting your own CPU on there as basically the only hardware modification is pretty neat. That's slick stuff. Congrats!


----------



## Yabert (Feb 7, 2010)

WolfTronix said:


> Yup, I replaced the Nissan's microcontroller with my own


Wooo! Nice!
Good job.


----------



## electro wrks (Mar 5, 2012)

Great work! Would it be possible to do something like this with Tesla BMS hardware? I haven't checked in a while. Maybe someone else has already done it.


----------



## WolfTronix (Feb 8, 2016)

electro wrks said:


> Great work! Would it be possible to do something like this with Tesla BMS hardware? I haven't checked in a while. Maybe someone else has already done it.


I would assume so...

This is typically what I do when I can't extract the firmware and decompile into something I am familiar with to make the changes I need...

In this case, I reverse engineered the hardware of the LEAF BMS, and once I new what pins on the micro controlled what.

I was able to make my own interposer board that routs the digital and analog pins over to the digital and analog pins on my micro.

The only reason I have to make changes, is because I am not using all 48 modules in the Leaf battery pack, (I am only using 40 of them).

This makes the microcontroller unhappy, and spends most of its time throwing fault codes and repeatably looking for the missing monitor/balance chips. And it disables balancing of the cells, since cells are literally missing.

Also, any unpowered monitor/balance chips breaks the serial LIN communications bus, and you get no cell voltages.

Anyway, yes, I would assume someone could do exactly the same thing with the Tesla BMS.


----------



## WolfTronix (Feb 8, 2016)

ekthor said:


> Congratulations Wolf.
> Any plan to sell your micro controller to the DIY community? How much $ would it be?


Sure if others want it...
How much do you thing others will pay for it?
I have about $6 in parts for the microcontroller and interposer board.
But lots of time and labor reverse engineering the hardware and software protocols. 



ekthor said:


> Please post its specs and future plans for it.


Info is on the website for it, but is a bit out of date:
http://www.wolftronix.com/E10_LithiumUpgrade/index.html

The specs will be identical to the Nissan Leaf BMS, with the following exceptions:

You can have any number of even modules you want, for example:
48, 46, 44, 42, 40 ... 10, 8, 6, 4, 2 series modules.
(each monitor/balancer chip needs a 4 cells to power it, and still support a single cell shorted... when 2 cells short out the monitor/balancer chip stops talking, breaking all serial communications).

I will support the following balance modes:

Bottom balance (You will have to discharge the pack externally, remove the load, then let the balance shunts take each cell down to the same target voltage).

Top balance (charge to the first cell reaches target voltage, then let the balance shunts take each cell down to the lowest cell). This would happen at the end of every charge cycle.

Continuous balance (let the balance shunts take each cell down to the lowest cell voltage, all the time). This appears to be what Nissan does.

Support for more that one BMS unit on the same CAN bus:
By shifting the CAN address of each BMS unit, or using a different CAN protocol.

The thing I don't know how to recreate is the magic algorithm that Nissan uses to calculate battery degradation and state of charge... They would take in account the battery temperature, mileage, charge cycles, depth of discharge, voltage, current, etc...

I will probably just use amp-hours in and out. 
Then set the battery pack capacity when the lowest cell reaches the discharge voltage knee, (since I would know how many amp-hours it took to get there). Kind of like when you do a battery gauge calibration on your cell phone. ;P



ekthor said:


> It would be really nice to be able to use as much Leaf Modules as the end-user wants. For instance in a NEV I would make 2 cars out of one Nissan Leaf battery pack.


Yup, see above... but you would need to acquire another Nissan Leaf BMS unit for the second vehicle.



ekthor said:


> How do you actually monitor (see) voltages and temperatures in real time? (I have not seen your YT videos), I assume you have a screen, "syslog" files for historic review?


How ever you want. 
It will spit out CAN packets, you can use Leaf Spy, my Pack Sniffer, a laptop, a tablet, etc...

For my truck I will have a dedicated multi-function display for real time battery cell voltage monitoring.



ekthor said:


> I believe its time for you to test it in your EV. Have you confirmed everything works? (Balancing, temp sensors, etc)


It is in the works...
My goal is to have the truck up and running in the Spring...
But it might take longer to implement all the features I want.



ekthor said:


> A friend of mine in Florida used leaf cells for almost 3 years in a conversion, without BMS, just bottom-balancing them without issues, he was very careful on SOC, he never charged the cells to their full capacity. Your approach is the best.
> 
> Hector


Nissan has a BMS unit for a reason. 

Thanks, 
Wolf


----------



## Karter2 (Nov 17, 2011)

It would be really good if you could resize your photos such that they do not distort the page format to micro print when this thread is opened.
Thanks in advance.


----------



## MathisLaurant (Feb 21, 2017)

Just out of curiosity. This battery has 3 connections. I know one is the positive terminal and the other is negative. But what is the center? Is that the BMS terminal?


----------



## WolfTronix (Feb 8, 2016)

MathisLaurant said:


> Just out of curiosity. This battery has 3 connections. I know one is the positive terminal and the other is negative. But what is the center? Is that the BMS terminal?


The Nissan Leaf modules actually have 4 cells in them...
Two are in parallel, and those two groups are in series, (2s2p)

The center post is connected to both cell groups, (center tap), this lets the BMS measure and balance every two cell group in the module.


----------



## MathisLaurant (Feb 21, 2017)

WolfTronix said:


> The Nissan Leaf modules actually have 4 cells in them...
> Two are in parallel, and those two groups are in series, (2s2p)
> 
> The center post is connected to both cell groups, (center tap), this lets the BMS measure and balance every two cell group in the module.


Ok, I've been looking online for a Data sheet on these Cells or a diagram how Nissan wires the BMS to for these cells but cant find anything. I'll keep looking thanks


----------



## WolfTronix (Feb 8, 2016)

From the Service Manual


----------



## WolfTronix (Feb 8, 2016)

From the Service Manual


----------



## WolfTronix (Feb 8, 2016)

Leaf module battery specs:
http://www.electricvehiclewiki.com/Battery_specs


----------



## MathisLaurant (Feb 21, 2017)

WolfTronix said:


> Leaf module battery specs:
> http://www.electricvehiclewiki.com/Battery_specs


is there a Charge and discharge C rating for these Cells?
I contacted the supplier of the cell at http://www.eco-aesc-lb.com/en/product/liion_ev/ for that information, but they told me that is proprietary information haha. but maybe there is a way to calculated based on the charging time for lvl 1, 2, and 3 chargers?


----------



## WolfTronix (Feb 8, 2016)

MathisLaurant said:


> is there a Charge and discharge C rating for these Cells?


The pack is fused at 225A... so that is probably the max continuous discharge current. 

According to Wikipedia:
https://en.wikipedia.org/wiki/Nissan_Leaf

The motor is 80kW... so 80,000 / 360V = 222.2A
And 44kW charge on CHAdeMO = 44000 / 360V = 122.2A


----------



## D a n n y^ (Aug 4, 2015)

WolfTronix said:


> Sure if others want it...
> 
> How much do you thing others will pay for it?
> 
> ...



I'll be watching for the "add to cart" button for this set up on your website! Make sure and post some videos when you get the truck going. You've got my attention.


Sent from my iPad using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

D a n n y^ said:


> I'll be watching for the "add to cart" button for this set up on your website! Make sure and post some videos when you get the truck going. You've got my attention.
> 
> 
> Sent from my iPad using Tapatalk


I have my microcontroller running the BMS hardware now.

Here is the latest video:
https://youtu.be/YilgYwfq_fI

I need to open up my other Leaf battery pack and swap in this BMS to finish the code to read out the cell voltages and command the balance shunts... but I have been sick... hopefully I can get to it this weekend. 

Thanks, 
Wolf


----------



## Caps18 (Jun 8, 2008)

WolfTronix said:


> The pack is fused at 225A... so that is probably the max continuous discharge current.
> 
> According to Wikipedia:
> https://en.wikipedia.org/wiki/Nissan_Leaf
> ...


That is what I had thought too, but it appears that there are time-current issues when dealing with fuses. I think I figured out that I could get 650A for 60 seconds (which would be 100% on my motor controller)


----------



## WolfTronix (Feb 8, 2016)

Yup, that is why I said "max continuous" discharge.


----------



## WolfTronix (Feb 8, 2016)

Progress is slowly being made:

I have the modified BMS now sending real* CAN packets.

Testing the current sensor code:
https://youtu.be/y2ESm_YsRlU

*now includes the sequence number and Poly 0x85 CRC byte.

The VCU in the Nissan Leaf would accept this as a valid CAN packet from the modified BMS.


----------



## D a n n y^ (Aug 4, 2015)

WolfTronix said:


> Progress is slowly being made:
> 
> 
> 
> ...



Exciting! My wife finally asked me last night "what's the deal with this guy you've been watching on YouTube all day everyday?" After I filled her in, she was rather impressed as well...( I think).
Anyway, I'm rooting for ya and excited to try to test the sniffer out on my leaf pack!


Sent from my iPhone using Tapatalk


----------



## hat_man (Jan 2, 2010)

A couple of questions from the peanut gallery (newbie section).......

Looking at the pic of the batteries let me see if I have this right. What I am looking at is 20 white modules (each containing 4 cells) creating a "pack" rated at 150v/65Ah weighing approx. 164lbs. (656lbs divided by 4) 

If a Leaf pack has 96 cells (4 per module) then it has 24 modules. If the pic is 1/4th of your total battery pack did you use 2 Leaf battery packs? You said you are using 40 of 48 modules. Unless each white sections is two modules? I guess I don't quite understand how the numbers all reconcile.

You are hoping for a 120 mile range in a small pickup right? What kind of truck? I think Rangers and S-10's are about 3000lbs ICE'd? Any idea what yours weighs including batteries? 

Once I get my head wrapped around some of these numbers I can do some more "fancy cyphering" for our project.


----------



## brian_ (Feb 7, 2017)

hat_man said:


> You are hoping for a 120 mile range in a small pickup right? What kind of truck? I think Rangers and S-10's are about 3000lbs ICE'd? Any idea what yours weighs including batteries?


The weight of a vehicle varies depending on configuration, especially with pickup trucks have choices for the engine, transmission, drive system (2WD vs. 4WD), cab size, box length, and even wheelbase. The Solectria E-10 is a second-generation S-10 in 2WD with a standard cab... and yes, with the 4-cylinder engine and manual transmission that would weigh about 2800 pounds plus options. I'm guessing that the glider would be roughly 2000 pounds, and the EV would add two motors, the batteries, electronics, and various brackets and boxes to that.

1995 Chevrolet S-10 features & specs from Edmunds


----------



## WolfTronix (Feb 8, 2016)

A Leaf pack contains 192 cells, in 48 modules, each module is 2s2p (7.5V @ 65Ah).

I am using 40 of 48 modules from one Leaf pack in the front.
And I using 40 of 48 modules from one Leaf pack in the back.

For a total of 80 modules, in 4 strings of 20 modules in series.

As for the weight of my truck, not sure, never weighed it... but on Lead acid My range was roughly the total battery pack Ah divided by 2.

For example, when new for the first few years:
120 Ah AGM pack got around 60 mile range.
150 Ah Gel Cell pack got around 75 mile range.

So this 260 Ah pack should get me around 130 mile range...
But I plan on only doing an 80/20 charge discharge on it, and with the weight savings from lead to lithium, I guesstimate that I will get a 120 mile range. 

More info is here:
http://www.wolftronix.com/EV.htm



hat_man said:


> A couple of questions from the peanut gallery (newbie section).......
> 
> Looking at the pic of the batteries let me see if I have this right. What I am looking at is 20 white modules (each containing 4 cells) creating a "pack" rated at 150v/65Ah weighing approx. 164lbs. (656lbs divided by 4)
> 
> ...


----------



## WolfTronix (Feb 8, 2016)

I found the specs on a 1995 Solectria E10:
https://avt.inl.gov/sites/default/files/pdf/fsev/sole1095.pdf

Curb Weight: 3959 lbs (with around 1200 lbs of that, Lead acid batteries).




brian_ said:


> The weight of a vehicle varies depending on configuration, especially with pickup trucks have choices for the engine, transmission, drive system (2WD vs. 4WD), cab size, box length, and even wheelbase. The Solectria E-10 is a second-generation S-10 in 2WD with a standard cab... and yes, with the 4-cylinder engine and manual transmission that would weigh about 2800 pounds plus options. I'm guessing that the glider would be roughly 2000 pounds, and the EV would add two motors, the batteries, electronics, and various brackets and boxes to that.
> 
> 1995 Chevrolet S-10 features & specs from Edmunds


----------



## brian_ (Feb 7, 2017)

WolfTronix said:


> I found the specs on a 1995 Solectria E10:
> https://avt.inl.gov/sites/default/files/pdf/fsev/sole1095.pdf
> 
> Curb Weight: 3959 lbs (with around 1200 lbs of that, Lead acid batteries).


Thanks. 
So a rough weight breakdown guess might be:
glider: 2000 lb
battery: 1200 lb
motors, mounting brackets and belt drives, controllers, charger, etc: 700 lb​


----------



## hat_man (Jan 2, 2010)

That's kinda what I thought. I almost felt silly asking. I had heard that the Leaf packs weighed well over 600 lbs and, with you using so much of the original equipment, I couldn't get the quantities to add up. 

So I guess that half of your set-up (one Leaf pack) could work pretty well for what we are looking at. About 325 lbs of battery (and support hardware) and maybe 60 mile range with a lighter donor and less battery weight. 

Not that I know anything about BMS, but I assume you have to use one from each OE Leaf pack to make your system work. 

We are watching all your work and YT videos. It's been a great learning tool.

Thank you


----------



## WolfTronix (Feb 8, 2016)

Yeah, I will have two modified Leaf BMS units, one in the front battery box, and one in the rear battery box.

Each BMS will monitor 40 modules.

I am hoping to get back to working on the power controller this weekend. 




hat_man said:


> That's kinda what I thought. I almost felt silly asking. I had heard that the Leaf packs weighed well over 600 lbs and, with you using so much of the original equipment, I couldn't get the quantities to add up.
> 
> So I guess that half of your set-up (one Leaf pack) could work pretty well for what we are looking at. About 325 lbs of battery (and support hardware) and maybe 60 mile range with a lighter donor and less battery weight.
> 
> ...


----------



## WolfTronix (Feb 8, 2016)

Power Controller:
http://www.diyelectriccar.com/forums/showthread.php/my-power-controller-186185.html


----------



## steve93 (Feb 22, 2017)

this is brilliant! If you were to produce a handful and a little manual, you could make them available on any ev parts website. since you already did the work...


----------



## WolfTronix (Feb 8, 2016)

If people are interested, I can have them available on my website:
http://wolftronix.com/store.html

I was originally going to make it also fit the EV200 contactor, but the terminal spacing did not work out...

So if there is also an interest in an EV200 version, let me know. 


Currently, all the I/O checks out, and I am tuning the isolated switch mode power supplies to operate over the full 8V-15V automotive range with worse case min and max loads. 

Then finish the state machines, and CAN message interface.


----------



## tortuga (Sep 11, 2017)

ekthor said:


> Congratulations Wolf.
> 
> Any plan to sell your micro controller to the DIY community? How much $ would it be?





WolfTronix said:


> Sure if others want it...
> How much do you thing others will pay for it?


I am interested in doing a similar thing but for a 120V motor.
If resoldering the CPU is easier than re-programming the existing one I am interested.


----------



## WolfTronix (Feb 8, 2016)

Well, I found it easier to replace the microcontroller, others might find it easier to read out and modify the firmware...

Either way you still have to cut and jumper traces to bypass the balancer chips you are not using.

Currently I am working on the code for the power controller:
http://www.diyelectriccar.com/forums/showthread.php?t=186185

Next is the Smart Switches and then the Multi Function Display.

This is my high level block diagram:
http://www.diyelectriccar.com/forums/showthread.php?t=176082

I have since swapped out the BC3300 chargers with a NLG511 charger, since it has CAN and J1772 built in.

Still looking for another NLG511 charger.
I have a NLG513 charger for trade.


----------



## tortuga (Sep 11, 2017)

WolfTronix said:


> Well, I found it easier to replace the microcontroller, others might find it easier to read out and modify the firmware...
> 
> Either way you still have to cut and jumper traces to bypass the balancer chips you are not using.
> 
> ...


Thats unfortunate about the cutting the jumper traces I was hoping they could be programmed out in firmware.
Is the power controller built into the battery micro-controller firmware?


----------



## WolfTronix (Feb 8, 2016)

The balancer chips communicate over serial LIN Bus and they are daisy chained.
And since they are powered by the 2 modules they are monitoring, the un-powered balancer chips can't propagate the LIN Bus.

So you end up with the single bad bulb taking out the series string of Christmas tree lights. 

That is why you have to Cut and Jumper to bypass the un-powered chips.
Also, that is why you have add/remove modules in pairs.

The modified Leaf BMS monitors the cells, balances them, and controls the battery pack heaters.

Each Power Controller has its own microcontroller on it.
They monitor CAN packets from the modified Leaf BMS, and other Power Controllers. And they Send CAN packets to the NLG511 battery charger(s), and trip the limp home mode on the motor controllers.


----------



## tortuga (Sep 11, 2017)

WolfTronix said:


> The balancer chips communicate over serial LIN Bus and they are daisy chained.
> And since they are powered by the 2 modules they are monitoring, the un-powered balancer chips can't propagate the LIN Bus.
> 
> So you end up with the single bad bulb taking out the series string of Christmas tree lights.
> ...


Ahh Okay gotchya, It would be nice if the chips could be powered from a 3.3V trace and just sense if the battery module(s) are present, enabling the pack to be reconfigured for different voltages.
Well count me in. Here is my post about my truck:
https://www.diyelectriccar.com/forums/showpost.php?p=901681
I have never soldered a surface mount chip before but I have soldered lots of other larger components.
So since this 'power controller' function was not provided by the Leaf pack and is necessary for this battery type we need additional microcontrollers? If I had to come up with this from scratch I think I would have put all the battery related functions (power controller and battery mangement) in one microcomputer in each 'battery pack' intended to be stacked in parallel. 
Then packs could be added or stacked for long trips or used for a different purpose like home back up power.


----------



## rev0 (Oct 7, 2017)

Can you provide more detail on how to bypass the unused balancer ICs? I bought a Leaf BMS which I had intended to use all of to balance/monitor a 96s range extender pack I'm making, and I accidentally swapped 2 wires when making my adapter cable and blew up an ASIC. I have the schematic of the BMS balacer chips from here: http://www.mynissanleaf.com/viewtopic.php?f=8&t=17470 but I wasn't quite sure how the in/out pins behaved on the ASICs and how to wire them to bypass. If you know anyone with a dead BMS who can donate a DS15120 IC I'd be grateful too, otherwise I've got to buy another $75ish BMS...


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> Can you provide more detail on how to bypass the unused balancer ICs? I bought a Leaf BMS which I had intended to use all of to balance/monitor a 96s range extender pack I'm making, and I accidentally swapped 2 wires when making my adapter cable and blew up an ASIC. I have the schematic of the BMS balacer chips from here: http://www.mynissanleaf.com/viewtopic.php?f=8&t=17470 but I wasn't quite sure how the in/out pins behaved on the ASICs and how to wire them to bypass. If you know anyone with a dead BMS who can donate a DS15120 IC I'd be grateful too, otherwise I've got to buy another $75ish BMS...


The easiest way is to leave the 4 BMS chips connected to the Optio-Isolators in the system, (and connected to cells). These have extra circuitry to drive and receive from the Isolators.

So you will have one module connected to the Pack most negative and one module connected to the most positive terminal.
And one module connected on either side of the main Pack disconnect.

Then bypass the missing modules (and BMS chips) by cut and jumping the OUT from the BMS chip you are using, to the IN on the next BMS chip you are using.

The chips count top to bottom across, so there is always a convenient via to solder a jumper wire into.

Doing this on a stock Nissan Leaf BMS, will cause lots of trouble codes and will cause the vehicle to be stuck in turtle (limp home) mode.
This is because the Nissan firmware expects all the BMS chips to be on the LIN bus.

My version of the BMS sends a token on the LIN bus, when it gets the token back, it knows the LIN bus is intact.
It then queries each possible BMS chip address to locate all the connected chips, and uses this data to build a cell table.

This table is in ascending order, despite any gaps in the BMS chip ID's.


----------



## rev0 (Oct 7, 2017)

WolfTronix said:


> The easiest way is to leave the 4 BMS chips connected to the Optio-Isolators in the system, (and connected to cells). These have extra circuitry to drive and receive from the Isolators.
> 
> So you will have one module connected to the Pack most negative and one module connected to the most positive terminal.
> And one module connected on either side of the main Pack disconnect.
> ...


Thanks for the info, I'll give it a try once I get enough batteries put into packs for this. I'm only interested in using this BMS to monitor cell voltages (it's quite expensive to get 96 channel isolated ADCs otherwise) and balancing, though the balance current might be a bit too low for a home-built 18650 pack. I would be interested in buying your brain transplant microcontroller board if you put them for sale, that would probably work better. Does your microcontroller still deliver CAN bus messages, so it could still work with Leafspy?


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> Thanks for the info, I'll give it a try once I get enough batteries put into packs for this. I'm only interested in using this BMS to monitor cell voltages (it's quite expensive to get 96 channel isolated ADCs otherwise) and balancing, though the balance current might be a bit too low for a home-built 18650 pack. I would be interested in buying your brain transplant microcontroller board if you put them for sale, that would probably work better. Does your microcontroller still deliver CAN bus messages, so it could still work with Leafspy?


Yeah, the Leaf BMS, (and I assume Volt and Tesla), are the way to go.
They are OEM quality and they put in a lot of hours engineering them. 
(Also, one of the reasons why it is taking me so long, its just me working on the firmware/software). 

I have not tried it with Leaf Spy, but I would assume it works, since its all the same CAN packets.

Getting the individual cell voltages from a Nissan BMS, requires a send/response sequence over CAN...

I was going to also have my version just send out Cell Voltages in an array of CAN packets. Since I have more than one device (power controller, display) looking at the cell voltages. 

But it will default into Nissan Leaf mode. 

For the State of Charge data, it will need to know the Ah capacity of your custom pack. 

For the State of Heath meter, you will have to discharge the battery pack all the way for it to update (I don't know the algorithm Nissan uses to calculate this)... Thus it becomes (Actual Amp-Hours / Theoretical Amp-hours).


----------



## Solarsail (Jul 22, 2017)

rev0 said:


> Can you provide more detail on how to bypass the unused balancer ICs? I bought a Leaf BMS which I had intended to use all of to balance/monitor a 96s range extender pack I'm making, and I accidentally swapped 2 wires when making my adapter cable and blew up an ASIC. I have the schematic of the BMS balacer chips from here: http://www.mynissanleaf.com/viewtopic.php?f=8&t=17470 but I wasn't quite sure how the in/out pins behaved on the ASICs and how to wire them to bypass. If you know anyone with a dead BMS who can donate a DS15120 IC I'd be grateful too, otherwise I've got to buy another $75ish BMS...


rev0, is this a range extender for a Leaf?

Would you have a link to your project somewhere?

Wolf, I apologize in advance for my ignorance. I am unaware of the larger context of your project. Are you trying to augment an auxiliary pack to an existing Leaf, to extend the range?

Thanks!


----------



## WolfTronix (Feb 8, 2016)

Solarsail said:


> Wolf, I apologize in advance for my ignorance. I am unaware of the larger context of your project. Are you trying to augment an auxiliary pack to an existing Leaf, to extend the range?
> 
> Thanks!


I am putting 4 parallel 150V 65Ah battery packs in my Solectria E10.
http://www.wolftronix.com/E10/index.html
I don't own a Nissan Leaf. 

Originally I used my DMOC Adapter:
http://www.wolftronix.com/dmocAdapter/index.html
For sniffing Leaf battery packs.

People wanted to do the same. (I even loaned out the DMOC Adapter setup).

Thus, the Pack Sniffer 1 was developed to check battery packs before purchase (more discreetly, since you don't need to haul around a big 12V battery). A USB power bank is all you need. 

Then people wanted to use the Pack Sniffer in the car, to monitor the BMS and control the contactors, and the such...

Thus Pack Sniffer 2 was developed (it should have probably been given a new name, but it still does everything version 1 did)...

I will be using the Pack Sniffer 2 in my truck as a simple multi function display, probably located in the center console (Might have more, depending on what I want to display). It is nice not having to hook up a laptop or something to get quick diagnostic info.

This will also double as the CAN programming module.
The firmware and config files will be on the Pack Sniffer 2's micro SD card.
It will handle configuration and firmware upgrading of the CAN devices...
And I have a bunch in the truck:
http://www.diyelectriccar.com/forums/showthread.php?t=176082

If you watched the video of the Pack Sniffer 2 computing check sums and boot loading its self from the micro SD card, (if the check sums do not match). The Pack Sniffer 2 will also do the same over CAN bus to all the other CAN devices in the system.

The same happens with Config files, if there is a change to a config file, it gets propagated and stored in the affected device over CAN bus...

A copy of the Config file is also stored locally on the device, such that if the Pack Sniffer 2, or the SD card is not available, the last config file it used.

Anyway, this is what I am working on now. 

I work on it in my spare time, so I am not sure when all of it will get done...
But I do hope to be driving around in the next few months.

And I am putting the Pack Sniffer 2 priority kind of high, since I know others want it, and it makes my life easier to be able to remotely program the other CAN devices.

However, I do have a BC1000 and BC3300 battery chargers in for repair.
And repairs get higher priority. (Working on the BC1000 tonight).


----------



## rev0 (Oct 7, 2017)

Solarsail said:


> rev0, is this a range extender for a Leaf?
> 
> Would you have a link to your project somewhere?
> 
> ...


It is indeed for a Leaf. I haven't formally written it down anywhere, I probably won't have time to until this weekend. Basically I'm trying to go the exact route that "Leaf Xpack" (https://www.youtube.com/watch?v=Ztejn3YYbvw&list=PL5Nz1FJp-6dtcfy52ArsE6-EyGCAKRlS1) did, and I found some info about getting the power sequencing signals from the HV battery connector (LB1 connector) to prevent his demise (accidentally applying 400V to the car when it's not expecting it).


----------



## Solarsail (Jul 22, 2017)

Thanks Wolf. If I understand correctly, the configuration is 2p20s2s2p, where the 2s2p represent a Leaf sardine can or module. I wonder if there is any balancing inside the module for the 2s? Is there a center tap for the 2s on the module available for balancing outside of the module?

Assuming a center tap is available, would it not then be possible to use 8x 10s x 60A off-the-shelf balance-protection boards to build a BMS?

Another dumb question - for monitoring, are the opto-isolators passing the analog signal or a digital signal? Would using mosfets as HV switches be simpler than opto-isolators?


----------



## Solarsail (Jul 22, 2017)

rev0 said:


> I found some info about getting the power sequencing signals from the HV battery connector (LB1 connector) to prevent his demise (accidentally applying 400V to the car when it's not expecting it).


Why did he tap into the car HV line instead of tapping into the battery pack HV out? Then you don't have to bother with the power sequencing signals. Rather odd.

Do you plan to charge the range extender using the Leaf charger or externally?

I plan to do the exact same project and am using new Panasonic 3.4Ah 18650s. Please see 

http://www.diyelectriccar.com/forums/showthread.php/18650-13s10p-project-48v-x-34ah-188618.html


----------



## WolfTronix (Feb 8, 2016)

I think this would be the correct 4p(20s(2s2p))?
ie. 4 of the 150V 65AH battery packs in parallel (I call them Wolf Packs). 

The modules are center tapped, see page 2 of this thread.

Yeah, nothing is stopping you from using an off the shelf BMS.
Except that the battery pack comes with a "free" one.

The opto-isolators are passing digital.
This is for protection of the BMS, when the main/emergency disconnect is removed.

Without the opto-isolators the BMS balance chips would complete the circuit and let out the magic smoke.


----------



## rev0 (Oct 7, 2017)

Solarsail said:


> rev0 said:
> 
> 
> > I found some info about getting the power sequencing signals from the HV battery connector (LB1 connector) to prevent his demise (accidentally applying 400V to the car when it's not expecting it).
> ...


Tapping into the battery directly means breaking the weather seal protecting the pack from water ingress, which has caused a car fire in one instance of a range extender. 

I plan to use the on board charger, quick charging is TBD, it's on the high side for safe charging (~2C) of the cells I'm using. I am following your thread also.


----------



## Solarsail (Jul 22, 2017)

rev0 said:


> Tapping into the battery directly means breaking the weather seal protecting the pack from water ingress, which has caused a car fire in one instance of a range extender.


No weather seal to be broken. The battery pack has a + and - terminal. May I know why you are not tapping into this terminal? Then you don't have to hack the vehicle ECU or BMS, etc. (Pack also has a disconnect switch that can be used.)



> I plan to use the on board charger, quick charging is TBD, it's on the high side for safe charging (~2C) of the cells I'm using. I am following your thread also.


If you charge the auxiliary pack using the vehicle charger, would not the charger or ECU complain when it sees the charge is exceeding 24 kWh or the voltage is not rising fast enough? Now you have to defeat all these safety mechanisms. I plan to have another extension cord which I would plug in the wall. The idea is not quick charging, but rather not to trigger any vehicle reaction. Charging speed will be identical to to the main pack to assure little voltage difference between the two packs.


----------



## rev0 (Oct 7, 2017)

Solarsail said:


> No weather seal to be broken. The battery pack has a + and - terminal. May I know why you are not tapping into this terminal? Then you don't have to hack the vehicle ECU or BMS, etc. (Pack also has a disconnect switch that can be used.)
> 
> 
> 
> If you charge the auxiliary pack using the vehicle charger, would not the charger or ECU complain when it sees the charge is exceeding 24 kWh or the voltage is not rising fast enough? Now you have to defeat all these safety mechanisms. I plan to have another extension cord which I would plug in the wall. The idea is not quick charging, but rather not to trigger any vehicle reaction. Charging speed will be identical to to the main pack to assure little voltage difference between the two packs.


That's the connector I will be tapping into; the problem is the contactors are *inside* the battery, so if you probe that connector you'll get 0V until the contactors are signalled to close from the VCM.

I haven't really looked into charging that much yet. Others don't seem to have a problem with adding a second pack in parallel with the main pack, I don't think the charger is that "smart", after all it has no issue with my pack charging much "faster" since it's degraded to 5 bars (~10kWH)...


----------



## Solarsail (Jul 22, 2017)

WolfTronix said:


> I think this would be the correct 4p(20s(2s2p))?


... and since it is always read right to left, the parenthesis can be removed ... 

I am just thinking that the Leaf BMS is designed for 96s while the Wolfpack is 40s. So a lot of hacking must happen so it would not trip. And then each Wolfpack needs one Leaf BMS, but you get two Wolfpacks and one BMS per wreck ... so now you need to find some floating BMS in the market.

I am just guessing, while knowing very little, but maybe two 20s balancer protector boards could do the same thing per wolfpack. Then for cell voltage monitoring, 40 cheap DPDT relays per wolfpack, one ADC and one opto-isolator? Are you using 40 ADCs and 40 optoisolators -- how does that work, if I may ask? I don't think CMOS switches can handle the HV. Actually probably the Leaf BMS does that for free. But how does that work?


----------



## rev0 (Oct 7, 2017)

Another question to Wolf, do you have any info on how the stock current sensor works (datasheet? or at least I to V conversion info?) I'd like to use the stock BMS for monitoring current in/out of the auxiliary battery pack as well and just interface my own current sensor. Couldn't really find any info on it.


----------



## Solarsail (Jul 22, 2017)

rev0 said:


> That's the connector I will be tapping into; the problem is the contactors are *inside* the battery, so if you probe that connector you'll get 0V until the contactors are signalled to close from the VCM.
> 
> I haven't really looked into charging that much yet. Others don't seem to have a problem with adding a second pack in parallel with the main pack, I don't think the charger is that "smart", after all it has no issue with my pack charging much "faster" since it's degraded to 5 bars (~10kWH)...


You have lost 5 bars and assuming it is not under warranty, you still don't want to break the seal? Is it difficult to break and get to the contactors? Otherwise, you would need to monitor when contactors go and and off and connect only at those times. What a pain.

The charger I am sure is reporting the state of the charge to the ECU and the ECU may panic. But I hope it works as that is what I would prefer to do, even though it slows the charge time.

My configuration is s(7s13s10p, 1s5s10p). So it is 7 modules in series, then a mini-module of 5s in series. Equivalent to 96s10p = 346V x 34Ah or 12 kWh. The reason for the 13s is that each module is nominal 48V, which can then be used for other activities as a 48V DC source. The mini-module is actually a full 13s10p module, with two outputs, 13s and 5s. (edit)

I still have all my bars left (on a 2011 Leaf), but find the range a bit too short for everyday use.

What configuration is yours. I understand you are using 18650s. May I ask what cells?


----------



## rev0 (Oct 7, 2017)

Solarsail said:


> You have lost 5 bars and assuming it is not under warranty, you still don't want to break the seal? Is it difficult to break and get to the contactors? Otherwise, you would need to monitor when contactors go and and off and connect only at those times. What a pain.
> 
> The charger I am sure is reporting the state of the charge to the ECU and the ECU may panic. But I hope it works as that is what I would prefer to do, even though it slows the charge time.
> 
> ...


I have lost 7 bars  getting the battery modules replaced by Cor this weekend actually, so it will be up to a nearly new 2013 pack, but I still want to pursue an add-on pack to give me some extra margin on long trips and get back lost range from future degradation.

Although the car is far out of warranty, I still want to keep the battery sealed, I am willing to go through the trouble of making a controller to deal with sequencing and managing all the states (there's a good video I found here that shows the power on/off/charge on/off sequences: https://www.youtube.com/watch?v=d0IozEyeGSk). Furthermore I would like to use in-line connectors everywhere such that I could remove my system without any trace of it being there if I needed to (for example when selling the car later on).

I am aiming to make this as safe as possible, with many layers of fusing/contactors/disconnect/more fusing/etc. also, adding my pack external to the main pack contactors helps in case there's a short or fault with my pack I believe. I'll try and draw up a block diagram sometime to make it clear.

For my battery architecture I picked more round numbers (12S(8S2P) for the first pack, ~1.4kWH), because originally I was going to design my own modular BMS system for balancing/monitoring, but the cost/complexity grew too much. Nissan's BMS is a much better solution, they already did the hard part of engineering a low parasitic drain isolated ADC/balancer board, and it's already got a nice user interface thanks to Leafspy. I will probably tap off the MCU->ASIC serial lines for my second level pack disconnect for under/over voltage and over current situations.


----------



## brian_ (Feb 7, 2017)

WolfTronix said:


> I think this would be the correct 4p(20s(2s2p))?
> ie. 4 of the 150V 65AH battery packs in parallel (I call them Wolf Packs).





Solarsail said:


> ... and since it is always read right to left, the parenthesis can be removed ...


In general, the series-parallel notation is relatively obvious... but I've never seen a clear definition. Where would the authoritative definition - including the order of precedence - be documented?

I notice that the above comments directly contradict the definition found on the first web page that I came across in a web search (White Paper - Notation for Series / parallel arrangement of battery cells):


> The order of 'S' and 'P' in the notation for the arrangement does matter: it indicates whether cells are first connected in series or in parallel. 3P4S means that 3 cells are connected directly in parallel first; while 4S3P means that 3 strings are connected in parallel last.


By that definition, a Leaf module is 2P2S, and the Wolftronix arrangement would be 2P2S20S4S.

In this case, parentheses could be helpful to describe the groups:
4p{20s(2s2p)}
where
() is an OEM Leaf module, and
{} is a "Wolf Pack" 
With the parentheses - even without using different styles - the grouping is clear regardless of what order is expected in the notation.


----------



## Solarsail (Jul 22, 2017)

To disambiguate the precedence without parenthesis, then a convention has to be agreed as to the order. I have seen both left to right and right to left used in many places. I think right to left is more popular.

Thus something like 2s(2p(2s2p)) is ambiguous as it is unclear whether what the order is for the inner 2s2p. One can try to guess from the parenthesis, but that would still be a guess. It should be disambiguated as either 2s(2p(2s(2p))) or 2s(2p((2s)2p)), unless the order has been specified. Once the order is specified, then parenthesis may not be needed, unless it becomes necessary, I think.

My preference for right to left is because of similarity with the way we write numbers. The left hand digits command a larger quantity than those on the right. Thus in 2s3p4s, the 2 is of sets of 12 cells, while the 3 is of sets of 4 cells, and the 4 sets of 1 cell.

The fun starts when we want to mix and match modules of different size. Thus my pack with 7s of 13s10p modules in series with a 5s10p - what is the notation? I suggest the following notation:

s(7s13s10p, 5s10p) or equivalently s(7s13s10p, 1s5s10p). If the order were left to right, then we would have to write as (10p13s7s, 10p5s)s, which I find confusing, because in functional notation we put the function to the left of the parameters when we write.

We can now factor that out and write s(7s13s, 5s)10p


----------



## D a n n y^ (Aug 4, 2015)

brian_ said:


> {} is a "Wolf Pack"



YES! Good one.
[emoji23]


----------



## WolfTronix (Feb 8, 2016)

Solarsail said:


> I am just thinking that the Leaf BMS is designed for 96s while the Wolfpack is 40s. So a lot of hacking must happen so it would not trip. And then each Wolfpack needs one Leaf BMS, but you get two Wolfpacks and one BMS per wreck ... so now you need to find some floating BMS in the market.


I am using 1 Leaf BMS per pair of Wolf Packs.
So each BMS does 80 cells.

2 BMS units total in the truck, one in the front battery box and one in the back battery box.

I am taking advantage of the optical isolation between the two pack halves in the Leaf.


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> Another question to Wolf, do you have any info on how the stock current sensor works (datasheet? or at least I to V conversion info?) I'd like to use the stock BMS for monitoring current in/out of the auxiliary battery pack as well and just interface my own current sensor. Couldn't really find any info on it.


Yup, I even did a video on it. 

0.5V = -350A
2.5V = 0A
4.5V = 350A


----------



## rev0 (Oct 7, 2017)

WolfTronix said:


> Yup, I even did a video on it.
> 
> 0.5V = -350A
> 2.5V = 0A
> 4.5V = 350A


Ah thanks, I'll take a look. There were a lot of videos for me to go through on your build hah. 

Another question, if only part of the stock BMS is used (right now I have it in the "minimum" configuration of 4s/4s/4s/4s, bottom and top of each side of the pack disconnect with the other chips bypassed), does it still balance? I don't see any of the shunts active on Leafspy, though your comment on your build said the balancing is happening all the time.


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> Another question, if only part of the stock BMS is used (right now I have it in the "minimum" configuration of 4s/4s/4s/4s, bottom and top of each side of the pack disconnect with the other chips bypassed), does it still balance? I don't see any of the shunts active on Leafspy, though your comment on your build said the balancing is happening all the time.


Nope, it won't balance, because right now it has lots of trouble codes due to communications loss with the bypassed chips.

The Nissan Leaf BMS will only balance the cells if all 96 are connected.

That was the reason why I swapped in my own microcontroller.


----------



## rev0 (Oct 7, 2017)

WolfTronix said:


> rev0 said:
> 
> 
> > Another question, if only part of the stock BMS is used (right now I have it in the "minimum" configuration of 4s/4s/4s/4s, bottom and top of each side of the pack disconnect with the other chips bypassed), does it still balance? I don't see any of the shunts active on Leafspy, though your comment on your build said the balancing is happening all the time.
> ...


That's too bad. Any plans on selling your custom controller then?


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> That's too bad. Any plans on selling your custom controller then?


Yup, Just need to finish the boot loader for it...
And have the Pack Sniffer 2, remotely program it over CAN.

Then it is ready to go. 

For pricing, I am thinking:
$20.00 USD for the programmed micro on the interposer board as shown (with out the programming connector).








$60.00 USD if you mail me a BMS unit, and I remove the micro, bypass the requested chips, and then solder on the above.

Does pricing seem reasonable?

Also, typical use at your own risk disclaimer.


----------



## rev0 (Oct 7, 2017)

WolfTronix said:


> Yup, Just need to finish the boot loader for it...
> And have the Pack Sniffer 2, remotely program it over CAN.
> 
> Then it is ready to go.
> ...


Sure, I'd be interested in one of the microcontroller/interposers for now to use on my 92-cell BMS (already bypassed myself). I may buy another later on for my second BMS which is coming for the final 92-cell pack, depending on how successful the first transplant is and whether I can get a replacement ASIC to solder on. Will you be listing that on your website then?


----------



## WolfTronix (Feb 8, 2016)

rev0 said:


> Sure, I'd be interested in one of the microcontroller/interposers for now to use on my 92-cell BMS (already bypassed myself). I may buy another later on for my second BMS which is coming for the final 92-cell pack, depending on how successful the first transplant is and whether I can get a replacement ASIC to solder on. Will you be listing that on your website then?


I will list them on the website when they are ready.


----------



## Solarsail (Jul 22, 2017)

May I ask Wolf or rev0, what is the method by which the Leaf BMS discovers each cell's voltage? Do they use 96 ADC's and opto-isolators? Doesn't sound right. How do they select the cell? Thanks.


----------



## WolfTronix (Feb 8, 2016)

Solarsail said:


> May I ask Wolf or rev0, what is the method by which the Leaf BMS discovers each cell's voltage? Do they use 96 ADC's and opto-isolators? Doesn't sound right. How do they select the cell? Thanks.


Each ASIC looks to have a single SAR or Sigma-Delta ADC converter, with a 6:1 MUX.

4 fully differential front ends to measure each cell (can measure across a cell in either direction).

2 single ended front ends to measure local 0V and voltage reference.


----------



## jimmyaz (Oct 9, 2017)

Hi Guys, 

I got a question regarding the Leaf cells and I think this thread might be the only good place to ask.

I have just torn a part a 2013 nissan leaf pack, the pack has some physical damage and puncture, but only a few module was slightly bend on the corner... Each cell measured 4.03v and they are all within .006v of each other balance wise. Everything seem favorable but my only concerns is when I took apart the 24module (big section)... I understand they're under compression and when taken apart they will expand a bit. However, one side of every single module the aluminum imprint in the middle seem to expand and bulge up a bit... kind of like puffy like RC lithium polymer... I am not sure if that's how they are suppose to be or all of the cells/module are puffy because of misuse?

It's weird, because only one side of each module the aluminum seem to bulge up.. the other side it's still sunk down in the center imprint.

Any advise?

thanks


----------



## Kevin Sharpe (Jul 4, 2011)

jimmyaz said:


> Any advise?


Can you post some pictures showing the 'bulge'?


----------



## jimmyaz (Oct 9, 2017)

Kevin Sharpe said:


> Can you post some pictures showing the 'bulge'?


Hi Kevin, 

Here's the picture, show one side and the other. Some are better, some are worse. It almost seem like the module is bent... I think I am screwed...


----------



## WolfTronix (Feb 8, 2016)

They tend to bulge a little bit, when you release the compression.

Those plates are kind of like expansion joints, they let the modules expand and contract with thermal and charge variation. 

They should be fine.


----------



## Hollie Maea (Dec 9, 2009)

Does anyone on here know if there is any spacing between the modules in a Leaf pack? I'm working on designing a drop in replacement. I found a CAD model of the modules to go by, but I don't know how much, if any, spacing is between the modules in a pack.


----------



## WolfTronix (Feb 8, 2016)

Nope, no spacing.
They bolt up right next to each other.


----------



## D a n n y^ (Aug 4, 2015)

Hollie Maea said:


> Does anyone on here know if there is any spacing between the modules in a Leaf pack? I'm working on designing a drop in replacement. I found a CAD model of the modules to go by, but I don't know how much, if any, spacing is between the modules in a pack.




Just as Wolf said they bolt in right next to one another. With that said, if you intend to use the original orange bus bar housing also(recommended), you'll need to be mindful not to over compress any modules.

A lesson learned from my end: I tried to sneak a bracket in between a few modules to serve as a lifting Point when dropping the packs in my box. The additional 1/8th inch metal completely through off the alignment for my bus bars and the orange protective cover. 









In the picture above, you can see the metal brackets on either side of the pack between the outer two modules and the end. Unfortunate mistake that is going to cause me some re-work.

Hope that helps!


----------



## Hollie Maea (Dec 9, 2009)

Thanks for the replies. The replacement will be replacing pairs (so there will be 24 4s modules) so I won't be reusing the busbars. I have lots of flexibility in how I do the terminals, so I'll decide that later when I have an actual pack in hand.


----------



## robh (Jan 26, 2016)

WolfTronix,
Would you mind sharing the bus bar configuration of your Wolf Packs? I'm planning 20S2P modules (150v) with a total of 40 modules. Do I have that right? I'm trying to determine the optimal battery layout and interconnect using Leaf batteries.

Thanks!


----------

