Mini Mainboard: Difference between revisions
Line 290: | Line 290: | ||
|580-616 | |580-616 | ||
|- | |- | ||
| | | Renault Zoe Gen1 | ||
|47k | |47k | ||
|5k1 | |5k1 |
Revision as of 09:12, 5 October 2024
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 7 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 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 5). This input starts the inverter operation.
- 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.
- Forward (Pin 7). 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.
- Emergency stop (Pin 9). The PWM is enabled as long as this input is high and shut down as soon as it goes low.
- 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
- 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.
- 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.
- 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
- 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
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.
- PWM Top phase 1 (Pin 6)
- PWM Bottom phase 1 (Pin 7)
- PWM Top phase 2 (Pin 8)
- PWM Bottom phase 2 (Pin 9)
- PWM Top phase 3 (Pin 10)
- PWM Bottom phase 3 (Pin 11)
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.
- Throttle input, 0-6.6V (Pin 11). 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 14 positive, Pin 13 negative). Cutoff frequency 16Hz
There are 4 internal analog inputs on JP1.
- Udc (Pin 17) Bus voltage input. 0-3.3V, cutoff frequency 16Hz
- Heatsink temperature (Pin 18), cutoff frequency 16Hz
- Il1 (Pin 19) Current phase 1. 0V=-Imax, 2.5V=0A, 5V=Imax (software configurable). Cutoff frequency 48kHz.
- 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.
- 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
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 | Resover excitation R2 |
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 |
Renault Zoe Gen1 | 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 |
- | 47k | 12k | 1.08 V | 1338 | 1298-1378 |