Mini Mainboard: Difference between revisions

From openinverter.org wiki
Jump to navigation Jump to search
(copied over pin descriptions from V3 board)
(Adopted pin description)
Line 13: Line 13:


As opposed to earlier mainboards the current sensor inputs are now designed for 5V input, i.e. 2.5V @ 0A. This interfaces directly with most current sensors that OEMs use and also with Melexis chips, LEM HTFS and Tamura L06P current sensors.
As opposed to earlier mainboards the current sensor inputs are now designed for 5V input, i.e. 2.5V @ 0A. This interfaces directly with most current sensors that OEMs use and also with Melexis chips, LEM HTFS and Tamura L06P current sensors.
== Digital inputs ==
== Digital inputs ==
There are external 8 digital inputs on JP2. A voltage of >7V is interpreted as a logical 1 (high). They all have a cutoff frequency of 40Hz.
There are external 8 digital inputs on JP2. A voltage of >7V is interpreted as a logical 1 (high). They all have a cutoff frequency of 40Hz.
# Cruise Control (Pin 5). This input sets the current motor speed as the set point for cruise control. Cruise control is disabled with the Brake input.
# Cruise Control (Pin 4). This input sets the current motor speed as the set point for cruise control. Cruise control is disabled with the Brake input. In SPI mode: MOSI
# Start (Pin 7). This input starts the inverter operation.
# Start (Pin 5). This input starts the inverter operation.
# Brake input (Pin 9). This input is connected to the brake pedal. It sets a configurable negative torque (regen) which overrides the throttle. I.e. if you press both, brake pedal and throttle, the throttle is ignored.
# Brake input (Pin 6). This input is connected to the brake pedal. It sets a configurable negative torque (regen) which overrides the throttle. I.e. if you press both, brake pedal and throttle, the throttle is ignored.
# Motor Protection switch or emergency stop (Pin 11). This input is connected to the thermal protection switch that is embedded into many motors. Its function is to inhibit the PWM signals when the motor overheats. This input directly controls the PWM signals without software interaction. The PWM is enabled as long as this input is high and shut down as soon as it goes low. If your motor does not have such a switch, tie the input high permanently.
# Forward (Pin 7). If this input is high the motor spins forward.
# Forward (Pin 13). If this input is high the motor spins forward.
# Reverse (Pin 8). If this input is high the motor spins backward. When neither input is high the motor will not spin at all.
# Reverse (Pin 15). If this input is high the motor spins backward. When neither input is high the motor will not spin at all.
# Emergency stop (Pin 9). The PWM is enabled as long as this input is high and shut down as soon as it goes low.
# Reserved input (Pin 17). This used to be an emergency stop input but I decided to reduce the number of HW stop pins. Emergency stop can now be chained to pin 11. Tie this to +12V (otherwise the inverter won't start using the 'start' switch)
# BMS input (Pin 10). This input limits the motor torque (both negative and positive) if a BMS signals an over or undervoltage condition. It is active high, i.e. high means over/undervoltage.
# BMS input (Pin 19). This input limits the motor torque (both negative and positive) if a BMS signals an over or undervoltage condition. It is active high, i.e. high means over/undervoltage.
There is one more digital inputs on JP1
There is one more digital inputs on JP3
# Gate driver error/Desat (Pin 5) This pin is pulled high (5V). When pulled low an error is signalled and the PWM is inhibited
# Error input (Pin 13) This pin is pulled high (5V). When pulled low an error is signalled and the PWM is inhibited


== Digital outputs ==
== Digital outputs ==
There are 5 external open collector outputs on JP2.
There are 5 outputs on JP2. They just source 3.3V with 220 Ohm series resistance and are meant to drive FETs or NPN transistors.  
They are switch via a uln2003 driver, each output can sink (makes a connection to ground) up to 150mA each
# Precharge output (Pin 15) This output is activated when the inverter is powered up. It is disabled as soon as the DC contactor is enabled.
[[File:Main board v3 .jpg|thumb|schematic (v2)]]
# DC contactor output (Pin 16) This output is activated when the bus voltage is above a given threshold and the start pin goes high. It is disabled on overcurrent, motor overheat and emergency stop.
 
