The SRF02 is an ultrasonic range finder that works with a
single transducer. Using only one transducer to both transmit the
ultrasonic burst and to receive the echo of the same, reduces the size
of the unit to only 20x24mm. The small size allows it to be easily
incorporated in a tube with a diameter of 25mm.
The SRF02 features both I2C and a
Serial Interface. (see PDF SRF02). The Serial Interface is a standard
TTL level UART format at 9600 baud,1 start, 2 stop and no parity bits,
and may be connected directly to the serial ports on any
microcontroller. Up to 16 SRF02's may be connected together on a single
bus, either I2C, or serial. The measurement rank is about 15cm to
600cm, so the received results are between 0x08 and 0xFF hexadecimal.
Taking advantage of the “dead” zone (0x00hex to 0x08hex) allows the
direct sending of commands to the "Host". An ER400TRS module connected
to the UART using a Pic 16F877A receives the data stream from the
Midi-Stick, converting it with a serial program routine to midi
messages, sending it to PortA, RA4. To have the ability of sending
program- or control change messages, increases the performer’s
possibilities to create and manipulate sounds. Only two bytes have to
be sent to get a result from the SRF02. The first it is the address
(between 0 and 15) and the second is the command itself. For example
0x00 (address 0), 0x55 (command): Initiates a new measurement - the
result is transmitted automatically from the SRF02 in microseconds by
TX.
To control the sensor and both push bottoms the circuit uses Pic
16F628A. The Pic has an UART and the ability for LVP (low voltage
programming). IC 74HCT573 is the interface to the Parallel Port of a PC
and is used to program the Pic. The ability to program the Pic "in
circuit" helps greatly in developing the program. (see programming "in
circuit")
Transistor (T1) switches VCC of
the ER400TS (Easy-Radio) and VCC of the 74HC4066. After 5 minutes
without detection of a new measurement the circuit enters "sleep" mode.
This explains the need for the transistor T1. Pressing push bottom S1
wakes the up. A VARTA rechargeable battery, 4,8V 80mA/H is used for the
circuit. The charging is done with a MAXIM, MAX712. The circuit is
calculated to charge the battery in approximately 3 hours.