Maxbotic Ultrasonic Range Finders

Terry’s (roussell) original posts (combined into one):

Slightly off-topic, but since were talking level sensors; I thought I'd throw this in:

http://www.maxbotix.com/

For less that $30 you get a 1" x 1" ultrasonic sensor that outputs distance from 6-254 inches with 1 inch resolution in PWM, analog voltage, or 9600 baud serial.

It isn't water proof/resistant (yet, a more resistant version is coming), so you have to take precautions to keep it dry. I use short sections of PVC pipe and open-cell foam to protect it. I'm using them to measure the draft of coal barges off the coast of Colombia and they work great.

Terry


When I asked if he used the serial option Terry responded:

Yeah, I sure do. The thing couldn't be any easier to connect; +5 Volts, ground and a serial out are all you need. Power it up and about 100 mSec later it starts sending data every 49 mSec. Feed it into Hyperterm and you'll see the copyright info and then something like - R114 - where the three digits represent the range in inches. It auto calibrates and from some crude testing (A buddy holding the sensor and the end of a tape measure and me holding the other end of the tape) the accuracy is spot on. It updates very fast too, with it sitting on my desk at work, pointing toward the ceiling (69 inches) I can move my hand up and down over it and it reacts "instantly". It’s also sensitive enough to pickup a broom handle over 6 feet away. I got mine at roboticsgroup.com for $24.95. A lot of technology for such a tiny price if you ask me…

Terry


FrankMc then asked:

Hi Terry

Nice find .....Do you think it could measure the water level inside a tank.... Im thinking you could mount it on a 6" pvc pipe stem on top of the tank this would hopefully protect it from the water and also giving a reading to the very top of the tank......

Frank


And Terry replied with the following posts and images (images linked):

I was planning on using one at home to measure inside a tank as you describe. I want to start collecting rainwater and reuse it for lawn irrigation and this seemed like an easy way to measure the water level. I also want to put one on the Coi pond to add/remove water as needed.

The project at work measures the distance from the sea surface level to the top of the barge deck (draft) at one corner and sends that data to a Parallax basic stamp. The stamp uses that data along with pitch/yaw data from a dual axis accelerometer to determine the draft at the other 3 corners to calculate how deep/shallow the barge is. From that info and barge shape and size and the water’s buoyancy I calculate how much coal is in the barge. The stamp also retrieves info from a GPS and sends that along with the draft info to the control tower at the pier through a MaxStream Xtend 900MHz serial radio. The whole thing runs off solar/battery power.

I found similar industrial sensors for $500-$600 each. I figured at that price, I could make the Maxbotix ones “disposableâ€, replace them more often and still come out better in the end.

I attached a drawing of the sensors water resistant enclosure. It looks way more advanced than it is. The parts consist of a PVC 1-1/2†--> ¾†NPT adapter and a PVC 2†--> PVC 1-1/2†both from the plumbing section at your friendly neighborhood Lowe’s or Home Depot. The foam is just some ¾†grey packing foam that came in the Maxstream radio box. I noticed that the ultrasonic waves would pass through it with no degradation in distance measurement so I cut a piece to fit the 2†opening of the housing. The data cable is a LAN patch cable that passes through the center of the ¾†threaded section of the housing. The idea being that the sensor housing will screw onto a piece of ¾†conduit and the cable will be inside the conduit… It works well and is effective in keeping the sea water from reaching the sensor at normal barge speeds (~3 knots).

Images:

http://www.cocoontech.com/uploads/post-7-1147381104.jpg

http://www.cocoontech.com/uploads/post-7-1147381159.jpg

http://www.cocoontech.com/uploads/post-7-1147381196.jpg

I purchased one of the sensors and replied:

Hey Terry;

I received one of these units and they are pretty cool. I just quickly tested it at work using test clips and my laptop. The refresh rate is very fast (I think the spec is something like three times a second) and you don't even need to use the transmit line (using the serial interface) so you only need three wires to this device if you want to use automatic updates.

I beleive you could even use this as an (exterior) motion sensor that is immune to heat problems generated by the sun (big problem here in Las Vegas).

Will post more in a separate thread after I get some more time playing around with this (want to see if I can use this for salt level detection in my water softener).

Just wanted to thank you for the information lead. I believe $35 bucks shipped is a great deal for this!

Thanks again,

BSR


FrankMc then responded:

Hi BSR

Looking forward to your feedback on this .... I have just ordered a couple myself , but im hoping to use the analogue output and connect them to a pic micro and use xPL to retrieve the values......Thats the plan at this stage.....

Frank
 
I've had one of these sitting around here for a couple months now - I really need to get around to doing something with it.
 
hey smee!

Good to hear from you! I'm going to try to old water softener level with this. I'm a little worried about it registering properly inside the tank though. Alignment will probably be critical. Will post what happens.

What are you thinking about doing with yours?
 