# Error output (Pin 17) This output is activated on over current, motor overheat, emergency stop, throttle out of range. In SPI mode: SCK
* The precharge output (OUT_PRE, pin 20) has two paralleled outputs, resulting in a maximum sinkage of 500mA.
# Brake output (Pin 18) This output is high when potnom reaches a certain negative threshold. The purpose is to switch on the brake light on a certain regen level At startup this pin is configured as an analog input to sense some preset adapter boards In SPI mode: MISO
 
# Voltage output (Pin 19) This output is activated when the bus voltage surpasses an upper or lower threshold. In SPI mode: /CS
* The DC contactor (OUT_DCSW, pin 12)  output is is switch via a additional N-Chanel mosfet, which can sink up to 1-2amps.
 
There's no econimizer system built into the openinverter board, so make sure your contactors have the appropriate economizing circuits .
 
# DC contactor output (Pin 12) This output is activated when the bus voltage is above a given threshold and the start pin goes high. It is disabled on overcurrent, motor overheat and emergency stop.
# Error output (Pin 14) This output is activated on over current, motor overheat, emergency stop, throttle out of range.
# Voltage output (Pin 16) This output is activated when the bus voltage surpasses an upper or lower threshold.
# Precharge output (Pin 20) This output is activated when the inverter is powered up. It is disabled as soon as the DC contactor is enabled.
# Brake output (Pin 10) This output is high when potnom reaches a certain negative threshold. The purpose is to switch on the brake light on a certain regen level
 
 
 
<nowiki>*</nowiki>note: there's 2 versions of the main board v3, the old board lacked the high current output drivers for the contractor control. This old version is only capable of sinking up to 300mA for the OUT_DCSW and 150mA for OUT_PRE.
 
Pictured in: "Main board (v1)"
 
== PWM outputs ==
== PWM outputs ==
There is one external PWM output on JP2, Pin 18. It outputs a duty cycle that is proportional to the motor or heatsink temperature or speed. Its offset and gain is software configurable. The frequency is fixed to 17kHz. It is an open collector output so it can be used with most temperature gauges in cars. It can sink up to 150mA.
There is one external PWM output on JP2, Pin 20. It outputs a duty cycle that is proportional to the motor or heatsink temperature or speed. Its offset and gain is software configurable. The frequency is fixed to 17kHz.


There are 6 internal PWM outputs on JP3. Pins 4, 8 and 12 provide a GND connection, Pins 1, 5 and 9 provide 5V. The outputs are 3.3V, 16mA. Frequency is configurable to 4.4, 8.8 or 17.6kHz.
There are 6 internal PWM outputs on JP1. The outputs are 3.3V, 16mA. Frequency is configurable to 4.4, 8.8 or 17.6kHz.
# PWM Top phase 1 (Pin 2)
# PWM Top phase 1 (Pin 5)
# PWM Bottom phase 1 (Pin 3)
# PWM Bottom phase 1 (Pin 6)
# PWM Top phase 2 (Pin 6)
# PWM Top phase 2 (Pin 7)
# PWM Bottom phase 2 (Pin 7)
# PWM Bottom phase 2 (Pin 8)
# PWM Top phase 3 (Pin 10)
# PWM Top phase 3 (Pin 9)
# PWM Bottom phase 3 (Pin 11)
# PWM Bottom phase 3 (Pin 10)
There is a configurable dead time between top and bottom outputs.
There is a configurable dead time between top and bottom outputs.


