SPLR02 [eng]

1. Job title

Ultrasonic rangefinder and passive speaker

2. Target of work

The target of the work is to acquire practical skills in measuring distance using an ultrasonic rangefinder and generating sound signals through a speaker.

3. Tasks of work:

  1. have a look with the methods of distance measurements using the ultrasonic rangefinder HC-SR04;
  2. have a look how to generate sound pulses using the passive speaker KY-006;
  3. create an algorithm for the programs in accordance with the tasks of paragraph 6;
  4. write the programs code according to the setting algorithm in paragraph 3.

4. List of laboratory work

Это изображение имеет пустой атрибут alt; его имя файла - 10pcs-Ultrasonic-Module-HC-SR04-Distance-Measuring-Transducer-Sensor-HC-SR04-HCSR04-1.jpg_960x960-1.jpgЭто изображение имеет пустой атрибут alt; его имя файла - KY-006_passive_buzzer_arduino_module.jpgЭто изображение имеет пустой атрибут alt; его имя файла - wavgat-arduino-r3-sml-800x800-1.jpg
ultrasonic rangefinder
HC-SR04
passive speaker
KY-006
Arduino Uno

!!! Attention!!!

When you use an analog of Arduino Wavgat, firstly you must install the appropriate driver on your computer.
Link 1, Link 2

and USB port driver is for CH341
Link

CONNECTION DIAGRAM
KY-006HC-SR04
S -> Arduino D10
+ -> +5v
– -> Gng
Gnd -> Gng
Echo -> Arduino D12
Trig -> Arduino D11
Vcc -> +5v

5. Input data and materials

Article is devoted to working with ultrasonic sensor HC-SR04

Article is devoted to working with module with passive sound emissions KY-006

6. Exercises for laboratory work

EXERCISES 2.1

Display in the Serial monitor the distance from the ultrasonic sensor HC-SR04 to a handicap (hand, phone, book, etc.) when the signal is received from this sensor. Display distance in centimeters.

EXERCISES 2.2

The message “Collision hazard!” is displayed in the Serial monitor if the distance from the handicap to the ultrasonic sensor HC-SR04 is less than 15cm.

EXERCISES 2.3

Send a sound signal of any tone with 1 second duration through the passive sound emitter KY-006.

EXERCISES 2.4

When the handicap approaches the ultrasonic sensor HC-SR04 at the distance closer than 20 centimeters, a signal should sound in the form of three successive sounds of different tonality, each 0.5 seconds long from the passive sound emitter KY-006.

7. Results
8. Form and conditions of delivery / acceptance of work.

Translated by Pavel Kalinin