Connecting SRF04 Sonar Modules to the Basic Atom

Introduction
The SRF04 module is controlled by a trigger pulse from the Basic Atom host
controller of around 10uS duration. After receiving the trigger pulse, the SRF04
will raise its echo pulse and wait for a returning echo. As soon as the echo is
detected by the SRF04, it will lower its echo line again. The Basic
Atom host
controller will measure the width of the echo pulse and use this to calculate
the range.
Although we have powered the SRF04 from the Basic Atom in the photo
above, the Basic Atom's internal 5v regulator is not suitable for powering much external
circuitry. It will power a single SRF04 OK, but anything more and I would recommend you use a separate 5v
regulator as shown in the schematic below. Further SRF04's can be connected, not shown here, with each
SRF04 requiring its own input and output pins.
Circuit Schematic for connecting an SRF04 Sonar
Module
to the Basic Atom

The following code can be downloaded here
'*********************************************************** '** ** '** SRF04 Demonstration Software for the Basic Atom ** '** ** '** Copyright 2002 - Devantech Ltd ** '** Commercial use of this software is prohibited ** '** Private and educational use only is permitted ** '** ** '** Written by Gerald Coe - April 2002 ** '** ** '*********************************************************** ' This code must be built with the PROGRAM
command - NOT the DEBUG command Trig Con
P8 '
Define pin for Trigger pulse Range Var Word ' 16 bit variable for Range Main
|
You can find more information on the SRF04 here