At present, the main method used to measure microcapacitance is the AC method. Its measurement principle is to continuously charge and discharge the measured capacitance through the excitation signal to form a voltage or current signal proportional to the measured capacitance, thereby measuring the measured capacitance value. The signal measured by this method has pulsating noise, and its pulsating component needs to be filtered out by a filter, but the introduction of the filter will reduce the speed of signal acquisition of the measurement circuit. Therefore, this paper designs a microcapacitance measurement circuit based on the charge amplification principle. The analog switch used in this circuit has a charge injection effect, which affects the resolution of the circuit. In order to solve this problem, this paper starts with the charge injection effect in the microcapacitance measurement circuit, analyzes the charge injection effect of the analog switch, designs the switch timing in combination with the single-chip microcomputer, and simulates the circuit designed based on Proteus and Keil software to verify the rationality of the design.
1 Charge injection effect in microcapacitance measurement circuit
The micro-capacitance measurement circuit based on the charge amplification principle is shown in Figure 1.
Figure 1 Microcapacitance measurement circuit based on charge amplification principle
In the figure, Vin is the excitation voltage source for charging and discharging, CX is the capacitance between the two plates of the sensor, i.e. the capacitance to be measured; S1~S5 are analog switches; op amp A1, capacitor Cf, resistor Rf and switch S3 constitute a charge amplifier; switches S4 and S5 and op amps A2 and A3 constitute two sample-and-hold devices, and A4 is an instrument amplifier. The analog switch is basically composed of an NMOS tube and a PMOS tube in parallel. It is a tri-stable circuit that can determine the state of the input and output terminals according to the level of the strobe terminal. When the strobe terminal is in the strobe state, the state of the output terminal depends on the state of the input terminal; when the strobe terminal is in the cut-off state, the output terminal is in a high-impedance state regardless of the input terminal level. [page]
The charge injection effect of the analog switch is the main factor affecting the resolution of the circuit. The charge injection effect mechanism has two main aspects: one is caused by the channel charge, as shown in Figure 2(a). According to the principle of MOS devices, when a MOS tube is in the on state, the inversion layer of the SiO2-Si interface stores a certain amount of charge. When the switch is turned off, the charge flows out through the source and drain ends and flows into the measurement circuit; the other is caused by the charge stored in the parasitic capacitance between the gate source and the gate drain being released and flowing into the measurement circuit [3-4], as shown in Figure 2(b). The error caused by the charge injection effect is much larger than the value of the measured CX, causing the charge injection effect.
2 Analysis of Charge Injection Effect of Switch
The electronic switch control timing design diagram is shown in Figure 3.
First, disconnect S3, and the circuit is only affected by the charge injection effect of S3. When switch S3 is disconnected, due to the charge injection effect, the charge will flow to the output and inverting input of A1. The charge flowing to the output of A1 has little effect, causing only a momentary slight distortion of the output waveform, while the charge flowing to the inverting input of A1 affects the measurement result, but A4 adopts a differential design to better solve this part of the impact. [page]
Charge injection effect on switches S1 and S2. As shown in Figure 3, S2 is turned off later than S3, and S1 is turned off later than S2. The charge injection effect when S2 is disconnected causes a small waveform distortion at point V1. When S1 is turned off, despite the charge injection effect of S2, V1 is set to the input voltage Vin. Therefore, the voltage on the measured capacitor Cx is not affected by the charge injection effect of S2; when S1 is disconnected, the injected charge will flow to the ground along the closed switch S2, and S1 will not affect the measured capacitor Cx. Therefore, S1 and S2 have basically no effect on the output.
The charge injection effect on switches S4 and S5. When S4 and S5 are disconnected, the charge injection effect will cause a slight distortion in the output waveforms of A2 and A3, but it is small relative to the output value and can be ignored. In addition, the differential input structure of A4 will cancel out the charge injection effects of S4 and S5, so the charge injection effect of S4 and S5 will not affect the final output Vo.
From the above analysis, it can be seen that the charge injection effect introduced when it is turned off is solved by reasonably designing the analog switch control timing.
3.1
Introduction to Keil C51
Keil is a microcontroller compiler developed by Keil, Germany. Keil C51 is currently the most popular 51 microcontroller development tool. Keil's compiler now has versions that support classic 80C51 and 80C51 derivatives. The new version μVision2 seamlessly combines the analog debugger dScope used by μVision1 with the integrated development environment, with a more friendly interface, easier to use, and supports more microcontrollers. For users who use C language for microcontroller development, Keil C51 has become an essential development tool.
Keil C51 software is one of the excellent software for microcontroller application development. Keil C51 provides an integrated development environment IDE (Intergrated Development Environment) Vision, including C51 compiler, macro assembler, connector, library management and a powerful simulation debugger. It supports assembly, PLM language and C language programming, with a friendly interface and is easy to learn and use. In the process of developing application software, editing, compiling, assembling, connecting, debugging and other stages are integrated in one environment. First, write the program with the editor, then call the compiler to compile, and then run it directly after connecting [5,6].
This software is developed using Keil C51, and the program is highly readable.
3.2 Introduction to Proteus
The Proteus embedded system simulation and development platform was developed by Labcenter Electronics in the UK. It is currently the most advanced and complete embedded system design and simulation platform in the world. It is currently the only EDA tool that can perform real-time simulation, debugging and testing of various microprocessors. In addition to the same functions as other EDA tools, such as schematic layout, automatic or manual PCB wiring, and circuit simulation, Proteus has the greatest feature that its circuit simulation is interactive. For microprocessor applications, programming can be done directly on a virtual prototype based on the schematic diagram, truly realizing system debugging, testing, and verification without a hardware target prototype, and achieving real-time debugging at the software source code level. If there is display and output, the input and output effects after running can also be seen. With the virtual instruments configured in the system, such as oscilloscopes and logic analyzers, a complete electronic design and development environment has been established. The Proteus product series can simulate microcontroller-based designs together with all peripheral electronic devices and instruments. Users can even use dynamic peripheral models such as LED/LCD, keyboards, RS232 terminals, etc. to interactively simulate the design in real time.
Proteus is a circuit analysis and physical simulation software that runs on the Windows operating system. It has the characteristics of rich experimental resources, short experimental cycle, low hardware investment, low loss during the experimental process, and a high degree of closeness to the actual design [7-9].
4 Design and simulation of switch timing
The schematic diagram of switch timing design is shown in Figure 4, in which the 80C51 chip is used, in which pins XTAL1 and XTAL2 are connected to the clock controller, the RST terminal is powered on, and the five output pins P1.0~P1.4 control switches S1, S2, S3, S4 and S5 respectively, and the power supply VCC is a +5 V DC power supply.
4.1 Program Design
Compile the program shown in Figure 5 on the Keil platform.
The program code is as follows:
#include
#define uchar unsigned char
#define uint unsigned int
sbit s1=P1^0; //Control switch 1
sbit s2=P1^1; //Control switch 2
sbit s3=P1^2; //Control switch 3
sbit s4=P1^3; //Control switch 4
sbit s5=P1^4; //Control switch 5
bit flag,flag1,flag2,flag3;
uchar ds,ds1,ds2,ds3;
uint jishi;
void Initialization() //Initialization function
{
EA=1;
ET0=1;
TMOD=0X02; //Timer working mode is 2
TH0=0x06; //Timing 250 ?滋s
TL0=0x06;
TR0=1;
s1=0;
s2=1;
s3=1;
s4=1;
s5=1;
flag1=1; flag2=0; flag3=0;
}
void inte() interrupt 1 using 3 //1s interrupt processing function
{
if(++jishi==40) //time interval 4000×250 ?滋s=1 s
{
jishi=0;
if(flag1){ds1++;}
if(flag2){ds2++;}
if(flag3){ds3++;}
}
}
void main ()
{
Initialization();
while(1)
{
if(flag1)
{
if(ds1==4){s3=0;}
if(ds1==11){s5=0;}
if(ds1==12){s2=0;}
if(ds1==13){s1=1;}
if(ds1==20){s4=0;flag1=0;flag2=1;}
}
if(flag2)
{
if(ds2==1){s3=1;}
if(ds2==2){s5=1;}
if(ds2==9){s2=1;}
if(ds2==10){s1=0;}
if(ds2==17){s4=1;flag2=0;flag3=1;ds2=0;}
}
if(flag3)
{
if(ds3==7){s3=0;}
if(ds 3==14){s5=0;}
if(ds3==15){s2=0;}
if(ds3==16){s1=1;}
if(ds3==23){s4=0;flag2=1;flag3=0;ds3=0;}
}
}
}[page]
4.2 After writing the program code, load the program file into the current project for
compilation. After the compilation is successful, perform the simulation. Click the Go menu item under the Debug menu to run the program continuously, and then switch to the Proteus interface. You can see that the circuit starts to simulate and run. The result is shown in Figure 6, achieving the expected function.
By analyzing the simulation results and the real-time operation of the LED, the correctness of the program and peripheral circuit design of the entire system was verified, and the debugging efficiency was improved. The use of this simulation design method can greatly simplify the hardware circuit testing and system debugging process, and the use of this method to successfully develop the system virtual development before actual production can improve development efficiency, reduce development costs, and increase development speed.
References
[1] Bai Guohua. Research and study on capacitance sensor measurement circuit [D]. Taiyuan: North University of China, 2005.
[2] Qiu Guiping. ECT system measurement circuit simulation and data acquisition system design [D]. Harbin: Harbin University of Science and Technology, 2007.
[3] Zhou Lili. Research on MEMS capacitive micro-accelerometer detection circuit [D]. Hefei: University of Science and Technology of China, 2008.
[4] Wang Lei, Wang Baoliang, Ji Haifeng, et al. New weak capacitance measurement circuit of capacitance sensor [J]. Journal of Sensor Technology, 2002 (4): 273-277.
[5] Niu Yuguang. Principle and interface technology of single chip microcomputer [M]. Beijing: Electronic Industry Press, 2008.
[6] Jian Xianzhong, Yu Jing, Xiong Xiaojun, et al. LED dot matrix display system based on 80C51 and KEIL C51 [J]. Chinese Journal of Instrumentation, 2005, 26 (8) Supplement:
315-316.
[7] Wu Fengjie, Xie Chenyue, Xie Bin. Application of Proteus and Keil in single-chip microcomputer open experiment [J]. Electronic Measurement Technology, 2008, 31(6): 100-104.
[8] Liu Yingqun. Integration of Proteus and Keil to build single-chip microcomputer virtual laboratory [J]. China Modern Education Equipment, 2005(8): 11-13.
[9] Cao Jianshu, Zeng Linchun, Xia Yunsheng. Simulation of virtual waveform generator based on Proteus and Keil interface [J]. Journal of Beijing Institute of Petrochemical Technology, 2008, 16(3): 9-11.
Previous article:Working Principle of DDS Chip AD9850 and Analysis of Its Interface with Single Chip Microcomputer
Next article:Design and implementation of IAP system based on C8051F microcontroller
Recommended ReadingLatest update time:2024-11-16 16:21
- 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
- PoE and PoE+, an article to understand Power over Ethernet
- How to control trace impedance of PCB for signal integrity?
- Disassembling the USB wireless network card, the circuit scheme is very classic
- Low-cost MCU options
- 5G millimeter wave antenna
- Design of Switching Power Supply Using MSP430 Microcontroller
- Analog Electronics Course Selection Test
- About SPI mode setting
- [Sipeed LicheeRV 86 Panel Review] 14. lvgl displays images and local time
- LCD screen problem