PCB Design for Capacitance Test Based on Single Chip Microcomputer

PCB Design Schematics for Capacitance Test Based on Single Chip Microcomputer

This circuit is based on the PCB design of the capacitance test circuit of the PlCl6LF874 microcontroller. The specific contents are as follows.

How the Capacitance Measurement Module Works
The overall design principle block diagram of the capacitance measurement module is shown in Figure 1, including power management circuit, PICl6LF874 microcontroller, capacitive sensor, signal conditioning circuit, PS021 capacitance-to-digital converter and interface circuit connected to the computer.

The working principle of the capacitance measurement module is: the capacitive sensor outputs a weak capacitance signal, and the capacitance signal passes through the signal conditioning circuit. Enter the PS02l capacitance-to-digital converter, the measurement capacitance of this device ranges from 0 to tens of nF (unlimited), after the internal conversion of the device, through the setting of the internal registers of the PS02l, the required value is obtained; the data is transmitted through SPI To the PICl6LF-874 microcontroller, the measured data is sent to the upper computer (computer) through the asynchronous serial communication interface USART of the microcontroller, and finally the application program of the upper computer displays the measurement results and saves the test data.

System hardware connection
This measurement circuit needs a control device to control the reading and writing of data. The PICl6LF874 microcontroller with simple structure, powerful functions and compatible with SPI serial interface is selected. Because the peripheral interface of PS02l is SPI, the single-chip microcomputer can control the work of PS02l well, and the measurement data can be sent to the host computer through the USART serial interface. The connection of the single-chip microcomputer is shown in Figure 2, and the connection diagram of the PS02l is shown in Figure 3.

Realization of System Software Functions
The application software designed based on PS021 includes programs such as detection, control, data processing, database management and system interface. Under the conditions of program running speed and storage capacity, try to use software to realize the hardware functions of traditional instrument systems and simplify hardware configuration. In addition, the interface is the “window” of the test system and virtual instruments, and is the main way for the system to display functional information. Software design should not only achieve functions, but also have a beautiful interface. After determining the hardware platform of the test system, the key is to choose appropriate software development tools to write the corresponding application software. The test module is developed in a graphical programming language. The development environment can provide an integrated development environment, which is convenient to connect with the instrument hardware and has a good user interface. According to the principle of the application program design of the upper computer, the software of the test system is obtained. By setting some parameters in the main interface of the software, the hardware circuit is connected to the upper computer, and the measurement results can be displayed. The measurement results are displayed on the data display interface, as shown in Figure 4.

Trials and Results
Use the above software to measure. Before measurement, the measurement system must be calibrated. When calibrating, PS02l requires the reference capacitance Cref and the measured capacitance Cmeas to be in the same capacitance value range, that is, to ensure that the Cmeas/Cref ratio does not exceed 25% (the limit value of PS02l). The reference capacitance is a very important part and has a direct impact on the quality of the measurement as well as the temperature stability of the measurement. Recommended capacitor materials: CFCAP (multilayer ceramic capacitors from Taiyo Yuden) series, COG or NPO ceramic capacitors. The discharge resistance Rdis is closely related to the discharge time, the discharge time τ=0.7R (C+20 pF), and the time constant τ ranges from 2 to 10μs (5μs is recommended). The resistance value of the discharge resistor calculated according to the formula.
In the test, the fixed capacitors of 1, 2, 3, 5.1, 6.8, 8.2, 9.1, 12, 13, 15, 16.5, and 18 pF were selected as the measured capacitors. Determine the size of the reference capacitor according to the range of the measured capacitance, and then determine the resistance value of the discharge resistor according to the measured capacitance and the reference capacitance value, combined with the discharge time, and finally select the appropriate measurement mode for measurement. In the calibrated system, connect a reference capacitor to the reference terminal and the measured terminal respectively. At this time, the value displayed on the data display interface is the sum of the reference capacitance value and the parasitic capacitance value (the data displayed by Sensor l in Figure 3) ; Then connect the measured capacitance in parallel on the basis of the reference capacitance of the measured terminal. The measured data is the sum of the measured capacitance value, the reference capacitance value and the parasitic capacitance value. The subtraction of the measured values ​​in the above two steps is the measured value. The capacitance value of , and the statistics of the measured capacitance value finally obtained are shown in Table 1.
Table 1 reflects the relative error between the measured value and the nominal value of the measured capacitance, and it is also known that the larger the measured capacitance value, the smaller the relative error between the measured value and the nominal value. Since the measured capacitance is affected by factors such as the ambient temperature, the amount of solder, and the quality of the measured capacitance, there are certain errors. Averaged over multiple measurements to obtain a more stable capacitance value. Under the calibrated system, the fixed capacitance is measured to verify the accuracy of the measurement module. The measured value is very close to the nominal value. It can be considered that the error of the nominal value of the measured capacitance is small. It is further known that the measurement accuracy of the capacitance measurement module is higher than that of the measurement module. high.
The PlCl6LF874 single-chip microcomputer can control the capacitance measurement module very well, and has a good promotion effect on the research of capacitive sensors. The single-chip microcomputer simplifies the circuit design and makes the measurement results achieve higher accuracy; at the same time, this measurement module can reduce the circuit board. Therefore, the volume of the whole device is reduced; it greatly simplifies the circuit design process, reduces the difficulty of product development, and is of great significance for accelerating product development and reducing production costs. The experimental results show that the measurement module has good practicability.

About Well Done

Well Done Technology was established in 2008, focus on PCB reverse engineering, PCB assembly, PCB design and manufacturing. Our technical team of more than 20 people includes senior engineers with rich experience.


Latest Case

Need Help?

Scroll to Top
welldone pcb manufacturer

Start to Achieve Your PCB Project