Computers and modern gadgets

This article presents a simple logic analyzer that works with the USBee v1.1.57 and Logic v1.1.15 shells. Assembled on a common microcircuit CY7C68013A from Cypress. I had a ready-made board with this chip, ordered from the Aliexpress website. This is what she looks like:

I wanted to make an LPT port on it, but then the need for it disappeared and so it lay around unclaimed. I needed a simple logic analyzer. It was decided to do it on this board. There are many circuits based on this chip on the Internet. It was necessary to add a buffer for data transfer, provide input protection and the ability to choose which shell to work with. The expansion board is placed on top of the main board. I will say right away that the circuit, board, firmware and everything necessary to work with this logic analyzer is at the bottom of the article. The 74LVC4245 chip was used as a buffer; you can use the 74LVC8T245A; they are completely identical. The protective function at the input is performed by BAV99 diode assemblies. And so this scheme was born:


Use jumper J1 to select the direction of data transfer. In the closed state for data reception, in the open state for transmission. There is such a shell as USBee AX Test Pod. It contains many test utilities that can be used to test the operation of the assembled device. One possibility is to generate different frequencies on the XP3 pins. True, you can’t ask them yourself. 8 different frequencies are displayed at once. You can also set outputs to 0 or 1 and many other tests. Use the XP5 jumper to select which shell we will work with USBee v1.1.57 or Logic v1.1.15. Firmware for different shells is respectively loaded into U2 and U3. The XP4 jumper is write protected. It will be needed when starting the Logic shell. Jumper J2 sets the voltage of the input levels. If it is closed, then the input signal level should be 3.3 V. It is also possible to set the signal level to the same voltage as the voltage being supplied to the device being diagnosed, but not more than 5V. To do this, open J2 and apply the supply voltage to the board being diagnosed to pin 10 of XP3. Also, do not forget to connect the common wire of the analyzer with the board being diagnosed. First, we need to modify the main board, that is, remove the 24C128 memory chip.

My board also did not have a GND connection between the USB connector and GND CY7C68013A had to be wired together.


No further changes need to be made.

Now we make our scarf measuring 41mm x 58mm. As a result, we get the following result:



We connect two boards:



To get started, we need to flash the memory chips. To do this, install the utility from Cypress CySuiteUSB_3_4_7_B204. We remove the XP5 jumper from the board and connect the board to the PC, an unknown device will appear in the device manager.


Install drivers from the file Driver_Cypress_win7 win8. We tell the dispatcher to look for drivers in this folder. The system will install the necessary driver itself. A new device will appear in the USB controllers:


Launch the installed program Control Center. A window will open in front of us, where our device should be at the top.

Select the Option tab then EZ-USB Interface:

The following window will open:


We are not changing anything here. We only need the S EEPROM button. Use the XP5 jumper to select one of the memory chips. Click S EEPROM and indicate where our firmware is stored. Select the firmware depending on the type of memory and click "Open". The numbers at the end of the firmware name indicate what type of memory the firmware is for. For 24C01 you need to select USBeeAX_01, and for 24C02 USBeeAX_01.


The process of uploading information will begin. If the firmware is successfully installed, there should be a message like in the screenshot. The number of bytes may vary depending on the selected firmware.


We press the reset button on the board and see a new unidentified device in the device manager. Installing drivers. Drivers will not be installed in automatic mode. In manual mode, we indicate what to install from the disk and select the driver from the Driver Cypress win7_win8 folder. It worked for me on Windows 8.1 with the EZ-USB FX1 No EEPROM driver (3.4.5.000).

Sensations are the product of activity analyzers person. An analyzer is an interconnected complex of nerve formations that receives signals, transforms them, configures the receptor apparatus, transmits information to nerve centers, processes it and deciphers it. I. P. Pavlov believed that the analyzer consists of three elements:sensory organ conducting pathways And cortical section.According to modern concepts, the analyzer includes at least five departments:

  1. receptor;
  2. conductive;
  3. setting block;
  4. filtration unit;
  5. analysis block.

Since the conductor section is essentially just an “electrical cable” that conducts electrical impulses, the most important role is played by the four sections of the analyzer (Fig. 5.2). The feedback system allows you to make adjustments to the operation of the receptor section when external conditions change (for example, fine-tuning the analyzer with different impact forces).

