Maxbotix Speed-up readings

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
brett burton
 
Posts: 11
Joined: Tue Jan 25, 2011 12:02 am

Maxbotix Speed-up readings

Post by brett burton »

I'm using a Maxbotix Ultra-sonic rangefinder for a project. It's one from the HR series, if that matters. My problem is that the readings are too slow. is there a way to speed things up a bit? My guess is that it's getting a reading every 300-500 milliseconds. I realize it has to bounce sound out and wait for it to come back, but is there a way to have it pulse quicker or more frequently?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Maxbotix Speed-up readings

Post by adafruit_support_bill »

The HR models are slower than the standard resolution models as you might expect. Still, they produce 100mS (filtered) updates in continuous mode. If you use them in trigger mode, you can have an unfiltered result in 100ms from the trigger time. http://www.maxbotix.com/documents/HRLV- ... asheet.pdf

User avatar
brett burton
 
Posts: 11
Joined: Tue Jan 25, 2011 12:02 am

Re: Maxbotix Speed-up readings

Post by brett burton »

If I'm understanding it correctly, the standard setup is for continuous mode. That would be the setup shown in the getting started tutorial:

http://www.adafruit.com/blog/2009/06/23 ... art-guide/

That should be reading continuously every 100ms? It seems slower. Am I missing something, or is my perception of time just off?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Maxbotix Speed-up readings

Post by adafruit_support_bill »

Post the code you are using.

User avatar
brett burton
 
Posts: 11
Joined: Tue Jan 25, 2011 12:02 am

Re: Maxbotix Speed-up readings

Post by brett burton »

int sonarPin = 1; //pin connected to analog out on maxsonar sensor
float distance;

//------------------------------------------------------------------

void setup() {
Serial.begin(9600);
}


//------------------------------------------------------------------

void loop() {
distance = analogRead(sonarPin) / 4.8; //this is my best guess scaling for inches on HRLV.
Serial.println(distance, 0);
}

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Maxbotix Speed-up readings

Post by adafruit_support_bill »

The spec sheet describes continuous operation as:
• Free run operation uses a 2Hz filter,
with 100mS measurement and
output cycle
The filter function is not clearly specified, but it is clearly some sort of low-pass filter. To get the best response time you will need to use the triggered mode of operation.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”