Dala's Leaf buildthread (2015 Nissan Leaf)

I recently found this excellent video taking a deep-dive into the Nissan Leaf reduction gear housing

There seems to exist two versions of the Leaf reduction gearcase.
7.94:1 for 2011-2013 ZE0 (White interior)
8.30:1 for 2013-2017 AZE0 (Black interior)

This information was missing from Wikipedia,only the 7.94:1 ratio was mentioned, so I added it.

What can we do with this newfound information? I initially got my hopes up that I could swap in the older gearbox for quicker acceleration, but after consulting with the Leaf forum we came to the conclusion that it's the other way around. The AZE0 ratio is better for quick accceleration, but has a lower topspeed. Topspeed is irrelevant for the Nissan Leaf, since it is software limited to max 150km/h, so if you have a ZE0 Leaf and want a whooping 4.5% increase in torque, you can swap in the newer reduction gear :)
 
So something that I bought a while back and forgot to even do was the exciting service point that is -> replacing the windshield wipers. This is long overdue, the car had the original wipers from 2015! The rubber section was really stiff, horrible noises, and they left streak marks on the windshield.


image_rmnhxb.jpg


I went with the pricier but more aerodynamical "Bosch Aerotwin'AR16U' and 'AR26U'". These cost 16 per piece. I wish I had done this last year already, what a difference!

I'm not really driving the car while on lockdown, so I'll have time for some boring maintenance tasks now. But there is barely anything to regularly service/inspect on the Leaf, so I'll probably work more on the programming side for now :)
 
LOL Yeah, something I need to do with mine, as well. But giving the blades a really good wipe down with some cleaner helps to prolong blades. I live in hot sunny florida and most people go through blades once or twice a year. I'm still on these blades after 3 years. Though, as you mentioned, they are starting to get stiff. The cleaner wiping isn't lasting as long now. Might be due for a replacement.
 
Ok so here is something most perhaps wouldn't share.

I've made some mistakes with the charging algoritm. Or rather say ignored a potential issue.

If you remember my 500km roadtrip story a few posts back, you could see that I hit some pretty high temperatures. Here's a flashback picture to the last charging session.


image_jyulkv.jpg


When Nissan launched the 40kWh battery back in 2018, early users quickly noticed that the lack of a thermal management system could lead to the battery throttling the charge speed after rapid consecutive fastcharging sessions, aka a roadtrip scenario. This led to the term 'Rapidgate'. People complained, and Nissan eventually launched a firmware update for the LBC to allow for a bit more power at higher temperatures (at the cost of battery health).

So, how does this relate to my 40kWh battery? I've been running WITHOUT any kind of limiter, allowing for the full 125A at any temperature. Although speedy, this is unacceptable for battery longevity. So let's see how Nissan did the original 40kWh implementation. I've formatted the data in two tables, one temperature and one for the instrument cluster dash-bars.

image_pzozxl.jpg


Afaik, this is the original data pre-rapidgate fix. So this is the safest known set of parameters for quickcharging a 40kWh pack. I've tested that I can successfully manipulate the charge speed on the fly, and now taken the OEM map into use. I'm pushing this firmware update to all customers aswell.

But what's next? With some thinking, we can create sets of better maps depending on usecase.

Example 1. Say you are preparing for a long roadtrip, care about your car, want it to last a long time. You also don't care if you need to charge 5minutes longer at each stop. Then an even more relaxed parameter set would be perfect.

Example 2. Another use case, you are in a rush to get somewhere. Every minute counts, so you want to minimize time spent charging, and don't care about long term battery health. Then a more aggressive set of charging parameters could be used (temporarily hopefully!).

The possibilities here are endless, and maybe quickly switching between charging speed profiles could be the solution. I'll have to consult with my customers :)
 
Here's something mildly interesting to say the least.

The 30kWh LEAF, sold between 2016 to 2018 have some controversy going on with the warranty replacements. Normally, a LEAF has warranty for capacity loss overtime, this means if it looses more than 30% capacity before the warranty runs out, Nissan replaces the battery with a new one. Early adapters / owners have longed for Nissan to replace the aging 24kWh packs with some larger ones when doing warranty, but Nissan has stood firm on only replacing 24kWh packs with newer 24kWh packs. But, the 30kWh LEAF is different! Nissan has been silently using 40kWh packs when they are doing warranty work on 30kWh LEAFs, and I kinda understand why.