Rice. 5.2.

If we take the human visual analyzer as an example, through which most of the information is received, then these five sections are represented by specific nerve centers (Table 5.1).

Table 5.1. Structural and functional characteristics of the constituent elements of the visual analyzer

Components (blocks) of the visual analyzer Structure Functions
Receptor block Formed by special photoreceptor cells (rods and cones) Photoreceptors are capable of producing electrical potentials in response to light exposure to the human eye.
Conductive blockFormed first by the optic nerves, and after their decussation - by the optic tract Conducting electrical impulses from receptors to the brain
Setting blockAnterior tubercles of the midbrain quadrigeminal Responsible for the formation of a clear image on the retina. Clarity is ensured, firstly, by creating an optimal level of illumination, and secondly, by accurately focusing the image on the retina. The first task is carried out by automatically changing the diameter of the pupillary opening, and the second - by changing the curvature of the lens
Filtration unitThalamus (lateral geniculate body) Ensures that only new information passes through to the cerebral cortex, filtering out repetitive signals
Analysis blockThe corresponding area of ​​the cerebral cortex (for the visual analyzer - the occipital lobe) Provides detailed analysis of the image and the formation of visual sensations - that is, only in this part of the brain are physiological phenomena transformed into mental ones

In addition to the visual analyzer, with the help of which a person receives a significant amount of information about the world around him, other analyzers that perceive chemical, mechanical, temperature and other changes in the external and internal environment are also important for compiling a holistic picture of the world (Fig. 5.3).

The block diagram of a sequential type analyzer is shown in Fig. 2.23.

Rice. 2.23. Block diagram of a serial type analyzer

Input signal U in arrives at the input device 1 analyzer, where it is amplified by an amplifier or attenuated by an attenuator to the desired value and fed to a mixer 2 . The mixer multiplies the input signal and the local oscillator signal 6 , the frequency of which varies linearly using a modulator 7 . A resonator is installed at the mixer output 3 , which isolates the signals of the sum or difference frequency of the local oscillator and the input signal.

In Fig. Figure 2.24 shows a block diagram of the analyzer, which differs from the block diagram shown in Fig. 2.23, by the presence of a frequency detector that converts the local oscillator frequency into DC voltage.

Rice. 2.24. Block diagram of an analyzer with a frequency detector:

1 – input device, 2 – mixer, 3 – resonator, 4 – detector,

5 – broadband amplifier, 6 – local oscillator, 7 – modulator, 8 – horizontal deflection amplifier, 9 – indicator, 10 – frequency detector

This makes it possible to reduce the requirements for the local oscillator regarding frequency stability and linearity of the modulation characteristic. In this scheme, the accuracy of the frequency reading is determined by the stability of the transmission coefficient of the frequency detector and the linearity of its characteristics in the frequency range of the tunable local oscillator.

Analyzers use double frequency conversion to reduce interference along the mirror channel. This interference may occur because the resonator will not be able to distinguish between the two signals if the condition

In the analyzer circuit with double frequency conversion (Fig. 2.25), the signal after the input device goes to the mixer 11 . It is also supplied with voltage from a manually tunable local oscillator 12 . Between mixers 1 And 2 intermediate frequency amplifier turned on 11 .

Rice. 2.25. Block diagram of an analyzer with two local oscillators:

1 – input device; 2 – second mixer; 3 – resonator; 4 – detector; 5 – wideband amplifier; 6 – second local oscillator; 7 – modulator; 8 – horizontal deflection amplifier; 9 – indicator; 10 – first mixer; 11 – intermediate frequency amplifier; 12 – first local oscillator


To suppress interference along the mirror channel, the intermediate frequency is chosen greater than the upper frequency of the signal spectrum. The use of two local oscillators allows you to calibrate the oscilloscope screen by frequency, since when the frequency of the first local oscillator changes, the scale markings do not change. When using a single local oscillator, changing its frequency range causes a change in frequency scaling. Spectrum analyzers use peak or rms detectors, and sometimes a series connection of the rms and peak detectors. To increase the accuracy of analyzers, recording instruments are used instead of a cathode ray tube. To obtain spectrum amplitude values ​​on a logarithmic scale (in dB), a linear-logarithmic converter is connected in front of the recording device.

