Follow MaxBotix:
Ask A Question
|     Written By: Tom Bonar     |     Date Posted: 10-25-2012     |      Updated 04-03-2013     |     
USB-MaxSonar Termite Output

This article provides instruction on the easy setup for the
MaxBotix® Inc., USB-MaxSonar® ultrasonic sensor lines. This instructional set will help you set up the USB-MaxSonar® ultrasonic sensors with your computer system.

Please use your prefered operating system instruction set:
Windows    Linux    Apple OS

Com Port:Determined by Hardware*
Baud57600 Bits per Second
Data Bits:8
Parity:0 / none
Stop Bit:1
Flow Control:0 / none

Connecting the USB-MaxSonar

1. Download a terminal program
2. Unzip to a location of your choice
3. Connect USB-MaxSonar ultrasonic proximity sensor to a computer with a Micro-B USB Cable
    Windows will automatically configure drivers, may take several minutes
    If Windows does not install the drivers immediately, they are available to download here
4. Run the terminal program .exe file
    The terminal program .exe file should look for the first available sensor and connect. If this does not
    occur, configure the above serial setting.
5. Please note that the first available COM Port in Windows is typically COM2 or greater.
    COM1 is frequently reserved by the Windows operating system. Also in certain computer hardware
    configurations additional COM ports are reserved by the Windows operating system. The sensor will
    select the next available COM port. A good rule of thumb is to select the highest number COM port.
6. Advanced user setup can be seen here

Troubleshooting Connectivity


If the software does not find the USB-MaxSonar automatically, simply click on "SETTINGS" and change the "Port" menu.

The communication port number should match the com port assigned to your computer by windows. After changing the "Port" menu click OK. None of the other settings need to be changed.



To connect or disconnect the COM port click the button shown.


Multiple Sensor Operation

1. Open a second terminal window
2. Click settings
3. Change port to match the newest COM#
4. Configure the COM port settings to the required values in the chart on the top of this page
5. Click ok

Terminal Software Setup

This was created with Ubuntu 12.10 and the software used is MoSerial.

1. Download and install a terminal program
2. If Linux OS doesn't recognize the sensor, drivers are available to
   download here
3. Configure port
   a. Click "Port Setup"
   b. Set "Device" menu to "/dev/ttyUSB0"
   c. Set Baud Rate to 57600
   d. Set Data Bits to 8
   e. Set Stop Bits to 1
   f. Set Parity to none
   g. Turn off all "Handshakes"
   h. Setup should match image on the right
4. Click "Connect"
5. Click tab that says "Received ASCII"
6. Advanced user settings is available here

Port Settings

Terminal Program Setup

ZTerm terminal program 1. Download terminal program
2. If the operating system doesn't recognize the sensor,
   drivers are available to download here
3. Configure terminal program
3. Select "Settings" menu
4. Select "Modem Preferences" option
5. Select "usbserial0"
   the zero may change depending on hardware configuration
6. Set the following options
   a. Set "Data Rate" to 57600
   b. Set "Data Bits" to 8
   c. Set "Parity" to None or 0
   d. set "Stop Bits" to 1
7.Remove check boxes from "Flow Control" options
8. The "Service Name" can be named at the user's preference
9. "Phone Number", "Pre-dial init", and "Password" options can be left blank

Please be aware that we have not evaluated Zterm for operation with the USB‑MaxSonar ultrasonic sensors. If you have a preferred terminal software, it can be configured with the same settings of Zterm

Computer USB ports have latency and buffer sizes which can change the time between the range readings reported by the USB‑MaxSonar ultrasonic sensors. This time delay can be caused by the USB hardware on the computer’s system board, the chipset managing USB communication ports, the age of the computer hardware, the number of devices using USB communication, and by the computers operating system.

When multiple USB connections are working in parallel, such as a mouse, keyboard, and flash-drive, the bandwidth is shared among the devices. When bandwidth is shared between devices, the buffer and latency is increased due to the extra demand of resources from the computer chipset.

The following direction sets are how to help lower the latency of the USB port in the computer's operating system.