Here is some inside information i got from a friends friend. It's the internal price list for all the packs.

image_kendsz.jpg


24kWh - 17666 0%VAT
30kWh - 22730 0%VAT
40kWh - 20871 0%VAT
62kWh - 28897 0%VAT

First of all, the prices are silly high, and Nissan won't let you buy a battery. These are only for warranty work. Note that the 40kWh pack is cheaper to get compared to the 30kWh pack. So there is a pure profit in using 40kWh packs instead of 30kWh ones. Also, Nissan still makes 40/62 packs, the 30 size was only used for a brief period, so it makes sense to streamline the production. But here is the real question, why not allow the same warranty upgrade for old 2011-2016 24kWh Leafs?

Speculation time:
- Upgrading the 24kWh Leaf to 40kWh makes the car so much more usable, that it would hurt newer sales. Can't have people using older cars for too long! Upgrading a 30kWh->40kWh doesn't hurt the sales as much.
- It is hard to upgrade the oldest Leaf. This I noticed myself too, the communication between the LBC->VCM is really different on the 2011-2013 ZE0 Leaf. If you drop in a 40kWh pack into a 2014+ AZE0 Leaf, the communication is mostly the same, and Nissan can get away with doing a minor firmware update. But if they try to do the same on the oldest ZE0, the pack wont even be recognized properly, and ALL the modules on the CAN-bus in the car would need a firmware update to cooperate. Nothing impossible (since we hobbyists are doing it right now!), but hard to do it officially.

I don't like Nissans strategy, since it promotes a throw away culture. End of rambling :)
 
I made another thing open source.

I've been approached by a few who have done bruteforce upgrades. Last year I experimented with the 30kWh cells inside a 24kWh battery, with mixed results. As you know, this method of upgrading has been superseded by the clean way to swap in newer battery packs, but since people are asking I made this information public.

https://github.com/dalathegreat/Nissan-Leaf-Bruteforce-Upgrade


image_ohxfuq.jpg


Still, I DO NOT recommend this way to upgrade. But it will probably help someone out there :)
 
Another minor maintenance thing, I figured it was a good idea to replace the cabin air filter. I picked this up a few weeks ago too, it was the cheapest filter available. I'm not to bothered about the charcoal ones, since I do most driving on open roads, so not a lot of smog to filter. And the electrical motor on this car doesn't have any leaky valvecover gaskets that would allow crankcase gas to enter the cabin, so I find it hard to justify the pricier filter. Someone convince me next time? :D


image_mqtdpy.jpg


And it was a good thing I replaced it, a ton of bugs fell out when I pulled the filter out. Look at that discoloration!


image_nhlaoi.jpg


I guess 5 years is quite a stretch for these filters, thinking about stepping the interval down to every second/third year. After all, it's a service item below 10, and there are not really any other things to service on this car now :p
 
So since the Muxsan CAN bridges were sold out, and I'm going thru quite a lot of them quickly, I decided to try and build some on my own. They are open source after all :)

I ordered a few PCBs from JLCPB. I opted for the more expensive lead-free version. And ofcourse in white, love white PCBs :D

image_rsxcfj.jpg


When I said a few, I meant 100x :D

image_gihbgi.jpg


Now just waiting for the components to roll in :)
 
Time to deep dive into the performance aspect of the LEAF. Maybe extract some more?

The energy.gov did a good test on the standard Leaf drivetrain. It can be viewed here: https://www.energy.gov/sites/prod/files/2014/03/f13/ape006_burress_2013_o.pdf

They checked the output, effeciencies and temperatures at sustained high load. Here is a screenshot of one of the more interesting slides. Note the shape of the torque-curve.

image_ayuzhk.jpg


To understand more what is needed to modify I need more data. I upgraded my old datalogging cable to log two CAN channels at the same time. I need data from both EV-CAN and CAR-CAN at the same time. I also need to use a Kvaser Memorator which has two channels, instead of the Kvaser Leaf (nice fitting name) that only had one channel.

image_chswec.jpg