The block diagram of a parallel type spectrum analyzer is shown in Fig. 2.26.

Rice. 2.26. Block diagram of a parallel type analyzer

The signal under study after the input device 1 arrives at P resonators 2i,…,2n. Voltage from the resonators after passing through the detector 3 recorded by a recording device 4 . In the automatic version of the parallel analyzer, a commutator is installed instead of a switch. Synchronously with channel switching, the scan of the recording device changes. In addition to the considered serial and parallel spectrum analyzers, there are combined ones, one of the possible schemes of which is shown in Fig. 2.27.

Rice. 2.27. Block diagram of an automatic analyzer of parallel type

In this circuit, the analyzed signal after the input device 1 goes to the mixer 2 . Mixed with local oscillator voltage 7 the intermediate frequency signal is also analyzed by resonators 3i,…,3n. The output voltage from the resonators passes through the switch 4 and detector 5 to the recording device 6 . The latter's deployment device is synchronized with the operation of the switch and modulator 8 , which changes the local oscillator frequency according to a certain law. Combined analyzers allow you to use the speed of parallel and the simplicity of the circuit of serial analyzers.

Let's consider the block diagram of an analyzer without resonators (Fig. 2.28), which implements expression (2.26). The signal under study after the input device 7 , goes to two multipliers 3 , in one of which it is multiplied by sinωt, and in the other by cosωt. Sine-cosine voltages are generated by a generator 2 . From the output of the voltage multipliers, they are supplied to the integrators 4 , at the output of which after time t we obtain voltages proportional to the sine and cosine components of the spectrum.

Rice. 2.28. Block diagram of an analyzer without resonators

, (2.43)

. (2.44)

If all devices in the circuit are ideal, we have an ideal analyzer with infinite resolution (at t И → ∞). Let us assume that the integrator is replaced by an RC filter with a time constant τ = RC. Filter transmission coefficient

. (2.46)

Let the input signal

, (2.47)

then the voltage at the output of the multipliers

If we take ω ≈ ω r, then at the output of the RC filter the voltage of the total frequency (ω + ω r) will be significantly less than the voltage of the difference frequency. Therefore we can write that

, (2.50)

. (2.51)

After squaring, summing and taking the root, we get

. (2.52)

This expression is similar to the expression for a simple oscillating circuit. LC generators, RC generators and relaxation generators are used as such generators. With relaxation generators, good linearity of the modulation characteristic can be obtained.

Rice. 2.29. Block diagram of a sweeping frequency generator

with feedback

To obtain a sinusoidal waveform, a low-pass filter is placed at their output.

In the frequency response, these generators are not common due to the difficulty of obtaining a wide frequency sweep band with a sinusoidal output voltage. Let's consider ways to improve the linearity of the modulation characteristic of the frequency response.

Another way is to use negative feedback. A frequency BH detector is used as a feedback link. Since the characteristics of this circuit are determined mainly by the feedback link, strict requirements are imposed on the frequency detector: it must have high stability and good linearity in the frequency swing range.

In addition to the methods discussed, to improve the linearity of the modulation characteristic, correction of the modulating voltage using nonlinear elements is used.

To obtain frequency marks on the indicator screen, the zero beat method or the frequency stopping method is used. The IFC diagram constructed using the zero beat method is shown in Fig. 2.30.

Rice. 2.30. Block diagram of the mark generator

The input parameters of the device include: sensitivity; bandwidth; dynamic range; input resistance.

The amplitude frequency response error is determined by the unevenness of the output voltage in the swing band, the unevenness of the frequency response and the nonlinearity of the vertical deflection detector and amplifier, and the amplitude reading error. The unevenness of the output voltage is estimated by the expression

, (2.53)

where U max and U min are the maximum and minimum values ​​of the output voltage in the swing band.

The unevenness of the natural frequency response of the frequency response in the swing band is determined by the image on the screen of the indicator of the output voltage of the device, measured by its own detector, and is calculated by the formula

, (2.54)

where l max and l min are the maximum and minimum beam deviations in the swing band.

The error of the frequency response is determined by the error of the mark node and the nonlinearity of the frequency scale, which can be determined by the formula

, (2.55)

where Δ f max – maximum frequency deviation from the linear law of its change; f Bf N high and low swing bands.

