Operácie

Acrob015: Rozdiel medzi revíziami

Zo stránky SensorWiki

Balogh (diskusia | príspevky)
Bez shrnutí editace
Balogh (diskusia | príspevky)
Bez shrnutí editace
Riadok 66: Riadok 66:
temperature. Many equations appears in literature, two of them are mentioned here:
temperature. Many equations appears in literature, two of them are mentioned here:


c=c011AV  (1)
<math>
\begin{equation}
    c = c_0 ( 1 + \gamma \vartheta )( 1 + A_V \eta ) 
\end{equation}
</math>
 
<math>a^3 + b^4 = c^5</math>
<math>\sum_{i=1}^n = \frac{n(n+1)}{2}</math>
<math>\sqrt{1-e^2}</math>
 
where  
where  
c0 - speed of the sound at 0° C and 0% RH (c0 = 331.5 [m.s-1]),
c0 - speed of the sound at 0° C and 0% RH (c0 = 331.5 [m.s-1]),

Verzia z 09:39, 19. apríl 2011

< Previous | Home | Next >


Ultrasonic sensor for distance measurement

In following application we will use the Parallax PING))) Ultrasonic sensor.

Features:

  • Provides precise, non-contact distance measurements within a 2 cm to 3 m range
  • Simple pulse in/pulse out communication
  • Burst indicator LED shows measurement in progress
  • 20 mA power cosumption
  • Narrow acceptance angle

Key Specifications:

  • Power requirements: +5 VDC
  • Communication:Positive TTL pulse
  • Dimensions: 22 x 46 x 16 mm
  • Operating temp range: 0 to +70 °C


Principle of operation

The Ping sensor measures distance using sonar; an ultrasonic (well above human hearing) pulse is transmitted from the unit and distance-to-target is determined by measuring the time required for the echo return. Output from the PING))) sensor is a variable-width pulse that corresponds to the distance to the target.

The PING))) sensor detects objects by emitting a short ultrasonic burst and then "listening" for the echo. Under control of a host microcontroller (trigger pulse), the sensor emits a short 40 kHz (ultrasonic) burst. This burst travels through the air, hits an object and then bounces back to the sensor. The PING))) sensor provides an output pulse to the host that will terminate when the echo is detected, hence the width of this pulse corresponds to the distance to the target.


Interfacing to the microcontrollers is a snap: a single (shared) I/O pin is use to trigger the Ping sensor and "listen" for the echo return pulse. An onboard three-pin header allows the PING))) to be plugged into a solderless breadboard (on an Acrob, for example), and to be connected to its host through a standard three-pin servo extension cable.


Example program

#include <stdio.h>


Sources of errors

Air Temperature

Changing environmental conditions are the main source of the differences. Many quantities influences measurement including temperature, humidity, turbulences, pressure and damping. Main source of error is air circulation and temperature. Many equations appears in literature, two of them are mentioned here:

Syntaktická analýza (parsing) neúspešná (MathML s fallbackom na SVG alebo PNG (odporúčané pre moderné prehliadače a nástroje pre zjednodušenie prístupu): Neplatná odpověď („Math extension cannot connect to Restbase.“) od serveru „https://wikimedia.org/api/rest_v1/“:): {\displaystyle \begin{equation} c = c_0 ( 1 + \gamma \vartheta )( 1 + A_V \eta ) \end{equation} }

where c0 - speed of the sound at 0° C and 0% RH (c0 = 331.5 [m.s-1]), γ - teplotný koeficient rýchlosti šírenia (okolo 0° C), γ = 1.83 10-3 [°C-1], AV - vlhkostná konštanta (medzi 50 ÷ 200 kHz), AV = 2.2 10-4, η - relatívna vlhkosť vzduchu [%],  - teplota vzduchu [°C].

Pre praktické účely môžeme vplyv vlhkosti prostredia na zmenu rýchlosti zvuku zanedbať, pretože je v porovnaní s vplyvom teploty omnoho menší. Dostávame tak zjednodušený, numericky menej náročný vzťah pre korekciu rýchlosti, ktorý je daný nasledovne

c=c00.6 . (2)

Another (easier) formula is:

Cair = 331.5 +(0.6× TC)m/s

The percent error over the sensor’s operating range of 0 to 70 ° C is significant, in the magnitude of 11 to 12 percent. The use of conversion constants to account for air temperature may be incorporated into your program.



< Previous | Home | Next >