CECS347 Project 1 - An Ultrasonic Ranger Finder-3
pdf
keyboard_arrow_up
School
California State University, Long Beach *
*We aren’t endorsed by this school
Course
347
Subject
Electrical Engineering
Date
Feb 20, 2024
Type
Pages
2
Uploaded by DeaconRoseAnt106
1 CECS 347 Project 1 An Ultrasonic Ranger Finder Total: 25 points+6 bonus points Preparation: You will need a LaunchPad, an HC-SR04 Ultrasonic sensor, a ruler to measure distance in centimeters, and three resistors (one 1kΩ
and one 2kΩ
or three 1kΩ
) for building a voltage divider. New Topics Covered: PLL, General Purpose Timer, Ultrasonic Sensor, Software PWM. Reference Projects: GPTM_Timer0A, UltrasonicSensor, SysTickPWM, TimerPWM Purpose: The purpose of this project is to review the following topics learned: GPIO, SysTick timer, Edge interrupt and to learn and practice the following new topics: •
PLL: Phase Lock Loop, learn how to generate a system clock using PLL. •
GPTM: General purpose timers, learn how to generate periodic timing with one general purpose timer. •
Ultrasonic sensor: Learn how to interface HC-SR04 ultrasonic sensor to detect obstacle range. •
Software PWM: How to generate a PWM signal using a hardware timer and use it to control the brightness of an LED. System Requirements: Design a system with an HC-SR04 ultrasonic sensor that provides information on the range of the closest obstacle in front of the system. 1.
PLL is required to generate a 16MHz system clock. 2.
The onboard RGB LEDs are used to provide range information. 3.
When there is no obstacle within 70cm in front of the system. All LEDs will be off. 4.
When there is an obstacle in the range of 10cm to 70cm in front of the system, white light will be turned on. The brightness of the white light will be used to indicate the range of the obstacle based on the following table. Distance (cm) PWM Duty Cycle 10 - 19 90% 20 - 29 80% 30 - 39 70% 40 - 49 60% 50 - 59 50% 60 - 69 40% 5.
When obstacle is within 10cm in front of the system, blink the red LED at a frequency of 2Hz: 0.25s on/0.25s off.
2 Hardware Design Requirements: 1.
Use General Purpose Timer1 in 16-bit count down mode to generate trigger pulses and to measure ultrasonic echo high period. 2.
Use SysTick timer with interrupt enabled to generate a PWM signal and use this PWM signal to control the brightness of the white light and the blinking of the red LED. 3.
Edge interrupt is required to capture the rising edge and the falling edge of the echo pin. 4.
Use the following pins to interface with the HC-SR04 Ultrasonic sensor: PB5 connects to the trigger pin, PB4 connects to the echo pin. Development Steps: 1.
(5 points) Project1P1: Build an embedded system with PLL to generate a 16MHz system clock. Use SysTick timer to generate a 2Hz square wave and output to the onboard red LED. Simulate on simulator and screen shot the logic analyzer’s output with the grid set to be 0.25s. 2.
(10 points) Project1P2: Keep a 16MHz system clock, add an ultrasonic sensor to the system and use General Purpose Timer1 in 16-bit count down mode generate trigger pulses and to measure ultrasonic echo high period. Edge interrupt is required to capture the rising edge and the falling edge of the echo pin. Demonstrate the distance detected using on board debug for the following three distances: distance>70cm, 10cm < distance < 70cm, and distance < 10cm. 3.
(5 points) Project1P3: Add timer-based PWM to the system to implement the light control: use SysTick timer to generate PWM signals control the brightness of the white light and the blinking of the red LED. Extra Challenges: 1.
(3 points) For Project1P2: use General Purpose Timer1 “Input Edge Time” mode to measure echo high period width. 2.
(3 points) For Project1P3: use General Purpose Timer2 PWM mode to control the brightness of the white light and the blinking of the red LED. Deliverable: 1)
Demonstrate your lab and submit source code for each of the three parts separately, one zip file per part: Project1P1.zip, Project1P2.zip and Project1P3.zip. For the two extra challenges, please submit: Project1P2Ex.zip and Project1P3Ex.zip. (20+6 points) 2)
Submit a project report. Demonstration video or video link in "Operation" section of the report. (5 points)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
What is the purpose of waiting 1 s after a voltage pulse before measuring current in sampled current voltammetry?
arrow_forward
What should I do when I get a current like 0.263187845A, should I round into the simplest form, or keep it and convert into mA?
arrow_forward
2. Please respond to question in attached image. Thank you.
arrow_forward
Please answer all subpart in short please Asap for like this
Please all subpart in short please..
arrow_forward
v Question Completion Status:
forward-biased
QUESTION 2
For this clipping circuit, what will be the minimum output voltage when diode is conducting?
10002
120VAC
ideal
2,5 V
10:1
+19.47 Volts
25 Volt
KA6.97 olts
ON E97 Volts
QUESTION 3
Click Save oand Submit to save and submit. Click Save AllAnswers to save all ansuers.
Sa
arrow_forward
Please help. You are going to draw arrows that indicates the flow of the given 5 actions (a,b,c,d,e).
You can draw arrows for all of them in the picture above, or make separate drawing for each letter. Please help me this is about CARRIER ACTION/FLOW OF CARRIERS in a semiconductor. It is also about Ferni Level.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337399128/9781337399128_smallCoverImage.gif)
Electricity for Refrigeration, Heating, and Air C...
Mechanical Engineering
ISBN:9781337399128
Author:Russell E. Smith
Publisher:Cengage Learning
Related Questions
- What is the purpose of waiting 1 s after a voltage pulse before measuring current in sampled current voltammetry?arrow_forwardWhat should I do when I get a current like 0.263187845A, should I round into the simplest form, or keep it and convert into mA?arrow_forward2. Please respond to question in attached image. Thank you.arrow_forward
- Please answer all subpart in short please Asap for like this Please all subpart in short please..arrow_forwardv Question Completion Status: forward-biased QUESTION 2 For this clipping circuit, what will be the minimum output voltage when diode is conducting? 10002 120VAC ideal 2,5 V 10:1 +19.47 Volts 25 Volt KA6.97 olts ON E97 Volts QUESTION 3 Click Save oand Submit to save and submit. Click Save AllAnswers to save all ansuers. Saarrow_forwardPlease help. You are going to draw arrows that indicates the flow of the given 5 actions (a,b,c,d,e). You can draw arrows for all of them in the picture above, or make separate drawing for each letter. Please help me this is about CARRIER ACTION/FLOW OF CARRIERS in a semiconductor. It is also about Ferni Level.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Electricity for Refrigeration, Heating, and Air C...Mechanical EngineeringISBN:9781337399128Author:Russell E. SmithPublisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337399128/9781337399128_smallCoverImage.gif)
Electricity for Refrigeration, Heating, and Air C...
Mechanical Engineering
ISBN:9781337399128
Author:Russell E. Smith
Publisher:Cengage Learning