This is how I set up the test bench for configuring and also just figuring out the DYP-ME007 Ultrasonic Range Finder, bought at GoodLuckBuy.com.
The usage is the same as for the popular SRF0004 equivalent;
The Vcc should be connected to 5v, Gnd is ground. When you pulse the trigger pin at TTL HIGH level (for at least 10uS) the echo pin will go TTL (5v) HIGH for a period proportional to the length between the DYP-ME007 and the nearest object. The period length is actually the time it takes for a ultrasonic sound to travel forth and back to the DYP-ME007 module. Don’t mind the other components to the left and right for the module on the picture!
|This is how I physically set up the test bench|
|This is the wiring scheme for the simple test bench|
I suspected there would be some problems with contact bounce at the switch, but fortunately I did not have to deal with that.
These are the readings I got from the oscilloscope. The scope was set up to trigger on a positive edged pulse of amplitude 1v or higher, which is within safe limits for the 5v pulse.
|Scope readings on 10cm distance|
|Scope readings on 20cm distance|
As you can see from the scope screen captures, the pulse width is very much proportional with length it measures. When I double the length, the pulse doubles the width. From the cursor readings you can easily see that the pulse width is approx. 600uS for each 10 centimeters.