Converting Analog Signals to Digital for Improved Performance

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.

Simplify Your Existing Analog Sensor Connection

In my last blog we reviewed how utilizing IO-Link sensors over analog sensors could be cost effective solution as it eliminates need for all the expensive analog I/O cards and shielded cables. In this blog we will see how IO-Link can effectively integrate your analog sensor- in case you want to retrofit your old sensor or maybe just because the IO-Link version for the sensor is not available.

Just to review few main points:

  1. Your beloved analog sensor typically requires a shielded cable run from the sensor to the control cabinet. The shielded sensor cables are usually 1.5x- 2x the cost of the standard M12 prox cables that you probably use elsewhere in the system.
  2. Where to connect the shielded cable? Now, you require analog card (typically 4 channel), which is also expensive compared to digital I/O cards — May be equally expensive as the IO-Link card. But, a 4 channel IO-Link master card could offer lot more compared to the 4-channel analog card. Simply put- your analog card can only take another 3 channels of analog signal where as there are a host of devices that you can connect to the IO-Link master to make your system scalable or future proof – more on this later- I get so excited talking about IO-Link.

In any case, coming back to the point- in general we pay a lot of money to add a single analog sensor in the system.  What if we could convert the analog signal to digital (same function that the analog card does), closer to the measurement sensor and get the digital data over a standard prox cable back to the control cabinet or to IO-Link? This way, we can totally eliminate or at least reduce the shielded cable run from sensor to the converter.

IO-Link3ConductorsBalluff offers this A/D converter module — at Balluff we refer to it as “Hobbit” – it is more like a small adapter that fits directly onto a sensor using the standard M12 fittings. The other side is M12 IO-Link connection to take the data back to the controller via an IO-Link master.  This single channel “Hobbit” offers 14 bits of conversion – to ensure you don’t lose data in translation.

IOLinkHubIf you need more than a single channel, Balluff also offers a 4-channel IO-Link hub, this still utilizes only a single port on the IO-Link master. Now, you have 3 or 7 ports (in case of 8 port IO-Link master), open to connect host of other devices such as digital I/O hubs, valve connectors, SmartLights, RFID, color sensors, Pressure sensors, linear measurement devices and so on…

I hope this blog helps you get little more clarity of many benefits of IO-Link. You can always learn more about the benefits of IO-Link at www.balluff.us/iolink.

On behalf of entire Balluff team, I want to wish you all Happy Holidays and Happy New Year!