1 Background
Ultrasonic distance measurement is a relatively low-cost, contactless range finding method with high accuracy. It uses sound waves with frequencies higher than the upper audible limit of human hearing (20kHz).
The principle of measurement is quite simple. The distance (L) can be calculated based on the ultrasound velocity (c) and the travel time (t) of ultrasonic waves, namely L = ( c * t ) / 2. The velocity is assumed to be constant, however, its actual value varies with air temperature. A compensation formula is c = 331.3 + 0.606 * T, where T is the air temperature. A typical ultrasound velocity in the air is 340m/s, so the formula for distance can be simplified to L = 170 * t, where t stands for the total travel time of the ultrasonic waves (the time between transmitting an ultrasonic burst and receiving its reflection).
This document instructs the user on how to use the Ultrasonic Range Finder Field Engagement Board. The board uses core independent peripherals of ATtiny817 to measure the wave's travel time. The design focuses on reducing the MCU core usage and system power consumption for real-time or low-power applications.