== Analog Inputs and over-current protection ==
== Analog Inputs and over-current protection ==
There are 3 external analog inputs on JP2.
There are 3 external analog inputs on JP2.
# Throttle input, 0-3.3V (Pin 6). Cutoff frequency 16Hz, input resistance 10k.
# Throttle input, 0-6.6V (Pin 11). Cutoff frequency 16Hz, input resistance 10k.
# Regen pot input, 0-3.3V (Pin 8). Cutoff frequency 16Hz, input resistance 10k.
# Redundant throttle or Regen pot input, 0-6.6V (Pin 12). Cutoff frequency 16Hz, input resistance 10k.
# KTY83 temperature sensor input (Pin 22 positive, Pin 21 negative).  Cutoff frequency 16Hz
# KTY83 temperature sensor input (Pin 14 positive, Pin 13 negative).  Cutoff frequency 16Hz
There are 4 internal analog inputs on JP7. Pins 5, 7, 10, 15, 16 provide a GND connection, Pin 1,2, 8, 11, 12 provide stabilized 5V.
There are 4 internal analog inputs on JP1.
# Udc (Pin 4) Bus voltage input. 0-3.3V, cutoff frequency 16Hz
# Udc (Pin 17) Bus voltage input. 0-3.3V, cutoff frequency 16Hz
# Il1 (Pin 6) Current phase 1. 0V=-Imax, 2.5V=0A, 5V=Imax (software configurable). Cutoff frequency 48kHz.
# Heatsink temperature (Pin 18), cutoff frequency 16Hz
# Il2 (Pin 9)
# Il1 (Pin 19) Current phase 1. 0V=-Imax, 2.5V=0A, 5V=Imax (software configurable). Cutoff frequency 48kHz.
# Heatsink temperature (Pin 13), cutoff frequency 16Hz
# Il2 (Pin 20) Current phase 2
The two current sensors are used for the programmable hardware over-current protection. A trip limit can be programmed that configures a hardware comparator. When the given current limit is hit, the PWM signals will be shut down without software interaction.
The two current sensors are used for the programmable hardware over-current protection. A trip limit can be programmed that configures a hardware comparator. When the given current limit is hit, the PWM signals will be shut down without software interaction.


== Position feedback ==
== Position feedback ==
There is an input for a pulse encoder on JP2. Pin 3 can be connected to an open collector output of an encoder. Its input resistance is 500 Ohms. The cutoff frequency is 16kHz. E.g. a 60 pulses/rotation encoder can spin up to 18000 rpm before the limit is hit. By changing the value of R2 the cutoff frequency can be varied (lower value, higher frequency).
Multiple position feedback types are supported via JP1. On the back of the board you will find solder jumper SJ1 that enables a 500 Ohm pull-up resistor that is needed for open collector encoders.
 
Alternatively Pin 1 and 3 can be connected to a quadrature encoder found embedded in many motors. It has better response than a single channel.
 
<s>Additionally Pin 4 can be connected to an index pulse for future use with synchronous motors.</s>
 
Pin 4 optionally provides 5V to power an optical encoder. To do that you have to bridge R28 (or put an application specific value there). You can also bridge R1 to get a GND connection on pin 2


Alternatively Pin 1 and 3 can be connected to a sin/cos feedback device and Pin 4 can generate a resolver excitation sine wave. In that case Pin 2 provides 1.7V to make the resolver feedback unipolar.
# Single channel pulse encoder - signal connected to Pin 14
# Dual channel quadrature encoder - connected to Pin 14 (A) and Pin 15 (B)
# Resolver - Exciter coil connected to Pin 13 (R1) and Pin 12 (R2). Feedback coils positive connected to Pin 14 (S2) and Pin 15 (S3). Negative poles of coils tied together and connected to Pin 16 (S1S4)
# SinCos feedback chip 0-3.3V - connected to Pin 14 and 15


== Communication ==
== Communication ==
JP1 provides a TTL level (3.3V) UART interface. It can be directly connected to a TTLUSB adapter or an Olimex ESP8266 wifi module. Pin 1 provides the 3.3V. It can be used to power the board or to power an external module like a Wifi or bluetooth transceiver. 400mA should not be exceeded. Pin 1 is 3V3, Pin 2 is GND,  Pin 3 is TX,  and Pin 4 is RX (Olimex UEXT compatible).
JP1 provides a TTL level (3.3V) UART interface, Pin 3 (RX), Pin 4 (TX)


The communication parameters are fixed to 115200 8N2 (2 stop bits!) and may be raised to 921600.
The communication parameters are fixed to 115200 8N2 (2 stop bits!) and may be raised to 921600.


There is a CAN interface on JP5. Pin 25 is CANL, Pin 26 is CANH
CAN interface Pin 1 is CANH, Pin 2 is CANL


== Power input ==
== Power input ==
Line 97: Line 75:


