Charger Board Update

ADC Measurements

The high voltages on the inverter can be measured using the isolated voltage measurement signals. The following formula can be used to calculate the actual voltage from the scaled signal:

Vc = (Vmeas - 0.5V)*100
The VH signal voltage curve

The bare minimum high voltage resolution I would like is 0.1V.

If the maximum voltage is 500V, 500V/0.1V = 5000 levels are required to achieve the required resolution.

If the maximum scaled voltage is 5V, the smallest detectable voltage would then be 5V/5000 = 0.001V. Therefore, any noise would have to be smaller than this voltage.

The minimum number of bits is then log2(5000) = 12.29, so a 13-bit ADC would have the minimum allowable bit resolution.

The ADS1115 is a 16-bit ADC which should be able to suit the purposes of these signals.

ADS1115 breakout board

Since there are 4 inputs to the ADS1115 board, 4 of the analog values can be read and 2 can be monitored in a different way. VH, VL, GIWA and GIVA are sent to the ADS1115 and CT and GIVT are monitored using a comparator and an interrupt.

Charging Procedure

  1. Turn on HIGH side switch (0% converter PWM)
  2. Precharge the capacitor
  3. Close main contactor, once capacitor voltage has settled
  4. Increase PWM until capacitor is at the set voltage
  5. Connect the mains
  6. Adjust voltage until no current flows
  7. Adjust voltage to keep constant charging current
  8. Enter constant voltage stage when within certain range of charged battery voltage
  9. Disconnect mains
  10. Reduce PWM slowly
  11. Open contactors

The full charging procedure can be controlled with a finite state machine. An update function can be run in order to check for events and update the state machine.


There are a total of 5 relays needed for the charger. 2 main contactors each for the battery and mains and an extra precharge resistor for the battery. The battery relays are contained within the battery unit and accessible to the hybrid ECU. However, the two contactors for the mains will have to be added.

Small precharge relay (left) and main contactor (right)

As you can see from the figure, the small relay pulls 101mA and the large relays pull 353mA. Regular 2n3904 bipolar transistors can handle 200mA constant current according to their datasheet, so a darlington pair can be used for the larger contactors and a 2n3904 can be used for the precharge relay.

These relays can be controlled from the H16 Hybrid ECU connector, which is why the charging controller board should be placed in between the hybrid ECU and inverter, instead of being connected directly at the inverter.

Relay connections to the hybrid ECU

Hybrid ECU connections

The hybrid ECU has 4 connectors A (H14), B (H15), C (H16) and D (H17). Detail of each of the connectors follows. Any pin names in bold correspond to pins that are needed for the charge controller.

H14 is a 31 pin 90980-12431 connector that is connected to the power source controller, CAN bus, transponder key, cruise control, shift lever, airbag and accelerator position sensor.

  1. GND1: Chassis Ground
  2. GND2: Chassis Ground
  3. ST2: (Power Source Control ECU and combination meter)
  4. TC: (Data link connector)
  5. IGSW: Ignition switch (Transponder Key Computer)
  6. CANH: CAN High
  7. CANL: CAN Low
  8. CCS: Cruise Control Combination Switch
  9. E2X2: (Shift Lever Position Sensor)
  10. E2X1: (Shift Lever Position Sensor)
  11. VCX2: (Shift Lever Position Sensor)
  12. VCX1: (Shift Lever Position Sensor)
  13. IMI: (Transponder Key Computer)
  14. SPD1: Speed? (Power Source Control ECU)
  15. ABFS: (Airbag Sensor)
  16. VCX3:(Shift Lever Position Sensor)
  17. VSX3: (Shift Lever Position Sensor)
  18. VSX2: (Shift Lever Position Sensor)
  19. VSX1: (Shift Lever Position Sensor)
  20. IMO: (Transponder Key Computer)
  21. EP1: (Accel Position Sensor)
  22. RDY: Ready (Power Source Control ECU)
  23. VSX4: (Shift Lever Position Sensor)
  24. VCX4: (Shift Lever Position Sensor)
H14 Connector

