Automatic and Manual Door Opening and Closing Control Circuit
I Iinterested in this Idea because it is a simple idea that Combines Movement through a Servo Motor and a Sense of Moving Objects
Website tinkercad
Arduino IDE Program
USB Cable Arduino
Arduino Uno R3
Micro Servo motor
IR Sensor HW201
Slide Switch
Pushbutton
Jumper Wires
Breadboard
I opened the tinkercad website
I choose from a list Component ( Slideswitch - Pushbotton - Arduino uno - PIR Sensor Because the IR Sensor not Found in tinkercad - Micro Servo - Resistor 1 KΩ )
Connect the ends of the components using wiring
I Wrote the Code using Blocks Code
I used Simulation to Make Sure the Circuit Worked
connection:
Servo on pin 2.
IR Sensor on pin 3.
Pushbotton on pin 4.
slideSwitch on pin 5.
code blocks:
You can Choose the Type of Control Manually or Automatically through SlideSwitch
manual mode
SlideSwitch Must be Moved to Position 1
The Door can be Opened by Pressing the Push button, and the Servomotor Works
automatic mode
SlideSwitch Must be Moved to Position 2
When the IR Sensor Senses the Presence of a Person in Front of it, it Opens the Door by Operating the Servomotor
inputs is ( IR Sensor - Pushbotton - slideSwitch )
outputsis ( Servo motor )
I connected the wires as in the circuit diagram shown earlier
There is no INPUT_PULLUP command on the Tinkercad website in Blocks code
So I researched how to connect the INPUT_PULLUP circuit instead of writing it in the code
Operation Video