Main Board Version 2

From openinverter.org wiki
Jump to navigation Jump to search
Main board
Connections
Schematic

The main board is the heart of the inverter system. It contains all the intelligence that is needed to convert the users inputs into motor shaft movement. It also contains all the protection circuitry to avoid damage in case of errornous inputs.

Its distinct features are:

Digital inputs

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

  1. 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.
  2. Start (Pin 7). This input starts the inverter operation.
  3. 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.
  4. Motor Protection switch (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.
  5. Forward (Pin 13). If this input is high the motor spins forward.
  6. Reverse (Pin 15). If this input is high the motor spins backward. When neither input is high the motor will not spin at all.
  7. Emergency Stop (Pin 17). This input has the same function as the motor protection input. It can be used for an emergency stop button. Tie it high otherwise.
  8. 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 are two more digital inputs on JP3

  1. Error input (Pin 13) This pin is pulled high (5V). When pulled low an error is signalled and the PWM is inhibited
  2. UVLO input (Pin 14) This pin is pulled high (3.3V). When pulled low an error is signalled and the PWM is inhibited

Digital outputs

There are 4 external open collector outputs on JP5.

  1. 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.
  2. Error output (Pin 14) This output is activated on over current, motor overheat, emergency stop, throttle out of range.
  3. Voltage output (Pin 16) This output is activated when the bus voltage surpasses an upper or lower threshold.
  4. 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.
  5. 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

PWM outputs

There is one external PWM output on JP5, 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 500mA.

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.

  1. PWM Top phase 1 (Pin 2)
  2. PWM Bottom phase 1 (Pin 3)
  3. PWM Top phase 2 (Pin 6)
  4. PWM Bottom phase 2 (Pin 7)
  5. PWM Top phase 3 (Pin 10)
  6. 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 JP5.

  1. Throttle input, 0-3.3V (Pin 6). Cutoff frequency 16Hz, input resistance 10k.
  2. Regen pot input, 0-3.3V (Pin 8). Cutoff frequency 16Hz, input resistance 10k.
  3. KTY83 temperature sensor input (Pin 22 positive, Pin 21 negative). Cutoff frequency 16Hz

There are 4 internal analog inputs on JP4. Pins 5,7 and 10 provide a GND connection, Pin 8,11 and 12 provide stablelized 5V.

  1. Udc (Pin 4) Bus voltage input. 0-3.3V, cutoff frequency 16Hz
  2. Il1 (Pin 6) Current phase 1. 0V=-Imax, 1.67V=0A, 3.3V=Imax (software configurable). Cutoff frequency 48kHz.
  3. Il2 (Pin 9)
  4. Heatsink temperature (Pin 13)

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.

Encoder Input

There is an input for a pulse encoder on JP5. 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).

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.

Additionally Pin 4 can be connected to an index pulse for future use with synchronous motors.

Pin 2 provides 5V with an output resistance of 120 Ohms to power the diode of an optical encoder with 30mA. You can bridge R7 to obtain plain 5V.

Communication

JP6 provides a TTL level (3.3V) UART interface. It can be directly connected to the provided TTLUSB adapter. Pin 1 provides the 3.3V net of the Olimex board. It can be used to power the board or to power an external module like a ZigBee or bluetooth transceiver. 100mA should not be exceeded. Pin 2 is TX, Pin 3 is RX and Pin 4 (next to the inductor) is GND.

The communication parameters are fixed to 115200 8N2 (2 stop bits!).

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

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 JP5

Pin Name
1 Encoder channel B
2 30mA output for IR diode
3 Encoder channel A or single channel input
4 Index pulse input
5 Cruise Control Input (12V)
6 Throttle Input (0-3.3V)
7 Start input (12V)
8 Regen Pot Input (0-3.3V)
9 Brake Input (12V)
10 Brake output (open collector 0.5A)
11 Motor Protection Switch (12V, PWM inhibit when low)
12 DC contactor output (open collector 1A)
13 Forward (12V)
14 Error Signal (open collector 0.5A)
15 Reverse (12V)
16 Over/Under Voltage (open collector 0.5A)
17 Emergency Stop (12V, PWM inhibit when low)
18 Temperature PWM output (open collector 0.5A)
19 BMS Over/Under Voltage input (12V)
20 Precharge Output (open collector 0.5A)
21 Motor Temperature Input -
22 Motor Temperature Input +
23 GND
24 Vcc (7-26V)
25 CANL
26 CANH