Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The precharge circuit runs entirely based on hardware (i.e. no firmware is required). 

                                                                                                         

 Fig 1. Pre-

...

Charge HV - HV line for pre-charging

Figure 1 shows the high voltage side of the pre-charge board. HV_IN is where the circuit is connected to the battery. The two MOSFETs connected in parallel act as a switch which connects our HV line to the motor controllers. The MOSFETs are put in parallel because parallel MOSFETs will balance out, distributing the current a bit and overall handling the load better. This switch will also disconnect the pre-charge circuit once the pre-charge is complete. The line contains four power resistors before the motor controller each rated at 100W, limiting the inrush current. After the motor controller is two resistors in parallel which act as discharge resistors. 

...

  • MOSFETs 
    • N-channel vs P-channel
    • Parallel MOSFETs
  • Power resistors vs normal resistors

                 

Fig 2. Pre-charge Charge HV - power resistors                 Fig 3. Pre-charge Charge Logic - comparator

Fig 1 shows the power resistors used to limit the current when pre-charging with two voltage dividers connected to either side. The voltage dividers connected to the left and right sides of the power resistors are used to compare the voltage of the battery and motor controllers and set to reduce the 150V from the HV line to 9.39V on the battery side and 9.84V on the motor controller side. Basically, if the pre-charge circuit is on, IN- will be 9.34V, and IN+ will rise from 0V to 9.84V. Aside from lowering the voltage, the resistances used in the voltage dividers are set such that when the motor controller reaches 95% of the voltage on the battery side, IN+ will be greater than IN-.

Fig 2 shows an op-amp comparator taking in IN+ and IN- as its non-inverting and inverting inputs respectively. This comparison will output a logic high when IN+ is greater than IN-, effectively signaling that the motor controller has reached 95% of the battery's voltage and pre-charge is complete. The op-amp is set with a positive feedback loop to prevent the comparator output from outputting a logic high when the op-amp is powered but its inputs are unpowered. This is an issue as, bouncing between logic high and logic low which may happen when the circuit is transitioning from a logic high to a logic low, it may bounce multiple times. The positive feedback latches the output to a logic high and makes it so there must be a significant difference between IN+ and IN- to switch the output. 

Things to research

  • Op-amps and op-amp comparators
  • Negative feedback and positive feedback


           Image Added

     Fig 3. Pre-Charge Logic - AND gate                 Fig 4. Pre-Charge Logic - SR Latch

Using only the comparator shown above presents another problem whereby the comparator may output a logic high when the op-amp is powered but its inputs aren't, such as when the battery relay to the pre-charge circuit is open. The AND gate solves this by taking in the comparator's input as well as a reading from IN+, or the motor controller side of the pre-charge circuit. This way, the AND gate will only output a logic high if the comparator signals pre-charging is finished, and the motor controller is indeed charged. The MOSFETs act as a resistive switch converting the IN+ reading to something that matches the comparator's logic high. 

An SR latch (the IC in figure 4) is placed after the AND gate in order to latch the output of the AND gate. So long as the enable (ENA) pin is powered, the latch works like a normal SR latch with S4 and R4 corresponding to set and reset for the output Q4. A capacitor is placed between the reset pin and its source to keep the reset input low for a short amount of time.