Skip to content

Nissan LEAF / e-NV200

Wiring diagrams 🔌~

Connectors on an AZE0, ZE1 pack:

connectors_aze0

Connection principle of the Nissan Leaf battery (internal):

image

The following pictures show an example of hooking up a LEAF battery to a Fronius Gen24 inverter. The same diagram can be useful for planning other inverter combinations.

Waveshare ESP32-S3-RS485-CAN is the new recommended hardware.

NOTE

The LEAF battery requires a 12V supply (set to 14V) capable of delivering at least 1.5A.

Remember to seat the service disconnect switch.

Without this fitted, the battery will not output any voltage when contactors are closed. This is how the SDS is used (Youtube).

High Voltage connection (energy)~

The Positive (+) wire is near the data port, and the Negative (-) wire is near the PTC high-voltage port (Aux Max 6kW).

HighVoltageWiring

hv-cable Zoe_harness

TIP

Check out our High Voltage wiring page with examples on how to make the connections safely.

Low Voltage connection (control and data)~

This battery requires Contactor control via GPIO option enabled on the Settings page to turn on/off the contactors/precharge resistor.

The example diagrams below show how to connect a LilyGo T‐CAN485 or a Waveshare ESP32-S3-RS485-CAN to a Nissan LEAF AZE0/ZE1 pack (with a Yazaki 36-pin connector), using automatic contactor control via solid-state relays, also featuring periodic BMS Power reset and an optional equipment stop circuit.

LilyGo T-CAN485~

lilygo draw

Waveshare ESP32-S3-RS485-CAN~

waveshare draw

The schematics can be found here and can be edited via draw.io.

Connector pinouts~

Nissan's own documentation uses pin numbering on the 36-pin low-voltage connector, which does not match the molded connector on AZE0/ZE1. The connections on the diagrams have been renumbered so that they do.

PIN name Yazaki 36 pin Yazaki 22 pin
BAT 1 1
IGN 2 2
EV CAN L 4 4
EV CAN H 5 5
PRE CHARGE V 7 6
PRE CHARGE GND 8 7
GND 10 9
GND 11 10
GND 12 11
RELAY POS V 15 12
RELAY POS GND 16 13
RELAY NEG V 18 15
RELAY NEG GND 19 16
CHG-IGN 29 19
  • Yazaki 36 pin for AZE0, ZE1 (2013-2023), e-NV200
  • Yazaki 22 pin for ZE0 (2011-2012)

Yazaki_pinouts

LV ratings~

Voltage levels: between 10.5-16V measured at the pin against GND.

PIN name Rating Function
BAT 200mA (dark: 1mA) BMS power supply
IGN 0.5mA starts/stops the BMS
RELAY POS 7W Positive contactor
RELAY NEG 7W Negative contactor
PRE CHARGE 7W Pre-charge relay

TIP

Check out our Low Voltage wiring page on how to make the connections in practice.

Software configuration~

For this battery type, use the option named Nissan LEAF battery under the Battery Protocol setting.

image

  • keep the Automatic current offset correction enabled, which will calibrate current measurement skew during open contactors (more info below).
  • On a ZE0 (2011-2012 24kWh) battery, you can enable Interlock required for extra safety. The system checks that the original high voltage connectors and SDS are properly seated in before you can start.
    • If you enable this setting on an AZE0 or ZE1 (2013-2023) battery, both HV plugs need to be seated (80kW motor and 6kW heater). Thus, for these, it is recommended to not use Interlock required due to the inconvenience of having to source both HV connectors (and manually insulate one of them). Instead, just block off the unused HV port with a 3D-printed cover.
  • the Balancing strategy setting is Aggressive by default. Start with this value if this pack is newly deployed, or experiences high cell voltage deltas (> 150mV). You can start experimenting with the Conservative when you have gained some experience on how balancing and degradation perform over time (using some monitoring solution over MQTT, like for example Home Assistant, to observe behavior is strongly recommended). Changing this setting requires a BMS reset.

