This is the fantastically easy to use sensor from Maxbotix. We are extremely pleased with the size, quality, and ease of use of this little range finder. The serial interface is a bit odd (it's RS232 instead of standard TTL), but the PWM and Analog interfaces will allow any micro to listen easily enough. The sensor provides very accurate readings of 0 to 255 inches (0 to 6.45m) in 1 inch increments with little or no dead zone!
Maxbotix is offering the EZ0, EZ1, EZ2, EZ3, and EZ4 with progressively narrower beam angles allowing the sensor to match the application. Please see beam width explanation below.
Control up to 10 sensors with only two pins! Checkout the Maxbotix FAQ listed below.
Checkout Mikey Sklar's flame-based trampoline, the high-lighter, using the EZ1!
If the ultrasonic range finder indicates that it has an "RS232 Serial Output" and is outputting an inverting signal with the voltage level based on Vcc, you could just use an inverting circuit using a transistor to invert the signal. This is not a standard RS232 that uses +/-12V. There are a few methods of flipping this signal through hardware or software. The resources and going further will provide specific examples.
Inverting Signal w/ Hardware
Doing a quick test using a retired NPN transistor from our storefront, I was able to get it working based on the circuit using a RedBoard Programmed with Arduino. I was using an Arduino so Vcc in my circuit was 5V. Since it's basically two diodes within the transistor, you will want to use resistors to limit the current. I just used two 330Ohm resistors just like I was turning on an LED. You probably do not need to do this but the values might need to be adjusted when using it at higher speeds or if the transistor is not fully turning ON/OFF. Testing with a multimeter, it worked as expected. An input of 5V would result in 0V (logic LOW) on the output since the transistor was turning on. With an input of 0V, the transistor would not be conducting so the output would be held HIGH at 5V. Using an Arduino serial passthrough for further testing, I was able to view the ultrasonic sensor's output data without any problems.
"RS232" Output and Inverting w/ Software
Otherwise, you could be clever in writing your code to store the value and possibly apply some sort of logical NOT operation. In Arduino, there is a special feature using software serial that inverts the signal by setting a parameter to true
[ "Software Serial Constructor" – https://www.arduino.cc/en/Reference/SoftwareSerialConstructor ]. There was someone in the Arduino forums that provided example code to invert the output, parse the data, and output it through the serial monitor here => [ User "Goldthing" - http://forum.arduino.cc/index.php?topic=114808.msg864009#msg864009 ].
Connecting Ultrasonic Sensor to Raspberry Pi
There is a tutorial from MaxBotix that shows you how to connect ultrasonic sensors to Raspberry Pis => [ http://www.maxbotix.com/Raspberry-Pi-with-Ultrasonic-Sensors-144/ ]. Certain ultrasonic sensors listed in the article require an inverter. If the ultrasonic range finder's output serial output is " RS232 " like the sensors listed under "Ultrasonic Sensors that Require an Inverter" , this indicates that the signal is basically an inverted output with the voltage level based on Vcc.
Therefore, you would need to follow the tutorial and use a serial inverter in order to use it with the Raspberry Pi. If you are using a Raspberry Pi a transistor, Vcc should be 3.3V since the Pi uses a 3.3V system.
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Based on 2 ratings:
This is the worst range finding sensor I've ever worked with. Sitting stationary in my garage it will read 110 inches, then 20 inches, then 40, then 110 with nothing around it moving. It's pointed at a wall and should have no trouble finding the distance. I've tried it both with the analog and pwm output, and they both are equally noisy. There's not enough consistency to it to even do some signal conditioning and get a useful value. I know it's a wide band it detects, but when pointed at a wall 9' away I should be able to get a reading of 9' consistent enough to detect if there's anything between it and the wall when nothing else around it is moving.
This seems very out of character for this product, which has historically been rock solid. I would suggest contacting our tech support team, they should be able to help get this issue resolved for you.
Although I bought one of these 10 years ago, I've only just got around to using it! I found it gave rock solid readings (using analog o/p pin 3, 3v3) much better than a ping))) module or HC04.
Quite a wide detection, ie would detect a door frame from a few metres away instead of thru the doorway.
Does this reflect offor of water? Measure height of water in a container?
in case you need it,
*Beam Width ≈ 70 degrees
*After ~ 1.1m the beam width becomes ≈ 1.5m and after that doesn't expand
I have tested it to a distance of about 3 meters which is the critical distance for my project
Beam Width diagram
This sensor has 1 inch resolution between 6" and 254". Any distance less than 6" will return 6" according to the datasheet and testing I have done.
Is the beam too wide to use in a sight glass? Basically, will it work in a tube less than 2 inches wide?
Part Number SEN-08502 Ultrasonic Range Finder - Maxbotix LV-EZ0 Customer Number 365466
Voltage for sensor coming from Arduino Uno 5 V Analog output is specified to be approximately 10 mV/inch We are reading the output into the Sketch Serial Windows (connected to Arduino) We are getting readings around 8” 13 9” 15 10” 17 11” 19
This is roughly 1.7 / Inch
What are we configuring or reading wrong? Answer: Figured it out! Arduino analog ranges from 0 to 1023. I will need to account for that!
is it possible to use this device to build a digital meter? i know that the max range is 7.65 and that ok for me now. is it possible to control the angle?? thnx
Would this be applicable to an autonomous plane, where this would be mounted facing to the side, and it would sense the presence of a wall? What I mean is, would the speed of a hobby airplane be too high for the signal receiver to work properly?
I haven't tested yet, but am eyeballing this sensor for my project. Point is, I have looked at the Product webpage and it says the update rate is 20Hz, so it really depends on how fast you want to fly the plane :-)
Can I use this device to just send or just receive an ultrasonic wave ?
I don't need the built-in ranging capabilities, but I do need to do both the transmission and the detection of ultrasonic waves at separate times for my project.
Just a note that may save some time: the TLL-level "RS232" output is inverted wrt RS232 TX. It's '0' non-active, and '1' active.