== Pin Header Summary ==
== Pin Header Summary ==
Pin Header JP2
Pin Header JP1
{| class="wikitable"
{| class="wikitable"
|'''Pin'''
|'''Pin'''
Line 104: Line 82:
|-
|-
|1
|1
|ENC_B/S3
|CANH
|Encoder channel B/Resolver S3
|CANH
|-
|-
|2
|2
|SJ4
|CANL
|GND/Resolver center point S1S4
|CANL
|-
|-
|3
|3
|ENC_A/S2
|RX
|Encoder channel A or single channel input/Resolver S2
|Serial console
|-
|-
|4
|4
|ENC_Z/R1
|TX
|Index pulse input/5V output/Resover excitation R1
|Serial console
|-
|-
|5
|5
|SIG_CRUISE
|DESAT
|Cruise Control Input (12V)
|Gate driver fault
|-
|-
|6
|6
|THROTTLE1
|PWM1P
|Throttle Input (0-3.3V)
|Power stage PWM
|-
|-
|7
|7
|SIG_START
|PWM1N
|Start input (12V)
|Power stage PWM
|-
|-
|8
|8
|THROTTLE2
|PWM2P
|Regen Pot Input (0-3.3V)
|Power stage PWM
|-
|-
|9
|9
|SIG_BRAKE
|PWM2N
|Brake Input (12V)
|Power stage PWM
|-
|-
|10
|10
|OUT_BRAKE
|PWM3P
|Brake output (open collector 300mA)
|Power stage PWM
|-
|-
|11
|11
|SIG_MPROT
|PWM3N
|Motor Protection Switch (12V, PWM inhibit when low)
|Power stage PWM
|-
|-
|12
|12
|OUT_DCSW
|R2
|DC contactor output (open collector 300mA)
|Power stage PWM
|-
|-
|13
|13
|SIG_FORWARD
|R1
|Forward (12V)
|Resover excitation R1
|-
|-
|14
|14
|OUT_ERR
|ENC_A/S2
|Error Signal (open collector 150mA)
|Encoder channel A or single channel input/Resolver S2
|-
|-
|15
|15
|SIG_REVERSE
|ENC_B/S3
|Reverse (12V)
|Encoder channel B/Resolver S3
|-
|-
|16
|16
|OUT_OVTMP
|S1S4
|Over/Under Voltage (open collector 150mA)
|GND/Resolver center point S1S4
|-
|-
|17
|17
|SIG_EMCYSTOP
|TMPHS
|Reserved
|Heatsink temperature sensor
|-
|-
|18
|18
|OUT_TEMP
|UDC
|Temperature PWM output (open collector 150mA)
|Bus voltage
|-
|-
|19
|19
|IL1
|Phase current 1
|-
|20
|IL2
|Phase current 2
|}
Pin header JP2
{| class="wikitable"
|'''Pin'''
|'''Signal'''
|'''Name'''
|-
|1
|GND
|GND
|-
|2
|VCC
|Vcc (7-26V)
|-
|3
|5V
|500mA output
|-
|4
|SIG_CRUISE/MOSI
|Cruise Control Input (12V) or SPI MOSI (3.3V)
|-
|5
|SIG_START
|Start input (12V)
|-
|6
|SIG_BRAKE
|Brake Input (12V)
|-
|7
|SIG_FORWARD
|Forward (12V)
|-
|8
|SIG_REVERSE
|Reverse (12V)
|-
|9
|SIG_EMCYSTOP
|Emergency stop (12V)
|-
|10
|SIG_BMS
|SIG_BMS
|BMS Over/Under Voltage input (12V)
|BMS Over/Under Voltage input (12V)
|-
|-
|20
|11
|OUT_PRE
|THROTTLE2
|Precharge Output (open collector 150mA)
|Regen Pot Input (0-6.6V)
|-
|12
|THROTTLE1
|Throttle Input (0-6.6V)
|-
|-
|21
|13
|MTEMP-
|MTEMP-
|Motor Temperature Input -
|Motor Temperature Input -
|-
|-
|22
|14
|MTEMP+
|MTEMP+
|Motor Temperature Input +
|Motor Temperature Input +
|-
|-
|23
|15
|GND
|OUT_PRE
|GND
|Precharge Output (3.3V)
|-
|16
|OUT_DCSW
|DC contactor output (3.3V)
|-
|17
|OUT_ERR/SCK
|Error Signal or SPI SCK (both 3.3V)
|-
|-
|24
|18
|VCC
|OUT_BRAKE/MISO
|Vcc (7-26V)
|Brake output or SPI MISO (both 3.3V)
|-
|-
|25
|19
|CANL
|OUT_OUVTG/CS
|CANL
|Over/Under Voltage or SPI /CS (both 3.3V)
|-
|-
|26
|20
|CANH
|PWM_USER
|CANH
|Temperature PWM output (3.3V)
|}
|}
== Hardware detection ==
== Hardware detection ==
Because the mini mainboard is primarily meant to be mounted on some sort of base board, we wanted to introduce a detection mechanism for the base board in case any special treatment is needed.
Because the mini mainboard is primarily meant to be mounted on some sort of base board, we wanted to introduce a detection mechanism for the base board in case any special treatment is needed.
Line 222: Line 260:
!voltage
!voltage
!ADC
!ADC
!+/-5% range
!+/-3% range
|-
|-
| -
| -
Line 229: Line 267:
|0.29 V
|0.29 V
|357
|357
|339-375
|346-368
|-
|-
| -
| -
Line 236: Line 274:
|0.35 V
|0.35 V
|431
|431
|409-453
|418-444
|-
|-
| -
| -
Line 243: Line 281:
|0.41 V
|0.41 V
|504
|504
|479-529
|489-519
|-
|-
|Nissan Leaf Gen3
|Nissan Leaf Gen3
Line 250: Line 288:
|0.48 V
|0.48 V
|598
|598
|568-628
|580-616
|-
|-
| -
| -
Line 257: Line 295:
|0.52 V
|0.52 V
|643
|643
|611-675
|624-662
|-
|-
| -
| -
Line 264: Line 302:
|0.56 V
|0.56 V
|700
|700
|665-735
|679-721
|-
|-
| -
| -
Line 271: Line 309:
|0.67 V
|0.67 V
|831
|831
|789-873
|806-856
|-
|-
| -
| -
Line 278: Line 316:
|0.73 V
|0.73 V
|905
|905
|860-950
|878-932
|-
|-
| -
| -
Line 285: Line 323:
|0.79 V
|0.79 V
|977
|977
|928-1026
|948-1006
|-
|-
| -
| -
Line 292: Line 330:
|0.86 V
|0.86 V
|1067
|1067
|1014-1120
|1035-1099
|-
|-
| -
| -
Line 299: Line 337:
|0.93 V
|0.93 V
|1154
|1154
|1096-1212
|1119-1189
|}
|}
[[Category:OpenInverter]] [[Category:Inverter]]
[[Category:OpenInverter]] [[Category:Inverter]]

