SPRADA5 April   2024 TMS320F28P550SJ , TMS320F28P559SJ-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Supplementary Information
    2. 1.2 Features
    3. 1.3 Block Diagram
    4. 1.4 Operation Modes
  5. 2Use Cases
    1. 2.1 Buffer Mode for High-Impedance Source
    2. 2.2 Battery Voltage and Current Monitoring
    3. 2.3 Low-Side Shunt Current Monitoring
    4. 2.4 Three-Phase Low-Side Current Sensing
    5. 2.5 Bidirectional Current Sensing
    6. 2.6 Non-Inverting Amplifier for Low-Voltage Sensors
    7. 2.7 Non-Inverting Amplifier for Bipolar Signals
    8. 2.8 Standalone Mode for Various Applications
  6. 3Summary
  7. 4References

Battery Voltage and Current Monitoring

In portable electronic designs, measuring battery voltage and current is essential to determine when the battery needs to be charged or replaced. The op-amps used in battery-monitoring circuits must meet accuracy requirements while consuming minimal power-supply quiescent current to prolong battery life. This section explains the circuitry for monitoring battery voltage and current in cost-optimized systems using the PGA module. Figure 2-3 illustrates a battery-voltage measurement circuit that utilizes the PGA module configured as a unity-gain buffer. To prevent violations of the amplifier’s common-mode input voltage range or output voltage swing, a resistor divider comprised of R1 and R2 divides the battery voltage. The output of the circuit can be internally or externally connected to other integrated peripherals within the device.

GUID-20230609-SS0I-KR89-N01T-KMCHHTM3XTXG-low.svg Figure 2-3 Battery-Voltage Measurement Circuit

An understanding of how well a system operates can be gained from the quantity of current flowing through the system. Comparing the current being drawn from a power supply to a pre-defined target range for that specific operating situation provides a fundamental understanding of how efficiently the system operates. Current levels exceeding the expected current level indicate that an element in the system consumes more power than expected. Likewise, if the current is lower than the expected value, this can mean that some part of the system is not powered properly or possibly disconnected.

Measuring the voltage drop across a low-side current-shunt resistor is often the most straightforward approach to determining battery and load current. Figure 2-4 shows an example of the low-side current-sensing circuit using the PGA module. The output of the circuit can be connected to other peripherals, such as the ADC and CMPSS modules, either internally or externally. For example, the CMPSS module can periodically sample the PGA output (with no CPU intervention) and trigger an interrupt when the signal crosses a threshold. The capacitor CFB is connected externally to the output of the PGA module to improve the dynamic performance.

GUID-20230609-SS0I-XSP1-TK5G-0JSKXHF2ZK8K-low.svg Figure 2-4 Low-Side Battery-Current Measurement Circuit

To customize the gain value and select the appropriate filter resistor for the PGA module, you can refer to the following code snippet. This snippet demonstrates where you can add your own code:

//
// Gain
//
#define PGA_GAINVALUE PGA_GAIN_4

//
// Filter Resistor
//
#define PGA_FILTERVALUE PGA_LOW_PASS_FILTER_RESISTOR_100_OHM

//
// P-MUX selection
//
#define PGA_PMUXINPUT PGA_PMUX_POS 

//
// N-MUX selection
//
#define PGA_NMUXINPUT PGA_NMUX_RTAP

//
// M-MUX selection
//
#define PGA_MMUXINPUT PGA_MMUX_INVERTING_GAIN_NEG

In the code snippet, PGA_GAINVALUE represents the desired gain value for the PGA module, and PGA_FILTERVALUE represents the desired value for the filter resistor RFILT. Please make sure to consult the documentation or reference manual for your specific device to find the available RFILT and gain values, and then replace PGA_GAINVALUE and PGA_FILTERVALUE with the actual values you want to use in your circuit.

In some applications, it is undesirable for the voltage potential of the load to be impacted by the voltage drop across the low-side current sensing resistor. To overcome this issue, a high-side battery current-sensing circuit using the on-chip PGA module can be utilized, which is demonstrated in Figure 2-5. This circuit monitors the total current supplied to the load in the positive power supply line. The PGA module measures the differential voltage developed across the sense resistor and sends the output to the CMPSS inverting pin and the ADC module. However, the high-side current measurement is limited to the application with battery voltage of less than VDDA.

For safety purposes, the CMPSS module can periodically sample the PGA output (with no CPU intervention) and trigger an interrupt when the signal crosses a threshold. The output of every CMPSS module can be tied directly into the Trip Zone (TZ) of any ePWM module, and the action when the signal is received is configurable in software. This means there is no software overhead to create the action in the ePWM through software.

If the divider resisters R1=Rib and R2=Ria, the output voltage of the PGA module is given by Equation 5.

Equation 2. V P G A _ O U T = R i b R i a ( R s h u n t I l o a d ) + V R E F
GUID-20230808-SS0I-CCBZ-QFV8-H15VBTTTKRCV-low.svg Figure 2-5 High-Side Battery-Current Measurement Circuit