0

I need to access distance data using a LV-EZ0 Maxtronix ultrasonic sensor: MB1000 LV-MaxSonar®-EZ0™High Performance Ultrasonic Rangefinder

Can anyone suggest what particular arduino libraries or code would be most useful?

I noticed this new ping library, NewPing

Would this work for my purposes with this particular sensor?

1 Answer 1

1

Likely work in pulse mode (library you mentioned) and sure work in RS232 serial mode (spec. in data sheet page 2, top, read data number as text).

How many sensors do you need and how fast update rate? Serial mode is easier if you application need small number of sensor at 'nominal' update rate (Arduino has limited number of hardware serial port, although softserial library may help).

Essentially, in pulse mode, the RX and PW pin is similar to Trig and Echo pin on many widely available sensor (several models number, basically following similar principle). Need care about the high and low relationship as may differ from the default value in library.

Taken from the data sheet of LV-MaxSonar®-EZ0

R X – If held low, the EZ0™ will stop ranging. Bring high for 20uS or more to command a range reading.

P W – This pin outputs a pulse width representation of range

Specifically you may want to first try the simple (old) ping: Ping Ultrasonic Range Finder

Changes needed:

  1. Your sensor data sheet requires 20 μs trigger pulse while the above is 2 μs;
  2. The library read a high pulse. Your sensor data sheet 'send pulse' which likely imply a HIGH pulse, may not need change;
  3. The library use one pin for both in and out. your is one pin in (in for sensor, out for Arduino) for trigger and one put out for measurement.

Also, another library. Note the author states that many sensor from the factory differs (may need small change in code): Distance Detection with MaxSonar ultrasonic rangefinder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.