When studying the bandwidth of resonant devices, it is convenient to have three marks on the screen: the central one corresponds to the resonant frequency, and the two outer ones mark the bandwidth of the device. To obtain these marks, you need a low-frequency LFO generator, which modulates the amplitude of the calibration generator. The method of stopping the frequency is that the modulating voltage does not have a sawtooth, but a sawtooth-step shape (Fig. 2.31).

Fig.2.31. Line-step voltage graph

At a moment in time 1 , stopping the frequency change, a bright dot will appear on the screen and at this moment the frequency is measured. To obtain high accuracy, a digital frequency meter is used. By changing the stopping moment, you can measure the frequency of any point in the frequency response.

This multi-band, or rather 10-band, LED spectrum analyzer for music is made on an ATMEGA8 microcontroller. Brief technical specifications:

Frequencies: 31Hz, 62Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz.
- Matrix size - 10x10.
- Possible modes: Point, line, peak registration.
- Input signal type: Linear stereo / Linear mono.

The analyzer has 4 indication modes: Line (column) with and without peak indication, and “dot”, also with and without peak indication. Two different inputs: stereo, via on-board mixer, and mono. Now let's move on to the hardware. Spectrum analyzer circuit:

The diagram shows that the device consists of two “blocks”, the matrix itself and the control board. The circuit is not at all complicated, everything is implemented on one controller from Atmega8. Quartz in the circuit is used at 18mhz. The CD4028 chip has a Soviet analogue K176ID1. and the firmware for MK is in the archive. The printed circuit board of the matrix is ​​one-sided, so the common anodes of the LEDs are soldered like this:


Fuses MK:


The inductor going to the CD4028 chip (K176ID1) plays a relatively important role, because If you use low-quality power supplies, this microcircuit may not work correctly. However, when powered from a high-quality source, the inductor can be replaced with a jumper. The jumpers on the board are replaced with switches, and the display mode is set with them.

Many are not averse to complementing the pleasant sound with interesting visual effects. This is what this console is designed for, which is a kind of multi-band equalizer that divides the spectrum of the melody by frequency and displays them on the indicator in the form of jumping bars. This spectrum analyzer is connected to five buttons that can be used to adjust the brightness of the display backlight, sensitivity, and change effects (racks, stripes, lines, oval, or ladder). In addition, the analyzer saves settings in memory, and you can also select the converter frequency using a jumper.

Spectrum analyzer circuit

Backlight adjustment was based on hardware PWM, at the output of OC2. The archive contains programs for displays 16x2, 20x2, 24x2, and 20x4. In principle, the firmware can be adapted for almost any screen (with an HD44780 controller), so if you have a display that the analyzer does not support, it is not difficult to remake the existing ones.

  1. The signal mass reaches the “Agnd” point on the board, then the analyzer and device masses cannot be connected to each other.
  2. The analyzer can be replenished symmetrically, +-2.5 V, “Agnd” will become ground and can be connected to the ground of the device.
  3. If the masses of the analyzer and the device must be connected, and it is not possible to replenish the analyzer symmetrically, you should add a DC component of the signal to raise it to the level of 2.5 V. We connect the masses and increase the signal with an R/R divider (resistors of the order of 100 kOhm), connecting it via the power bus. The signal to the divider is supplied through a capacitor (about 1 µF).

How to configure the analyzer to work with a computer. Remember that if you want to build it into an amplifier or other device, take into account the fact that different signal levels may appear there. If you have the ability to supply a signal from a generator (from a computer via line-in), this will simplify the setup.

Connect and run the circuit, connect the output of the computer sound card, ground to Agnd. The masses of the system and the computer cannot be connected! Set the function generator to sine, frequency 400 Hz, gain approximately 80%.

Set the left potentiometer so that only one segment is deflected. Change the oscillator frequency to 10 kHz, set the right potentiometer in the same way.

For accurate calibration, you will need two programs - “generator” and “oscilloscope”. Make sure the signal is not distorted. The elements used to assemble the input filter must be identical to those in the diagram, this primarily applies to capacitors. In the following figures, there is a distorted signal on top, and a clean one below it, which is what needs to be achieved.

Video of work


Connection diagram, structure and principle of operation of a standard network transformer for an input voltage of 220 V.

If you notice an error, select a piece of text and press Ctrl+Enter
SHARE:
Computers and modern gadgets