Extra Battery, How to Integrate with 24kWh Traction Battery?

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
HI all.
I am building extra battery for my Nissan Leaf as well, reading this tread gave me a lot information to think about.
My battery will be small, only 8.5 kwh. And build on 18650 cells. So problem with over current during rapid charging and discharging actual for me as well.
As we know, BMS of original battery can send commands to limit power of motor inverter - during discharge, or send signal to rapid charger to limit charging current.
So idea is to sens current to additional battery, and when necessary send canbus command to limit charge or discharge.

What you think, how possible it will be?

Another option, to false original BMS to think that battery to hot, and it will automatically will limit current from rapid charger, or to motor inverter.

Andrew
 
In the Leaf, the rapid charger does its own current limiting; all the car does is set a maximum current (120A in the case of Leaf) and a maximum voltage (391V in case of the Leaf). The charger then does constant current-constant voltage (CCCV) charging just like any other battery charger.

If you put another battery in parallel to the main battery, the internal resistance will drop and you will be able to receive more current. The car won't complain and you don't have to do anything to enable this.

The same goes for discharging and regenerative braking; these are based on the Hx (internal resistance) signal, and this will change if you put more cells in parallel, so you will be able to regenerate earlier and harder, and you won't get power limited with a worn battery.
 
mux said:
In the Leaf, the rapid charger does its own current limiting; all the car does is set a maximum current (120A in the case of Leaf) and a maximum voltage (391V in case of the Leaf). The charger then does constant current-constant voltage (CCCV) charging just like any other battery charger.

If you put another battery in parallel to the main battery, the internal resistance will drop and you will be able to receive more current. The car won't complain and you don't have to do anything to enable this.

The same goes for discharging and regenerative braking; these are based on the Hx (internal resistance) signal, and this will change if you put more cells in parallel, so you will be able to regenerate earlier and harder, and you won't get power limited with a worn battery.

I believe his concern (and mine though I am trying to solve by finding the right cells that can handle the full power envelope of the Leaf) is how to ask the Leaf to limit discharge power at lower SoC where the 18650 extender pack will be the dominant power source, since it won't be designed for high drain. Ditto for regen/quick charging in the opposite direction. It should be possible since the car already limits regen/power at very low SoC, just need to find out how to intercept those messages.
 
Ah, I see. Thanks for clearing that up.

That is quite a bit more involved. AFAIK most of the reverse engineering to this end has not been fully figured out. I see a couple of approaches:

- Artificially raise/lower Hx values until the car starts throttling everything. This should affect everything: fast charging, regen and acceleration.
- Use cells with sufficient internal resistance that their contribution to the peak power is limited. This is very easy to do with a small 18650 pack simply by using standard welding tabs.

If you want to do it 'properly', this gets very involved and touches on the quick charge CAN bus which hasn't been touched mostly:

- You have to limit regen by changing the braking torque available messages from the BCM
- You have to limit maximum motor power by changing the discharge current available messages from the BCM
- You have to limit DCQC current by changing the accepted current messages on CHAdeMO CAN. Also tell the car that the charger can only supply that current.

The hardware for this is not quite available, but I'm still working on it. Well, in fact, I'm done with it, just have to find the time to document and film it. I haven't yet built it into my car between the battery and VCM, so I can't tell for sure that it works.
 
Yes, that is exactly I am thinking as well.
I am expecting my USB2CAN dongle soon, so I will be able to read/write can bus, and see how possible to
control all three parameters : regen, charging and discharge .

As Mux mention "- Artificially raise/lower Hx values until the car starts throttling everything. This should affect everything: fast charging, regen and acceleration." - this will be easy way of doing it.

Another options, as I mention before - to rise temperature on battery sensors, then BMS will think that battery too hot and will start reducing
charge / discharge / regen. Maybe it will be enough to rise temperature only on one sensor, and left another two/three still connected to battery.
 
I can confirm that increasing the temperature to about 48-49 degrees does work. Only the highest temperature value counts, but they're both in the same CAN packet so you can just as well increase both. Just make sure that the actual battery temperature is always lower or equal to what you're spoofing it for.

Just a USB to CAN dongle isn't enough by the way. You have to intercept messages and change them on the fly. The bus will not accept ID spoofing (it'll throw all kinds of errors if you do - they're easy to clear but you won't be able to charge or drive while you do that) and it will throw errors if the BCM sends one value and immediately something else on the bus sends another value. You need something that reads messages from the battery, changes them and then sends them to the rest of the car.
 
mux said:
The same goes for discharging and regenerative braking; these are based on the Hx (internal resistance) signal, and this will change if you put more cells in parallel, so you will be able to regenerate earlier and harder, and you won't get power limited with a worn battery.

Are you implying that Hx actually represents the internal resistance, e.g. milliohms, of the battery or it's conductance (mhos)? To some, it's
another measure of battery health. To others, it's another variable that decreases with battery degradation over time. My Leaf data over
the years indicates that the internal resistance of the Leaf's battery has a negative temp coefficient and increases over time with battery
degradation, as one might expect, and doesn't correlate with Hx directly (dR/dT):

