1828 views|1 replies

2618

Posts

0

Resources
The OP
 

C2000 built-in comparator error sources and correction methods--F28004x, F2807x, F2837x [Copy link]

C2000 series chips are widely used in digital power supply and motor control, in which overcurrent and overvoltage protection are essential. TI's Picollo series chips, starting from F2802x, have integrated an on-chip comparator with DAC. The threshold is set by DAC, and the sampling signal is sent to the positive and negative input terminals of the on-chip comparator for comparison. The protection signal is generated and sent to the PWM module to block the PWM output, thereby achieving overcurrent and overvoltage protection with fast response speed and no need for additional comparators and reference voltages.

The built-in comparators of the C2000 series chips can be mainly divided into the following two categories:

Comparator Type

Features

Covering Chip

Comparator module(COMP) type0

Each COMP has a 10-bit DAC and a comparator.

2802x, 2803x, 2806x M35x, M36x

Comparator subsystem(CMPSS) type0

Each CMPSS has 2 12-bit DACs and 2 comparators.

F2807x, F2837xD, F2837xS, F28004x

Regardless of the type of comparator mentioned above, its positive input terminal is directly connected to the ADC sampling port (this port is used to sample the information that needs to be monitored, such as voltage or current), and the negative input terminal can be connected to the internal DAC output or another ADC sampling port. This article will take the example of connecting the negative terminal of the comparator to the internal DAC output (this is also the most common usage) to introduce the possible error sources of the internal comparator and their correction methods.

Sources of error:

  1. static offset error, static offset error.
  2. Comparator Hysteresis
  3. The difference between the ADC reference and the comparator internal DAC reference.

1. Static offset error

Now suppose that the comparison threshold we want is 1.5V. When the comparator positive input voltage is greater than 1.5V, the comparator output is 1 (high level); when the input voltage is less than 1.5V, the comparator outputs 0 (low level). If the internal DAC reference is 3V, then we need to set DACVAL to 2048 to make the DAC output 1.5V. In the case described above, there are two places where errors will be introduced, one is the internal DAC error (offset error), and the other is the comparator error (input referred offset error). These two errors are collectively called static offset error.

For the F28004x, F2807x, and F2837x series chips, the parameter static offset error is listed in the specification, which is ±25mV. In other words, although theoretically DACVAL=2048 can get a threshold of 1.5V, due to the static offset error, the voltage at the negative end of the comparator may be between 1.475V and 1.525V when the comparator flips, and you don't know what this value is, so calibration is required. The calibration method is to connect a threshold level you need to the positive end of the comparator, turn off the internal comparator hysteresis loop, and let the comparator's DACVAL gradually increase from 0 to 4095, and then gradually decrease to 0. In this way, the comparator output will flip twice, and the average of the DACVAL values during these two flips is the DACVAL value corresponding to the corrected threshold voltage.

If the internal DAC is not used to generate the comparison threshold, and both the positive and negative terminals of the comparator are connected to external signals, then only the error of the comparator needs to be considered.

2. Comparator Hysteresis

The hysteresis of the C2000 comparator can be set. The COMPHYS bit of COMPHYSCTL can set the width of the hysteresis. When the width is set to 0, it means there is no hysteresis. Note that in the specification, the unit of hysteresis is LSB, so it is related to the reference of the DAC inside the CMPSS module. If the reference voltage of the internal DAC is 3V, 1LSB corresponds to 3V/4096=0.7mV. Taking F28004x, F2807x, and F2837x as examples, the hysteresis can be selected from 12LSB, 24LSB, 36LSB, and 48LSB.

It should be noted that after adding the hysteresis, the threshold of the comparator flipping from 0 to 1 is still the previously calibrated value, and will not become (calibrated value + 1/2*hysteresis width), while the threshold flipping from 1 back to 0 will become (calibrated value - hysteresis width), as shown in the following figure:

查看详情

3. Differences between ADC reference and comparator internal DAC reference

In actual systems, in addition to using comparators for hardware protection, it is also common to use AD sampling for software protection. For the same voltage or current signal, after considering the aforementioned static offset error and hysteresis, sometimes we will find that the value obtained by ADC sampling does not reach the threshold of the comparator DAC output, but the comparator still flips, and the difference may even be as much as 200 LSB. This is because the reference voltage of the chip ADC is different from the reference voltage of the DAC inside the comparator.

Taking F28004x, F2807x, and F2837x as examples, the internal DAC reference of the comparator comes from VDDA by default and can be configured as VDAC, while the ADC reference comes from VREFHI. The default power supply of VDDA is 3V, and the internal ADC reference VREFHI we often use is 3.3V. In this way, if our comparator DACVAL is set to 2048, the comparator will flip at 1.5V, and the value sampled by the ADC at this time is only 1.5V/3.3V*4096=1862. This is because the difference between the ADC reference and the internal DAC reference of the comparator is different. For signals that require both hardware protection and software protection, this needs special attention. The simplest solution is to configure the internal DAC reference of the comparator as VDAC, and connect VDAC to VREFHI at the same time to make the two references consistent.

in conclusion

This article takes F28004x, F2807x, and F2837x chips as examples to introduce the error sources and correction methods of the built-in comparator, and corrects the misunderstanding of the comparator hysteresis. For systems where the same signal requires both software protection and hardware protection, we point out the reasons that may cause deviations in the software and hardware protection thresholds, and provide solutions. Correct use of the internal comparator of the C2000 chip can achieve fast software and hardware protection and improve the overall reliability of the system. At the same time, it does not require external references and comparators, saving PCB space, and is a very practical module.

This post is from Microcontroller MCU

Latest reply

Thanks for sharing, let’s play with F28004x.   Details Published on 2020-9-28 21:18
 

7422

Posts

2

Resources
2
 

Thanks for sharing, let’s play with F28004x.

This post is from Microcontroller MCU
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list