User Tools

Site Tools


supported_hardware:maxsonar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
supported_hardware:maxsonar [2012/02/10 18:52] – external edit 127.0.0.1supported_hardware:maxsonar [2019/02/21 19:58] James Sentman
Line 1: Line 1:
 =====Max Sonar===== =====Max Sonar=====
-{{ :supported_hardware:ms_hero.jpg|}} +{{:supported_hardware:ms_hero.jpg |}}
-The MaxSonar is a sonar rangefinder from [[http://www.maxbotix.com/|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 [[http://sentman.com/MaxSonar_Plugin.html|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 ironMaking 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.+This page is for the new MaxSonar plugin that replaced the original one in XTension 9.4.16. If you are looking for documentation for the original plugin it can be found [[supported_hardware:maxsonar_old|here]]
  
-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. 
  
-{{ :supported_hardware:ms_twoofthem.jpg?200|maxsonar as mounted }} +The MaxSonar is a sonar rangefinder from [[http://www.maxbotix.com/|Maxbotix]] with the unusual feature of an RS232 serial port making it easier to connect to a host computer rather than to a micro controllerIt comes in many different configurationsranges and accuracies. Even in a fully water proof enclosure with focusing horn
-{{ :supported_hardware:ms_finished1.jpg?160}} +
-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 car parked in the garage or notAnd 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 [[http://www.maxbotix.com/BUY_NOW.html/|Buy Now]] or various other fine internet purveyors of robot and hobby electronics like [[http://sparkfun.com/|SparkFun]]+Since they are slow speed serial they can be connected reliably over long twisted pair wiresNeeding only 4 wires running back to the USB/Serial adaptorThis plugin also supports connecting them via Serial/Ethernet adaptors such as the Wiznet ethernet/Serial cards. See below for more info about the configuration options available in that case.
  
-=====Setting up with XTension===== +====Connect via Serial Port:==== 
-In the XTension preferences create 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 changeHysteresis lets you ignore quick variations that might be cause by something quickly passing under the sensor or just some noise caused by 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.+{{:supported_hardware:maxsonar_settings_serial.png?direct&400 |}} If connecting over standard USB/Serial adaptor select that adaptor from the port popup after creating the new InterfaceWhen using serial ports separate interface will be needed for each max sonar that you wish to connect to
  
-Create 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 defaultGive the unit the address "A1" and optionally add units or other settings and scripts.+For serial connected device create a single Unit, assign it to the proper interface and make sure that the device type popup has “Distance” selected. The Address of the unit should be just the number 1 as only a single device can be connected over a single serial portMake sure that the “Dimmable” checkbox is checked as well as the “Receive Only” and “Ignore Clicks” checkboxes.
  
-=====2/10/2012 now supports serial/ethernet adaptors=====+====Connect via TCP:==== 
 +{{:supported_hardware:maxsonar_outgoing.png?direct&400 |}}By selecting “Remote TCP Connection” from the port popup you can make an outgoing connection to a Wiznet or other Serial/Ethernet card in Server mode. If you are using the Wiznet in server mode then you will need a separate interface for each one you wish to connect to. In the [[http://www.planetarygear.org/2012/06/wiznet-configurator-for-mac-v2.html|Wiznet Configurator]] set the serial port settings to 9600 baud, no parity, no flow control, 8 data bits and 1 stop bit. Also on the networking tab it is important to make sure it’s set for “Server” mode as this will then listen for incoming connections from XTension. You will need to configure your Wiznet card with a static IP address or a DHCP reservation in your router in order to make sure that it’s always available on the address that XTension knows about.
  
-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 areBaud9600, ParitynoneFlow Control: noneData Bits: 8, Stop Bits: 1. +For an outgoing TCP connected device create a single unit, assign it to the proper interface and make sure that the device type popup has “Distance” selected. The Address of the unit should be just the number 1 as only single device can be connected over a port this way. Make sure that the “Dimmable” checkbox is checked as well as the “Receive Only” and “Ignore Clicks” checkboxes. 
 + 
 +====Connect via Server:==== 
 +{{:supported_hardware:maxsonar_listen.png?direct&400 |}}Lastly you can select the “Listen For Incoming TCP Connections” from the port popup and the plugin will start a server on the entered port. The Wiznet cards and most other TCP/Serial adaptors can also be run in client modeMeaning they will make a connection to the pre-programmed server address. Use the above mentioned Wiznet Configurator to setup the serial port settings the same as in the Connect Via TCP example, but in this case set the networking options to connect as a Client. You will also have to enter the IP address of your XTension machine and the port that you are running your server on
 + 
 +When running a server, any reasonable number of max sonar devices can connect to the plugin. When a client first connects XTension will look up it’s MAC address and create a new Distance unit for you automatically and use the MAC address as the Address of the unit so that they will all be unique. In this way you can support multiple devices with a single interface instance. 
 + 
 +====Unit Configuration==== 
 +The new plugin has more options for filtering than the older plugin had. 
 + 
 +===Initial Input Filtering:=== 
 +{{:supported_hardware:maxsonar_initial.png?direct&400 |}} These options are identical to what they were in the older plugin. Since the value of the reading can jump around quite a bit it can be useful to do some initial filtering on it. The Hysteresis Buffer Size... 
 + 
 +(unfinishedhave to go pick the child up from schoolback momentarily)
supported_hardware/maxsonar.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1