# Nissan Leaf Battery Pack Sniffer...



## WolfTronix (Feb 8, 2016)

USB powered CAN sniffer and display to read out the state of a Nissan Leaf Battery Pack.









For use when salvaging battery packs from wrecked Leafs (Leaves?).

Weekend project, built using parts on hand.

Videos:
http://www.youtube.com/playlist?list=PLQdu_G7xyFIR29L5izNZavf4Uf8IMWuZm

Pics:
http://www.wolftronix.com/leafPackSniffer/index.htm

Enjoy, 
Wolf


----------



## dcb (Dec 5, 2009)

Definitely a nice bit of validation of a used pack. I've seen folks wire up a cheap bluetooth obd adapter to the pack and use android leaf spy too.

Took me a while to figure out your dev board is a rtmcs2 of your own making 

What is the lowest voltage you think the bms will run on is? (10v for sure, possibly 5v?)


----------



## WolfTronix (Feb 8, 2016)

Finished version, all packaged now:








Video:
https://youtu.be/e6CroYIOoas

There was one firmware bug in the previous version (shows up in the part 2 video at 3:03), [DrSegatron] noticed that the average cell voltage was higher than the highest cell…

The first pass I sum all the cells and divide by 96.
But each pass after that I never cleared that value from the sum.
So the next pass started with the last average value then summed in the 96 cells, then divided by 96. This caused the average cell voltage to creep up with each pass (97/96).

It is fixed now. 

Thanks again to [DrSegatron].


----------



## WolfTronix (Feb 8, 2016)

dcb said:


> Definitely a nice bit of validation of a used pack. I've seen folks wire up a cheap bluetooth obd adapter to the pack and use android leaf spy too.
> 
> Took me a while to figure out your dev board is a rtmcs2 of your own making
> 
> What is the lowest voltage you think the bms will run on is? (10v for sure, possibly 5v?)


Leaf Spy will work, but ironically you also need a way to power the battery.
Salvage yards tend to get suspicious if you are carrying around a 12V car battery. 

Yeah, the RTMCS2 is actually an 8 channel servo controller, but it has become my go to dev board.
I packed a lot of functions into it. Here is its page:
http://www.wolftronix.com/rtmcs2/index.html

It won't run at 5V that was the first thing I tried, and was the reason why I built the 5V to 12V boost converter.

Typical automotive voltage range is 8V to 17V, so I would assume it has to be more than 8V. But I have not tested this.

There is a 5V linear regulator, and a separate voltage supervisor microcontroller reset chip.


----------



## miscrms (Sep 25, 2013)

Very nice!


----------



## skooler (Mar 26, 2011)

Hi Wolftronix.

I'm interested in this. Are you able to supply to the UK?

Sent from my SM-N9005 using Tapatalk


----------



## Ai! (May 9, 2014)

Alternatively, if You already have leaf spy pro and elm327 adaptor combo, You can do the same.


----------



## skooler (Mar 26, 2011)

Will an elm 327 read data direct from the bms though? As in, with a battery outside the car with appropriate harness and power supply?

Sent from my SM-N9005 using Tapatalk


----------



## Ai! (May 9, 2014)

skooler said:


> Will an elm 327 read data direct from the bms though? As in, with a battery outside the car with appropriate harness and power supply?
> 
> Sent from my SM-N9005 using Tapatalk


of course You'll need a round connector for the battery pack and a power supply (12V) to wake up bms cpu and elm, there is identical data over a can line, so it is not important where You will sniff (at obd connector or anywhere else)

BMS is almost standalone unit, it's balancing chips are powered directly from HV pack (from the first cells) and cpu is only gathering info about shunts, cells connections, under/over voltage, esr, and HV isolation phase shift, so it will definately work with or without a VCM connected from the car.


----------



## WolfTronix (Feb 8, 2016)

skooler said:


> Hi Wolftronix.
> 
> I'm interested in this. Are you able to supply to the UK?
> 
> Sent from my SM-N9005 using Tapatalk


Sure...

But I have not been able to source the round connector (22 pin on the 2012 and earlier, and 36 pin on the 2013 and later) for the battery pack...

So I have been thinking about making a few without the connector for those that want them... But I am not sure how useful they are unless you already have the connectors.

You would have to plug in wires like this:


----------



## Tomdb (Jan 28, 2013)

3d Print it. And glue in the "normal" single row 0.1" female headers. 

Must be the easiest option


----------



## skooler (Mar 26, 2011)

Tomdb said:


