Question: 1 . Write a sketch using Arduino IDE and include the full code as a text in your solution. 2 . Design and simulate the

1. Write a sketch using Arduino IDE and include the full code as a text in your solution. 2. Design and simulate the hardware circuit using Proteus. Then, include the following images in your solution: a. The design of your circuit before running your simulation. b. All states of your simulation showing all possible cases.
Assume we want to design an embedded system using Arduino Uno board that will control a smart parking gate system. The parking gate consists of a metal stick attached to a servo motor, and an ultrasonic sensor to measure the distance of a car from that stick. The ultrasonic sensors trigger pin and echo pin are connected to Arduinos 2 and 3 digital pins, respectively. On the other hand, the servo motors orange cable is connected to Arduinos 6 digital pin whereas the servo motors red and brown cables are connected to 5V and GND, respectively. Initially, the servo motor is set to angle of 0 degree and the ultrasonic sensor transmits a sonar wave and waits until receives the reflected sonar wave from the incoming car. Once, the ultrasonic sensor receives the reflected signal, the system will measure the distance in centimeter. If the measured distance is less than or equal 200 cm, the servo motor will be set to angle of 90 degree which will make the stick in vertical position and thus opening the gate. The system will wait for 10 seconds to let the car to enter the parking area and afterwards, the servo motor will be set to angel of 0 degree again to make the stick in horizontal position and thus closing the gate. Finally, after closing the gate, the system will wait for 1 second to repeat the process again.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!