- Analog voltage provides range information on a linear voltage scale
- Pulse width outputs a digital representation of range using a pulse which directly corresponds with the range
- Serial data output of our sensors delivers asynchronous data at TTL voltage levels
- The analog envelope output is a minimally filtered output of the acoustic waveform
This article discusses the different sensor output options available. Also, the article explains the differences between these outputs and shows examples of the output formats. If you have questions about the outputs used by Maxbotix, please contact us.
At Maxbotix, many of our sensors offer several outputs that are simultaneously available. Each of these outputs sends the range information measured by the sensor. Each output format is sent in a unique communication format with its own unique advantages. This article outlines the benefits and operation of a number of these outputs.
The Different Sensor Output Options
The majority of our sensors simultaneously offer three unique range outputs. The sensor’s datasheet will outline all outputs for your specific sensor. Each of these outputs is an electronic data stream that represents the range reading. The standard outputs used by Maxbotix are pulse width, serial data (either RS232 style or TTL style), analog voltage, I2C, and analog envelope.
Any output format allows you to take the electronic range information from the sensor and turn it into a readable format. While each output has its own benefits, some require more knowledge and equipment to use. Some outputs are more accurate than others, but the beginning user may find that a more accurate output is beyond their scope of electronic interface and coding knowledge.
Analog Voltage (AN)
Analog voltage is one of the most popular outputs of our sensors. This output provides range information by a linear scaling of voltage; where the voltage that gets larger as a target increases in distance from the sensor or smaller as the distance decreases. The scaling factor varies between sensor lines, but it can be found in the datasheet. While the analog voltage is easily used, this is the least accurate output.
Pulse Width (PW)
The PW pin outputs a digital representation of range using a pulse width. The width of the high pulse directly corresponds to the range. A narrower high pulse indicates a lower range, and a wider high pulse indicates a larger range. The pulse will be at 0-Vcc voltage levels. The exact scaling between pulse width in uS and range is listed in the datasheet. While reading the pulse width requires more advanced hardware than a voltmeter, the pulse width is a more accurate range output.
Serial Data (RS232 or TTL)
Most microcontrollers have built-in UART (universal asynchronous receiver/transmitter) processors that can be used to read and send serial data. The serial output of our sensors delivers asynchronous data at TTL voltage levels. The output is an ASCII capital “R”, followed by ASCII character digits representing the range. This output will require a properly configured serial terminal program. You can download a terminal program and review the settings in this article. Because the data is presented in a binary data format, the serial output is most accurate.
Many of our sensors output serial data using the RS232 protocol at the 0-Vcc voltage level, but some sensors such as the MB7380 output serial data in the TTL format. The two protocols differ solely at a hardware level and are essentially mirror images of each other. There are a number of inverters available that can swap between the two protocols. Additionally, the HRLV-MaxSonar-EZ line can output either of these formats. The terminal program settings are identical for either format.
Analog Envelope (AE)
The analog envelope output is a minimally filtered output of the acoustic waveform. This format is useful if you want to perform your own signal processing at the expense of more complex circuits. The output allows the user to apply their own filtering and target detection scenarios. The time axis along the bottom directly corresponds to distance in a linear manner, and the height of each peak corresponds to the acoustic return of the target. Often a higher peak means a better target.
We offer a variety of output formats to allow you to use the one that best fits your application and circuitry. Depending on your circuitry and familiarity with the outputs, you may choose to use different outputs for different applications. For this reason, it is recommended that you verify how well the outputs of a sensor will work for your application.
If you have any questions please feel free to contact our technical support team. We are here to help you succeed.
Products Related to the Article
The weather-resistant HRXL-MaxSonar-WRT is a rugged, ultrasonic sensor component module…
The industrial outdoor I2CXL-MaxSonar-WR sensors have a robust PVC housing designed to meet…
The XL‑MaxSonar‑AE0 offers the widest and most sensitive beam pattern of any indoor sensor we currently offer…
Articles Related to the Article Above
The Analog Voltage pin on the MaxSonar family of sensors has been the most popular output for our users. All of the MaxSonar sensors have this output included. This guide will give a look into how to use it for obtaining the distance to the target being detected…
When you use a rugged WR sensor from MaxBotix, the sensor pinout is exposed allowing you to attach wires and equipment to the sensor. While leaving the pinout open provides greater flexibility in how you choose to connect to the sensors, it can leave the sensors exposed to the weather in some applications…
The MaxSonar can be directly interfaced to be used with your PC if you have a PC with a DB9 Serial connection or a USB to DB9 converter. The DB9 connection is capable of being connected to the TX pin output on the MaxSonar® sensor. Connecting the sensor to a computer allows the user to see range readings that have already been processed to distance using RS232…