Sonic-Project | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Distance measuring with SRF04 sonic moduleSections
1. IntroductionThis section describes how to measure distance to objects with the SRF04 sonic modul from Devantech. In this sample we use two sonic modules. MAM128 (Mini Application Modul) is used as controller unit. 2. Physical basesUltrasonic waves are sound vibrations outside of the human hearing area. The frequenzy is above 20kHz. Sound waves can only spread when they are in a suitable medium. In a vacuum no suitable medium is available, so it is impossible to hear something in the universe. The sound velocity is depending on it medium. Although the sound velocity is relatively small, it was measured first in the seventeenth century. Within the following centuries the people recognized that the sound velocity didn't depend on the frequency of the wave, but of his medium and the temperature. Sound waves are also reflected differently or even absorbed by objects.
Sound waves go into all directions circularly, as far as they aren't absorbed or reflected limitedly by objects. The sound energy spreads out proportionally to the radius on an area getting bigger and bigger. The energy of a sound wave and the volume decreases with the distance to the acoustic source. Further the energy depends on the amplitude and frequency of the sound wave. By doubling of the frequency the speed of the air molecules also doubles. If a police car passes fast with siren, you can take acoustically truly, that the tone suddenly gets considerably lower. This fact is called Doppler effect. The dicoverer was the Austrian physicist Christian Doppler who made the first theoretically and practical tests. In the picture below you can recognized how this effect come about. The stationary acoustic source is represented on the left. The wavelengths are equally big in all directions. on the rigth side the acoustic source is moving from left to rigth side. At point A a lower note can be heard because the wavelength was stretched. At point B a higher note than the original one can therefore be heard because the wavelength was compressed. If the start frequency is known, the speed of the object can be calculated. 3. SRF04 Sonic moduleThe ultrasound module is consisting of transmitter, receiver, control and analyze logic. The modul is working with TTL level. A defined trigger signal starts the measureing. The measurement result is distributed over the echo line. The signal length of the echo line reflect the distance of the object in the recording area. The distance can be calculated with the following formular: Distance[µs*cm] = Time[µs] / Velocity of sound[µs/cm]3.1 SRF04 Timing3.2 SRF04 DC Electrical Charateristicts
4. Hardware DiagramThe MAM (Mini-Application-Mudul is discribed here. 5. SoftwareThe software is written in Ansi-C and is optimized for the AVR-GCC cross compiler. 6. Downloadsonicmain.csonic.c sonic.h |
'펌웨어디자인(Firmware Design)' 카테고리의 다른 글
적외선통신 (0) | 2009.07.19 |
---|---|
AVR로터리엔코더볼륨 (0) | 2008.12.09 |
AVR 마이크로컨트롤러설계도구 (0) | 2008.11.11 |
AVR USB AT90USB162 마이크로컨트롤러 (0) | 2008.11.11 |
온도제어기 (0) | 2008.11.11 |