This paper introduces a design scheme of digital display resistance and capacitance measurement system based on 555 timer and single chip microcomputer. The system uses 555 and the resistance or capacitance to be measured to form a multivibrator, measures the period of the 555 output signal through the single chip microcomputer, calculates the resistance or capacitance value according to the mathematical relationship between the period and the resistance or capacitance to be measured, and then displays it on LCD1602. Finally, the simulation results show that the measurement system has the advantages of simple structure, convenience and practicality, and can measure the resistance and capacitance values within a certain range.
1 Introduction
In the manufacturing and use of electronic instruments and meters, there are a large number of printed circuit boards that need to be debugged, measured and repaired, and the values of resistance and capacitance need to be tested.
This paper introduces a design scheme of digital resistance and capacitance measurement system based on AT89C51 single-chip microcomputer and 555 timer, and then makes a circuit to realize the function of the system. The system uses 555 timer and the resistance (or capacitance) to be measured to form a multivibrator, measures the period of 555 output signal through the single-chip microcomputer timer, calculates the resistance (or capacitance) value according to the mathematical relationship between the period and the resistance (or capacitance) to be measured, and then displays it through the 1602 LCD display. The simulation results show that the measurement system has the advantages of simple structure, convenience and practicality.
2. Design and Principle
2.1 Overall design plan
The whole measuring system is composed of several circuit modules such as the single chip minimum system, buttons, resistors, capacitors, multivibrators composed of 555, and liquid crystal display, as shown in Figure 1.
2.2 Multivibrator Principle
As shown in Figure 2, when measuring capacitance, a multivibrator is formed by using 555, the capacitor CX to be measured, and resistors R1 and R2 (R1 and R2 are known resistors), so that a periodic square wave is output from the output terminal Q of 555 and connected to the oscilloscope, as shown in Figure 2 (b). This signal is not a square wave with a duty cycle of 50%. According to reference 2, the duration of the high level time in one cycle T is:
When measuring resistance, use another 555 to form a multivibrator circuit, connect the resistor to be measured RX to the position of R1 (or connect RX and a known resistor in series), and replace CX with a known capacitor C. The cycle time is:
2.3 MCU Timing Principle
The periodic square wave signal output by 555 is sent to the microcontroller for timing, and the signal cycle time T is measured. Then, the above mathematical relationship is used for calculation and processing to obtain the capacitance or resistance value to be measured. The principle of microcontroller timing is: using the microcontroller's external interrupt 0 and timer 0. The output signal of 555 is connected to the microcontroller's external interrupt 0 pin P3.2, and it is set to falling edge trigger. When the output signal of 555 is a falling edge, the external interrupt is triggered, and the microcontroller's timer 0 is turned on to start timing until the next falling edge arrives, that is, a cycle is reached, and the timing is stopped. At this time, the timer records the length of a cycle.
3. Hardware module design
3.1 MCU Minimum System
The core controller of the system uses the AT89C51 single-chip microcomputer. Figure 3 shows the minimum system of the single-chip microcomputer, including the single-chip microcomputer and the crystal oscillator circuit and reset circuit required for the normal operation of the single-chip microcomputer. In Proteus, the power supply and ground of the single-chip microcomputer are connected by default, so they are omitted in the figure.
3.2 Button Circuit
The key circuit is used to determine whether to measure capacitance or resistance. As shown in Figure 4, a single-pole double-throw key is used. When the key is pressed to the upper pin P3.6 of the microcontroller, it is used to measure capacitance; when it is pressed to the lower pin P3.7, it is used to measure resistance.
3.3 555 Multivibrator
As shown in Figure 5, a multivibrator is formed by using 555 and the capacitor or resistor to be measured. The periodic square wave generated by 555 is output from the Q pin and then connected to the external interrupt INT0 pin of the microcontroller, that is, the P3.2 pin. During measurement, only one of the two circuits is connected to the microcontroller, which is used to measure capacitance and resistance respectively.
3.4 LCD Display Circuit
The measurement results need to be displayed. This system uses LCD1602 as the display. Figure 6 shows the connection circuit between LCD1602 and the microcontroller. The P0 port is connected to a pull-up resistor as the data port; the first 3 bits of the P2 port are used as the control pins for reading, writing and enabling.
4. Software Design
The system software flow chart is shown in Figure 7. After the power is turned on, the first thing to do is to initialize, including the initialization of timer T0, external interrupt 0 and LCD1602. Then start the 555 chip, and use the microcontroller to determine whether there is an interrupt request. If not, continue to wait for the interrupt request; if so, start the timer to start timing until there is an interrupt request and stop timing. After obtaining the timing value, that is, one cycle of the 555 output signal, determine whether to measure resistance or capacitance. After judgment, the resistance or capacitance value is displayed by LCD1602.
5. Simulation results
The above circuit modules are integrated together to form a measurement system. After the program is written correctly in Keil, the circuit is simulated in Proteus. The simulation results of measuring a 50kΩ resistor and a 150μF capacitor are shown in Figure 8. It can be seen that there is a certain error in the measurement, which is mainly because the approximate value is taken when the previous formula is used for calculation. After the simulation is passed, the required components are purchased according to the simulation circuit and the physical circuit is made.
6. Conclusion
This paper introduces a design of a resistance and capacitance measurement system based on a 555 timer and a single-chip microcomputer. In the design and simulation of the system, two software platforms, Keil and Proteus, are used. The program is written in C language in Keil, and the function of the system circuit is simulated using Proteus. The measurement circuit is simple and reliable, easy to implement, and can measure resistance and capacitance values within a certain range, thus proving the practicality of this design.
Previous article:How to solve the four major misunderstandings of 51 single-chip microcomputers? A novice can advance by just reading this article
Next article:Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- The Difference Between Oscilloscope Channel Coupling and Trigger Coupling
- S7-200 PLC decryption software download is definitely available!!
- Official Pioneer Tips: Unlocking the 400Mhz GPIO Flip Frequency of the HPM6700 Series
- Why are three-layer PCBs rarely seen?
- I was badly hurt by "RZ7888"!!!
- I feel good today
- The meaning of two and a half dimensions in RF simulation
- How to select rectifier modules for communication power systems
- Rohde & Schwarz launches combined spectrum analyzer and phase noise tester
- [Starting at 13:30 pm] TI wireless connectivity product series application design guidance, online hands-on demo