Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library

Free library / Schemes of radio-electronic and electrical devices

Two-channel oscilloscope attachment for PC. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Computers

Comments on the article Comments on the article

It is known that it is very problematic to set up some devices well without an oscilloscope. However, oscilloscopes are quite expensive, so if you have an IBM-compatible computer, it is much cheaper to build a relatively simple set-top box for it, such as the one described in the article below.

The proposed two-channel oscilloscope attachment to a PC is designed to observe and study the shape of electrical signals, measure the time and amplitude characteristics of electrical processes. The bandwidth of each channel is 0...50 MHz, the beam deflection factor is 0,1...20 V/div., the input impedance is 1 MΩ, the input capacitance is 20 pF, the sweep duration is from 0,1 ms/div Minimum PC requirements: 100, VGA, printer port, MS DOS 386.

On the high-frequency bands, the device works according to the stroboscopic principle, on the low-frequency bands - in real time. The software allows operation in the spectrum analyzer mode. The number of samples of the signal displayed on the screen in the normal mode is 256, in the spectrum analyzer mode - 128. The program uses the LPT1 port (see table): the base port is 378H. printer status signal port (input) 379H, control signal port (output) 37AH. The program assumes that the state of the port bits is standard and corresponds to the states of the signals on the pins of the printer connector [1].

Two-channel oscilloscope attachment to PC

The schematic diagram of the attachment is shown in fig. one.

Two-channel oscilloscope attachment to PC
(click to enlarge)

The studied signals through the input sockets XW1 and XW2 are fed to resistive-capacitive dividers, consisting of switches 1SA2, 2SA2, resistors 1R1-1R8, 2R1-2R8 and capacitors 1C2-1C9, 2C2-2C9, which determine the maximum vertical span (prefixes 1 and 2 here and below denote the belonging of the elements to channels 1 and 2, respectively). The MOS switches of the 1DA1 microcircuit are connected to the outputs of the dividers through repeaters on transistors 1VT2, 2VT1 and 2VT2, 1VT1 (two of its directions are used in channel 1, the rest in channel 2). The keys are opened by pulses with a duration of about 10 not coming from the shaper on the trigger DD1.2, and capacitors 1C10 and 2C10 are charged through them, to which the non-inverting inputs of the op-amp 1DA2 and 2DA2 are connected. The voltages on the capacitors, corresponding to the voltages of the signals at the time of opening the keys, are amplified by the op-amp by 10 times. The duration of the opening pulse corresponds to the minimum duration of the front of the input signal, which will be displayed without distortion, i.e., determines the bandwidth of the passed frequencies

A dual successive approximation ADC is connected to the outputs of the op-amp. It contains 1DA3, 2DA3 comparators and a DAC assembled on DD2, DD3 microcircuit elements and an R-2R matrix consisting of resistors R12-R19, R21 - R28. The outputs of the comparators are connected to pins 13 and 15 of the XP1 printer connector. The signal values ​​on these pins correspond to bits 3 and 4 of the 379H port. The DAC inputs are connected to pins 2-9 XP1, so the value of the DAC output signal can be set by writing a number from 378 to 0 (within 255...0,5 V) to the 4,5H port.

The measurement of voltages at the outputs of the op amps 1DA2 and 2DA2 implemented in the program by successive approximation is carried out as follows. First, the number 378' is set to the 2H port (2,5 V at the DAC output) and the state of the comparator outputs is checked (bit 3 and 4 of the 379H port). If the comparator worked, 26 is added to the specified number, if not, the second is subtracted from the first. Then the state of the comparators is checked again, 25 is added or subtracted. The procedure is repeated until 2r is added or subtracted. The resulting numbers correspond to the voltage values ​​at the outputs 1DA2 and 2DA2. The divider R20R29 sets the limits for changing the voltage at the DAC output from 0,5 to 4,5 V. To prevent the pulse shaper from triggering when determining the voltages at the outputs of the op-amp, a log of 1,2 is applied to the input D of the trigger DD0 at this time. writing to a port equal to 2 µs is 2x40 µs.

