40Hz Ultrasonic Range Detection Sensor
A guide to using the DYP-ME007 with Arduino in order to calculate distances from objects. In
this case I’m also altering the output of an LED with PWM according to how close an object is to
the sensor. So the nearer you are the brighter the LED.
So if we start with the DYP-ME007, it’s an IC that works by sending an ultrasound pulse at
around 40Khz. It then waits and listens for the pulse to echo back, calculating the time taken in
microseconds (1 microsecond = 1.0 × 10-6 seconds). You can trigger a pulse as fast as 20 times a
second and it can determine objects up to 3 metres away and as near as 3cm. It needs a 5V power
supply to run.
Adding the DYP-ME007 to the Arduino is very easy, only 4 pins to worry about. Power, Ground,
Trigger and Echo. Since it needs 5V and Arduino provides 5V I’m obviously going to use this to
power it. Below is a diagram of my DYP-ME007, showing the pins. There are 2 sets of 5 pins, 1
set you can use, the other is for programming the PIC chip so don’t touch them!
Working Voltage : 5V(DC)
Working Current : max 15 ma
Working frequency : 40HZ
Output Signal : 0-5V (Output high when obstacle in range)
Sentry Angle : max 15 degree
Sentry Distance : 2cm - 500cm
High-accuracy : 0.3cm
Input trigger signal : 10us TTL impulse
Echo signal : output TTL PWL signal