In modern industrial production, especially automated production, various sensors are used to monitor and control various parameters in the production process, ensuring that equipment operates in normal or optimal condition and that products achieve the best quality. From the vastness of space to the immensity of the ocean, and to various complex engineering systems, almost every modern project relies on a wide variety of sensors.
Therefore, it is no exaggeration to say that without a large number of excellent sensors, modern production would lose its foundation.
As a detection device, a sensor can sense the measured information and transform it into an electrical signal or other required form of information output according to a certain rule, in order to meet the requirements of information transmission, processing, storage, display, recording, and control. However, we don't know much about the sensor output options. Therefore, the editor of Gongcai.com has compiled an article about sensor output options, taking the MaxBotix type ultrasonic sensor as an example.
Key factors
Analog voltage provides range information for the linear voltage range.
The pulse width is represented digitally using the pulse output range that directly corresponds to that range.
The serial data output of the sensor provided by the Industrial Data Network (IDN) offers asynchronous data at TTL voltage levels.
The analog envelope output is the minimum filtered output of the acoustic waveform.
At Maxbotix, many of our sensors offer multiple outputs available simultaneously, each transmitting information about the range measured by the sensor. Each output format is sent using a unique communication format and has its own distinct advantages. This article outlines the benefits and operation of some of these outputs.
Different sensor output options
Most sensors simultaneously provide three distinct range outputs. The sensor's datasheet will outline all the outputs for a particular sensor. Each of these outputs is an electronic data stream representing a range reading. The standard outputs used by Maxbotix are pulse width, serial data (RS232 or TTL type), analog voltage, I2C, and analog envelope.
Any output format allows you to acquire electronic range information from a sensor and convert it into a readable format. While each product has its own advantages, some require more knowledge and equipment. Some outputs are more accurate than others, but novice users may find that more accurate outputs are beyond their knowledge of electronic interfaces and coding.
Analog voltage (AN)
Analog voltage is one of the most popular outputs from our sensors. This output provides range information through a linear scaling of the voltage; that is, the voltage, which increases as a target increases, decreases as distance from the sensor decreases. The scaling factor varies between sensor lines but can be found in the datasheet. While analog voltage is easy to use, it is the least accurate output.
Pulse Width (PW)
The PW pin uses a digital representation of the pulse width output range. The width of a high pulse directly corresponds to that range. A narrower high pulse indicates a lower range, and a wider high pulse indicates a larger range. The pulse will be at a voltage level between 0 and Vcc. The datasheet lists the precise ratio between the uS pulse width and the range. While reading the pulse width requires more advanced hardware than a voltmeter, the pulse width provides a more accurate range output.
Serial data (RS232 or TTL)
Most microcontrollers have a built-in UART (Universal Asynchronous Receiver/Transmitter) processor for reading and sending serial data. Our sensor's serial output provides asynchronous data of TTL voltage levels. The output is an ASCII uppercase "R" followed by ASCII alphanumeric characters indicating the range. This output will require a properly configured serial terminal program. You can download the terminal program and view the settings in this article. Because the data is presented in a binary data format, the serial output is the most accurate.
Many of our sensors output serial data using the RS232 protocol at the V232 voltage level, but some sensors (such as the MB7380) output serial data in TTL format. These two protocols differ only at the hardware level and are essentially mirror images of each other. Many inverters are available that can switch between the two protocols. Furthermore, the HRLV-MaxSonar-EZ series can output in either of these formats. The terminal program settings are identical for both formats.
Simulated envelope (AE)
The analog envelope output is the minimally filtered output of the acoustic waveform. This format is useful if you wish to perform your own signal processing at the cost of more complex circuitry. The output allows users to apply their own filtering and target detection schemes. The straight line along the bottom time axis corresponds to the distance in a linear fashion, and the height of each peak corresponds to the acoustic return of the target. Generally, higher peaks indicate a better target.