Abstract: This paper introduces a design scheme of a dual-channel simple digital oscilloscope. The AT89S52 single-chip microcomputer is used as the control core. After the input signal is processed by the preprocessing circuit, it is passed through the high-speed A/D converter ADC0809 to realize real-time sampling, data processing, storage and display on the LCD, and the keyboard is used for function setting. This design innovatively realizes the storage/playback of waveforms, real-time comparison and analysis of dual-channel signals, and program-controlled amplification to improve sensitivity. The test results show that the system is stable, has the characteristics of high measurement frequency, clear waveform, high reliability, low cost, etc., and has high practical value.
Keywords: digital oscilloscope; AT89S52; preprocessing circuit; ADC0809; real-time sampling
0 Introduction
Digital oscilloscope is an electronic measuring instrument with a wide range of uses. Compared with traditional analog oscilloscopes, digital storage oscilloscopes not only have the advantages of waveform storage, small size, low power consumption, and easy use, but also have powerful real-time signal processing and analysis functions. They are increasingly widely used in electronic and telecommunications laboratories.
With the development of electronic technology and the changes in circuit structure, the requirements for circuit measurement have become higher. For the majority of science and engineering students and ordinary workers in electronics and other related industries, many circuit parameters need to be measured and analyzed in electronic production and product maintenance, and digital oscilloscopes are often needed. However, the high-performance digital oscilloscopes currently used in China are generally expensive, so it is of great significance to study simple digital oscilloscopes.
1 System structure and working principle
1.1 System structure
The design uses AT89S52 microcontroller as the control core, and consists of pre-processing circuits (including impedance conversion, program-controlled amplification, signal conditioning circuits), A/D data acquisition circuits, E2PROM storage circuits, function keyboards, LCD display circuits, and power supplies. The system structure block diagram is shown in Figure 1.
1.2 Working Principle
The digital oscilloscope has two input channels. The preprocessing circuit consists of impedance conversion, program-controlled amplification, and signal conditioning circuits. The input signal first passes through the impedance conversion circuit and then enters the program-controlled amplification circuit, where the signal is amplified (attenuated) as needed, and then enters the signal conditioning circuit for level adjustment to a 0-5 V voltage that meets the A/D conversion requirements. The output analog signal is then sampled in real time by the high-speed A/D converter AD0809 and converted into a digital signal, which is then stored in the semiconductor memory E2PROM after passing through the AT89S52 microcontroller. The microcontroller reads the signal from the memory
and performs calculations, displaying the waveform on the LCD screen. All functions can be completed by keyboard operation.
2 Hardware Design
2.1 The microcontroller
AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8 192 in-system programmable FLASH memories. It is manufactured using Atmel's high-density, non-volatile storage technology and is compatible with the standard MCS-51 instruction system and 80C51 pin structure.
The system uses AT89S52 microcontroller as the main control chip. The microcontroller first converts the analog signal into a digital signal by controlling the A/D converter, then stores the digital signal in the E2PROM memory, and finally displays the waveform of the analog signal on the LCD.
2.2 Programmable amplifier
circuit The function of the programmable amplifier circuit is to attenuate large signals and amplify small signals, ensuring that the signal amplitude input to the A/D converter is within the required input voltage range to achieve the best measurement and observation effect. The analog switch CD4051 and the operational amplifier OPA842 are used, and the precision potentiometer is used to achieve multi-level vertical resolution. The register module is used to set the channel number in the AT89S52 microcontroller, and the analog switch is controlled by writing the channel number to select different feedback resistors, thereby achieving different amplification factors. The specific circuit is shown in Figure 2.
2.3 Signal conditioning
Since the signals observed by the oscilloscope are mostly positive and negative voltage signals, and the A/D converter AD0809 is a unipolar reference voltage. In order to sample the negative voltage of the signal, it is necessary to add a DC value to the signal to raise the negative voltage part of the signal to above the zero level. Therefore, a signal conditioning circuit is used to condition the signal within the range of 0 to 5 V that meets the requirements of A130809. R1, R2, R3, and U1 are simplified modules of the programmable amplifier circuit, and the circuit is shown in Figure 3.
2.4 Data storage circuit
E2PROM is the key device of data storage circuit. This paper selects AT24C512 which has I2C bus capacity of 512 Kb (64 K×8 b) recently launched by Atmel. The main features of this chip are as follows: storage capacity is 65,536 B; compatible with 100 kHz, 400 kHz, 1 MHz I2C bus; 100,000 programming/erase cycles; single power supply, read/write voltage is 1.8~5.5 V; ESD protection voltage is greater than 4 kV; write protection function, when WP is high, it enters write protection state; CMOS low power technology, maximum write current is 3 mA; 128 B page write buffer; automatic timed write cycle. SDA line and SCL are connected to P2.4 and P2.5 ports of the microcontroller respectively. The data storage circuit is shown in Figure 4.
2.5 Other hardware circuits
A/D conversion module: The A/D converter uses ADC0809, which is a CMOS single-chip successive approximation A/D converter that can process 8 analog inputs and has three-state output capability. It can be connected to various microprocessors or work independently. The input/output is compatible with TTL, and the conversion time is about 100μs.
Keyboard control module: The system uses 5 independent keyboards as function keys, which are respectively used for running and stopping, waveform amplification, waveform reduction, waveform upshift, and waveform downshift.
LCD liquid crystal display circuit: This design uses MGL(S)-240128T liquid crystal display. The single-chip microcomputer P1 port is connected to the LCD data port for reading digital signals. P3.6 and P3.7 are used as the read/write control signal ports of the liquid crystal display module, and P2.5 is used as the LCD chip select port.
3 Software design
The software design part mainly includes the main program module, A/D conversion module, LCD display module, and key processing module. Its flow chart is shown in Figure 5.
3.1 A/D conversion part
When the timer generates an interrupt, ADC0809 converts the input analog quantity into a digital quantity. The maximum conversion rate of ADC0809 can reach 640 kHz. The program sets the timer time interval to 2μs, so the sampling frequency reaches 500 kHz.
3.2 Keyboard scanning part
A key is set to run and stop the waveform, and 4 independent keys are used to change the size of the waveform. The two parameters amp and time are used to adjust the amplitude and time axis respectively. When the MCU detects that the key is pressed, the values of the two parameters change accordingly, thereby changing the size of the waveform.
3.3 LCD display part
The first data generated by A/D, the corresponding point is arranged in the first column, so the horizontal axis position of the point is determined, and the vertical axis position is calculated by the digital signal size in proportion. Since the sampling frequency is fixed, the time interval between every two points is the same, and the next point is arranged in the second column, and so on.
3.4 Digital storage part
The digital storage chip selected is AT24C512 launched by Atmel, which is used to store the signal size at different times, overcoming the disadvantage that the analog oscilloscope can only display the current waveform. Since the chip uses the I2C bus to transmit data, the I/O port of the microcontroller is needed to simulate the bus.
4 Conclusion
The digital oscilloscope designed in this paper with the AT89S52 microcontroller as the control core can achieve the required performance indicators and run stably and reliably under the organic combination of software and hardware. The test shows that the digital oscilloscope has a high real-time sampling rate, and can convert the collected data into the corresponding waveform through the hardware circuit and software program and display it well on the LCD screen. The digital oscilloscope can realize the functions of waveform acquisition, conditioning, storage, and display, and can set the corresponding functions of the waveform through the keyboard. It has the characteristics of small size, simple operation, convenience, and cheap equipment. In subsequent improvements, the frequency division synthesis technology can be used to synthesize the sampling frequency to increase its sampling frequency. At the same time, the digital oscilloscope also has a certain expansion capability, with broad application prospects and practical value.
Previous article:LED digital large screen display system based on single chip microcomputer
Next article:Design of password lock based on single chip microcomputer (designed in C language)
Recommended ReadingLatest update time:2024-11-16 18:09
- 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
- IAR Compilation Optimization Level Introduction
- Problem with peripheral clock enable statement
- Three-phase brushless DC motor control board
- Choosing the right ARM-based MCU
- [RVB2601 Creative Application Development] Study Notes 1 - Development Environment Construction and New Project
- Free application: Erha image recognition artificial intelligence vision sensor (using K210, 1000 times faster than STM32H743)
- Choosing the Correct Thermistor for Your Temperature Sensor
- EEprom write speed is slow
- CircuitPython 7.0.0 released
- They are all six non-gates. This power supply can be used even if it is connected reversely, but it cannot be replaced.