Synchronization is carried out in channel 1 using comparator DA1, the inverting input of which is connected through capacitors C1 and C2 to the output of the repeater on transistors 1VT1 and 1VT2. To increase the noise immunity, resistors R2 and R3 are introduced, which set the comparator to a hysteresis of 20 mV. The synchronization level is regulated by a variable resistor R4

The time delay from the moment the DA1 comparator is triggered to the moment the keys of the 1DA1 chip are opened is set by software and hardware at high-frequency ranges and by software at low-frequency ones. In the first case, the program, when it is ready to receive the next value of the input signals, sets and then removes the "Reset" signal from the trigger DD1.1 (bit 7 of port 37A = "1/0", pin 1 of the printer connector = '0/1 '). The trigger "cocked" in this way is triggered when the comparator DA1 is switched, and the transistor VT3 closes. As a result, one of the time-setting capacitors C2-C8 begins to charge from the current source made on the elements VT9. R7, R21. When the voltage on it reaches the voltage value on output of the DAC, the comparator DA2 is triggered and starts the pulse shaper (001.2, R11, C22), which controls the keys of the 1DA1 chip. outputs 2DA0 and 11DA0.The voltage values ​​​​are recorded in memory, the following value is set in the DAC, the trigger DD379 is "cocked" again, and the cycle repeats until a key is pressed

On the elements VT1, R5, R6, VD1, C3, C6, a node for determining the presence of synchronization is implemented. 1, and after "arming" the trigger DD10, the program waits for the comparator DA1 to fire. Otherwise, this trigger is started from the program by sequentially setting the "Reset" and "Set" signals (bits 1, 379 of port 1A - "1.1/2", pins 4, 7 of the printer connector = "37/10").

The values ​​from 0 to 255 are programmatically set at the DAC output, respectively, the delay from the moment of synchronization to the moment of opening the keys changes from the minimum value to the maximum, and the signal image is formed. The sweep period T (in seconds per division) is determined by the formula T \u2d CU / 4,5I, where C is the capacitance of the connected capacitor in farads; U - 0 V - maximum voltage of the DAC I 001 2 A - collector current of the transistor VTXNUMX

With a large capacitance of the time-setting capacitor, the signal image is formed too slowly. Therefore, the program implements a procedure for determining its capacitance, which checks how many times the program can read the signal values ​​during its charging. can be opened several times. In this case, intermediate values ​​are set at the DAC output, and the DD1 trigger is launched from the program by sequentially setting the "Reset" and "Set" signals.

If a sweep duration greater than 5 ms/div is selected. (switch SA2 in the lower - according to the scheme - position), the delay after switching the comparator DA1 is generated by software. The program "knows" about this by the zero value of bit 2 of port 379H. Trigger DD1.1 is launched from the program by sequentially setting the signals "Reset" and "Set" at specified intervals. The sweep time is set from the keyboard using the "0" - "9" keys.

The vertical beam shift is changed by variable resistors 1R13 and 2R13, the sweep duration (smoothly) - by resistor R28.

Program written in Turbo Pascal. It implements a fast Fourier transform (spectrum analyzer). The signal shown on the screen is converted. In order for the spectrum to be displayed correctly, it is necessary that an integer number of signal periods fit on the screen. This can be achieved by selecting the duration of the sweep with a variable resistor R8. The subroutine for fast conversion in Fortran is given in [2]. There you can also find an explanation of the method for determining the signal spectrum through the Fourier transform.

To power the set-top box, a source of stabilized voltages +12, +5, and -6 V is required. The current consumption in the +12 and -6 V circuits does not exceed 50, in the +5 V circuit - 150 mA. The ripple level should not exceed 1 mV. You can use a Chinese-made power supply (adapter) for 3 ... 12 V, 1A, modifying it, as shown in fig. 2.

Two-channel oscilloscope attachment to PC

