Go Down

Topic: Extreme data variation with MaxBotix Ultrasonic Rangefinder (Read 1 time) previous topic - next topic

Postholes

I am using three MaxBotix ultrasonic range finders:
http://www.maxbotix.com/documents/MB1010_Datasheet.pdf

using the Sequentially Read Each MaxSonar wiring scheme:
http://www.maxbotix.com/articles/031.htm

I have played with angles and surfaces they are pointed at, a timer around the calling function so there is a time lag between each of the analogRead functions and I am still getting a very large range in data collected from the lead sensor in the chain. This latest run I was getting from 16 inches to 57 inches (variation of 41 inches is not going to work for my application), and the second sensor has a 10 inch variation and the final sensor only has a variation of 4 inches.

Am I doing the wrong kind of scheme? Would the Continuous looping scheme give me more accurate readings? Are there any other suggestions?

Should I try using a filter to and try to get an average before making decisions about actions? That idea comes up because the high values seem to be accurate and the pattern might work if I take 3 readings and if one of the 3 is higher than my threshold then continue normally or if all is less than stop the aircraft.

Thanks for any help,
Postholes

TeslaIaint

Did you read the links that you provided?
The first line of the second link says, "Continuous free run operation will generally not work when using more than one sensor in the same system."

Postholes

I read the link, that is why I am using the mode in a lower section that is titled:
Sequentially Read Each MaxSonar
which is followed by (Always Works)

I tried getting 3 readings and only using the maximum value of the 3 and I am still getting greater than 12 inches of variation on that one sensor.

Does anybody have experience trying to use multiple sensors on the same project? My next idea at this point is to re-wire and use the section titled:
Control the MaxSonar Sensors to Range Simultaneously
I chose not to use this one because it explicitly says that this works for most, and not all situations.

Could I just have a bad sensor?

Thanks,
Postholes

johnwasser

How often are you triggering the string of devices?  Perhaps if you trigger too often the first sensor will get interference from the third sensor in the chain.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Postholes

I was reading with every loop and dialed it back to 100 milliseconds and doing the largest of 3 readings from that. So I'm getting one solid read roughly every 300-325 milliseconds. I'm not sure if that is fast enough. Although, I am getting better data. I'm worried it might be running into a wall before any decision could be made, unless I tell it to stop from 10' away lol. Hopefully that's the worst case scenario haha!

Would you wage a guess that if this was on a quad copter the flight speed would be seriously hampered by a bottle neck that large? All flight control decisions are based on this sensor data.

I'm working on getting interference with rotor noise worked out then hopefully moving onto actual flight. I have most of the program wrote for an initial text but I have this issue and the interference issue to figure out. I have some ideas on the interference problem but I may be back here asking for advice on that.

Thank you,
Postholes

Go Up