And ofcourse when I was feeling it and decided to go test this I happened to be low on charge :) But it won't mess much with the results, the motor inverter should still be torque limited and not voltage limited.

image_wlsfzl.jpg


I did a quick full throttle pull, 0->100->0 km/h, and did the entire braking only with the regenerative braking. This is what the applied torque looks like in the logs. Notice the familiar shape? Never mind my unstable foot on the braking :D

image_uvqlqa.jpg


There are two interesting parameter that I'm logging. 'MotorAmpTorqueRequest[Nm]' is the one that the VCM sends to the inverter. "MG_EffectiveTorque[Nm]" is the response signal from the inverter that is sent back to the VCM. I think that we could try upping the demand message a bit with a CAN-bridge MITM-attack, but I don't know how much the inverter is willing to give before we go outside some limit set by the Nissan engineers. Now I need to go and cut the CAN-signal going between the VCM->Inverter :)
 
How to read CAN data manually

Since I need to write code that modifies some values on the bus, I thought I might give a quick crash course on how to read the data manually. Let's say you start with a log snippet that looks something like this

Code:
1	1	21163	RX	333265401		0x00000176	7	0x00 a9 05 6b 00 00 05 	
1	0	21164	RX	333265401		0x000001d4	8	0x6e 6e 3f 80 87 44 81 86 	
1	1	21165	RX	333265401		0x000001d5	5	0x00 00 00 01 d7 	
1	1	21166	RX	333265401		0x00000260	4	0xc8 c8 b3 a0 	
1	1	21167	RX	333265402		0x00000245	8	0x7f e8 02 18 b7 00 7f e3 	
1	1	21168	RX	333265402		0x00000292	8	0x98 68 1e 80 50 00 00 03 	
1	1	21169	RX	333265403		0x00000300	1	0x03 	
1	1	21170	RX	333265403		0x000006f6	3	0x91 00 00 	
1	0	21171	RX	333265403		0x000001db	8	0xde 80 9f ea 14 00 01 7f 	
1	0	21172	RX	333265403		0x000001dc	8	0x6e 0f 8f fd 00 c0 c3 68 	
1	0	21173	RX	333265407		0x000001da	8	0x9d 72 19 fb 0a e5 00 e7 	
1	1	21174	RX	333265407		0x000002de	8	0x00 00 00 00 00 00 01 40 	
1	1	21175	RX	333265407		0x000001cb	7	0x00 00 00 00 60 00 11 	
1	1	21176	RX	333265407		0x000001cc	4	0x00 00 05 41 	
1	1	21177	RX	333265408		0x0000054a	8	0x3c 80 70 0b 00 00 00 49 	
1	1	21178	RX	333265409		0x0000054b	8	0x10 48 98 12 14 00 00 01 	
1	0	21179	RX	333265408		0x0000054a	8	0x3c 80 70 0b 00 00 00 49 	
1	0	21180	RX	333265408		0x0000054b	8	0x10 48 98 12 14 00 00 01 	
1	0	21181	RX	333265409		0x0000011a	8	0x4e 40 04 aa 80 00 03 70 	
1	0	21182	RX	333265409		0x0000054c	8	0x64 65 40 00 00 50 51 00
We want to read the Nm value that the inverter sends back, it's in message 0x1da
Code:
0x000001da 8 0x9d 	72 	19 	fb 	0a 	e5 	00 	e7
This message contains 8 bytes, and by looking at the database we see that the MG_EffectiveTorque is a 11bit long value, ranging from frame2,bit2-0,frame3,bit7-0. It is also signed 2's complement, but we won't worry about that right now.


image_gfkxrb.jpg


If we extract 9fb (this is 12bits), and convert it to binary, we get 1001 1111 1011. Now we cut off the first bit to make it 11bits long, and we end up with 001 1111 1011. If we convert this to Decimal, it is 507. In the database, we see that this message has a scaling of 0.5, so we simply multiply the value with that and end up with 253,5 Nm torque response.

Wow that is a lot of steps just to get a single value out, so you see why it pays off to use some tool that translates this on the go. It is very tiring to do this by hand, but a necessity if you are experimenting ofcourse.
 
My initial attempts at persuading the inverter to output more power was a failure. Check this screenshot

image_enqdhz.jpg