Revision as of 16:03, 7 October 2023

Mini mainboard front

The mini mainboard is the smallest form factor openinverter motor control board. It has the same functionality as the Main Board Version 3 but offloads a few components. It is meant to be used as a daughter board on top of an adapter board. The adapter board must (or may) implement:

  • The Wifi module socket
  • Relay drivers

In addition the mini mainboard allows talking to SPI peripherals. Therefore some pins have double mapping:

  • SIG_CRUISE: MOSI (SJ3 must be closed to the right side for that).
  • OUT_BRAKE: MISO
  • OUT_ERR: SCK
  • OUT_OUVTG: /CS

Like previous boards it contains a 5V switching regulator that can be loaded with about 500 mA. Alternatively It can be powered with a single 5V rail, which has to sit at 5.3V though for sufficient resolver excitation amplitude.

As opposed to earlier mainboards the current sensor inputs are now designed for 5V input, i.e. 2.5V @ 0A. This interfaces directly with most current sensors that OEMs use and also with Melexis chips, LEM HTFS and Tamura L06P current sensors.

Digital inputs

There are external 8 digital inputs on JP2. A voltage of >7V is interpreted as a logical 1 (high). They all have a cutoff frequency of 40Hz.

  1. Cruise Control (Pin 4). This input sets the current motor speed as the set point for cruise control. Cruise control is disabled with the Brake input. In SPI mode: MOSI
  2. Start (Pin 5). This input starts the inverter operation.
  3. Brake input (Pin 6). This input is connected to the brake pedal. It sets a configurable negative torque (regen) which overrides the throttle. I.e. if you press both, brake pedal and throttle, the throttle is ignored.
  4. Forward (Pin 7). If this input is high the motor spins forward.
  5. Reverse (Pin 8). If this input is high the motor spins backward. When neither input is high the motor will not spin at all.
  6. Emergency stop (Pin 9). The PWM is enabled as long as this input is high and shut down as soon as it goes low.
  7. BMS input (Pin 10). This input limits the motor torque (both negative and positive) if a BMS signals an over or undervoltage condition. It is active high, i.e. high means over/undervoltage.