Balancing strategy~

The setting named Balancing strategy determines the way the battery is started up after a BMS Reset or after a cold boot. The options correspond to the way the battery was started when it was in the car:

  • Aggressive setting corresponds to the way the battery used to balance when in the car during driving. It's aggressive because it can't be predicted, discharging and regen charging were depending on how the car used to participate in the traffic.
  • Conservative is the way it used to balance during AC charging. It's conservative as the BMS could perfectly calculate the amount of balancing required over the entire, predictable charging process.
  • Off corresponds to the balancing strategy that used to be applied during quick charge of the car. It has been observed that during this mode no balancing occurs on the cells.

Despite having Balancing in the name, it has been observed that this setting also influences the charge/discharge power limits reported by the BMS. The Aggressive setting imposes limits sooner, to protect the battery cells from high regen peaks that could occur at high SOC during driving. Since such peaks are unlikely to ever appear in stationary storage, the consequence is that charging in this strategy will become very slow above 95-97% SOC.

TIP

Set to Conservative to avoid overbalancing when your pack is in good shape (small cell voltage delta in your preferred SOC range).

The setting can be applied individually per pack in double or triple battery setups.

There's also a fourth setting under the hood, shutdown, this is naturally unselectable from here, but it is used with the Periodic restart of BMS setting described below.

Periodic restart of BMS~

The BMS in the Nissan LEAF packs was not originally designed to operate 24/7 under all conditions. Over time, the SOC% will become less accurate, and under certain conditions, even the GIDS (Wh remaining) becomes confused (see Issue 86). The BAT pin can be under +12V continuously; the IGN pin should be the one turned off from time to time (as the wiring diagram above).

See the Periodic Reset page for details.

Set Periodic BMS Power reset OFF time: to 120 seconds for Nissan LEAF packs. Based on empirical observations, the 30kWh (2013–2017, AZE0) pack benefits most from the 24h period, together with the Skip reset for one period if balancing option enabled. Changing Balancing strategy to Conservative may improve balancing on packs that are in good shape (small cell voltage delta over the entire SOC range you use).

TIP

The LEAF BMS uses passive balancing: each of the 96 cells has a small resistor (shunt) that can be switched on to dissipate a small amount of energy as heat, slowly bringing fuller cells down to the level of the lowest cells. At the start of a balancing cycle, it measures all cells and flags any cell that is more than a small tolerance above the lowest one. While draining, it keeps track of how much it has taken from each flagged cell and switches that cell's shunt off once the count indicates it is close enough to the lowest one. So a small difference between cells is normal, and the flagged cells aren't always the ones with the highest voltage at that moment. The target cell delta is around 17mV.

The same cells may stay flagged for many hours (sometimes a day) before draining really starts: the Cellmonitor shows them as cyan bars marked Pending, then Balancing while the list keeps changing, until it's empty.

A BMS reset discards the progress and restarts the whole process, waiting included — which is why the Skip reset for one period if balancing option helps.

NOTE

In the past, we used to recommend wiring the battery pack's IGN and BAT inputs together, and doing the periodic BMS power reset would have cut the power to both of them. Since then, it turned out that this is incorrect. The proper method is to have only IGN getting cut, BMS sent a shutdown command and CAN stopped for at least about a minute (as when you turn off the car), and keep BAT always at +12V (as you don't normally remove your 12V battery from the car either when you get out): this lets the BMS save to persistent memory and do household tasks. If you have an older system running with IGN and BAT inputs wired together, it's recommended (but not mandatory) to correct the wiring and switch periodically only IGN.

More Battery Info 📜~