11/20/14 -13,700 miles, 76 mohms per LeafDD, 20 Deg, 73% SOC
11/27 -13,800 miles, 67 mohms per LeafDD. 25 deg, 63% SOC
11/30 - 13,900 miles, 56 mohms per LeafDD, 27 deg, 71% SOC
12/2 - 14.100 miles, 55 mohms per LeafDD, 28 deg, 67% SOC
12/16 - 14,500 miles, 89 mohms per LeafDD, 15 deg, 93% SOC
12/27/14 - 14,800 miles, 103 mohms per LeafDD, 11 deg, 24% SOC
3/10/15 - 17,400 miles, 60 mohms per LeafDD, 30 deg, 73% SOC
3/14 - 17, 550 miles, 56 mohms per LeafDD, 32 deg, 47% SOC
4/14 - 19,100 miles, 59 mohms per LeafDD, 25 deg. 38% SOC
5/4 - 19,989 miles, 64 mohms per LeafDD, 24 deg.  48% SOC
5/15 - 20,400 miles, 73 mohms per LeafDD, 20 deg. 41% SOC
5/22 - 20,700 miles, 58 mohms per LeafDD, 28 deg. 50% SOC
12/10/15 - 28,000 miles, 90 mohms per LeafDD, 19 deg. 92% SOC
4/5/16 - 32,000 miles, 74 mohms per LeafDD, 24 deg, 55% SOC
5/16 - 33,700 miles,89 mohms per LeafDD, 22 deg, 47% SOC
5/16 - 33.700 miles, 58 mohms per LeafDD, 31 deg, 76% SOC
10/5 - 39,300 miles, 100 mohms per LeafDD, 22 deg, 50% SOC
10/6 - 39,400 miles, 61 mohms per LeafDD, 30 deg, 51% SOC
10/7 - 39,500 miles, 80 mohms per LeafDD, 25 deg, 56% SOC
10/15/16 - 40,000 miles, 71 mohms per LeafDD, 27 deg, 45% SOC

If possible, please reference a source for a reliable definition of Hx.
 
Well yes, that is part of the problem here. I don't know either how everything exactly correlates, but the charging speed is either dependent on many things at once OR has some hysteresis or mapping function that is a bit obscure. I haven't seen any reports of people reverse engineering it exactly. So it's going to be hard to know for sure how to limit charging/discharging speed.
 
FWIW, @GerryAZ once posted this comment on what he figures the Hx value is (I seem to recall reading something similar either in the help system of Leaf Spy or on the Wiki):

http://www.mynissanleaf.com/viewtopic.php?t=23912#p493789
 
alozzy said:
FWIW, @GerryAZ once posted this comment on what he figures the Hx value is (I seem to recall reading something similar either in the help system of Leaf Spy or on the Wiki):

http://www.mynissanleaf.com/viewtopic.php?t=23912#p493789

Yes, thanks. That's more logical, i.e. Hx is the ratio of the present battery conductance
(mhos) to a new battery's conductance. It basically follows SOH over time.
 
mux said:
In the Leaf, the rapid charger does its own current limiting; all the car does is set a maximum current (120A in the case of Leaf) and a maximum voltage (391V in case of the Leaf). The charger then does constant current-constant voltage (CCCV) charging just like any other battery charger.

The first description/senctence better defines the functionality, since the voltage of the battery increases as it charges. So it's not really a constant
voltage source too during the constant current charging, but limits the max battery voltage as the process completes.
 
Vehicle asks for specific current and DC charger deploys that. AFAIK 10x per second.
It's not CC CV. Vehicle is not limiting according to pack voltage.
Vehicle is limiting according to maximum cellpair voltage.

Current from DC station varies up and down. Enabling AC for example. Current rises
as peak voltage per cellpair allows more current. And station ramps up.
 
Big news!

Alright, holy ****, after a full weekend AND monday of messing up probably everything there is to mess up about this endeavour, I *FINALLY* got my CAN bus bridge to work the way I intended. It now:

- Transparently passes through all CAN messages
- Can selectively edit CAN messages ('man in the middle' attack-type stuff)
- Outputs every single CAN message as well as possible errors out to a serial port

I have mounted this on my EV-CAN right off the VCM and am currently using it to add the extender pack capacity to the main pack capacity by modifying CAN message 0x5bc (available charge signal). This has the desired effect of increasing the amount of kilometers on the dashboard accordingly.

I'm now going to spend the rest of today making some more logging tools and properly writing firmware for the extender pack. I'll post a video maybe tomorrow (depends, I have a busy week ahead).

I don't think I can convey how big this news is. I'm not the first person to spoof CAN this way, but as far as I know, I'm the first person to do realtime CAN bus manipulation in a working Nissan Leaf, certainly for this purpose. This will allow for unprecedented hacking of these vehicles.

