Nissan Leaf BMS Reverse Engineering
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Nissan Leaf BMS Reverse Engineering
Having just purchased a dirt cheap Nissan leaf with 40km range it's time to upgrade it!
I have a 63kwh pack arriving in 2 weeks that'll boost the range up to around 450kms. A can bus bridge is also included which 'scales up' the reported capacity and range estimations between the battery and the VCM. I've read this can be a bit buggy so I thought why not just reverse engineer the BMS firmware and change the hard coded values to properly match the cells in the pack.
While I wait for my Renesas V850 MCU debugger (to hopefully dump my 24kwh BMS firmware), someone sent me a 30kwh firmware dump and I've recreated the seed/key PID27 algorithm. It is different to the 24kwh algorithm but I thought I'd post it here in case anyone else ever needs the 30kwh code. Once you send the BMS the correct response it'll allow EEPROM and Flash dumping and rewriting amongst other things.
I have a 63kwh pack arriving in 2 weeks that'll boost the range up to around 450kms. A can bus bridge is also included which 'scales up' the reported capacity and range estimations between the battery and the VCM. I've read this can be a bit buggy so I thought why not just reverse engineer the BMS firmware and change the hard coded values to properly match the cells in the pack.
While I wait for my Renesas V850 MCU debugger (to hopefully dump my 24kwh BMS firmware), someone sent me a 30kwh firmware dump and I've recreated the seed/key PID27 algorithm. It is different to the 24kwh algorithm but I thought I'd post it here in case anyone else ever needs the 30kwh code. Once you send the BMS the correct response it'll allow EEPROM and Flash dumping and rewriting amongst other things.
Re: Nissan Leaf BMS Reverse Engineering
I recovered a few of these when new, when owners ignored the battery level.
How "cheap" was your leaf?
I love hearing about the projects you're working on!

How "cheap" was your leaf?
I love hearing about the projects you're working on!

