Data Sheet

MaxBotix
®
Inc.
Copyright 2005 - 2013 MaxBotix Incorporated
Patent 7,679,996
HRUSB-MaxSonar
®
-
EZ™
Series
Page 6
Web: www.maxbotix.com
PD12141h
MaxBotix Inc., products are engineered and assembled in the USA.
Serial Terminal Configuration Con’t
USB Latency
Computer USB ports have latency and buffer sizes which can change the time between the range readings reported by the
HRUSB-MaxSonar-EZ ultrasonic rangefinder. 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.
Other Operating Systems
Windows Users
For advanced Windows users, this instruction set will allow the use of a low-latency mode of operation for the
HRUSB-MaxSonar-EZ.
1. Open Windows’ "Device Manager"
This can often be accessed from the Windows’ Control Panel
2. Expand the "Ports (COM & LPT)" menu
3. Select the COM port that is assigned to the HRUSB-MaxSonar-EZ.
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 "Receive (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
Linux Users
For advanced Linux users that wish to operate in low-latency with the HRUSB-MaxSonar-EZ 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 HRUSB-MaxSonar-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 HRUSB-MaxSonar-EZ into low-latency mode.
It is recommended that the configuration is confirmed. To do this 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".