I'm revising the board design and layout, hardening it and selling it soon for $40-50, depending on how expensive the potting is going to be.
 
And a quick follow-up: I just drove about a kilometer with the module in place, but it did stall once. The firmware clearly still needs some polishing before I can reliably get long-term logs. I hope to have this done by thursday, which is when I need the car for a longish trip. Then I should be able to log all CAN messages during a drive to a computer and I"ll post it here.
 
And another follow-up: I just finished up the entire thing. I fixed the bug that caused the firmware crash earlier and I got the extender to properly talk to the VCM. The car now correctly displays the remaining range based on the total capacity of all batteries in the car.

It is glorious.
 
mux said:
Big news!

Alright, holy ****, after a full weekend AND monday of messing up probably everything there is to mess up about this endeavour, I *FINALLY* got my CAN bus bridge to work the way I intended. It now:

- Transparently passes through all CAN messages
- Can selectively edit CAN messages ('man in the middle' attack-type stuff)
- Outputs every single CAN message as well as possible errors out to a serial port

I have mounted this on my EV-CAN right off the VCM and am currently using it to add the extender pack capacity to the main pack capacity by modifying CAN message 0x5bc (available charge signal). This has the desired effect of increasing the amount of kilometers on the dashboard accordingly.

I'm now going to spend the rest of today making some more logging tools and properly writing firmware for the extender pack. I'll post a video maybe tomorrow (depends, I have a busy week ahead).

I don't think I can convey how big this news is. I'm not the first person to spoof CAN this way, but as far as I know, I'm the first person to do realtime CAN bus manipulation in a working Nissan Leaf, certainly for this purpose. This will allow for unprecedented hacking of these vehicles.

I'm revising the board design and layout, hardening it and selling it soon for $40-50, depending on how expensive the potting is going to be.

mux,
Is there a possibility that this programmable "spoofing" of the CAN can be used to hack a pragmatic solution that allows the bi-directional CHAdeMO protocols to be used to design a charge/discharge controller so that my Leaf can be used as the energy storage for my solar system? Both Pika Energy and SolarEdge use a DC bus design philosophy with their proprietary (expensive) home storage batteries that are essentially functionally the same as my Leaf's battery. Seems it should be a matter (likely NOT simple) of proper battery management based on external operating requirements (charging when excess energy is available (solar or grid) and discharging when externally energy is required - operator demands).
 
Yes, totally. Note that to implement CHAdeMO, you do need to have direct control over the contactors as well. But yeah, this could very well be a CHAdeMO controller as well. Will require some significant engineering and programming, obviously.
 
I'm told that 2013 and later model Leafs have bidirectional energy capabilities and can be used with the Setec Power V2H unit and the Nissan V2G units (vapor-units???). Appears this is very worthwhile hack to use with a commercially available (~400 VDC) bus system (Pika Energy in particular). Pika has no interest however as they want to sell their proprietary (yes very expensive) battery. I don't really blame them however as they likely don't want to be involved in the already problematic battery degradation issues of the Leaf.

Since I'm not an electronics designer with any in-depth CAN, microprocessing, circuit board design experience, I'm simply hoping a DIYer or startup company will produce the basic design of the required controller. It seems you have mastered the external battery charge controller functions which would seem to be the critical factors in the design of the solar/grid based charge (discharge) controller. The Bolt purportedly uses PLC protocols over the DC bus to do the controls - that might be simpler? AND having a 60 KWH battery would result (my case at least) in almost total independence from the grid for my house with properly designed solar/backup generator system.

The arguments that such dual functional use of a large EV battery will significantly increase degradation would not seem to "hold water", IF the controller was "smart" and minimized the rapid and hot charging of quick charging AND the amount of overall rates of power transferred in/out over time from the solar system was relatively small compared to the normal driving habits. (likely TBD!)

My guess is that over the next few years, as most EV batteries become 300+ mile range capable, and most driver use 10% of the energy daily, this concept will eventually gain traction. May have to just be patient.
 
I finally got time to process the parallel cell data for LG HE4 in 3p, 4p, and 5p in order to extrapolate how many in parallel I would need to get acceptable charge/discharge rates on not just the LG cells, but also my currently purchased Hyundai PHEV cells, since they're pushing a bit above the spec at 8.6C discharge (max specified 6.9C).

Jg2y1Zq.png


Based on the estimates I would need only 3p to make the Hyundai pack safe to use across the entire discharge SoC range, but the LG cells won't be safe to use for max discharge until 7p (672 cells total, $2032.80 at $327/kWH) and 10p if you include quick charging (960 cells total, $2904). I'm still pursuing other options, my next cell candidate is the Sony VTC4 as mentioned previously, I just purchased 20 of these to test in various parallel groups. The base cell spec is considerably better, with up to 12A pulse charge spec, and 30A discharge, so I expect this to be safe in as low as 2-3p.
 
Back
Top