Subscribe
 


Ultrasonic Range Finder using PIC16F628 and SRF04



Ultrasonic Range Finder using PIC16F628 and SRF04
This is a small test program for the Devantech SFR04 Ultrasonic Range Finder, a cheap ultrasonic sensor for robotic applications.

The PIC starts the whole sequence by sending a trigger pulse of 10 uS or more. The trigger line going low starts the ultrasonic module which sends out 8 bursts of 40 kHz sound. To prevent direct coupling from the transmitter to the receiver the units waits a bit and then raises the echo pulse line. This is the signal for the PIC to start measuring time because any incoming ultrasonic echo will pull the echo pulse line down. The elapsed time is a measure for the distance between the sensor and the object.

Noteworthy is that the wires have to be soldered to the unit. The little booklet that is supplied shows that clearly enough. What is less clear is that it is a bottom view. So in effect I reversed the power during my first test. It drew over 1 amp of power (the leds on the breadboard dimming was my signal that something was wrong) but fortunately it did survive!

Authored by Bert van Dam at Lonely Nights, Added: Feb 25, 2007



http://members.home.nl/b.vandam/lonely/pagina33.html

Unsorted Pool