Engineer's Electronic Production Story: DIY Design of Digital Oscilloscope

Publisher:翩翩轻舞Latest update time:2015-04-27 Source: eefocusKeywords:Engineer Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  With the development of electronic technology and the changes in circuit structure, the requirements for circuit measurement have become higher. In electronic production, it is found that the measurement of many parameters is no longer capable of being done by a multimeter, such as the output waveform of a certain I/O port of a single-chip microcomputer or the measurement of the frequency response of an amplifier, etc. Therefore, the oscilloscope has naturally become a necessary tool for electronic engineers and enthusiasts, just like the multimeter. However, the price of an oscilloscope is thousands or even tens of thousands of yuan, which is not acceptable to everyone. If you are an electronics enthusiast or an electronics major like me, why not use your ingenuity to make a sufficient oscilloscope yourself, which not only saves money, but also allows you to enjoy the unique fun of DIY!

  The following is a brief introduction to the basic principles of oscilloscopes, and then a brief comparison between digital oscilloscopes and analog oscilloscopes. Physics theory can prove that when a heavy object fixed at one end by a thin rope swings, the distance from the central vertical line satisfies the sine wave law. The hourglass experiment can clearly show this waveform that changes with time: use an hourglass as a heavy object, and lay a piece of paper on the table under the hourglass. When the hourglass starts to swing, let the paper move at a constant speed. In this way, the fine sand flowing out of the hourglass leaves a sine wave mark on the paper, as shown in Figure 1. Using this design idea, the waveform can be unfolded on a plane (corresponding to the flow of time).

  Engineer's Electronic Production Story: DIY Design of Digital Oscilloscope

  This design concept is widely used in waveform recording and display. For example, an electrocardiograph uses an electric heating needle that swings in place to record the ECG waveform on a recording paper tape that moves at a constant speed.

  Although the structure of the electrocardiograph can record voltage signals, in a large number of applications, the oscilloscope does not need to consume paper to record waveforms, but only observes waveforms. Therefore, reusable CRT oscilloscopes are applied to the design of oscilloscopes. The analog oscilloscope adds the two electrical signals to be observed to the X and Y channels of the oscilloscope to control the offset of the electron beam, thereby obtaining the display waveform of the relationship between the two electrical signals on the fluorescent screen. This analog oscilloscope is large in size, heavy in weight, high in cost, expensive, and not suitable for measuring non-periodic, single-shot signals. The digital oscilloscope first samples the analog signal at high speed to obtain the corresponding digital data and stores it. The sampled digital signal is processed and calculated using digital signal processing technology to obtain the required various signal parameters. The signal waveform is drawn according to the obtained signal parameters, and the measured signal can be analyzed in real time and transiently, so that the user can understand the signal quality and diagnose the fault quickly and accurately. At the beginning of measurement, the operator can select the measurement type, measurement parameters and measurement range through the operation interface (automatic setting can be selected, and the instrument automatically sets the optimal range); the microprocessor automatically interprets the measurement settings to the sampling circuit and starts data acquisition; after the acquisition is completed, the microprocessor processes the sampled data according to the measurement settings, extracts the required measurement parameters, and sends the results to the display component.

  Both analog and digital oscilloscopes can usually be used to observe simple repetitive signals well. However, both have their advantages and limitations, as shown in Figure 2. For analog oscilloscopes, it is difficult to display signals with very low frequencies because the afterglow time of the CRT is very short. Since the brightness of the scanning track on the oscilloscope tube is inversely proportional to the scanning speed, it is difficult to see low repetition rate signals with fast rise and fall times. The brightness and scanning speed of the scanning track of the digital oscilloscope are independent of the signal repetition rate, so they can be well reflected. For displaying the fast rise and fall edges of repetitive signals with high repetition rates, there is almost no difference in the performance of digital storage oscilloscopes and analog oscilloscopes, and both oscilloscopes can be used to observe signal waveforms well. When measuring signal parameters, the advantage of digital storage oscilloscopes is that they have the ability to automatically measure various parameters. When using an analog oscilloscope, you must set the cursor yourself and analyze and understand the displayed waveform to obtain the measurement results. However, if you need to make adjustments, it is generally best to use an analog oscilloscope. This is because the real-time display capability of the analog oscilloscope enables it to display the input voltage at all times. Its waveform update rate (the number of times the scan track is drawn on the screen per second) is very high, so any changes in the signal will be displayed immediately. In contrast to analog oscilloscopes, digital oscilloscopes display waveforms reconstructed from acquired waveform data, so their waveform update rate is much lower than that of analog oscilloscopes. As a result, there is a certain time delay between the signal changing and the changed signal being displayed on the screen, which is a major disadvantage of digital oscilloscopes.