In this screenshot I added 10Nm to the demand. So it seems like the inverter firmware clamps to some hardcoded value to keep 80kW, which is a damn shame. I might try some other tricks, but it feels like either firmware needs to change (incredibly difficult) or an inverter swap from a newer Leaf (never done afaik)?
 
Time for some spring-cleaning!

I decided to install the summer wheels and do a proper spring cleaning session. The paint has suffered the salty roads for quite some time now, so time to give it some love.

Started with assessing the wheel-wells, they are surprisingly clean. Looks like my periodical winter spraydowns have helped with keeping the rust at bay. Here's the rear

image_dmraqh.jpg


But on the front the cast iron knuckles have rusted significantly. I gave everything a good degreaser and pressure wash before putting on the summer wheel setup.

image_ovvezd.jpg


I then focused on the paint. I did a pressure wash, degreaser, pressure wash, claybar+cleaner, P2000 compound, anti swirl compound and finally hand-waxed the paint. I think I spent well over 8h with the car, here's a picture midway thru

image_emrpuy.jpg


And then the final result, shame the sun went away, but the paint really shines :)

image_hhpolr.jpg


There is still some OEM orange peel in the paint, but I'm unsure how much can be sanded safely...
 
Not much has happened, still waiting on some parts for a long needed project, but I wont post about it until I have all the parts I need ;)

Now for something completely different. The rear wiper was pathetic, so I inspected it. Turns out it was just about to crumble into pieces, so I replaced it with a newer Bosch unit.

image_askqrh.jpg


I also have most of the components needed to start building some CAN bridges, still waiting for the final ones. I will send this all to a local electronics expert so they can piece it together. And yeah, it probably would have been faster to order everything from China, but I like to support the local businesses in these times :)

image_jrzgff.jpg
 
Dala said:
I also have most of the components needed to start building some CAN bridges, still waiting for the final ones. I will send this all to a local electronics expert so they can piece it together. And yeah, it probably would have been faster to order everything from China, but I like to support the local businesses in these times :)

A guy of the spanish EV build forum asked for an alternative provider ofmuxsan's boards becausetindie was out of stock. Do you mind to sell some of MIDMboards you did for error?
What's you dev platform? I build muxsan code via avrdude in linux envbut patching his makefiles manually.
Since COIVID-19 I hadn't time to go back to this, but the idea is trying to find a way to be aligned to muxsan avr studio build project but able to build on different platforms... and trying to do a choerent pull requests to muxsan repo.

p.s. thanks for this super interesting thread, is one of the thread that convinced me to buy a leaf (now a 2016/30wkh)... slowly planning upgrades after end of warranty when I'll have also more time to do it myself.
 
ginetto said:
Dala said:
I also have most of the components needed to start building some CAN bridges, still waiting for the final ones. I will send this all to a local electronics expert so they can piece it together. And yeah, it probably would have been faster to order everything from China, but I like to support the local businesses in these times :)

A guy of the spanish EV build forum asked for an alternative provider ofmuxsan's boards becausetindie was out of stock. Do you mind to sell some of MIDMboards you did for error?
What's you dev platform? I build muxsan code via avrdude in linux envbut patching his makefiles manually.
Since COIVID-19 I hadn't time to go back to this, but the idea is trying to find a way to be aligned to muxsan avr studio build project but able to build on different platforms... and trying to do a choerent pull requests to muxsan repo.

p.s. thanks for this super interesting thread, is one of the thread that convinced me to buy a leaf (now a 2016/30wkh)... slowly planning upgrades after end of warranty when I'll have also more time to do it myself.

Yeah I could probably start selling some, since I will build quite a few :D Shoot me an email via the website contact form and I'll get back to you asap.

For dev environment, I use Atmel Studio 7.0, but I'm on a Windows 10 machine.

Glad to hear you got a Leaf :D These cars have so much potential, the mods are really gonna take off now when more and more are starting to play around with CAN-bridges.
 
I finished up the trailer wiring. It was the least fun I've had with the Leaf :D

So to properly wire in the 7-pin trailer harness, I ran the cable into the boot and started to look for the light signals needed.
These can be taken from the left side.
- Turn signal left
- Daylight running light
- Brake light
- Chassis GND

From the right hand side light, the "Turn signal right". So this all means removing a ton of plastic panels to getting the wiring properly routed. Not fun!

