Mittwoch, 15. Januar 2014

I'm trying out the Sensor HC-SR04 Modul.
First of all I had to figure out, how it works.

As you can see it has 4 pins.

VCC 5V
Trigger
Echo
GND

Here is how it should be controlled:

Send a 10us impulse to trigger pin.
The module will send 8 ultrasonic impulses.
The echo pin goes high for 100us to 25ms, depending on the distance to the object.
If there is no reflecting surface, the echo pin goes down after max. 30ms