Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

嵌入式系統

Introduction to Embedded System Design

Part 8: Ultrasound sensor

授課教師
Che-Wei LIN (林哲偉)

Embedded System-1
Objectives

 To familiar with operation of


ultrasound sensor
 This Grove - Ultrasonic ranger is a non-contact
distance measurement module which works at
40KHz. When we provide a pulse trigger signal
with more than 10uS through singal pin, the
Grove_Ultrasonic_Ranger will issue 8 cycles of
40kHz cycle level and detect the echo. The pulse
width of the echo signal is proportional to the
measured distance. Here is the formula: Distance =
echo signal high time * Sound speed (340M/S)/2.
Grove_Ultrasonic_Ranger's trig and echo singal
share 1 SIG pin.
Embedded System-2
Specifications

 Operating voltage: 3.3/5.0VDC

 Operating current: 15mA

 Ultrasonic frequency: 42kHz

 Measuring range: 3-400cm

 Resolution: 1cm

 Output: PWM

 Suli-compatible Library

Embedded System-3
Arduino Example

 Base Shield and connect Ultrasonic Ranger to D7.

 UltrasonicRanger Library

 https://github.com/Seeed-Studio/Grove_Ultrasonic_Ranger

Embedded System-4
Lab Request

 In this week’s lab, we will utilize ultrasound sensor in the monitoring the

appropriateness of distance between subject and LCD screen.


 Please mount your ultrasound sensor in your LCD screen.

 Please detect the distance between LCD screen and user’s body (head) and display the distance in the
serial monitor of Arduino

 Based on the distance, please display the “the level of appropriateness” between a user and the LCD
screen.
» For the information of the “the level of appropriateness” between a user and the LCD screen, please take following
link as reference (https://health.businessweekly.com.tw/AArticle.aspx?id=ARTL000081826 )
− Distance < 40 cm: Too short

− 40 cm ≦ Distance ≦ 60 cm: Appropriate

− 60 cm < Distance: Too long

 Please measure the input trigger from Arduino to ultrasound sensor by oscilloscope and explain what is the
input-out relationship between Arduino and ultrasound sensor

 Extra Bonus: Use four sensors in the corners of the LCD screen to detect if the subject’s hear are
higher/lower of the upper/lower bound of the LCD screen.
Embedded System-5

You might also like