The More Battery Info button at the bottom of the main page opens a window with additional information about the pack. A few notes about the most important ones:

  • +12V BAT level: the voltage level of the 12V source that you use to power up the pack (at BAT and IGN inputs). Should not go below 11 V!
  • Insulation: insulation resistance measured by the BMS. When contactors are closed, this value averages around 100kΩ (may depend on the inverter). When contactors are open, this shows much higher values. Both are normal like this. This value should not be considered; it's the inverter that determines whether there's an insulation problem.
  • Capacity as new: is the estimated capacity in kWh when the pack was new out of the factory.
  • Actual capacity: is the degraded capacity in Ah (and multiplied by the pack's nominal voltage in kWh) corresponding to the BMS's health knowledge about the cells.
  • SOH raw: the raw State-Of-Health (and the average one) reported by the BMS on the CAN bus. The average one is what you'd see in LeafSpy. Both show 100% if the pack has been SOH-reset recently.
  • Hx: is a Nissan-specific measurement value related to the internal resistance of the pack. Shows 100% if the pack has been SOH-reset recently (see further down below).
  • QC charge count: the total number of quick (DC/Chademo) charges that have been started while the pack was operating in the car.
  • AC charge count: the number of AC charges that have been started while in the car. This number increases at each pack boot and BMS reset when Balancing strategy is set to normal charge.
  • Charge to full count: the number of charges that resulted in a full battery.
  • Turtle count: the number of cases when the car has been forced to run into turtle mode, to prevent over-discharging.
  • Automatic current offset: the current offset measured at every boot and again each time the contactors open (see note below).
  • Lifetime usage histograms: Each event recorded the temperature at its start and the peak it reached. Peak (the hottest the pack got) drives the heat assessment; start temperature is shown alongside.

Capacity information

The SOH value you see on Battery Emulator's main page is calculated from Capacity as new and Actual capacity. It may be slightly different from the (raw) SOH value you'd see in LeafSpy, but it's still a relevant value, even for an SOH-reset pack, which would stay at 100% for a longer period.

A certain discrepancy between total charges and the AC + QC counts is normal — it can occur when charging is interrupted (e.g., by a power cut).

Automatic current offset

Some Leaf battery packs report a small current even when none should flow; in some cases, it reaches a few amperes. This shows up as phantom charging or discharging, and skews the power and SOC figures passed to the inverter. With Automatic current offset correction, enabled by default under Battery config, Battery-Emulator measures this error itself. Whenever a pack's contactors are open, any current the BMS reports can only be sensor offset. After a short settling time, those readings are averaged over the last 10 seconds and subtracted from that pack's current thereafter. The offset is measured at every boot and again each time the contactors open. It is kept unchanged while they are closed, including during a periodic BMS reset. A second or third pack that stays disconnected, for example because its voltage differs too much from the other packs, keeps updating its offset. Battery Emulator can only tell that contactors are open when it drives them itself, so this needs Contactor control via GPIO enabled, plus 2ⁿᵈ / 3ʳᵈ battery contactor control via GPIO in double or triple battery setups. Each pack is measured separately, using its own contactors. The value found for each pack is shown as Automatic current offset at the bottom of the Status panel on the More Battery Info page. "Unknown" means the pack has not yet been measured, for example, because its contactors are not controlled by Battery-Emulator. The setting takes effect after a reboot. Put simply, to recalibrate, just reboot Battery Emulator.

When the BMS limits the pack's output power, the log names the reason each time it changes, for example Battery output power limit reason: 3, high temperature. The reasons are 1 low cell voltage, 2 fault or other, 3 high temperature (hottest sensor at or above 51°C), 4 low temperature (coldest sensor below -10°C), and 0 when the limit is lifted. ZE1 (2018+) packs show the number only, as their codes are not decoded yet.

TIP

The LEAF battery is fully charged at 92-96% SOC. Use the Rescale SOC function to get a nicer-looking 100% curve! However, Nissan specifically advises against habitually charging to 100%, which adds wear; thus, for a longer lifetime, you should set SOC max percentage to 80 long term (during the summer, when the pack would charge to 100% quickly and then stay full almost all day).

Part numbers for Nissan LEAF batteries~

If your battery is missing any wires/disconnect switches, here are the OEM part numbers and purchase links. Do note that it might be cheaper to source from your local scrapyard!

Product Purchase Link
High voltage connector 80kW 297A6-5SH1A Ebay
High voltage connector 80kW 297A22581R ZOE, also works Ebay
High voltage 80kW cable 297A21061R from ZOE41 (both ends have the good connector type) Ebay
36pin battery connector (2013-2023) Yazaki 7287-1065-30 AliExpress
22pin battery connector (2011-2012) Yazaki 7283-8750-30 AliExpress
Precrimped 22/36 connectors AliExpress
Service disconnect switch (2013-2023) 297C1-3NF0A Ebay
Service disconnect switch (2011-2012) 2971C13NA0B Ebay
4ch SSR on DIN rail. Make sure you get the DC-CN version! AliExpress

TIP

All e-NV200 packs are technically similar to AZE0 so 2013+ parts fit them!

A spreadsheet with parts and links for a Nissan 40kwh battery and 8kW inverter (30A fuses).

TIP

The current sensor in the LEAF battery is not very precise, especially at low currents. For good measurements, especially in double/triple setups, or for accurate charge power tapering, you can use an external current sensor on the DC wire heading toward the inverter: QNHCK2-16 DC clamp.

Alternative HV connectors~

The original part number for the Nissan Leaf battery is 297A65SH1A, but a cheaper alternative for the battery HV connector can be found in scrapyards. Renault Zoe or Kangoo Batteries use the same connector as the Leaf battery.

The connector used is an Aptiv HV RCS 800.

Incompatible cables~

When searching on eBay, you may come across other cables in the Zoe that use a connector that is similar in appearance but is much smaller. These will not connect to the Leaf battery terminals:

  • Zoe HV Wiring Harness - PN: 240419193R
  • Zoe HV Engine Bay Wiring Harness - PN: 240413370R
  • 297A6 3NA0A does not fit; you have to cut a part of it to use the pins.

Control wiring specifics~

The battery contactors draw 0.4 A each at 12 V. 0.5 mm² (AWG 22) is enough cable cross-section for the required current.

If you pin the connector yourself~

The Yazaki 22/36-pin connectors are designed with a 2.1mm hole to accommodate the cable and include an elastic ring for waterproof sealing. The normal cable of the above cross-section has protective insulation that is too thick (usually 2.1mm in external diameter) to be used with the waterproof seals. You may want to choose an automotive cable that follows the reduced rubber cable standard (FLRY-A or B, ISO 6722) and has an outside diameter no thicker than 1.5/1.7mm (preferably 1.5 mm). Need at least 0.7/1mm thick cable (e.g., cable + wrap) to allow correct waterproofing; e.g., no Ethernet cable can be used because it's too thin.

BTW, it's not strictly necessary for a cable to be automotive-grade if it has a sufficient copper cross-sectional area (0.5 mm²) and an outer diameter of ~1.5 mm.

NOTE

Ensure the pins go all the way to the bottom and the pin is seated properly with a "tick". If they are inserted incorrectly (not far enough, "wonky") then you won't have a proper connection.

Of course, if you install the battery indoors, you can omit the sealing rings and have a wider range of wire choices. You can use a 3D-printed cover to protect the connector from falling debris.

Here is a nice example of a completed 22-pin 2011-2012 cable:

image

Crimping a 36pin connector:

image

3D-printable parts~

You can print your own safety cover for the unused heater port, a dust protector for the LV connector and a fixation ring, even a complete Service Disconnect Switch or even your own HV Connector. Check out the 3D‐printable parts page.

Notes on stuck SOH ❤️‍🩹~

NOTE

SOH and Hx reported by the BMS do not accurately reflect the real degradation of the cells during stationary storage over time.

DETAILS

Reverse engineering of the LEAF battery controller (LBC) firmware shows that it updates its SOH only through two built-in estimators, and both are tuned for driving, not for stationary storage:

  • The capacity-based estimator needs a measured discharge from a rested, nearly full pack (about 88 % or more) to a rested, nearly empty one (about 25 % or less), and it throws the measurement away whenever the averaged pack current stays below about 20 A for 16 minutes.
  • The resistance-based estimator needs regen-like events, at least 10 A of charge fading into at least 10 A of discharge within a second or two, at 40–95 % SOC and 10–50 °C, and it only runs while the balancing strategy is set to Aggressive.

An EV battery repurposed for stationary storage mostly runs well below 20 A, and in double or triple setups the inverter current is split between the packs, so each pack sees only a half or a third of it and these thresholds are practically never reached. Even a newly learned value only takes effect when the LBC restarts, so without a periodic BMS reset it would not be published either.

In practice the SOH, together with the capacity and remaining-energy figures the LBC derives from it, stays at the value it had when the pack left the car, and this is not a fault of the pack or of Battery Emulator. A degradation reset only sets it back to 100 % without measuring anything, so a real health check needs an external capacity measurement, for example a full charge and discharge counted with a shunt, which is out of Battery Emulator's scope and possibilities.

The 2016-2017 30kWh LEAF battery had a software bug in the BMS that caused the reported kWh to be incorrect and the state of health % to drop too quickly. If you have one of these batteries and it shows SOH below 50%, it might be affected. The Battery-Emulator can perform a degradation reset and bring the Hx and SOH percentages reported by the BMS back up to 100%. This can be accessed from the Webserver, via the "More battery info" page. By pressing "Reset degradation data", the clear is performed.

This will not give you any more battery capacity, though if you've swapped a bad cell with a good cell a reset is required to make use of the new capacity. Actual capacity reported in Ah is not affected by the reset.

NOTE

If you perform the degradation reset, certain SOH levels and Hx will show as 100% and stay there. However, this will widen the SOC range you can use your battery in, possibly giving you a few kWh of usable energy back, but you'll have to carefully set your limits manually, as described further down below.

IMPORTANT

The degradation reset only works on 2011-2017 (ZE0/AZE0) batteries.

image

Performing the reset~

Not available on small flash boards

This is left out of the firmware for the LilyGo T-CAN485 and the ESP32 DevKit to save flash memory, it only works on the other boards. See what else is left out.

To perform a proper SOH% reset, that sticks between reboots, choose how to perform the following steps:

At the location~

  • Open contactors
  • Reset battery degradation via the More Battery Info page
  • Disconnect CAN cable from the battery
  • Keep BMS BAT power ON, only remove IGN 12V power
  • Wait 3 minutes
  • Reconnect CAN cables
  • Restore 12V to IGN
  • Close contactors
  • Reboot Battery Emulator

Remotely~

NOTE

This can only be done remotely if only IGN is cut by BMS Reset and the battery is the only device on the CAN bus.

  • Set Periodic BMS Power reset OFF time to 180 s
  • Open contactors
  • Reset battery degradation via the More Battery Info page
  • At Perform a BMS Power reset now press Start and wait for the 180s to pass (watch Battery Emulator main page)
  • Close contactors
  • Reboot Battery Emulator

After these steps, the CAN-reported SOH and Hx reset to 100% becomes persistent. Actual capacity in Ah is not affected by the reset.

Set your own, real limits~

Note that after you reset the SOH to 100%, the BMS will allow charging and discharging the cells, likely beyond limits that are safe for long-term use, with respect to the cells' longevity. In stationary use, the battery charges and discharges much more slowly and in a different pattern than when used in a car.

You can set up Home Assistant, which lets you track cell voltages and delta over the long term, to be able to investigate the behavior.

To see some results, follow these steps after you do the reset (in normal ambient conditions; avoid extreme cold or hot periods):

  • Disable Rescale SOC if you have it set
  • Let the battery discharge to empty
  • Let the battery charge to full
  • Let the battery discharge to empty again
  • Watch how the values of Cell Voltage Delta and SOC (real) change over time as approaching full and empty

For example: image

TIP

The BMS will prevent damage to the cells during discharge to empty and charge to full. Battery Emulator will show these events as Battery is completely discharged and Battery is fully charged. You'll likely see Large cell voltage deviation! Check balancing of cells too. The goal is to find the thresholds you can manually set between which the battery can operate without regularly encountering these.

Try to find the widest time window of Cell Voltage Delta where the value changes the least — that's the most comfortable and safest "zone" for the cells to operate. Look at the SOH graph over the same time period — that should give you the minimum and maximum percentage of SOC rescaling you can set in Battery Emulator to prevent the battery from entering the high cell voltage delta zone. Take into account the absolute minimum SOC value your inverter is willing to go until (eg. Fronius allows discharging to 5% only, doesn't go below), you can reduce min SOC rescale about by that amount.