H15 is a 35 pin 90980-12429 connector that is connected to the inverter and stop light.

  1. ILK: Inverter interlock (Inverter)
  2. ST1-: (Stop Light Switch)
  3. STP: Stop (Power Source Control ECU and Stop Light Switch)
  4. BATT: 12V battery (IGCT Relay)
  5. MSDN MG2 Shutdown (Inverter)
  6. MUU: MG2 PWM U (Inverter)
  7. MVU: MG2 PWM V (Inverter)
  8. MWU: MG2 PWM W (Inverter)
  9. GWU: MG1 PWM W (Inverter)
  10. GVU: MG1 PWM V (Inverter)
  11. GUU: MG1 PWM U (Inverter)
  12. GSDN: MG1 Shutdown (Inverter)
  13. P1: Main switch (Main SW)
  14. MFIV: MG2 Inverter Fail (Inverter)
  15. MIVT: MG2 Inverter Temperature (Inverter)
  16. MIWB:MG2 Phase current W (Inverter)
  17. MIVB: MG2 Phase current V (Inverter)
  18. OVH: Overvoltage (Inverter)
  19. GIMV: (Inverter)
  20. ET1:TOINV (Inverter)
  21. STB: (Inverter)
  22. VN: VH capacitor voltage (Inverter)
  23. GIVT: MG1 Inverter Temperature (Inverter)
  24. MIWA: MG2 Phase current W (Inverter)
  25. MIVA: MG2 Phase current V (Inverter)
  26. GIWB: MG1 Phase current W (Inverter)
  27. GIWA: MG1 Phase current W (Inverter)
  28. GIVB: MG1 Phase current V (Inverter)
  29. GIVA: MG1 Phase current V (Inverter)
  30. GFIV: MG1 Inverter Fail (Inverter)
H15 Connector

H16 is a 35 pin 90980-12428 connector that is connected to the battery relays, main relay, air con water pump relay, the boost converter, engine controller, accelerator position sensor and circuit breaker sensor.

  1. CON1: Battery precharge relay
  2. CON2: Battery positive relay
  3. CON3: Battery negative relay
  4. MREL: Main relay (IGCT Relay)
  5. WP: Air conditioning water pump relay (AC W/P Relay)
  6. +B2: Connected to +B1 12V (IGCT Relay)
  7. +B1: Connected to +B2 12V (IGCT Relay)
  8. GCNV: Converter ground (Inverter)
  9. CSDN: Converter Shutdown (Inverter)
  10. CPWM: Converter PWM (Inverter)
  11. NEO: (Engine control module)
  12. GO: (Engine control module)
  13. ITE: TOECU (Inverter)
  14. AS1: SIF+ (Circuit Breaker Sensor)
  15. ASIG: SIF- (Circuit Breaker Sensor)
  16. CLK: Clock (Inverter)
  17. FCV: Boost converter fail (Inverter)
  18. CT: Converter temperature (Inverter)
  19. OVL: Overvoltage (Inverter)
  20. NODD:
  21. VCP1: (Accel Position Sensor)
  22. VPA1: (Accel Position Sensor)
  23. EP1: (Accel Position Sensor)
  24. VL: VL boost converter voltage (Inverter)
  25. VLO:
  26. VCP2: (Accel Position Sensor)
  27. VPA2: (Accel Position Sensor)
  28. EP2: (Accel Position Sensor)
H16 Connector

H17 is a 34 pin 90980-12430 connector that is connected to the transmission control ECU, power source control ECU, MG1 and MG2.

  1. PCON: (Transmission control ECU)
  2. PPOS: (Power source control ECU and transmission control ECU)
  3. MMT: (MG2)
  4. MSNG: (MG2)
  5. MSN: (MG2)
  6. GSNG: (MG1)
  7. GSN: (MG1)
  8. GCS: (MG1)
  9. GCSG: (MG1)
  10. GRFG: (MG1)
  11. GRF: (MG1)
  12. MMTG: (MG2)
  13. OMTG: (MG2)
  14. OMT: (MG2)
  15. MCSG: (MG2)
  16. MCS: (MG2)
  17. MRF: (MG2)
  18. MRFG: (MG2)
H17 Connector