This paper uses ADC0808 to convert the input analog signal, controls the core AT89C51 microcontroller to calculate and process the conversion result, and finally drives the output device 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 single-chip microcomputers and SPICE analysis. It is powerful, has rich system resources, low hardware investment, and intuitive images. It has been favored by the majority of users in recent years.
1 System Overview
1.1 Design Tasks
A digital voltmeter is designed using the single-chip microcomputer AT89C51 and ADC0808. The voltage value of the analog signal between 0 and 5 V is converted into a digital signal, which is displayed with a two-digit digital tube. The voltage value of the ADC0808 analog input signal is observed through a virtual voltmeter, and the LED digital tube displays the corresponding numerical value in real time.
1.2 Overall Plan
The block diagram of the digital voltmeter circuit is shown in Figure 1.
The circuits needed in this design include power supply circuit, analog/digital conversion circuit, microcontroller control circuit, display circuit, etc. The chips needed in the design include AT89C51 microcontroller, ADC-0808, 74LS74, LED digital tube, etc.
Proteus software simulation circuit design of digital voltmeter#e#2 Proteus software simulation circuit design of digital voltmeter
The voltage input signal to be measured is within the maximum operating voltage range that the ADC0808 chip can withstand. It is converted into A/D by the analog/digital conversion circuit, processed by the microcontroller control circuit, and then displayed on the digital tube by the seven-segment decoding/driving display circuit.
The hardware circuit schematic is shown in Figure 2.
2.1 Interface design of AT89C51 microcontroller 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 of 0 to FF, which is displayed with a two-digit digital tube. The simulation is started with the Proteus software. 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.
In Proteus software, set the crystal frequency of AT89C51 microcontroller to 12 MHz. In this circuit, EA is connected to high level and there is no external ROM.
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 grounds the address lines C, B, and A, 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 A/D conversion digital quantity is allowed to be read. The OE pin is controlled by the P2.0 pin and RD pin of the microcontroller through an 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 microcontroller 30 pin ALE. The 8 digital output terminals are connected to the P0 port of the microcontroller.
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 be completed, the digital result of the analog input signal of channel 0 of ADC0808 is converted and outputted and displayed 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.
5 Conclusion
The digital voltmeter in this paper 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. If you want to obtain higher accuracy, you need to use I2-bit, I3-bit and other A/D converters higher than 8 bits. 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:Virtual Prototype Model and Modal Simulation of Vibration System
Next article:Technical Analysis of Vehicle Alcohol Monitoring System
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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 wireless broadband technologies in the 5G era
- Design and implementation of temperature control system based on MSP430
- [Erha Image Recognition Artificial Intelligence Vision Sensor] Evaluation 2: Built-in 7 functions, face recognition and other tests
- 【Xianji HPM6750】Development process using Embedded Studio
- 【TouchGFX Design】Decomposition of the generated project directory structure and recommendation of two C++ introductory books
- consult
- Nuvoton's new development board Chili allows you to complete Linux application development in 40 minutes
- Common basic knowledge of 4G DTU
- [NXP Rapid IoT Review] + Alternative Experience Rapid IoT Studio online IDE
- LIS25BA package and evaluation board files