Key Takeaways
- 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
Synopsis
This article discusses the different sensor output formats available for a Maxbotix Inc., sensor. Further, 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 Inc., please contact us.
At Maxbotix Inc., many of our sensors offer several outputs that are simultaneously available. Each of these outputs sends the range information measured by the sensor. Each sensor 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 Outputs
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 Inc., are pulse width, serial data (either RS232 style or TTL style), analog voltage, I2C, and analog envelope.
Any sensor 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 ultrasonic sensors. This analog sensor 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 ultrasonic sensor 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 at
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.