According to chemistry, alcohol is a solution...
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Nissan Leaf BMS Reverse Engineering
This is a Gen1 2012 leaf, I got it for $3k with a few months rego left on it. There were 2 for sale in town, the 5k Gen1 model had 80km range but that's still not enough to make it into town and back so I didn't see the point in the more expensive car. Interior and exterior are almost immaculate, AC, heating, all that good stuff. The deprecation on these is nuts, I think they were around 50k new?
After driving it around, the acceleration from a dead stop is pretty impressive from an 80kw motor and with the regenerative breaking it barely uses the pads in normal driving. The range when new (~150km) is more than enough for a daily driver if you lived in town, even paying top dollar to charge at a charge station (55c/kwh), it's still equal to about 3L/100KM in 91RON.
Driving through the hills uses between 13 and 14kwh / 100km. New it came with a 24kwh battery. It's worn down to about 8kwh which is why they're so cheap.
I've ordered a 63kwh CATL battery pack, going by the 14kwh/100km consumption that should get me 450+km between charges. The Gen1 leaf has a max AC charge of 3.5kw (15A 240v plug) which will be just fine with our Off-grid setup. It'll fast charge at 60+ KW so you'll get an 80% charge in under an hour - though nissan says to avoid fast charging as heat is the biggest killer of the batteries.
The old cells will be repurposed into a 48v battery pack for the shed, combined with a cheapie 8kw MPPT inverter and some panels.
The new batteries were fairly expensive but they have 200,000km warranty on them / 3yrs and CATL are the largest Lithium battery manufacturer in the world so I'm expecting little trouble with them. I paid a little extra from a EV company in Sydney so any warranty issues go through them and I don't need to deal with China.
The battery has two quick connect plugs on it, and I think 8 bolts holding it in. Once they're out, it lowers down with the help of the forklift and it's ready to repack. It weighs around 300kgs, and will weigh 380kgs with the new cells in it. The extra 80kgs is distributed evenly front and rear and those that have done the mod say there's no noticable extra weight or handling issues.
After driving it around, the acceleration from a dead stop is pretty impressive from an 80kw motor and with the regenerative breaking it barely uses the pads in normal driving. The range when new (~150km) is more than enough for a daily driver if you lived in town, even paying top dollar to charge at a charge station (55c/kwh), it's still equal to about 3L/100KM in 91RON.
Driving through the hills uses between 13 and 14kwh / 100km. New it came with a 24kwh battery. It's worn down to about 8kwh which is why they're so cheap.
I've ordered a 63kwh CATL battery pack, going by the 14kwh/100km consumption that should get me 450+km between charges. The Gen1 leaf has a max AC charge of 3.5kw (15A 240v plug) which will be just fine with our Off-grid setup. It'll fast charge at 60+ KW so you'll get an 80% charge in under an hour - though nissan says to avoid fast charging as heat is the biggest killer of the batteries.
The old cells will be repurposed into a 48v battery pack for the shed, combined with a cheapie 8kw MPPT inverter and some panels.
The new batteries were fairly expensive but they have 200,000km warranty on them / 3yrs and CATL are the largest Lithium battery manufacturer in the world so I'm expecting little trouble with them. I paid a little extra from a EV company in Sydney so any warranty issues go through them and I don't need to deal with China.
The battery has two quick connect plugs on it, and I think 8 bolts holding it in. Once they're out, it lowers down with the help of the forklift and it's ready to repack. It weighs around 300kgs, and will weigh 380kgs with the new cells in it. The extra 80kgs is distributed evenly front and rear and those that have done the mod say there's no noticable extra weight or handling issues.
- Gatecrasher
- Posts: 352
- Joined: Sat Apr 25, 2020 6:09 am
Re: Nissan Leaf BMS Reverse Engineering
That's pretty cool. Good luck. I'd really like to pick one of these up myself, but I don't have room for anything else right now.
Re: Nissan Leaf BMS Reverse Engineering
What’s the cost of your new batteries? I did a quick google and it seems that it ranges from $1500 to $12000!!!
According to chemistry, alcohol is a solution...
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Nissan Leaf BMS Reverse Engineering
You can find wrecked late model packs ~40kwh for around 4k but they'll be down to around 80% health. Importing direct from china for the full kit is around 7-8k, the guys up in Sydney where I ordered my kit (DrHybrid) cost $9k including GST, import duty and tax and brokerage. It's a fair chunk of money but with the amount of km's we do daily it'll pay itself off in full after ~2yrs if we can use it every other day unless we increase the storage capacity of our off-grid setup for night charging.
My daily driver here now is a T30 xtrail which won't be re-registered, or the mrs Amarok which is pretty good on fuel. The Xtrail uses around 8-9L/100km and at $1.80/L up here in Goulburn on a good cycle it'll take 50-60,000km to break even which I think is under 1000km a week which is pretty much what the mrs does now (she's a farrier for the region so a LOT of driving). If fuel prices continue to go up, it's even better.
It's not ideal for everyone, and with BYD's, MG's and other chinese EV's from around 30k new drive away it may be worth waiting a few more years for something cheaper and newer but for us I think it'll be a good fit. If you live and work in the city then even a fairly worn Leaf would be good enough.
My daily driver here now is a T30 xtrail which won't be re-registered, or the mrs Amarok which is pretty good on fuel. The Xtrail uses around 8-9L/100km and at $1.80/L up here in Goulburn on a good cycle it'll take 50-60,000km to break even which I think is under 1000km a week which is pretty much what the mrs does now (she's a farrier for the region so a LOT of driving). If fuel prices continue to go up, it's even better.
It's not ideal for everyone, and with BYD's, MG's and other chinese EV's from around 30k new drive away it may be worth waiting a few more years for something cheaper and newer but for us I think it'll be a good fit. If you live and work in the city then even a fairly worn Leaf would be good enough.
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Nissan Leaf BMS Reverse Engineering
Long hold the connect button for Verbose mode
Tested with a Vgate Icar Pro Bluetooth adaptor. Cheap chinese elm327's won't work - the 8 byte CAN buffer they have is far too small for the traffic flow on a leaf can bus.
- Gatecrasher
- Posts: 352
- Joined: Sat Apr 25, 2020 6:09 am
Re: Nissan Leaf BMS Reverse Engineering
I saw this last night. It's some info about custom reflashes for the Leaf BMS. Don't know if it'll help you given the model year differences, but I thought it was interesting and wanted to pass it along.
https://www.youtube.com/watch?v=dMeuZrXy3Dk
https://www.youtube.com/watch?v=dMeuZrXy3Dk
-
- Posts: 533
- Joined: Fri Mar 04, 2016 10:35 am
- cars: R33 GTST, '60 Vw Bug, Express (4G63T), GW X200
- Location: Windellama, NSW
- Contact:
Re: Nissan Leaf BMS Reverse Engineering
Yup, I'm safetyUggs 

- Gatecrasher
- Posts: 352
- Joined: Sat Apr 25, 2020 6:09 am
Re: Nissan Leaf BMS Reverse Engineering
Well then. 
