Power factor is an important parameter in AC circuits, an important indicator for measuring whether the power system is operating economically, and an important detection quantity for the online monitoring system of the power supply line. It needs to be measured in real time in the power factor compensation system [1]. Therefore, it is very necessary to design a power factor online detection circuit with simple structure and high detection accuracy. The measurement of power factor generally requires sampling the voltage and current of the circuit under test, and then processing and extracting the power factor signal. It usually consists of voltage and current sampling circuits, shaping circuits, synchronous cycle measurement, phase measurement, etc. Its disadvantages are that the structure is complex and difficult to repair. Sometimes the power factor measurement accuracy is not high [2]. To this end, the author analyzes and calculates the power factor of the circuit under test based on voltage sampling, and displays the size of the power factor through the display circuit, and transmits the measured power factor over a long distance through the communication interface circuit. This not only simplifies the structure of the power factor measurement circuit, improves the measurement accuracy of the power factor, but also enhances the function of the power factor detection circuit.
2. Principle Analysis
The principle of detecting the power factor by extracting the voltage is shown in Figure 1 (a). First, three high-precision WB series digital AC voltage true RMS sensors are used to detect the power supply voltage U1 of the circuit under test, the voltage U2 across the additional adjustable resistor RP, and the load voltage U3. The function of the adjustable resistor RP is to make the additional resistance as small as possible to reduce the impact on the load under test, and to obtain a voltage
U2 with an appropriate value to meet the requirements of power factor calculation. According to circuit theory [3], the phasor diagram of voltages U1, U2 and U3 can be drawn as shown in Figure 1 (b), and COSϕ
is the power factor of the load under test.
Figure 1 Schematic diagram of voltage measurement principle and voltage phasor diagram
According to the cosine theorem in geometry,
From formula (2), we can know that as long as the voltages U1, U2, and U3 are calculated, the power factor COSφ of the load can be obtained. In order to reduce the hardware overhead of the measurement circuit, the data processing and calculation are completed by the microcontroller software.
3. Microcontroller input and output circuit design
The microcontroller input and output circuit mainly processes the voltage signal detected by the sensor, mainly including signal conversion, calculation, storage, and display of the power factor and data transmission. For this reason, we designed a circuit composed of a microcontroller and related components as shown in Figure 2.
[page]
The MCU is the PIC16F877 MCU, which is one of the MCU series with the most integrated peripheral modules and the most powerful functions [4]. The MCU chip has an 8-channel, 10-bit resolution digital-to-analog converter ADC module and a 4K FLASH program memory. The RA port is a bidirectional I/O port with only 6 pins. It combines the A/D converter function on the basis of the basic input/output function. The port direction controller can define the port pin as input or output. RB and RC are 8-pin input/output programmable interfaces respectively. Each I/O port can provide or absorb 20mA of current, can directly drive light-emitting diodes and solid-state relays, and has a watchdog circuit. It has the characteristics of simple external circuit structure, easy use, and reliable performance. The power factor is directly output by the microcontroller through a 4-bit red high-brightness digital tube to display the power factor with a display accuracy of 0.001.
The three detection voltages are input to the microcontroller through the RA0, RA1, and RA2 pins of the input interface RA. The power factor is first converted into a digital signal by the A/D converter and saved, and the converted data is displayed in real time through the RC and RB interfaces. In addition, it can also communicate with the monitoring system through the serial interface to transmit the power factor of the line to the monitoring system in a timely manner. There are currently two commonly used serial communications [5], one is RS-232 serial communication, and the other is RS-485 serial communication. However, since the serial input and output interfaces of the PIC16F877 microcontroller are both TTL or CMOS levels, and the PC of the monitoring system is usually an external bus standard serial interface of the RS-232 specification and uses negative logic, the serial input and output interface levels of the PIC16F877 microcontroller do not match and need to be converted. Here, the MAX232 chip is used to implement the level conversion function. The peripheral circuit of the MAX232 chip is simple, and only four 0.1μF capacitors are needed.
4. Software Design [6]
The main task of the software is to complete A/D conversion, data calculation, display and communication. For convenience, the software is written in a modular structure. The main program mainly includes program initialization, subroutine calling, display, etc.
(1) A/D conversion subroutine
This subroutine mainly selects the A/D input channel and the A/D conversion clock; sets the A/D interrupt and opens the corresponding interrupt enable bit; waits for the required sampling time; starts the A/D; waits for the A/D to complete; reads the A/D conversion result and stores it in the specified storage unit.
(2) Digital filtering subroutine
In order to avoid the interference noise generated in the industrial field causing errors in the power factor measurement, digital filtering is added during software design. There are usually many digital filtering methods, and the median filtering method is used here. That is, the voltages U1, U2, and U3 are sampled continuously for 5 times, and then these sampled values are sorted and the middle value is selected. This filtering method is more effective in filtering out pulse interference.
(3) Operation subroutine
First, the voltages U1, U2, and U3 after digital filtering are read in, and then the square operation is completed through the multiplication instruction to obtain U12, U22, and U32, and then the subtraction, multiplication, and division operations are performed to finally obtain
, that is, the measured power factor is obtained.
The task of the communication subroutine is to complete the initialization of serial communication. The synchronous asynchronous receiving and transmitting module (USART) of the PIC16F877 microcontroller uses the RC6 and RC7 pins of the C port as a two-wire serial communication interface. In order to make the USART work in the sending and receiving states respectively, the bit 7 of the receiving state and control register of the USART and the bit 7 of the TRISC register are first set to 1, and the bit 6 of the TRISC register is set to 0. Secondly, to make the USART work in asynchronous communication mode, the sending and receiving rates, i.e., the baud rate, must also be set. Finally, by setting the bit 4 of the sending state and control register TXSTA to "0", the USART is made to work in asynchronous communication mode.
5. Experiment and result analysis
In order to verify the accuracy of the online measurement of power factor, the author built a test platform as shown in Figure 4, where COSϕ is a single-phase power factor meter with an accuracy level of 0.2. During the experiment, two different loads, incandescent lamps and electric fans, were used as measurement objects to carry out power factor measurement experiments, and the experimental results were compared with the readings of the power factor meter.
[page]
Figure 4 Schematic diagram of the test circuit
S1 is the power switch, S2 is the transfer switch. When S2 is closed in the lower position, the direct reading of the power factor meter can be obtained; when S2 is closed in the upper position, the power factor measurement value of the online measurement circuit can be obtained. The test results and calculated values are shown in Table 1.
As shown in Table 1, the measured value obtained by the measurement circuit is very close to the reading of the power factor meter, indicating that the measurement circuit has good measurement accuracy. Incandescent lamps are pure resistive loads, while electric fans are inductive loads. The test shows that the power factor measurement circuit has good versatility and is suitable for both resistive loads and inductive loads. 5 Conclusion
The scheme of measuring power factor based on voltage sampling simplifies the structure of the power factor online detection circuit, reduces the cost, and improves the detection accuracy. In addition, this idea of detecting power factor also has good practical value, because in practice, voltmeters are more common than power factor meters. When there is no power factor meter at hand, the voltmeter can be used to measure the corresponding three voltages. The power factor of the load can also be calculated by formula (2), which solves the difficulty of measuring power factor without a power factor meter and brings great convenience to the measurement of power factor. However, this measurement circuit also has its shortcomings. When measuring, an additional adjustable resistor needs to be connected in series, so the measurement is not very convenient. In addition, it will affect the work of the load. Therefore, when using it, the resistance value should be adjusted as small as possible to obtain an appropriate voltage. Through experiments, we believe that the voltage can be adjusted to about 10V, which can meet the measurement requirements and will not cause too much impact on the load.
The innovation of the author of this article: By sampling the voltage of the circuit under test and calculating the power factor of the circuit under test, the power factor measurement circuit structure is simplified and the measurement accuracy of the power factor is improved. It overcomes the traditional power factor measurement, which requires the detection of voltage and current, and then the voltage and current waveform transformation to obtain the phase difference of voltage and current, and finally the power factor of the circuit under test can be obtained.
References
[1] Liu Xinping, Li Jun. Application of single chip microcomputer in motor power factor measurement [J]. Computer Engineering and Design. 2007, (2): 400-401.
[2] Zhang Jianxiong, Su Hongying, Zheng Wenzheng. Power factor measurement instrument based on electric energy metering chip [J]. Electrical Applications 2006, (4): 76-78.
[3] Qiu Guanyuan, ed., Circuits (4th Edition) [M]. Beijing: Higher Education Press, 1999.
[4] Duan Dapeng, Jiang Xiuchen, Sun Caixin, et al. Digital measurement algorithm of dielectric loss factor based on orthogonal decomposition [J]. Proceedings of the CSEE, 2008, 28(7): 127-133.
[5] He Ankun, Zhang Jingwu, Chen Ming. Implementation of serial communication between inverter and PC based on RS-485 [J]. Microcomputer Information, 2007, 10-1: 98-99.
[6] Cao Yue. Design of methane sensor based on PIC16F877 microcontroller[J]. China Science and Technology Information, 2008 (8): 128-129.
Previous article:Design of On-site Power-free Electronic Password Lock Based on 51 Single-Chip Microcomputer
Next article:Common Problems of C51 Microcontroller in Electronic Circuit Design
Recommended ReadingLatest update time:2024-11-16 23:59
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Inductor and capacitor selection for flyback circuit
- Single-ended input and double-ended output circuit
- When calculating the circuit branch current and component voltage, how to determine whether the selected loop group is an independent loop using the loop current method?
- Evaluation summary: Domestic FPGA Gaoyun GW1N series development board
- What is IoT technology?
- The Analog Engineer's Circuit Design Cookbook: Amplifiers
- TGF4042 Function Signal Generator Review: Unboxing and Trial
- Wireless Alliance names Wi-Fi 6E for 802.11ax networks using 6GHz spectrum
- Exposing unscrupulous merchants [Jimu Microelectronics Flagship Store]
- esp32,stm32: add machine.I2S to support I2S protocol