Nissan Leaf Gen 3 (2018 up EM57): Difference between revisions

From openinverter.org wiki
Jump to navigation Jump to search
Line 1: Line 1:
If you scanned the QR code on your gen 3 Leaf adapter board you are in the right place to help set it up![[File:Leaf Gen.3.png|thumb]]
If you scanned the QR code on your gen 3 Leaf adapter board you are in the right place to help set it up!
[[File:Gen 3 PC board assembly.png|thumb]]


== This adapter board is compatible with Gen 3 Nissan Leaf (model year 2018+) inverters and the [[Mini Mainboard|open inverter mini main board]] ==
== This adapter board is compatible with Gen 3 Nissan Leaf (model year 2018+) inverters and the [[Mini Mainboard|open inverter mini main board]] ==
Line 46: Line 47:


=== Setting up the 3rd generation Leaf adapter board jumpers ===
=== Setting up the 3rd generation Leaf adapter board jumpers ===
[[File:Front adapter board SMD components.png|thumb]]
[[File:Pc board SMD only.png|thumb]]




Line 52: Line 53:


''This jumper allows disconnecting the brake output circuitry from the board address circuitry for testing (see Mini Mainboard Hardware Detection.)  **add link** This IO is shared between a board address analog input and a brake light output.  Once this is proven out there should be no need to change this jumper.''
''This jumper allows disconnecting the brake output circuitry from the board address circuitry for testing (see Mini Mainboard Hardware Detection.)  **add link** This IO is shared between a board address analog input and a brake light output.  Once this is proven out there should be no need to change this jumper.''
'''SJ5 -''' Open Inverter has an Emergency Stop (E-Stop) function to quickly, non-destructively, and safely shut down the inverter.  To use the E-Stop option connect an E-stop switch (closed when OK, open in stop position) 12v feed to position 40 of this adapter board. The switch must break the 12v signal of the circuit when the e-stop is pressed or if a wire breaks. Other methods are not recommended for safety - to verify it shuts the inverter down when needed. To ignore the E-Stop functionality solder the SJ5 jumper closed. No need to populate **the e-stop input** connector position in this bypassed case.


'''SJ5 -''' Open Inverter has an Emergency Stop (E-Stop) function to quickly, non-destructively, and safely shut down the inverter.  To use the E-Stop option connect an E-stop switch (closed when OK, open in stop position) 12v feed to position 40 of this adapter board. The switch must break the 12v signal of the circuit when the e-stop is pressed or if a wire breaks. Other methods are not recommended for safety - to verify it shuts the inverter down when needed. To ignore the E-Stop functionality solder the SJ5 jumper closed. No need to populate **the e-stop input** connector position in this bypassed case.
'''SJ5 -''' Open Inverter has an Emergency Stop (E-Stop) function to quickly, non-destructively, and safely shut down the inverter.  To use the E-Stop option connect an E-stop switch (closed when OK, open in stop position) that feeds 12v to position 40 of this adapter board. The E-Stop switch must break the 12v signal of the circuit when the e-stop is pressed or if a wire breaks. Other methods are not recommended for safety - to verify it shuts the inverter down when needed. To ignore the E-Stop functionality, solder the SJ5 jumper closed. No need to populate position 40 (e-stop signal) in this bypassed case.


'''You must either feed in 12v on pos. 40 or solder SJ5 closed.  12v is needed on this E_STOP line or the inverter will not run.'''
'''You must either feed in 12v on pos. 40 or solder SJ5 closed.  12v is needed on this E_STOP line or the inverter will not run.'''
Line 65: Line 67:




'''SJ8 / J8'''  
'''SJ8 / J8''' is a voltage select solder jumper in the case of SJ8 and a 3 position header in the case of J8.  You must use either style to select 3.3v or 5v for your programmer.  See programming the ESP32 below for further info on programming.




'''SJH1 & SJL1''' These should be either both soldered if a CAN termination resistor is desired here or both open. Do not leave one open & one closed.  If this is the end of a CAN line these should both be soldered.
'''SJH1 & SJL1''' These should be either both soldered if a 120ohm CAN termination resistor is desired here. Do not leave one solder jumper open & one closed.  If this is the end of a CAN line these should both be soldered.


''There is a capacitor in the middle of the 2x 60 ohm resistors to help filter noise on the CAN lines.  There is also a TVS diode (D6) right next to the 40pos. connector to help with static protection.''
''There is a capacitor in the middle of the 2x 60 ohm resistors to help filter noise on the CAN lines.  There is also a TVS diode (D6) right next to the 40pos. connector to help with static protection.''
Line 94: Line 96:
If you are using the factory Leaf 40 position connector there are some open inverter specific wires that need to be added.
If you are using the factory Leaf 40 position connector there are some open inverter specific wires that need to be added.


<nowiki>**</nowiki>add image of a stock female leaf connector** with colored dots to help identify wires?
[[File:Inverter entry board harness.jpg|thumb]]
<nowiki>**</nowiki>add which pin numbers or mark them somehow in the table below**


<nowiki>**</nowiki>add which pin numbers or mark them somehow in the table below**
[[File:40pos pin out back.png|thumb]]
[[File:40pos pin out.png|thumb]]





Revision as of 01:15, 23 October 2023

If you scanned the QR code on your gen 3 Leaf adapter board you are in the right place to help set it up!

Gen 3 PC board assembly.png

This adapter board is compatible with Gen 3 Nissan Leaf (model year 2018+) inverters and the open inverter mini main board

This is a work in progress...

Any deeper dive info is in italics. You can skip over anything inn italics if you don't want to know how it works or what it's doing in the background.

Things to verify

Some of the info was not completely clear for the development of this board. Things that need to be verified:

  • Let's use strikethrough as we verify these items.
  • The board address needs to be checked with the brake circuit connected and disconnected (cut SJ4 to disconnect, solder to connect it.) Need to verify this does not skew the address voltage and change the address. There are vias to measure the voltage in the board address block to help.
  • The second part of the brake circuit looks like it should block 2.5v and below from turning on the brake lights. Above about 2.7v the brake lights should go on. This depends on if the STM32 can push enough power to overcome a few components. Trying to give a wider range of available addresses and still have the brake light output trigger in regen. The high side switch turns on at around 1.2v on the enable line, that's what the zener blocking diode is for.
  • R3 and R9 are setup as 0R (jumper) resistors as Nissan had them. These should not be populated for now.
  • R2 & R4 are unclear grounds. Need to figure out if these are in fact required grounds.
    • J1 connector (Nissan 32 pos.) on position 20 if using thru hole board to wire connectors has only a .3mm trace to ground which likely won't last or work well. If this ground is required there is a large ground via right next to position 20 to solder to for a good ground. Will need to correct this in the next version once understood.
  • R13 is a pull down resistor for the T_SINK input. This is at 3K3 in V0.0.1 but unsure if this is ideal. There are 2 plated thru holes on each side of R13 to use to make testing the ideal value easier.
  • What connector options to use for the Open Inverter connections to get out of the inverter.
  • The capacitors on each contactor mosfet gate should be checked that they do not delay turn on or off too much and that they help eliminate chatter.


There are optional jumpers on both the adapter board and the mini mainboard.

Setting up the mini mainboard jumpers

Mini mainboard.png


SJ1 (mini mainboard back) should be **soldered / not soldered.**

This enables a 500 ohm pull-up resistor that is needed for open collector encoders. In the case of the EM57 motor it **is / is not required**.

SJ3 (mini mainboard) soldered to the left is setup for cruise control 12v input. It should stay like this.

Soldered to the right is 3.3v MOSI for SPI communications. Do not apply 12v to this input while shorted to the right of the jumper or damage likely will result.






Setting up the 3rd generation Leaf adapter board jumpers

Pc board SMD only.png


SJ4 can be ignored. It should stay connected.

This jumper allows disconnecting the brake output circuitry from the board address circuitry for testing (see Mini Mainboard Hardware Detection.) **add link** This IO is shared between a board address analog input and a brake light output. Once this is proven out there should be no need to change this jumper. SJ5 - Open Inverter has an Emergency Stop (E-Stop) function to quickly, non-destructively, and safely shut down the inverter. To use the E-Stop option connect an E-stop switch (closed when OK, open in stop position) 12v feed to position 40 of this adapter board. The switch must break the 12v signal of the circuit when the e-stop is pressed or if a wire breaks. Other methods are not recommended for safety - to verify it shuts the inverter down when needed. To ignore the E-Stop functionality solder the SJ5 jumper closed. No need to populate **the e-stop input** connector position in this bypassed case.

SJ5 - Open Inverter has an Emergency Stop (E-Stop) function to quickly, non-destructively, and safely shut down the inverter. To use the E-Stop option connect an E-stop switch (closed when OK, open in stop position) that feeds 12v to position 40 of this adapter board. The E-Stop switch must break the 12v signal of the circuit when the e-stop is pressed or if a wire breaks. Other methods are not recommended for safety - to verify it shuts the inverter down when needed. To ignore the E-Stop functionality, solder the SJ5 jumper closed. No need to populate position 40 (e-stop signal) in this bypassed case.

You must either feed in 12v on pos. 40 or solder SJ5 closed. 12v is needed on this E_STOP line or the inverter will not run.


SJ6 is optional and can be left with both positions open.

Position 19 on the 40 position Nissan connector is for the PWM_USER / OUT_TEMP signal. Part of the PWM_USER functionality is an optional pull up resistor (R19) that is not populated. An 0805 SMD resistor can be added if a pullup is desired on board (the footprint is for a hand solder 0805, larger than normal but makes it easier to modify.) SJ6 is a voltage select solder jumper to select between the onboard voltages of 5.3V and 12v. There is also a plated through hole called UV1 (user voltage) to be used for the pull up voltage if desired.

C11 capacitor is to reduce EMI. If your PWM device needs a very sharp edge this may interfere. C12 is a 1uF capacitor to help stabilize the user selected voltage.


SJ8 / J8 is a voltage select solder jumper in the case of SJ8 and a 3 position header in the case of J8. You must use either style to select 3.3v or 5v for your programmer. See programming the ESP32 below for further info on programming.


SJH1 & SJL1 These should be either both soldered if a 120ohm CAN termination resistor is desired here. Do not leave one solder jumper open & one closed. If this is the end of a CAN line these should both be soldered.

There is a capacitor in the middle of the 2x 60 ohm resistors to help filter noise on the CAN lines. There is also a TVS diode (D6) right next to the 40pos. connector to help with static protection.



Soldering on the Nissan connectors

The adapter board is setup with multiple footprints for both of the 32 and 40 position inverter's internal Nissan board to wire connectors.

**Add different connector images**

**add different connector part numbers**

**add female plug housing part numbers**

**add female terminal part numbers**

**add wire size ranges for terminals**

**add crimper options**

40 position Leaf connector modifications

If you are using the factory Leaf 40 position connector there are some open inverter specific wires that need to be added.

Inverter entry board harness.jpg

**add which pin numbers or mark them somehow in the table below**

40pos pin out back.png
40pos pin out.png


40 position connector pin out:

Pos. Abbreviation Description AKA Capabilities Pos. Abbreviation Description AKA Capabilities
1 +12VSW Switched +12v 21 +12VSW Switched +12v
2 PRE□ Precharge contactor switched ground 4.5 amps recommended to use an economizer 22 DCSW□ EV battery contactor switched ground 4.5A recommended to use an economizer
3 GND Ground 23 GND Ground
4 GND Ground 24 GND Ground
5 oERR□ Output - Error signal, switched ground 1 amp 25 CRUISE * ° Cruise control signal 12v / MOSI 3.3v
6 sSTRT* Input, 12v start signal pulse 26 empty empty
7 sFWD* Input, 12v forward 27 sBRAKE* Brake light input 12v
8 sREV* Input, 12v reverse 28 MTEMP+ Motor temp senor +
9 empty empty 29 sBMS* Battery Management System error +12 signal
10 oBRK▲ Output, brake +12v (see SJ4) 1.5 amps 30 MTEMP- Motor temp sensor -
11 THROT2° Throttle 2 0-3.3v signal 31 empty empty
12 CANH CAN high signal (see SJH1) 120 ohm termination resistor solder jumpers 32 THROT1° Throttle 1 0-3.3v signal
13 CANL CAN low signal (see SJL1) 120 ohm termination resistor solder jumpers 33 empty empty
14 oUVTG□ optional output? 1amp max switched ground 1 amp 34 empty empty
15 empty empty 35 S1 Encoder S1 wire
16 S3 Encoder S3 wire 36 empty empty
17 +5V +5V for sensors (like throttle) 37 S4 Encoder S4 wire
18 S2 Encoder S2 wire 38 +5V +5V for sensors (like throttle)
19 oTEMP□ over temp signal, switched ground, 1 amp max 1 amp, has EMI filter capacitor (C11) for PWM 39 R2 Encoder R2 wire
20 R1 Encoder R1 wire 40 sE-STOP Optional Emergency stop switch (see SJ5) Can add an E-Stop switch to 12v.
KEY
* = 12v Signal
° - 0-3.3v Signal
□ = Switched ground
▲ = Switched +12v

32 position connector

This connector and harness should not need any modifications.

Programming the ESP32 Wi-Fi module

Solder jumper JP8 & J8 set the programming header voltage to either 5v or 3.3v. Use only 1 header to set the voltage to your programmer's output voltage.

If 5v is used the 3.3v regulator will convert it to 3.3v for the ESP32.

**Add image**

Follow instructions here **add link*

**add info about programming with the STM32 processor programmed already**

**add info about the boot delay** ESP32 boot delay R & C is set to the commonly recommended 10k resistor & 1uF in V0.0.1. Not sure how / why 4k7 / .1uF was chosen but can easily switch back.

Programming the STM32

Add info on programming the STM32 processor.

**settings info** link..

**options** link..

Extra header J3

**add info about the extra header** what's the use case?

Contactor outputs, PRE & DCSW

**4.5 amps max**

**add economizer circuit if not in contactor**

**add image of capacitor locations**

**100nF capacitors on each gate to help eliminate chatter. Required? Need to change? Contactor chatter issues?**