High Voltage source - dalathegreat/Battery-Emulator GitHub Wiki

Options for high voltage precharge

The MEB battery, but also CCS charge ports require an external high (precharge) voltage to be applied before contactors are closed.

One of the options is the HIA4V1 board original or modified for Lilygo or Stark CMR.

[!CAUTION] The default precharge code will use the PRECHARGE contact to generate the PWM signal, Stark CMR has relay connected to the output, which will fail early when exposed to this PWM for a longer time.

HIA4V1

The HIA4V1 has been used successfully to precharge the MEB battery's inverter port. It can be found on aliexpress. Without modification it requires manually tuning the resistor (marked 104 in the picture below) to match the external voltage to the internal battery voltage. Given the thin traces on the board, it is probably a good idea to put a circuit breaker between the battery and this board.

image

image

Modified HIA4V1 directly controlled via digital output ESP32 (for Lilygo and Stark CMR)

The HIA4V1 contains a 555 based oscillator, with the output connected to a MOSFET. This MOSFET is 3v3 compatible, which means we can directly control it from an ESP32 based board like the lilygo.

To do this:

  • first remove the 620 ohm smd resistor (marked 621) from the board. Easiest way to do this is put some solder on top of the resistor such that it covers both ends, melting the solder of both ends and thus releasing the resistor.
  • In place of the above resistor, on the pad closest to the MOSFET, solder a small wire.
  • Connect this wire via a 330 ohm resistor to a pin on the lilygo (eg. io25) or Stark CMR (eg. io19 GPIO header).
  • Solder a gnd wire to gnd pin of the connector on the underside of the board (if the low voltage gnd of the HIA4V1 is already shared with the lilygo, this step is not necessary). And connect this to the gnd of the lilygo or connect to GND of Stark CMR GPIO header

image image

By using the ledcWriteTone(PRECHARGE_PIN, freq); function you can now tune the voltage.

Results while powering the board with 12V:

  • 23kHz : 370V
  • 28kHz : 390V

ledcWrite(PRECHARGE_PIN, 0); to turn the output off.

Note that these values depend on the current the HIA4V1 has to provide. I also biased my board with 4x 140k resistors in series across the HV output (4x to increase voltage handling capability), to prevent very high output voltage in no-load situations (which may damage connected equipment).

Modified HIA4V1 for control via FET board (possible for Lilygo and Stark CMR)

HIA4V1 modifications:

  • Remove 6 (marked) components on the primary side of the transformer
  • Bridge the primary side of the coil to the power pin (A)
  • Add the output bias resistors 4x 140k (or equivalent) on the HV output pins, protected with shrinksleve (B)
  • Clearly mark the polarity of the HV output to avoid confusion

Frontside modifications - Components to be removed and output polarity marking: image

Backside modifications - Bridge from coil to power pin (A) and HV bias resistors (B) image

This method can also be used with the Lilygo HW if a seperate FET board is used, any MOS FET that works with 3V3 siganl will work.

ToDO add link, for now google for: 15A 400W MOS FET Trigger Switch Drive Module PWM Regulator

Wiring diagram: image

Decoupling inverter from battery during precharge

During precharge the inverter will see a high voltage on its inputs pins. The inverters we have tested on will use this a trigger to startup. This will put a load on this high voltage while the contactors of the battery are not yet closed. This load will disrupt the precharging sequence and will cause the precharge to fail. In order to prevent this we decouple the positive input from the inverter while precharging. This is done via a normaly closed (NC) high voltage contact. When the precharge sequence is active, this contact will be opened, decoupling the battery and precharge circuit from the inverter. We use a normally closed contact, because this does not require any power during normal operation.

Type used: SEV100ADXL (1NC contact and controlled via 12V) Link to contactor or google for: Sayoon SEV100AD SEV100BD Hv Dc-relais 100A

The connection is added to the schematic above

Software configuration (Lilygo or Stark CMR)

Make sure to enable the #define PRECHARGE_CONTROL option in the USER_SETTINGS.h file https://github.com/dalathegreat/Battery-Emulator/blob/main/Software/USER_SETTINGS.h

The precharge code itself is located in the folder Software/src/communication/precharge_control/precharge_control.cpp

https://github.com/dalathegreat/Battery-Emulator/blob/main/Software/src/communication/precharge_control/precharge_control.cpp

At the time of writing (release 8.13.0) both Lilygo and Stark CMR are support out of the box.

The mapping of the pins towards the physical hardware can be found in the corresponding file linked to the hardware you use, located in the directory Software/src/devboard/hal. Make sure to double check the connection is as expected.

https://github.com/dalathegreat/Battery-Emulator/tree/main/Software/src/devboard/hal