Abstract: The design uses AT89C51 single-chip microcomputer, A/D converter ADC0808 and common anode digital tube as the main hardware, and analyzes the digital voltmeter Proteus software simulation circuit design and programming method. The single-chip microcomputer is applied to measurement technology, ADC0808 is used to convert analog signals into digital signals, AT89C51 is used to process data, and the digital tube is used to complete the display in a scanning manner. The designed digital voltmeter can measure the voltage value of 0~5 V. AT89C51 is an 8-bit single-chip microcomputer. When the input voltage of ADC0808 is 5 V, the output digital value is +4.99 V. The circuit of this design is simple, low-cost and stable in performance.
Keywords: digital voltmeter; 51 single-chip microcomputer; ADC0808; digital tube LED
0 Introduction
With the development of electronic science and technology, electronic measurement has become a means that must be mastered by the majority of electronic workers, and the requirements for measurement accuracy and function are getting higher and higher, and voltage measurement is particularly prominent because voltage measurement is the most common. Digital voltmeter is a voltmeter designed using digital measurement technology. Compared with analog voltmeters, digital voltmeters have the characteristics of intuitive and accurate readings, wide display range, high resolution, large input impedance, high integration, low power consumption, strong anti-interference ability, and strong scalability. Therefore, they are widely used in voltage measurement and voltage calibration. This paper uses ADC0808 to convert the input analog signal, and the control core AT89C51 microcontroller calculates and processes the conversion results. Finally, the output device is driven to display the digital voltage signal. The interface circuit design is realized through Proteus simulation software, and real-time simulation is performed.
Proteus software is a circuit analysis and physical simulation software. It runs on the Windows operating system and can simulate and analyze (SPICE) various analog devices and integrated circuits. It is a simulation software that integrates microcontrollers and SPICE analysis. It is powerful, has rich system resources, low hardware investment, and intuitive images. It has been favored by users in recent years.
1 System Overview
1.1 Design Task
Design a digital voltmeter using the MCU AT89C51 and ADC0808, convert the voltage value of the analog signal between 0 and 5 V into a digital signal, display it with a two-digit digital tube, and observe the voltage value of the ADC0808 analog input signal through a virtual voltmeter, and the LED digital tube displays the corresponding numerical value in real time.
1.2 Overall Scheme
The circuit block diagram of the digital voltmeter is shown in Figure 1.
The circuits needed in this design include power supply circuit, analog/digital conversion circuit, single-chip control circuit, display circuit, etc. The chips needed in the design include AT89C51 single-chip microcomputer, ADC-0808, 74LS74, LED digital tube, etc.
2 Proteus software simulation circuit design of digital voltmeter
The voltage input signal to be measured is within the maximum working voltage range of the ADC0808 chip, and is converted by the analog/digital conversion circuit to achieve A/D conversion, and the program data is processed by the single-chip control circuit, and then the digital tube displays the input voltage through the seven-segment decoding/driving display circuit.
The hardware circuit schematic is shown in Figure 2.
2.1 Interface design of AT89C51 single-chip microcomputer and digital tube display circuit
A digital voltmeter is designed using the single-chip microcomputer AT89C51 and ADC0808 to convert the DC voltage value of the analog signal between 0 and 5 V into a digital signal 0 to FF, which is displayed with two digital tubes. Proteus software starts the simulation. The current input voltage is 2.5 V, which is converted into a digital value of 7FH. The voltage of the input analog/digital converter ADC0808 can be changed by adjusting the potentiometer RV1 with the mouse pointer, and the voltage value of the analog input signal of ADC0808 can be observed through the virtual voltmeter. The LED digital tube displays the corresponding numerical value in real time.
The crystal oscillator frequency of the AT89C51 single-chip microcomputer is set to 12 MHz in the Proteus software. The EA of this circuit is connected to a high level, and there is no external ROM expansion.
2.2 Interface design of A/D conversion circuit
The A/D converter uses the integrated circuit ADC0808. ADC0808 has 8 analog input signals IN0~IN7 (pins 1~5, 26~28), and the address lines C, B, and A (pins 23~25) determine which analog input signal is A/D converted. This circuit connects the address lines C, B, and A to ground, that is, selects channel 0 to input the analog voltage signal. Pin 22 ALE is the address latch enable control signal. When the input is high, the address signal is latched. Pin 6 START is the start control signal. When the input is high, the A/D conversion starts. This circuit connects the ALE pin and the START pin together, and they are controlled by the P2.0 pin and the WR pin of the microcontroller through an NOR gate. Pin 7 EOC is the A/D conversion end signal. When the A/D conversion ends, pin 7 outputs a positive pulse. This signal can be used as a detection signal to indicate whether the A/D conversion is over or as a signal to request an interrupt to the CPU. This circuit is connected to the P3.2 pin of the microcontroller through a NOR gate. Pin 9 OE is the A/D conversion data output enable control signal. When the OE pin is high, the digital quantity of the A/D conversion is allowed to be read. The OE pin is controlled by the P2.0 pin and the RD pin of the single-chip computer through the NOR gate. Pin 10 CLOCK is the real-time clock input terminal of ADC0808. The clock signal is obtained by using the six-frequency crystal oscillator frequency of the single-chip computer 30 pin ALE. The 8 digital output terminals are connected to the P0 port of the single-chip computer.
3 Software programming of digital voltmeter
When the system is powered on, the startup address of ADC0808 is initialized, the digital tube display is turned off, and the A/D conversion is started. After waiting for the startup to end, the digital quantity result of the analog input signal of channel 0 of ADC0808 is converted and output on the three-digit digital tube through the dynamic display of the digital tube.
According to the design requirements and the hardware circuit, a resistor voltage divider is used when inputting analog signals. The final sampled input voltage is only one tenth of the actual input voltage. Therefore, a data adjustment program should be written in the program. It should also be noted that the hardware display circuit uses dynamic scanning display. In the dynamic scanning display mode, there are certain requirements for the frequency of dynamic scanning. If the frequency is too low, the digital tube LED will flicker. Usually, the digital tube lighting time interval is generally about 5ms. This requires that when writing the program, it should be lit and maintained for a certain time. Summarizing the above analysis, the program flow chart is shown in Figure 3 and Figure 4.
The program design of this circuit mainly includes A/D conversion part, LED display, initialization and timer interrupt part. Part of the program code is shown below.
5 Conclusion
The digital voltmeter in this article can measure the voltage value of 0~5V. AT89C51 is an 8-bit single-chip microcomputer. When the input voltage of ADC0808 is 5V, the output digital value is +4.99V. If you want to get higher accuracy, you need to use I2-bit, I3-bit and other higher than 8-bit A/D converters. The display part of the digital voltmeter can add a BCD code adjustment program to display its data through a three-digit digital tube. The display deviation of this design can be solved by correcting the reference voltage of 0808, or by using software programming to correct its measured value. This system was debugged by Proteus simulation software during the design process, and has the characteristics of simple circuit, low cost, high accuracy, fast speed and stable performance.
Previous article:Single chip music program design (including source code)
Next article:Design of a solar alarm system
Recommended ReadingLatest update time:2024-11-16 20:23
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- TDA2030 audio amplifier circuit diagram
- dsp reports an error after importing a new project!
- Learn more about logic analyzers
- [NXP Rapid IoT Review] Adding Bluetooth Capabilities with NXP Rapid IoT
- On the saturation problem of operational amplifier circuit
- sdram_datasheet.pdf
- The book on switching power supplies states that because the capacitor is charged in each cycle, the current decline slope continues to increase. How do you understand this?
- [TI recommended course] #In-depth study of light load high efficiency and low noise power supply reference design for wearable devices and the Internet of Things (TIDA-01566)#
- Mastering the Linux kernel: core technology for smart device development
- Channel explanation in wireless communication