Hi BSR

Have you had a chance to play with the Maxbotic device as yet ...???

I received my two units today and was surprized how small they are.....

I have started running some hose for the pond pump filling solenoid ,that i should finish on the weekend and myabe for now control it via IR .... until i can get something happening with some pic coding...Im still thinking of using the analogue output of the Maxbotic Device......

Frank
 
BSR,

I realize the application you are now working on is specific for your use, but I'm interested in the driveway monitoring application.

However your Homeseer thread has me a little concerned how this could be achieved without bogging down Homeseer.

Maybe later you could explore this a little more ?
 
Hey Frank, I don't think I'll be using the analog output as the voltage would be to low and I'm thinking not enough resolution for the distances I would see.

You can easily calculate the expected voltage output though from the documentation (based on your specific measured distance range).

John;

Because the sensor is spitting out data (when the RX input is high) at a fast rate it will cause a five percent increase in CPU usage with HomeSeer (with my 1.2 GHZ AMD with 512 MB ram). You could incorporate a signal from one of the serial output lines and hold it high say every five seconds or so, but as per smee's advice you would have to do something to accommodate the voltage level differences between the serial port's 12 volt output and the sonic board's five volt input limitation.

Actually come to think of it, why couldn't one just use a 555 timer circuit sort of like I did for my car monitor project, and have that hold the RX input line high for a second say for every ten seconds or so (depending on how often you need a reading). Let's see what smee thinks of that idea :) . You could also use an Elk 960 Timer relay if you had one around.

You would just have to play around with the two external resistor values and the 10 microfarad cap value. There are plenty of 555 tutorials around that shows how to do this.

If possible it would be nice to only have this on say for half a second and pulse the sensor every five or so seconds with that pulse. This would significantly reduce the CPU usage for HomeSeer. Since the sensor is spitting out RS232 data automatically whenever the RX line is high, you wouldn't have to worry about sending anything via the RS232 port to initiate a reading.

The only thing you would have to worry about is the accuracy of the first reading though as the sensor self calibrated. But the last value during that "on" pulse would be the "best" value taken during an "on" cycle.

Anyways if you are using it as a driveway monitor you would need "gross" numbers anyways.

One nice thing though is now that the script is posted at the HS board Rupp referenced above, this makes it pretty much a plug and play item for HomeSeer!

My thanks go out to Michael (The Great) McSharry (my new nickname for him!) for simplifying my original code (hehe, my code worked, just took waaay to many lines compared to Michael's method) I used the first suggested method he posted (and not the "one-line" suggestion).

I don't have a lot of free time this week (family in town, son graduating Friday) but maybe later that following week I can play around with this some more.

Regards,

BSR
 
Hi BSR

> Hey Frank, I don't think I'll be using the analog output as the voltage would be to low >and I'm thinking not enough resolution for the distances I would see.

After reading your post im thinking it might be better to Gate the Maxbotic device..My initial thoughts were the same as yours ...a 555 timer ....but every minute or so.....but i thought it would be nice to be able to query the Maxbotic device when required....So im thinking of having a pic micro connected to a serial receive line of a max232 chip....
The pic chip would then enable the Maxbotic device.....Wonder if possible to connect the Maxbotic to the max232 chip to tx at 232 levels or would it need to be inverted ...???

Could use the spare pins on the pic to select the auto reporting interval .......Ummm

Frank
 
Frank:

Substitute an AVR for the PIC and we're thinking along the same lines.

I think a 555 should work fine for turning the sensor output on and off. From the data sheet, I'm not sure how accurate the first measurements would be when it's turned on. It says the RX line controls ranging and data transmission, but I don't think it says whether the chip needs to "warm up" when turned on. It's still got power but I don't know if it does any internal recalibration. I really need to power mine up and play with it - maybe I'll find time sometime (yeah, right). The only problem with the 555 will be if you want long intervals between readings.

I was thinking that an intelligent AVR/PIC interface would be pretty cool, though. Not only could you control the interval (as you mentioned), but you could also program it for an alarm mode - thinking driveway sensor here (among other things). It could be set up to only send a signal to the computer when something comes within 5 or 10 feet of the sensor. For instance, it could send data the first time it gets a reading closer than 10 feet, no data while the sensor continues to read less than 10 feet, and then another message when the sensor reads greater than 10 feet again. This distance could be user-programmed with jumpers. This should be extremely easy to set up.
 
Hi Smee

Yes i think a micro controller interface is the way to go.....

Im about to build the prototype hardware using a pic16f88 which i havent used before ...

Have changed my mind (again) in regards to which signal to use....Im now thinking of measuring the Pulse width signal and then sending the info via the pic serially when requested or when the auto report timer has timed out.....At this stage i intend to gate the Maxbotic device........

Im going to put a 4way dip switch to select the auto reporting delay.....


More Soon

Frank
 
Back
Top