The prefix is ​​mounted on a conventional breadboard. When repeating, it should be noted that the device is sensitive to external and internal pickups. For example, the penetration of the input signal into the timing chain can cause distortion of the observed signal. Therefore, the installation must be carried out in such a way that the connection of these set-top box circuits with each other and the penetration of external signals into them is minimal. Capacitors C4, C5 should be soldered directly to the terminals of the comparator DA1, elements 1DA1,1C10, 2C10, 1DA2, 2DA2 should be placed side by side. Resistors 1R1-1R8, 2R1-2R8, capacitors 1C1-1C9, 2C1-2C9, C7-C21 should be mounted on the corresponding switches.

The following parts can be used in the attachment. Resistors R12-R19, R21-R28 - with a permissible deviation from the nominal value of not more than ± 0,25%, for example, C2-29. The value of the resistors R12-R19, R28 is 1 ... 10 kOhm, R21-R27 - 0,5 ... 5 kOhm, and the resistance of the latter should be exactly two times less than the first (this can be achieved by parallel connection of resistors with a rating first). The remaining resistors are of any type with a tolerance of ± 5%. As time-setting (C7-C21, 1C1 -1C8, 2C1-2C8) it is desirable to use capacitors with the smallest possible deviation from the nominal values ​​\uXNUMXb\uXNUMXband small TKE.

Transistors 1VT1, 2VT1 - high-frequency field transistors with a cutoff voltage of at least 5 V (KP303G-KP303E, KP307Zh, etc.), 1VT2, 2VT2 - high-frequency npn structures with a static current transfer coefficient h21e of at least 50 (KT316D, KT325B, KT325V) , VT1, VT2 - any relevant structures with h21e not less than 400, VT3 - with a collector pulse current of at least 300 mA and an operating frequency of at least 200 MHz (KT3117A, 2N2222).

The input currents of the op amps 1DA2 and 2DA2 must be no more than 0,1 nA, the output voltage slew rate must be at least 20 V / μs (KR544UD2A, LF356). Comparators 1DA3, 2DA3, DA2 - with a voltage gain of at least 105, input currents of not more than 0,5 μA and a switching time of not more than 0,5 μs (KR554SAZ, LM211N, K521SAZ), DA1 - with a switching time of not more than 15 ns ( KR597CA2, AM686).

As a DD1 chip, you can use KR1594TM2 (74ACT74N), KR1533TM2 (74ALS74AN), DD2, DD3 -KR1594LN1 (74ACT04N), KR1554LN1 (74AC04N), KR1564LN1 (74HC04N). When using KR1594TM2, the frequency band is 0 ... 50 MHz (in this case, the capacitor C22 is not installed, and R11 is replaced with a resistor with a resistance of 4,7 kOhm), KR1533TM2 - 0 ... 15 MHz. The use of the KR1564LN1 microcircuit requires a change in the values ​​​​of the resistors R12 - R19, R28nR21 - R27: the resistance of the first must be at least 5 kOhm, the second - at least 2,5 kOhm (while maintaining the ratio 2R / R).

The resistance of the open channel MOS keys 1DA1 should be no more than 100 Ohm, the on / off time - no more than 10 not (KR590KN8, SD5002).

Setting up the set-top box begins with checking the input repeater modes. If the voltages at the emitters 1VT1, 2VT1 go beyond 1,5 ... 2,5 V, resistors 1R9 or 2R9 are selected. Then, using a signal source with a calibrated frequency, by selecting capacitors C7-C21 and resistor R9, the required values ​​​​of the sweep frequency are set at high-frequency ranges (it is set programmatically at low-frequency ones).

When working with an attachment, one should take into account the features of the stroboscopic effect, which are expressed, for example, in a significant distortion of the waveform with amplitude modulation, if the frequency of the modulating oscillation is close to the sampling frequency. In addition, the DA2 comparator introduces a delay of about 300 ns, which can make it difficult to observe the edges of signals with a large duty cycle. The set-top box can bring the greatest benefit when used in real time - as a storage oscilloscope, as well as with a sweep duration of less than 1 μs / div. - as an alternative to expensive high-frequency devices.


  1. Guk M. PC interfaces: a reference book. - St. Petersburg: Peter Kom, 1999.
  2. Gonorovsky I. S. Radio engineering circuits and signals: a textbook for universities. - M.: Radio and communication, 1986.