In the example above, the top graph establishes the red lines, which show the comfortable area of Cell Voltage Delta. The green lines show where the SOC curve intersects the red lines: this gives the min and max SOC rescale values for a safe zone. (Note the slight hysteresis between charge and discharge; take the highest value for safety.

This way, you'll still be in the safe zone with your battery, but you'll likely be able to use a higher capacity than the original SOH allowed in the BMS before the reset. Re-evaluate this graph periodically, every 3 months (no need to do full charge-discharge so often; just keep your eye on Cell Voltage Delta and SOC (real) relation on normal usage)

Physical size 📏~

The Leaf battery packs (24/30/40kWh) are all the same physical size. The 62kWh battery, however, is 40mm taller.

  • 24kWh (2011–2012, ZE0) = 277kg (601lb) 1547.0 (L) × 1188.0 (W) × 264.0 (H) mm
  • 30kWh (2013–2017, AZE0) = 294kg (648lb) 1547.0 (L) × 1188.0 (W) × 264.0 (H) mm
  • 40kWh (2018–2023, ZE1) = 303kg (668lb) 1547.0 (L) × 1188.0 (W) × 264.0 (H) mm
  • 62kWh (2018–2023, ZE1) = 410kg (903lb) 1547.0 (L) × 1188.0 (W) × 304.0 (H) mm

Leaf 24/30/40kWh pack

The e-NV200 battery pack is 1578 (L) x 1102 (W) x 266 (H) mm and is packaged differently from the LEAF packs (active cooling and service disconnect at the front instead of the middle).

Battery Emulator will detect an e-NV200 pack as LEAF AZE0.

e-NV200 24/40kWh battery pack

Test before you buy 🔍~

You can test a Leaf pack on-site before you buy it by making a portable cable with a Yazaki connector and bringing a 12V power source (AGM, UPS, 3x18650 in series, etc.).

If you have a spare, compatible ESP32 board with a CAN connector, you can use the Battery Emulator with no inverter configured to start communicating with the pack; open Cell monitor or More Battery Info to check health and lifetime usage.

Worth making a rig with SSRs and enabling Contactor control via GPIO / Periodic BMS Power reset settings, so the contactors would close to verify with a multimeter that the pack properly outputs the voltage.

You can even connect LeafSpy the same way if you get an OBD2 socket hooked to the Yazaki connector:

pack-with-tester-cable-and-battery

These pictures show it for AZE0/ZE1. For the ZE0 2011-2012, it's similar; you just need to use the other Yazaki connector, with different pin locations (see above for pinout).

pack-with-tester-cable-and-battery

⚠️ To ensure you don't deal with an insulation-faulted pack (see video), measure DC voltage between each contact of the service disconnect switch and the case (do this with the pack completely powered off and disconnected from anything). You should see the DC voltage slowly decrease to 0 (wait until it is close to 0 on both). If you see a constant voltage standing still between the battery casing and any of the contacts, that pack likely has an insulation fault and may be dangerous to use!

CAUTION

Working with high voltage is dangerous. Always follow local laws and regulations regarding high voltage work. If you are unsure about the rules in your country, consult a licensed electrician for more information.