We live in an analog world, where we experience temperatures, pressures, sounds, colors, etc., in seemingly infinite values. There are infinite temperature values between 70-71 degrees, for example, and an infinite number of pressure values between 50-51 psi.
Sensors today continue to use analog circuitry to measure a natural process, but more often, the electrical analog signal is then converted to a digital (binary) signal.
How a signal is converted from analog to digital?
A variety of mechanical and electrical transducer technologies, such as Bourdon tube, piezoresistive, manometers, strain gages, and capacitive can be found in a typical pressure sensor. Any one of these can be used to sense pressure and convert the physical pressure into an analog electrical signal. The analog output continuously varies as the pressure rises and lowers. For many sensors of the past, the story ends here. The sensor works well if certain precautions are met, but enhanced features are limited. This sensor would be comprised of electrical components, such as diodes, capacitors, op-amps, and resistors, with typical signal outputs of 0-5VDC, 0-10VDC, +/- 10V, 4-20mA, 0-20mA, etc.
Analog output sensors provide an infinitely varying signal and converting it to digital cannot improve the accuracy of the measured value. Nor will it increase the amount of information we receive from the natural world. So why do we do it?
Why convert to digital signals?
There are several good reasons for converting analog to digital signals. Analog uses more power than digital and it’s more difficult to encrypt, decode, or synchronize. Analog outputs also have a slow rate of transmission. But typically, the biggest reasons are that analog signals weaken and pick up electrical noise as they traverse, and they’re difficult to process and store.
Noises and transmission rates
Electrical energy from motors, contactors, and other electrical devices can become induced into the sensor’s analog electronics, creating noise on the signal. Analog amplifiers can increase the signal strength to extend transmission distances, but it also amplifies the induced noise. The transmission of digital signals, on the other hand, is faster and has negligible distortion. And although a digital signal may need an amplifier for long lengths, too, digital regeneration can more easily correct any 0/1 errors and amplify the signal without amplifying any noise.
Converting a continuously variable signal into 1s and 0s
An analog-to-digital converter (ADC) is an integrated circuit that performs the conversion. While this process includes many important steps, and there are several popular techniques, each has three main processes: sampling, quantizing, and encoding.
Sampling is a process used to select a subset of values from a larger set. In our case, we are starting with an infinite set of values from the analog signal and want to capture a snapshot of the signal at certain time intervals. With a sampling rate of 500Hz, the ADC will grab and hold a value from the analog signal 500 times per second.
Once the signal is sampled, it is quantized. This involves mapping the sample from a set of infinite signal values down to a finite number of values. If there were 100 available increments for quantizing a 0-5vdc signal, for example, the infinite output would now be reduced to 100 available signal level choices with 0 volts mapping as 0, 2.5 volts mapping as 50, and 5 volts as 99.
Lastly, the quantized signal level is encoded to binary form, where it can benefit from the processing, storage, and transmission advantages that come with a digital signal. A quantized level of 50, encoding with an 8-bit processor, would be 00011001, equating to a 2.5vdc signal.
In actual practice, we do not use 100 increments to quantize. The ADC, which is based on the number of bits within the processor within the ADC chip, determines the amount of quantizing increments or levels. Eight bits provide 256 increments. Twelve bits provide 4096 increments or steps, as it is also referred.
Is 12 bits worth of increments (4096 steps) enough resolution?
5VDC /4096 steps = .00122V/step or 1.22mV/step
In most applications, a small step of 1.22mV is acceptable. The original analog signal is now sampled at a specific time, and an increment closest to the value is chosen as the signal level. The quantizing process in this case will round the infinite analog value that was sampled to the nearest multiple of 1.22mV.
The output signal is now a square wave, rather than the original sinusoidal. The peak of each square wave is always the same amplitude, with the peak of the wave representing a “1” and the trough or zero amplitude being a “0.”
The sensor output, now digitized, is capable of further processing, offering enhanced product features such as faster transmission rates, negligible distortion, and the ability to communicate to advanced systems such as IO-Link.
A digital to analog converter (DAC) can convert the signal back to analog, but complete restoration is no longer possible due to the samples taken only at specific times, and the quantizing step rounding off to the nearest increment.
So, the next time you see a spec sheet that says “12-bit resolution,” rest assured you are working with a sensor that has some enhanced capabilities.
One Reply to “Converting Analog Signals to Digital for Improved Performance”