Intro
Author: Dirk Uffmann (Munich, Germany)
Original version published: April 10, 2008
Last update: June 08, 2009
The intention of this article is to provide support for everyone
who intends to build his own ultrasonic sonar range finder
with I2C Interface for use with his mobile robots. The functional features
of the range finder described here are somewhat similar to the
commercial types SRF02, SRF05 and SRF10 by Devantech Ltd. in UK.
However, I could not compete on their level of miniaturisation,
current consumption, voltage needed and range. Features of
the range finder described here are:
- Measurement Range 15 - 510 cm
- Time needed for measurement: 30 ms
- Interface for communication: I2C with 100kHz SCL clock
- Simple I2C communication with only 2 bytes for start of measurement
(I2C address & command) and 2 Bytes for getting the result
(I2C address+1 & result [1 unit = 2 cm]). If further bytes are read
(by acknowledging the previous byte), also the further echoes are reported
to the I2C master.
- I2C address can be chosen out of 127 possible
(any even number between 0x02 and 0xFE, see .equ OwnAddress=0xE4
in assembler file)
- I2C command can be chosen out of 256 possible
(any valid number between 0x00 and 0xFF, currently set to 0x50
in assembler file)
- Support of the general I2C master write (I2C address = 0x00) to start
several of these units in parallel at the same time
- Possible firmware update to extend measurement range
up to 5m (drawback: doubled measurement time of 30 ms,
one more byte for reading the result or decreased measurement resolution
[1 unit = 2 cm])
- Interface for software download: SPI
- Echo time adjusted amplification (from 200 to 3500 in 16 steps) during measurement
switched by the µC according to a defined time schedule
(change of effective resistors in the OpAmp feedback circuit)
- Supply voltage 8 - 12 V, protection against supply voltage
polarity error (Schottky diode)
- Current consumption 14 mA (no matter if measurement ongoing or not:
6 mA are consumed by the voltage regulator, 8 mA are consumed by the amplifier,
power management is only used for the microcontroller [running at 8 MHz system clock]
which is in sleep mode most of the time)
- The circuit is connected with a 2x5 pin header for voltage supply and
I2C / SPI communication
- Size of the board: 49 mm x 50 mm, single sided
- Ultrasonic frequency: 40 kHz
- Ultrasonic sender: Murata MA40B8S
- Ultrasonic receiver: Murata MA40B8R
- µController: Atmel AVR ATtiny26
- OpAmp: TL084
|
 |
Beneath you see a picture of the range finder.
Generally, you may click on the pictures to get an enlarged view
of the picture. Push the buttons on the navigation menu
to get more detailed information on these topics.
Figure Caption: Ultrasonic sonar range finder, view on the component side
Top of Page