LM3S811 measuring AC effective value

Publisher:静雅心灵Latest update time:2015-06-19 Source: ednchinaKeywords:LM3S811 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  I have a TI LM3S811 development board. Although it is not a professional ADC, it contains a 4-channel ADC with a sampling rate of 500kbps, a 10-bit resolution, and a range of -1.5V~1.5V or 0V~3V. It also has an analog comparator, which should be enough to measure the effective value of AC. It depends on how much it can measure. I have a project that needs to measure a signal of 400Hz and a maximum of ±12V. Taking this as an example, how can I maximize the ability of this chip ADC to measure the effective value of AC?

  In aviation electrical, synchro, and rotary transformer, it is necessary to measure several signals at the same time. In this case, we must first consider whether the chip has the possibility of synchronous measurement. Assuming that one of the signals is, it can be expressed by V=Acos(wt), where A is the amplitude and w is 2*pi*400Hz. The ADC range is -1.5V~1.5V or 0V~3V, with a resolution of 10bit, and the minimum voltage resolution is 3/1024=2.93mv. The sampling rate of 500bps corresponds to 2us. Haha, the interval between the 4 channels is 6us. If the change within 6us is less than 2.93/2=1.46mv, the error of the collected data is only determined by the resolution of the ADC. For this chip, it is synchronous acquisition. For a 400Hz signal, its amplitude changes by 1.46mv/6us/400Hz=0.6v in each cycle, while the amplitude of the signal is only 1.2v. It is impossible for the amplitude to change by at least half in one cycle, so theoretically it can meet the requirements of synchronous acquisition.

  There are several ways to measure the effective value of sinusoidal AC. One is to convert AC into DC through a detector circuit composed of diodes and capacitors, but this method has large errors for low-frequency signals such as 400Hz, so give up. One is to measure with a dedicated chip such as AD736. I haven't checked the data sheet for accuracy, and the price is not cheap, so give up. One is direct ADC sampling, which can collect multiple times to calculate the area, or only measure the maximum value. This method is the best for measuring low-frequency AC of 400Hz.

  At first, we wanted to measure directly. The LM3S811 has an analog comparator, which can easily know the beginning of each cycle. For a 400Hz sine wave signal, the maximum value can be accurately collected at its 1/4 cycle, and the ±12V AC signal can be divided into ±1.2V by resistors. For the ±1.5 range, there is still a 25% margin. However, for a symmetrical waveform like a sine wave, half of the information is wasted, and the voltage resolution that can be measured is only 3V/1024=2.93mv, which corresponds to 2.93mv*10=29.3mv for the AC signal.

  Then I thought of using multiple sampling to calculate the area. For most signals, multiple sampling can improve the accuracy, and anti-interference measures can be added to the software algorithm. However, it is powerless for signals with an amplitude less than 29.3mv.

  Since the AC signal is symmetrical, if only the upper half wave is collected and expanded to the entire ADC range, the accuracy can be doubled. However, the diode cannot be accurately half-wave rectified with 0 as the boundary. It needs more than 0.7v to conduct, and there is an error of 0.7v relative to the original signal, which is much more serious than the above 29.3mv. After thinking for a few days, since it is not possible to divide accurately with 0v as the boundary, it can be divided by -0.7v or even -1v, and then corrected in the software. At least the signal collected by the ADC should be accurate.

  As shown in Figure 1, T3 is the signal after resistor voltage division, and T4 is the signal after conditioning. Although I have looked through the datasheet of LM3S811 and have not seen the input voltage limit of its ADC, and have not tested what will happen if a negative voltage is input when it is set to 0v~3v, I think it can measure 0v~3v and -1.5v~1.5v, and there should be no problem with inputting -1v~3v voltage. If the negative voltage is directly treated as 0v, I don’t have to modify it in the software. If this method is feasible, the accuracy of the measured signal should be 14.6mv, and the corresponding AC voltage is 10mv, haha.

 

image002.gif

        Figure 1 Schematic diagram

 

image004.jpg

        Figure 2 Transient analysis diagram

  In summary, if the frequency of the AC signal changes, the area can be calculated by multiple sampling. If the frequency of the AC signal is fixed and not high, which is the most common case, the period can be accurately calculated using an analog comparator, and the ADC only needs to measure the maximum value at 1/4 period when collecting the signal. This way, the calculation is less and the accuracy can be satisfied. At the same time, it is considered to be synchronous collection. For signals with effective values ​​below 15/1.414=10.6v, the accuracy can reach 10mv, reaching the limit of 10-bit ADC, making full use of it.

Keywords:LM3S811 Reference address:LM3S811 measuring AC effective value

Previous article:Uncovering the secrets of testing and measurement - Test every Monday [Week 11]
Next article:Design of 1Hz-64MHz digital frequency meter

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号