image_zccucf.jpg


But the payoff now is huge. I now have functioning trailer wiring!

image_fcxptp.jpg


NOTE! This car officially has 0kg of towing capacity in the registry. It is illegal to go on a road and tow. This picture was taken on the side of the road, I never recommend anyone to do anything illegal. Check your local legislation for how to go about for retrofitting a tow bar.
 
Ok I promise this is the last post regarding towing, and we'll get back to something more interesting :)

So lets say I "Simulated" a proper tow run with a bigger trailer. It was possible to tow for 270km with a charge stop in the middle, going max 85km/h. Any faster than that, the air resistance from the big trailer cover would break the efficiency, as you can see from the picture it is quite a big one. It should be possible to go 160-180km on a single charge with the big trailer, which I am extremely satisfied with.


image_wcgwil.jpg


Now there is no reason to borrow an ICE anymore! :)
 
I'm still waiting for some parts, but I decided to post this already since it is functional.

Okay so here is a big upgrade for the Leaf. The stereo. I have the base model of the Leaf, which has a pathetic attempt at a stereo. There is a tiny display on the unit that is used for the reverse camera, making it a pain in the butt to reverse with. It doesn't even do bluetooth music streaming. It screams basic. Take a look:


image_eeokke.jpg

Oh yeah 2004 called and want their stereo back.

So what can we do about it? Lots. The base model stereo doesn't integrate with the climate control system like on the higher spec models. So on those it's not possible to change the stereo, since you then loose so much functionality. On this base model, there is a 2DIN slot that you can put whatever you want into. After doing some research, I found something that ticked all my requirements. These are

-Android based
-Will run Leafspy Pro
-Spotify
-Reverse camera compatible
-Front facing camera always recording
-Android auto optional

Turns out there aren't that many options that do this, but thankfully the 'Atoto A6 Pro' ticked all the boxes and more. I went with the A6Y2721PRB-G model, which also has gesture sensors.

Let's get to installing it! But not so fast, first you need to order these adapters:
-Axxess Aswc-1 Universal Steering Wheel Control Interface
-70-7552 WIRING HARNESS AFTERMARKET STEREO FOR NISSAN (07-UP) + SUBARU (08-UP)
-American International NDK780 2012-16 for Nissan Select Model Install Kit
-Steering Wheel Control and BackUp Camera Retention Harness AXXESS AX-NIS32SWC-6V
-Radio Antenna Adapter for Nissan/ Infiniti Scosche ref Part NAA2B Metra 40-NI12

After most of these adapters arrived, I started to install the stereo. To remove the middle console cover, grab the lower portion and pull it. The whole thing just pops out.

image_kjgnej.jpg


After removing it, it's adapter fastening time. I won't show every tiny detail, but there is quite some cables to adapt. I also tucked in the GPS & Wifi antenna that came with the stereo behind everything.


image_sjlqye.jpg


One thing that the Atoto unit comes with are extra USB ports. This is really useful, since the Leaf originally shipped with one USB port that was designated for ipods. This port only supplied like 125mA, which is not enough to charge a phone. The new ports are 1xQC @ 2000mA and 1x regular USB @ 500mA. This is a really nice upgrade!

image_gvhmrp.jpg


This is what it looks like all mounted, maybe 3d-print a cover for them later?

image_ytiibi.jpg


After getting all the adapters in (minus steering wheel and reverse camera, still waiting for those to drop in the mail), I fired up the unit. After doing the Android setup, you're free to explore the unit and further set up all the apps you want to use. Note that I'm still waiting on the screen bezel, there are gaps on both sides of the unit.

image_lgnzrx.jpg


I have a feeling the Leafspy app will be quite heavily used :)

image_echlql.jpg


I'm particularly fond of Spotify right now. Worth mentioning that this unit has way better drivers for the speakers, I originally planned to change the speakers in the doors, but after listening to it with this new unit, there really is no need at all.

image_ujvgau.jpg


The screen is IPS and really hard to photo properly. But it looks amazing. This is what it looks like in full daylight, really easy to read the screen.

image_lgpssh.jpg


10/10 would install again. Now to just wait for the steering wheel/camera adapters. :)
 
Back
Top