> 3d Print it. And glue in the "normal" single row 0.1" female headers.
> 
> Must be the easiest option


If somebody can supply the cad i'm happy to run off a few on the 3d printer...

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

Tomdb said:


> 3d Print it. And glue in the "normal" single row 0.1" female headers.
> 
> Must be the easiest option


I don't have a 3d printer...
But, I like that Idea...

I wonder how hard it would be to make a 3D model...
Would just need to be a cylinder with a two notches in it, and cutouts for the 4 female headers... 

Thanks,
Wolf


----------



## Tomdb (Jan 28, 2013)

lucky the notches are parallel with the pin rows. So measure that puppy up, sure someone can make a quick model. Else I could make one, but the you need to measure in metric


----------



## WolfTronix (Feb 8, 2016)

Tomdb said:


> lucky the notches are parallel with the pin rows. So measure that puppy up, sure someone can make a quick model. Else I could make one, but the you need to measure in metric


We use Solid Works here, at work, and I think I can get one of the mechanical guys to model it.

I will bring in the connector and female mates tomorrow and see what happens. 

We have a FAB LAB over at the University that lets you 3D print and pay by the hour/material you use. So I think this is a really good solution to a hard to get connector. 

Thanks, 
Wolf


----------



## Tomdb (Jan 28, 2013)

Plus it will be the cheapest. And it is only for testing purposes so need for all the features, just a simple holder for the actual connectors and no weatherproofing or locking.


----------



## WolfTronix (Feb 8, 2016)

Tomdb said:


> Plus it will be the cheapest. And it is only for testing purposes so need for all the features, just a simple holder for the actual connectors and no weatherproofing or locking.


Yeah, it is the perfect application for a 3d Printer.


----------



## WolfTronix (Feb 8, 2016)

Done in solid works:









Going to go print it tonight at the Fab Lab.


----------



## skooler (Mar 26, 2011)

Gen 1 or gen 2? Have one of each here. If you can make the file available i'll prknt one out here too.

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

skooler said:


> Gen 1 or gen 2? Have one of each here. If you can make the file available i'll prknt one out here too.
> 
> Sent from my SM-N9005 using Tapatalk


I wanted to print it first, might need to tweak the centering and the openings for the connectors, before posting it...

But if you wan to try it out and give me feedback on it, I can make adjustments to it while I am still at work.


----------



## skooler (Mar 26, 2011)

More than happy to. 3d printer is 5 foot from my desk so no real effort whatsoever!

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

skooler said:


> More than happy to. 3d printer is 5 foot from my desk so no real effort whatsoever!
> 
> Sent from my SM-N9005 using Tapatalk


This forum won't let me attach an .stl file. 
Send me your email?


----------



## skooler (Mar 26, 2011)

WolfTronix said:


> This forum won't let me attach an .stl file.
> Send me your email?


Mike at indra.co.uk

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

skooler said:


> Mike at indra.co.uk
> 
> Sent from my SM-N9005 using Tapatalk


Sent, let me know if it needs any adjustments.

Thanks, 
Wolf


----------



## skooler (Mar 26, 2011)

WolfTronix said:


> Sent, let me know if it needs any adjustments.
> 
> Thanks,
> Wolf


Got it thanks

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

Fit is good, need to do some tweaking on the pin alignment:


----------



## Tomdb (Jan 28, 2013)

Welcome to the future 

Once you have some electronics knowledge and 3d printer knowhow, the possibilities become quite endless. 

I would make a lip around the top so you could pull it out and not have to pull the wires to get the assembled plug out.


----------



## WolfTronix (Feb 8, 2016)

Tomdb said:


> Welcome to the future
> 
> Once you have some electronics knowledge and 3d printer knowhow, the possibilities become quite endless.
> 
> I would make a lip around the top so you could pull it out and not have to pull the wires to get the assembled plug out.


Yeah, a lip would be good...

The future is nice.


----------



## skooler (Mar 26, 2011)

Just run one off. Works a treat. Thanks wolf!

Sent from my SM-N9005 using Tapatalk


----------



## dcb (Dec 5, 2009)

that is wicked cool and fast turnaround!

fyi, you can put anything in a zip file and attach it.


----------



## WolfTronix (Feb 8, 2016)

skooler said:


> Just run one off. Works a treat. Thanks wolf!


How well does the one you printed line up?

It looks like your 3D printer has a smaller bead diameter, (higher resolution).

Mine was printed on an "Up! Mini" 3D printer they had at the FAB LAB the "Lulzbot TAZ" 3D printers where in use.

