assignment
This week's assignment was to design and program a smart device that performs a certain function or solves a problem, using the program Arduino to read signals from multiple input components to control multiple action components, using Arduino C (Text Code).
inspiration
I chose to design a smart parking system When the car approaches the IR sensor picks up a signal so it turns on the buzzer so that the guard pays attention so the guard presses the switch to move the servo motor so that it allows the car to pass.
Software
tinkercad: I use tinkercad to simulate the circuit before actually designing it.
Arduino IDE: To write the codes responsible for programming Arduino-compatible boards.
Component List
arduino uno
servo motor
Wires
Breadboard
IR sensor
Buzzer
on/ off switch
LCD
arduino uno
IR sensor
breadboard
Buzzer
on/ off switch
LCD
USB
Wires
servo motor
Cardboard
Wooden sticks
glue
First: I used (Arduino Uno, servo motor, Breadboard, IR sensor, Buzzer, on/ off switch, and LCD)
Then: I started wiring them:
I Connect the Servo motor with the ground, power, and pin ( 5 ).
Then I connected the IR sensor with the ground, power, and Pin ( 6 ).
Then I connected the Buzzer with the ground, and Pin ( 7).
Then I Connect the slide switch with the ground, power, and pin ( 3 ).
Then I connected the IR sensor with the ground, power, and Pins (13, 12, 11, 10, 1, 0).
note :
The input component are the IR sensor and on/ off switch.
The output component are the servo motor, Buzzer, and LCD.
I used TINKERCAD to simulate the circuit before I started to Build your circuit on a breadboard and test it.
First: I defined the component I used and which pins they are connected to on the Arduino.
Second: in the Void Setup sekchen, I wrote the processes I want to be run for once.
Third: Void loop sekchen:
If the reading of the switch is equal to high
if the reading of the sensor is equal to 1
turn on the buzzer, turn on the LCD, and print on it welcome back, and move the motor 90 degrees
Simulation on tinkercad
First: I used (Arduino Uno, servo motor, Breadboard, IR sensor, Buzzer, on/ off switch, and LCD)
Then: I started wiring them:
I Connect the Servo motor with the ground, power, and pin ( 11 ).
Then I connected the IR sensor with the ground, power, and Pin ( 2 ).
Then I connected the Buzzer with the ground, and Pin ( 13 ).
Then I Connect the slide switch with the ground, power, and pin ( 3 ).
Then I connected the IR sensor with the ground, power, and Pin ( A4 ),(A5).
Simulation on reality
final model
I faced a problem when turning on the circuit, the switch was not working.
solutions:
I found that when writing the code I wrote if the switch is high without writing digital read, I modified it and found the switch worked.
This assignment aims to learn how to control multiple components by Arduino board through multiple inputs. This gives you more control over the components in your circuit and the ability to program each one of them individually to do certain tasks, That will help me control my final project components as I need.
In the EOWeek Session, we divided groups Our team consisted of me and Eslam. to Build a simple representation of a smart home system. This system senses the light in a room, as well as, weather parameters (temperature and humidity) in order to control a DC fan and a DC lamp.
Tools & Materials
1 DC Lamp
2 Relay Modules
1 DC Fan
2 Push Buttons
Jumper Wires
Crocodile Wires
1 DHT Sensor
1 Microwave Sensor
1 LDR Module
9V Adaptor
5V Adaptor
1 Arduino Uno
2 Large Breadboards
1 Slide Switch