There is one more digital inputs on JP1

  1. Gate driver error/Desat (Pin 5) This pin is pulled high (5V). When pulled low an error is signalled and the PWM is inhibited

Digital outputs

There are 5 outputs on JP2. They just source 3.3V with 220 Ohm series resistance and are meant to drive FETs or NPN transistors.

  1. Precharge output (Pin 15) This output is activated when the inverter is powered up. It is disabled as soon as the DC contactor is enabled.
  2. DC contactor output (Pin 16) This output is activated when the bus voltage is above a given threshold and the start pin goes high. It is disabled on overcurrent, motor overheat and emergency stop.
  3. Error output (Pin 17) This output is activated on over current, motor overheat, emergency stop, throttle out of range. In SPI mode: SCK
  4. Brake output (Pin 18) This output is high when potnom reaches a certain negative threshold. The purpose is to switch on the brake light on a certain regen level At startup this pin is configured as an analog input to sense some preset adapter boards In SPI mode: MISO
  5. Voltage output (Pin 19) This output is activated when the bus voltage surpasses an upper or lower threshold. In SPI mode: /CS

PWM outputs

There is one external PWM output on JP2, Pin 20. It outputs a duty cycle that is proportional to the motor or heatsink temperature or speed. Its offset and gain is software configurable. The frequency is fixed to 17kHz.

There are 6 internal PWM outputs on JP1. The outputs are 3.3V, 16mA. Frequency is configurable to 4.4, 8.8 or 17.6kHz.

  1. PWM Top phase 1 (Pin 5)
  2. PWM Bottom phase 1 (Pin 6)
  3. PWM Top phase 2 (Pin 7)
  4. PWM Bottom phase 2 (Pin 8)
  5. PWM Top phase 3 (Pin 9)
  6. PWM Bottom phase 3 (Pin 10)

There is a configurable dead time between top and bottom outputs.

Analog Inputs and over-current protection

There are 3 external analog inputs on JP2.

  1. Throttle input, 0-6.6V (Pin 11). Cutoff frequency 16Hz, input resistance 10k.
  2. Redundant throttle or Regen pot input, 0-6.6V (Pin 12). Cutoff frequency 16Hz, input resistance 10k.
  3. KTY83 temperature sensor input (Pin 14 positive, Pin 13 negative). Cutoff frequency 16Hz

There are 4 internal analog inputs on JP1.

  1. Udc (Pin 17) Bus voltage input. 0-3.3V, cutoff frequency 16Hz
  2. Heatsink temperature (Pin 18), cutoff frequency 16Hz
  3. Il1 (Pin 19) Current phase 1. 0V=-Imax, 2.5V=0A, 5V=Imax (software configurable). Cutoff frequency 48kHz.
  4. Il2 (Pin 20) Current phase 2

The two current sensors are used for the programmable hardware over-current protection. A trip limit can be programmed that configures a hardware comparator. When the given current limit is hit, the PWM signals will be shut down without software interaction.

Position feedback