Homemade oscilloscope, analog or digital? Of course, digital  

  But overall, digital oscilloscopes still have great advantages.

  When making your own oscilloscope, should you make an analog oscilloscope or a digital oscilloscope? Of course, if you want to make one, make a digital one! Because making a digital oscilloscope is easier, please read on:

  1. Analog oscilloscopes require CRT oscilloscopes that are compatible with the bandwidth. As the frequency increases, the process requirements for CRT oscilloscopes are strict, the cost increases, and there are technical bottlenecks. Therefore, it is not easy to buy in the electronics market. Most of the ones with good performance are imported brands. They are expensive and need to deal with many problems, such as generating anode high voltage, scanning sawtooth waves, and electromagnetic shielding of the oscilloscope, etc. Moreover, the volume is large, let alone portability. Digital oscilloscopes only need high-speed A/D converters that are compatible with the bandwidth. Other memories, D/A converters, and displays are all relatively low-speed components. The display can use LCD display modules, which are easy to buy in the electronics market, are not expensive, and are simple to use. You only need to consider the interface with the microprocessor, which is small in size and consumes much less power than CRT oscilloscopes. It is easy to make an oscilloscope portable using an LCD display module, and it is no problem to make it into an oscilloscope! Of course, LCD display modules also have their shortcomings, such as brightness and contrast are not as good as CRT oscilloscopes, but considering all factors, the advantages of LCD display modules are still quite obvious.

  2. The analog oscilloscope is a complete hardware structure. It is difficult to upgrade the function after it is completed. However, the digital oscilloscope is different. After ensuring the basic hardware, its control and other functions are realized by software. This makes it very easy to upgrade. You can even use it as a development board to practice programming! Are you still hesitating to make an oscilloscope that can be used as a development board?

  Based on the above two reasons, making a digital oscilloscope is of course the best choice!

  This article introduces a portable digital oscilloscope I made (as shown in Figure 3).

This article introduces a portable digital oscilloscope I made.  

  Because of the 320×240 resolution display, the displayed waveform is very detailed. Figures 4 to 11 are actual photos of the oscilloscope measuring signals of different frequencies. [page]

  The display waveform is very detailed due to the 320×240 resolution display.The display waveform is very detailed due to the 320×240 resolution display.

  The display waveform is very detailed due to the 320×240 resolution display.The display waveform is very detailed due to the 320×240 resolution display.

  The display waveform is very detailed due to the 320×240 resolution display.The display waveform is very detailed due to the 320×240 resolution display.

  The display waveform is very detailed due to the 320×240 resolution display.The display waveform is very detailed due to the 320×240 resolution display.

  When measuring a 5Hz signal with a general analog oscilloscope, you can only see a bright spot moving on the screen, and you can't see the complete waveform at all. However, the oscilloscope I made can display the complete waveform, which is a great advantage when measuring low-frequency signals. [page]

  The oscilloscope consists of 6 circuits, namely:

  1. Input program-controlled amplification (attenuation) circuit 2. High-speed AD conversion circuit 3. FIFO storage circuit 4. Display control circuit 5. Clock generation circuit 6. Frequency measurement and control circuit Among these parts, the most important are the program-controlled amplification circuit and the AD conversion circuit, because these two circuits are the throat of this digital oscilloscope. The program-controlled amplification circuit determines the input bandwidth and vertical resolution of the oscilloscope, and the AD conversion circuit determines the horizontal resolution of the oscilloscope. These two resolutions directly determine the performance of the oscilloscope. These two parts of the circuit convert the measured signal into the data signal required by the subsequent processing circuit. Fortunately, these parts of the circuit can be composed of high-performance integrated circuits plus a small number of peripheral devices. The circuit design is simple and debugging is also simple. I think the most difficult part of the entire oscilloscope should be the program, that is, the software aspect.

  The software is responsible for all data processing and control tasks of the oscilloscope, including AD sampling control, horizontal sweep speed control, vertical sensitivity control, display processing, peak-to-peak value measurement, frequency measurement, etc. In order to improve performance, this oscilloscope uses two single-chip microcomputers, one for display and one for control, so the design of the program also needs to consider the communication between the two single-chip microcomputers, which will be described and explained in detail in each chapter of the article.

  The display waveform is very detailed due to the 320×240 resolution display.

  Through the production of this oscilloscope, you will learn a lot of things, such as how to use operational amplifiers to design combined amplifier circuits, the application of high-speed AD converters, the application of FIFO memories, the SPI bus interface protocol of AVR microcontrollers, and the driving of high-resolution dot-matrix LCD displays. These contents are also very useful for other electronic designs.

Keywords:Engineer Reference address:Engineer's Electronic Production Story: DIY Design of Digital Oscilloscope

Previous article:Three steps to faster, in-depth debugging of high-speed storage failures
Next article:Engineers' Stories: An Oscilloscope Allergic to Beautiful Engineers?!

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号