The Mechanical guys are adding a lip and giving some more clearance for the small connectors.

Thanks, 
Wolf


----------



## WolfTronix (Feb 8, 2016)

dcb said:


> that is wicked cool and fast turnaround!
> 
> fyi, you can put anything in a zip file and attach it.


Good to know!

I will post the final working version here. 

Thanks, 
Wolf


----------



## skooler (Mar 26, 2011)

Lines up nicely. Good enough but have only tried it with loose sockets inside - no housing.

I'm using a cubepro which I believe is 70 micron resolution. Took about an hour to print.

Cheers.

Mike


----------



## WolfTronix (Feb 8, 2016)

Version 2...

Better aligned the slots and made more clearance for the connectors...
Should not need to file it to make it work now. 

Also added the requested lip around the edge.









If anyone wants to print it out and give feedback
I can make changes on Thursday, (I will print it out on Thursday after work).

Here is the .STL file:
View attachment LEAF_PLUG2.zip


----------



## spaceballs3000 (Jun 22, 2012)

Looks fine to me.

you want me to sent it to you to try out?


----------



## WolfTronix (Feb 8, 2016)

No need to send me the part... That is the beauty of 3D printing, no shipping. 

But, if you could you check the fit with 2, 3, and 4 pin Dupont connectors you have laying around... You will probably have some in an old computer case / mother board:









There should be some extra side to side clearance for the connectors, so that they can better line up in the socket (no need to file the corners to get them to fit).

I am going to print one after work today. 

Thanks, 
Wolf


----------



## WolfTronix (Feb 8, 2016)

Printed a few:








The fit is a little loose for the Dupont connectors, but I think they will work, since I was planning to glue them in.


----------



## Tomdb (Jan 28, 2013)

Now that looks good. Now lets hope that no one breaks off a wire, because there is no coming back from that.


----------



## WolfTronix (Feb 8, 2016)

Tomdb said:


> Now that looks good. Now lets hope that no one breaks off a wire, because there is no coming back from that.


Just print another one. 

The other end of the cable will also have a connector, so you can change it out for the Gen1 Leaf Pack, (and Gen3, if it is different then the Gen2).

I am planning on working on the layout tomorrow.

Thanks, 
Wolf


----------



## WolfTronix (Feb 8, 2016)

Time Lapse video of the schematic and layout in progress:
https://youtu.be/oUnSPCgVgMk (part1, schematic).
https://youtu.be/e4yIkigFEjU (part2, schematic and layout).
https://youtu.be/xJKIt6UV8lM (part3, mostly layout).

Thanks, 
Wolf


----------



## Kevin Sharpe (Jul 4, 2011)

happy to report the 'sniffer' is working well after it's trip to the UK


----------



## skooler (Mar 26, 2011)

Very interesting!

Sent from my SM-N9005 using Tapatalk


----------



## WolfTronix (Feb 8, 2016)

Kevin Sharpe said:


> happy to report the 'sniffer' is working well after it's trip to the UK


Nice! I am glad it survived! 
Let me know if you have any issues with it.

If you are interested I can send you a production version, once they are done:
https://youtu.be/vrKcGIGZ7Y8

I ordered the PCB today from OSH Park... 
Should be here in a few weeks. 

Still finalizing the parts list... 
Then I can order all the parts.

I plan on open sourcing it, it would be neat to see it sniffing other manufacturer's battery packs too.


----------



## Kevin Sharpe (Jul 4, 2011)

I've been using the sniffer for testing my 48kWh Leaf pack... works great


----------



## WolfTronix (Feb 8, 2016)

Glad it is working out for you. 

Progress update on the pre-production prototype:
https://youtu.be/g0971PfAnD8

Might have a new video up later today.

Thanks,
Wolf


----------



## dcb (Dec 5, 2009)

Kevin Sharpe said:


> ...


Did you 3d print a plastic wrench so you can work on the batteries more safely?


----------



## Kevin Sharpe (Jul 4, 2011)

dcb said:


> Did you 3d print a plastic wrench so you can work on the batteries more safely?


No, I invested in an insulated toolkit after accidentally shorting a battery cell and melting a 6mm thick piece of steel


----------



## TrevorFernandez (Apr 8, 2020)

Hi Wolftronix, were you able to decode the CAN packets from the 2011 Nissan Leaf Battery also? Thank you! 




WolfTronix said:


> USB powered CAN sniffer and display to read out the state of a Nissan Leaf Battery Pack.
> 
> View attachment 64106
> 
> ...


----------

