The comparator is a device designed to compare any values ββ(from lat. Comparare - "compare"). It is an operational amplifier with a large multiplication factor. It has inputs: direct and inverse. If necessary, the reference signal can be connected to any of them.
How does the comparator work?
A constant signal called a reference signal is applied to one of the inputs. It is used as a reference for comparison. The second receives the test signal. The output is a transistor that changes its state depending on the conditions:
- Direct input voltage is higher than the inverse - the transistor is open.
- The voltage of the inverse input is higher than the direct - closed.
Accordingly, the output voltage changes abruptly from minimum to maximum, or vice versa.
The voltage of the output stages corresponds to the input levels of most digital circuits. This is necessary for cases when the comparator is a pulse shaper that controls the operation of logic elements.
Comparator Application
Used in electrical signal measurement circuits and in analog-to-digital converters. In the logical circuits, the βorβ and βnotβ elements work, which are also comparators. Accordingly, the use of this component is not limited to specific examples, since it is used universally.
It is worth noting that the comparison device can be made from any operational amplifier, but not vice versa. The gain of the comparator is quite high. Accordingly, its inputs are very sensitive to the voltage difference between them. A divergence of several millivolts significantly changes the output voltage.
Thus, the comparator allows you to observe the minimum fluctuation in the input voltage levels. This makes it an indispensable element of comparison schemes and measuring instruments of high accuracy:
- indicators of the level of the incoming signal;
- metal detectors;
- micro and millivoltmeters;
- electromagnetic radiation detectors;
- laboratory sensors
- mass comparators;
- gas analyzers.
The principle of operation of the analog comparator
An analog comparator compares continuous signals - input measured and input reference. How the device works is shown in the graph below.
With a slow change in the input signal, the comparator switches repeatedly over a short period of time. This phenomenon is called "electronic bounce." Its presence significantly reduces the effectiveness of the comparison. Because often repeated changes in the output state, the terminal transistor enters the saturation state.
To reduce the effect of "electronic bounce", POS - positive feedback is introduced into the circuit. It provides hysteresis - a small difference between the on and off voltage levels. Some comparators have built-in PIC, which reduces the number of additional structural elements. For example, with a slight loss of sensitivity, they achieve stable operation of the comparator.
Features of the digital comparator
A digital comparator is a one-bit analog-to-digital converter. The output voltage is either a logical β0β or β1β. Both analog and digital signals can be input. The device is used as a pulse shaper to interface sensor circuits and display devices. It can be used to analyze the spectrum of a sound or light signal. A comparator is also the logical elements βorβ and βnotβ used in computer technology.
Theoretically, with slightly small fluctuations in the input signal level, a state of output uncertainty may occur. In practice, the equality of the measured and reference voltages does not occur. Because the comparator has limited gain or positive feedback.
A typical example is the Schmitt trigger (TS). It does not match the on and off levels, which is determined by the PIC. This allows you to neglect the discrete noise during the operation of the comparator.
Comparator Chip
The industry produces comparators in the form of integrated circuits. Their use allows you to create compact devices with a minimum of attachments. Also the advantage of small parts in the small length of the connecting conductors. In conditions of increased electromagnetic radiation, they are receiving antennas for all kinds of electrical interference.
Operational amplifier comparator
Comparators have a lot of similarities with operational amplifiers:
- gain;
- input impedance;
- value of input currents;
- saturation state.
Sensitivity, in other words resolution, is a specific parameter. It determines the accuracy of the comparison. It is characterized by the minimum signal difference at which the comparator is triggered. Its value in integrated circuits has hundreds of microvolts. This is slightly worse than comparators on operational amplifiers.
Switching time characterizes the speed of the comparators. It is determined by the minimum time the output signal changes: from the moment of comparison to the moment of operation. Depends on the difference of the signals at the inputs. The switching times are tens and hundreds of nanoseconds.
How to make a comparator with your own hands?
Those who can read the circuit diagrams and solder easily assemble the simplest comparators for use in everyday life. The scope is very extensive. On them you can build a lot of structures with minimal cost. The simplest comparator is an operational amplifier without positive feedback.
As a basis for the comparator, the LM339 series op amp is used. To control and visualize the operation of the circuit, red and green indicators are introduced. When connecting power to the op-amp, one of the LEDs should light up, and which one does not matter. This is determined by many factors: network interference on the circuit, features of the party and the parameters of the OS. Even if you take several identical chips, you will get different results.
If the input signal is close to "0" - green will glow, and if close to the supply voltage, then the red LED. Then you can try to change the logical state of the comparator by applying a voltage equal to, for example, half the supply voltage of the op-amp to one of the inputs. The output signal does not depend on the absolute value of the voltages at the direct and inverse input. But only from the difference in voltage.
These experiments demonstrate the operation of the comparator without PIC. Such a comparator can be used where special measurement accuracy is not required. Such devices are household thermostats, chargers for car batteries, desulphation (recovery) devices for car batteries, photo relay.
Practical example of comparator
The circuit diagram shows a light sensor.
The reference voltage is set by resistors RV1 and R2. At the same time, RV1 serves as a regulator of the design sensitivity. Indication is implemented on the D1 LED. The sensor is the LDR1 element, which changes the ohmic resistance depending on the illumination. The comparator itself is represented by the operational amplifier LM324. This simple device demonstrates how the comparator works in practice.
Mass comparators: concept
The mass comparator is a device designed to clarify the difference in the mass values ββof weights while controlling weight and weight standards, as well as for precision weighing. The most accurate mass comparators can weigh any sample and compare it with another similar to it. This happens at the atomic level. The need for such devices arises from the imperfection of reference samples of measures of weight and volume of liquid.
Examples and use of weight refinement devices
The Russian mass standard is a platinum cylinder. It was copied from the French sample 125 years ago. Over the past years, the standard has lost in the form of oxides about 40 micrograms from the original weight. Accordingly, its use for the needs of industries with high accuracy of mass measurement is now difficult.
A new mass standard has been developed. Scientists have designated as such a silicon ball with an even number of atoms. Now this is the most accurate version of the standard kilogram. Its specifications are accepted by the international community for use.
The created sample needs to be copied multiple times. Since modern areas of science, especially pharmacology, bioengineering, computer electronics, nanotechnological developments require precision measurement accuracy. For such areas of science and technology, hundredths of a microgram are critical. This task should be solved by the atomic mass comparator - a device capable of determining the difference in several particles.
The atomic comparator uses the reference signal received from a high-precision crystal oscillator for measurements . The measured voltage is taken from a quantum discriminator that determines the stability of the line of the smallest particles. Its changes are caused by a discrepancy in the number of atoms of the sample. Therefore, now it is the most accurate measuring device.
There are less accurate mass comparators. Their cost is much lower than atomic, but for all of them there is work in industry, commerce, standardization.