Multiple position feedback types are supported via JP1. On the back of the board you will find solder jumper SJ1 that enables a 500 Ohm pull-up resistor that is needed for open collector encoders.

  1. Single channel pulse encoder - signal connected to Pin 14
  2. Dual channel quadrature encoder - connected to Pin 14 (A) and Pin 15 (B)
  3. Resolver - Exciter coil connected to Pin 13 (R1) and Pin 12 (R2). Feedback coils positive connected to Pin 14 (S2) and Pin 15 (S3). Negative poles of coils tied together and connected to Pin 16 (S1S4)
  4. SinCos feedback chip 0-3.3V - connected to Pin 14 and 15

Communication

JP1 provides a TTL level (3.3V) UART interface, Pin 3 (RX), Pin 4 (TX)

The communication parameters are fixed to 115200 8N2 (2 stop bits!) and may be raised to 921600.

CAN interface Pin 1 is CANH, Pin 2 is CANL

Power input

The main board contains a regulated buck converter to power all of its components. The allowed input voltage is 7-26V.

Pin Header Summary

Pin Header JP1

Pin Signal Name
1 CANH CANH
2 CANL CANL
3 RX Serial console
4 TX Serial console
5 DESAT Gate driver fault
6 PWM1P Power stage PWM
7 PWM1N Power stage PWM
8 PWM2P Power stage PWM
9 PWM2N Power stage PWM
10 PWM3P Power stage PWM
11 PWM3N Power stage PWM
12 R2 Power stage PWM
13 R1 Resover excitation R1
14 ENC_A/S2 Encoder channel A or single channel input/Resolver S2
15 ENC_B/S3 Encoder channel B/Resolver S3
16 S1S4 GND/Resolver center point S1S4
17 TMPHS Heatsink temperature sensor
18 UDC Bus voltage
19 IL1 Phase current 1
20 IL2 Phase current 2

Pin header JP2

Pin Signal Name
1 GND GND
2 VCC Vcc (7-26V)
3 5V 500mA output
4 SIG_CRUISE/MOSI Cruise Control Input (12V) or SPI MOSI (3.3V)
5 SIG_START Start input (12V)
6 SIG_BRAKE Brake Input (12V)
7 SIG_FORWARD Forward (12V)
8 SIG_REVERSE Reverse (12V)
9 SIG_EMCYSTOP Emergency stop (12V)
10 SIG_BMS BMS Over/Under Voltage input (12V)
11 THROTTLE2 Regen Pot Input (0-6.6V)
12 THROTTLE1 Throttle Input (0-6.6V)
13 MTEMP- Motor Temperature Input -
14 MTEMP+ Motor Temperature Input +
15 OUT_PRE Precharge Output (3.3V)
16 OUT_DCSW DC contactor output (3.3V)
17 OUT_ERR/SCK Error Signal or SPI SCK (both 3.3V)
18 OUT_BRAKE/MISO Brake output or SPI MISO (both 3.3V)
19 OUT_OUVTG/CS Over/Under Voltage or SPI /CS (both 3.3V)
20 PWM_USER Temperature PWM output (3.3V)

Hardware detection

Because the mini mainboard is primarily meant to be mounted on some sort of base board, we wanted to introduce a detection mechanism for the base board in case any special treatment is needed.

We chose to assign a secondary meaning to the OUT_BRAKE pin because its level can be measured by the ADC. So OUT_BRAKE can be brought to a certain voltage level with a high impedance voltage divider. The voltage level encodes the hardware variant. It will not disturb normal operation because its total resistance is chosen at least one order of magnitude larger than the output impedance of OUT_BRAKE, which is about 270 Ohms.

A the upper voltage divider resistor R1 is connected to the "5V" rail which actually sits at 5.3V. R2 is connected to GND

Variant R1 R2 voltage ADC +/-3% range
- 47k 2k7 0.29 V 357 346-368
- 47k 3k3 0.35 V 431 418-444
- 47k 3k9 0.41 V 504 489-519
Nissan Leaf Gen3 47k 4k7 0.48 V 598 580-616
- 47k 5k1 0.52 V 643 624-662
- 47k 5k6 0.56 V 700 679-721
- 47k 6k8 0.67 V 831 806-856
- 47k 7k5 0.73 V 905 878-932
- 47k 8k2 0.79 V 977 948-1006
- 47k 9k1 0.86 V 1067 1035-1099
- 47k 10k 0.93 V 1154 1119-1189