User Tools

Site Tools


supported_hardware:maxsonar_old

This is an old revision of the document!


Max Sonar (legacy plugin)

NOTE this is the documentation for the original MaxSonar plugin. That plugin is no longer included in XTension and you should use the New Maxsonar Plugin

The MaxSonar is a sonar rangefinder from Maxbotix. As of this writing (3/10/2009) XTension supports all available maxsonar devices in the various beam width and enclosure combinations. Connection to a maxsonar requires an individual USB/Serial or other serial adaptor for each device and purchasing the maxsonar plugin from sentman.com The plugin is already installed in the release version of XTension in demo mode and requires only a serial number to activate, no further software downloads are required.

The device does not come in a complete package and enclosure with a serial port plug so requires some work by the end user with a soldering iron. Making the connection to a DB9 plug is fairly easy however with good large size through holes on the board for easy soldering and good documentation of what pins go where on the maxbotix site. While the maxbotix website has schemes for connecting multiple sensors on a single port by round robining them via their enable pins, XTension cannot support this via a standard serial adaptor so a single USB/Serial adaptor can only support a single maxsonar for now.

Since they are slow speed serial devices the serial lines can be extended a good distance via standard cat5 cable, or even longer via an rs-422 adaptor set. They require only 4 wires, or 2 pairs in a CAT5 cable for a long distance connection if you can provide 5v locally to power them.

maxsonar as mounted  I have mounted them in surface mount telephone jacks into which they fit perfectly and then installed them on the bottom of both garage door openers to know if there is a car parked in the garage or not. And since they can accurately measure the distance i can tell the difference between me leaving the table saw in the middle of the garage and a car, and which car is parked in which garage bay.

The MaxSonar devices can be purchased from their homepage Buy Now or various other fine internet purveyors of robot and hobby electronics like SparkFun

Setting up with XTension

In the XTension preferences create a new interface and select a device type of “Mac Sonar” then select the name of the serial port to which you've connected it. You can now set the hysteresis buffer size and significant change. Hysteresis lets you ignore quick variations that might be cause by something quickly passing under the sensor or just some noise caused by a less than perfect placement or movement. Larger values will scan and average readings for longer periods before sending a change. The significant change value will not send a new value till the new reading after being passed through the hysteresis buffer is more than the value. Keep this in mind if you're calculating something based on the value, that it may be within the significant change range of the real value.

Create a new Unit in XTension and set it's interface to whatever you named the max sonar interface you created in the step above. The only device selection is “sonar rangefinder” which will be selected by default. Give the unit the address “A1” and optionally add units or other settings and scripts.

2/10/2012 now supports serial/ethernet adaptors

As of build 830 of XTension the included MaxSonar driver supports both the original local connection over a connected serial adaptor and also via Wiznet or Barionet Barix TCP/Serial adaptors. The serial settings that you need to setup on the device to connect to it are: Baud: 9600, Parity: none, Flow Control: none, Data Bits: 8, Stop Bits: 1.

supported_hardware/maxsonar_old.1562077495.txt.gz · Last modified: 2023/02/13 14:51 (external edit)