Windows Users 

For advanced Windows users, this instruction set will allow the use of a low-latency mode of operation for the USB‑MaxSonar.

1. Open "Device Manager"
2. Expand the "Ports (COM & LPT)" menu
3. Select the COM port that is assigned to the USB‑MaxSonar
4. Right click on the COM port and go down to "Properties" on the new menu
5. On the Communications Port Properties window select the "Port Settings" Tab
6. Click on the option that says "Advanced"
7. Set the "Recieve (Bytes)" option to 512
8. Set the "Transmit (Bytes)" option to 512
9. Set the "Latency Timer (msec)" option to 2
10. The "Serial Enumerator" option should be checked.
   This setting makes Windows remember the COM port assigned to the Device
   When this is unchecked, Windows will assign it the first available Com Port

A screenshot of what the Advanced Communications Port Properties window should look like after configuration can be seen here.

Linux Users 

For advanced Linux users that wish to operate in low-latency with the USB‑MaxSonar please use the following directions. While operating in low-latency mode, the USB buffer delay will be reduced to 128mS at most.

1. Open xTerm window

2. Type the following command: $ dmesg | grep FTDI.
   a line that looks like "/dev/ttyUSB#" will be output

3. enter the following command. $ setserial /dev/ttyUSB# -g.
   The # sign will be the USB port assigned to the USB‑ProxSonar‑EZ sensor.
   Information will be output that looks like"/dev/ttyUSB#, UART: unk, PORT:0X0000, IRQ:0".

4. Enter the low latency command: $ setserial /dev/ttyUSB# low_latency.
   This command will set the USB‑MaxSonar into low-latency mode.

It is recommended that the configuration is confirmed.

5. Enter the command $ setserial /dev/ttyUSB# -g.
   The low-latency flag should be appended as follows:
   "/dev/ttyUSB#, UART: unk, PORT: 0X0000, IRQ: 0, Flags: low_latency".

Author: Kathy Kostal  Date: 08-31-2016
Inc 5000 Maxbotix Logo Inc. Magazine Unveils 35th Annual List of America's Fastest Growing Private Companies–the Inc. 5000. MaxBotix Inc., Ranks No. 1752 on the 2016 Inc. 5000 with Three–Year Sales Growth of 213%.
Click here for full article.
Author: Cody Carlson  Date: 08-02-2016
Raspberry Pi 2 board MaxSonar sensors offer a variety of outputs including TTL serial data. This tutorial guides you through the process of setting up your Raspberry Pi 3 with a MaxBotix sensor. Click here for full article.
Author: Scott Wielenberg  Date: 07-26-2016
Full Horn Housing MaxBotix offers an expanded range of packaging options for many of our sensors. Each option provides unique benefits to certain mounting integrations. This article provides a brief overview of each option.
Click here for full article.
Author: Scott Wielenberg  Date: 07-18-2016
Sensor is Tested When providing support, our technical support team may determine that further testing at our facility is the best way to help resolve the issue that you are facing. At this point, they will start the Return Merchandise Authorization (RMA) process. This article will explain what you can expect as your ultrasonic sensor travels through our RMA process.
Click here for full article.
Author: Scott Wielenberg  Date: 07-11-2016
Typical Wall Pipe Many customers have requested the option to mount an ultrasonic sensor in a pipe. During the testing and development cycle, we discovered a number of considerations and requirements that must be met for the application to be successful. When all of these are met, a user may be able to achieve the desired level of success for measuring the liquid level inside of a pipe.
Click here for full article.
Author: Jenney Grover  Date: 06-28-2016
one of the options for outputs On April 19th, we welcomed our supporters to join us for the Grand Opening of the Build Out. Bob and Nita Gross gave a tour of the build out and their vision for the space. We continue to be in awe of the support from our community, our employees, our distributors, and our customers. Thank you for the many years of support, and we look forward to serving you in the years to come.
Click here for full article.
Signup for notification of our exciting new products and periodic new letters. We are excited to provide the latest information from MaxBotix Inc.