Author: A.Khabarov, Kovrov, Vladimir region

See other articles Section Computers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Improving the efficiency of PbS quantum dot solar cells 14.06.2024

The latest solar technology research represents a significant breakthrough in improving the efficiency of PbS quantum dot solar cells. This method, based on the use of pulsed light, offers promise for simplifying the production and expanding the applications of these cells. A research team from the Daegu Gyeongbuk Institute of Science and Technology has developed an innovative method that uses pulsed light to improve the electrical conductivity of PbS solar cells. This method can significantly reduce the processing time required to achieve similar results. PbS quantum dot solar cells have significant potential in solar technology due to their photovoltaic properties. However, the formation of defects on their surface can reduce their performance. The new method helps suppress defect formation and improve electrical conductivity. Using strong light to complete the process ... >>

Magnetic Power Bank 5000mAh 14.06.2024

Huawei introduces a convenient and multifunctional charger to the market - Huawei SuperCharge All-in-One Magnetic Power Bank. This magnetic battery allows you to quickly and conveniently charge your Huawei phone anywhere, anytime. With a thickness of just 11,26 mm and a weight of 141 grams, this portable power bank fits easily into a pocket or bag, making it ideal for travel and everyday use. Despite its compact size, this battery provides enough power to charge your phone on the go. The new product supports wired charging with a power of 25 W and wireless charging up to 15 W (and up to 30 W when connected to an adapter), providing fast charging for both the power bank itself and other devices. The battery is compatible with various fast charging protocols such as SCP, UFCS and PD, making it ideal for a wide range of devices. The power bank is also compatible with Huawei phones that support wireless charging. ... >>

Changes in a father's brain after the birth of a child 13.06.2024

A recent study conducted by scientists from the Hefei Institute of Physical Sciences of the Chinese Academy of Sciences found interesting changes in the brains of men after becoming fathers. These changes were associated with involvement in child care, sleep problems, and mental health symptoms. Scientists found that men who became fathers experienced a loss of brain volume after giving birth. This volume loss was associated with greater involvement in parenting, sleep problems, and mental health symptoms. Researchers have found significant changes in men's brains between the prenatal and postnatal periods. In particular, there was a loss of gray matter volume, especially in parts of the brain responsible for higher functions such as language, memory, problem solving and decision making. Men who paid more attention to their children and spent more time with them lost more gray matter in their brains. This also affected their mental health ... >>

Random news from the Archive

Electric motor without magnets 20.05.2021

German experts have developed the first electric motor, the efficiency level of which is 95%. Some of the usual materials are not used in its design.

Introduced the first motor that does not contain rare earth materials. Such an engine does not harm the environment. This does not affect its effectiveness in any way - it, on the contrary, has increased to 95%.

As early as 5 years ago, Honda announced that it was starting to develop a deformed magnet that does not contain rare earth materials. At the time, it was considered an important breakthrough. With a successful outcome, the company could start producing electric motors without heavy metals.

German motor supplier Mahle presented its own project - the first ever electric motor that does not use magnets. Now the engine is going through the last stage of development. The main feature is that it does not need to use rare earth elements to create it.

Such a breakthrough will make production more environmentally friendly. In addition, the new electric motor has advantages in terms of resource costs.

Other interesting news:

▪ A new way to get airbrushed

▪ Immunity works according to the season

▪ Asphalt in vegetable oil

▪ Creating Super Potatoes

▪ Stress damages the bones

News feed of science and technology, new electronics


Interesting materials of the Free Technical Library:

▪ section of the site Big encyclopedia for children and adults. Selection of articles

▪ article Polyclinic Pediatrics. Crib

▪ article Why do most Japanese applicants take Kit Kat chocolates to the exam? Detailed answer

▪ article Editing the cutting tool. home workshop

▪ article Player powered by a bicycle generator. Encyclopedia of radio electronics and electrical engineering

▪ article Dialog timer-machine. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:


Email (optional):

A comment:

All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews