Nissan Leaf Gen 3 (2018 up EM57)
If you scanned the QR code on your gen 3 Leaf adapter board you are in the right place to help set it up!
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...
Things to verify
Some of the info was not completely clear for the development of this board. Things that need to be verified:
- 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.
There are optional jumpers on both the adapter board and the mini mainboard.
Setting up the mini mainboard jumpers
SJ1 (mini mainboard back) 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. 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. In this case the 3 position solder jumper should be connected middle and the left and should arrive with a small copper trace between the 2.
Setting up the 3rd generation Leaf adapter board jumpers
SJ4 on the Leaf adapter board's lower right side is a shorted jumper. This jumper allows disconnecting the brake output circuitry from the board address circuitry for testing (see Mini Mainboard Hardware Detection.) This IO is shared between a board address and a brake light output. Once this is proven out there should be no need to change this jumper.
SJ5 Is an Emergency Stop (E-Stop) input to quickly, non-destructively, and safely shut down the inverter. To use an E-Stop function, cut the SJ5 jumper. To ignore the E-Stop functionality just leave the SJ5 jumper closed / shorted.
SJH1 & SJL1 connects the CAN high line to a resistor pair to provide a 120 ohm termination resistor if desired. These should be either both soldered or open only, not one open one closed. 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 for 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.
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 | empty | empty | 31 | sBMS* | Battery Management System error +12 signal | |||||
12 | CANH | CAN high signal (see SJH1) | 120 ohm termination resistor solder jumpers | 32 | MTEMP- | Motor temp sensor - | ||||
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 5.3v or 3.3v. Use only 1 header to set the voltage to your programmer.
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**
**100nF "debounce" capacitors on each gate. Required? Need to change? Contactor chatter issues?**