Cierre

Multisim simulation - capacitance measurement circuit

Digital Capacitance Tester:

Capacitance is an essential electronic component in electronic design. It is widely used in electronic design. There are many types of capacitance, and the values of different types of capacitance From a few pf to a few F, it is very important to clarify the capacitance value in practical applications. This time, we plan to design a digital capacitance tester, which can intuitively display the value of the capacitance to be tested through the display. Through the literature review, this design proposes the following two system hardware implementation schemes.

Scheme 1: Using a single-chip microcontroller to realize the detection of capacitance value;

Scheme 2: Using integrated digital circuits to realize the detection of capacitance value;

Scheme comparison:

The main working principle of Scheme 1 is to convert the size of the capacitance to be measured into the number of pulses proportional to it, and then use the counting function of the internal timer of the microcontroller to count the pulses. Calculate the number of pulses per unit time, and then convert it into the corresponding capacitance value through the program algorithm inside the single-chip microcomputer, and finally use the IO of the single-chip microcomputer to complete the display drive of the display. This method has a simple circuit structure, and the system can be upgraded by modifying the program. However, the development cost of the system must be increased due to the use of a single-chip microcomputer, and a high operating speed of the single-chip microcomputer is required to achieve a wider measurement range.

The second scheme is mainly to use the monostable trigger to generate the timing time. The time base circuit provides the standard frequency basic signal, the pulse frequency is 100Kz. When the timing starts, the gate is opened, and the measured pulse passes through the gate , the counter starts counting until the gate closes when the timing time ends, and stops counting. If the number of pulses counted by the counter within the timing time is N and the parameters are set properly, then the number N of pulses is the value of the capacitance.

Determination of the scheme:

Through the above analysis and comparison of the two hardware implementation schemes, we can see that although the circuit structure of scheme one is simple, its cost is relatively high, and system programming is required This greatly increases the difficulty of development; while the second option uses hardware circuits to work more stably without downtime. Comprehensive consideration of this design option two as the hardware circuit implementation of the system.

The overall program block diagram of the system is as follows:

d6c582e4-1e39-11ee-962d- dac502259ad0.png

Unit circuit design

Power supply circuit design:

The power supply circuit is the foundation of an electronic device, only when the power supply circuit works normally can it Ensure the normal operation of electronic equipment. The power supply circuit of the multi-channel anti-theft alarm designed this time converts the 220V voltage of the AC mains into a low-voltage AC voltage through an isolated step-down transformer, and then converts the AC circuit into a pulsating DC voltage through a rectifier circuit, and then converts it into a pulsating DC voltage through a filter circuit. The pulsating DC voltage is converted into a stable DC voltage. Since the rectified DC voltage is still high, in order to provide it to the anti-theft alarm, it is necessary to further transform the DC voltage and convert it to 5V DC voltage.

d6ee77f8-1e39-11ee-962d-dac502259ad0.png

So The first step in the design of the power supply circuit is the selection of the transformer. Due to the high voltage of the mains, most of the chips at this stage are low-voltage chips and cannot be used in a high-voltage environment. Therefore, it is necessary to use a step-down transformer to convert the AC mains into AC voltage with lower voltage. The transformation ratio of the transformer is a very important parameter, which determines the voltage input at the output terminal of the transformer. In this design, the transformation ratio of the transformer is selected as 10:1. This transformation ratio can guarantee that when the voltage at the input terminal is 220V, the transformer’s The output voltage is about 22V.

At present, most of the chips in electronic design are powered by DC, and the voltage measured by the output of the transformer is AC, so it needs to be converted into DC by a rectifier bridge. Because the rectifier bridge can convert AC voltage into DC voltage, but it can be known through simulation and practice that the DC voltage output by the rectifier bridge after conversion has large pulsations and is not a flat voltage signal. In order to make the output voltage signal more To be stable and constant, a filter circuit needs to be set at the output end of the rectifier bridge.

The DC voltage processed by the filter circuit has reached a usable level, but the maximum power supply voltage of the electronic components used in this design is 5V, so in order to ensure that it can be used for the circuit, this time In the design, the integrated voltage regulator chip LM7805 is selected to form an integrated voltage regulator circuit to realize the output of 5V DC voltage.

Reference pulse generation circuit

In order to realize the measurement of the capacitance value, it is necessary to count the reference pulse during the period when the gating level is enabled. So the reference pulse is a very important parameter in the capacitance tester. In this design, the 555 timer generates a square wave pulse signal with a frequency of 10KHz as the reference frequency. The reference pulse generating circuit designed this time is shown in the figure below. The main function of this circuit is to generate a square wave signal with a frequency of 10KHz at pin 3 of the 555 timer, and use the square wave signal as a reference signal.

d710ee96-1e39-11ee-962d-dac502259ad0.png

Single Stable circuit

As shown in the figure below, the monostable trigger circuit designed by using the 555 timer in this design is used in the circuit. The pin outputs a pulse signal of a certain width as a gate control signal, which is used to control the pulse counting circuit to count the reference signal.

In order to achieve the purpose of accurate measurement, this design adopts the method of sub-range measurement. There are two main methods to realize sub-range measurement, one is to change the gating cycle of the monostable circuit by adjusting the resistance in the monostable circuit; the other method is to change the reference pulse signal; in this design, choose method 1, That is to change the gating period of the monostable circuit.

d7427678-1e39-11ee-962d-dac502259ad0.png

count Circuit

The pulse counting circuit is shown in the figure below. The pulse counting circuit designed this time uses three pieces of 74LS160 to form a 3-digit decimal addition counting circuit. The three 74LS160 chips are hundreds, tens and ones from left to right. The counting result is output in the form of BCD code.

d75824dc-1e39-11ee-962d-dac502259ad0.png

display Driving Circuit

As shown in the figure, it is the display driving circuit of the digital capacitance tester designed this time. The main function of the display driving circuit is to display the counting result of the counting circuit. In order to ensure the stability of the displayed content of the display, this design uses a 74LS273 trigger to latch the counting results, and uses a BCD code digital tube to display the results.

d775cdfc-1e39-11ee-962d-dac502259ad0.png

Multisim Simulation

As shown in the figure below, it is the simulation circuit of the digital capacitance tester designed this time. The switches S1 and S2 on the left side of the circuit are used for range switching, and S1 is the measurement range of 1uF-100uF. When S1 is closed, the range of capacitance that can be measured at this time is 1uF-100uF.

The accuracy of the measurement can be adjusted by adjusting the resistance value at the upper end of S1.

d793e044-1e39-11ee-962d-dac502259ad0.png

d7b795a2-1e39-11ee-962d-dac502259ad0.png

When the switch S2 is closed, measure at this time The range is 1nF-100nF, and the capacitance value measured in this range is 1nF smaller than the actual capacitance value.

d7e7af94-1e39-11ee-962d-dac502259ad0.png

d8113404-1e39-11ee-962d-dac502259ad0.png

Power simulation diagram

d8374fea-1e39-11ee-962d-dac502259ad0.png