Now , I gonna make a smart small storage drawer .🤩
I love having office tools, to use them to write summaries, and also drawing tools since I am in the College of Arts, but with the large number of tools on the desktop, it becomes very messy, and it is also exhausting to have a storage drawer that I open and close many, many times. I thought about making a smart storage drawer that opens and closes using a sensor instead of opening and closing it with my hands.🤷
This tutorial helped me a lot to do my task .👉
_ Software
It is a free app for 3d design , electronics , and coding
Makes it easy to write code and upload it to the board offline
_ Electric components
_Making Tools
Firstly , opened TinkerCAD and created new circuit .
Then brought the components needed ( Arduino UNO , ultrasonic sensor , LEDs ( red & green ) , 220 ohm resistor , servo motor , side switch , push button , breadboard ) .
After that started building my circuit as follows :
_ connect the Arduino with breadboard by wiring 5v pin of Arduino to the positive rail of the breadboard and GND to the negative rail
_ Connect the LEDs as follows : Red on pin2 on Arduino and Green on pin 3 , remembering to connect 220ohm resistor with both of them .
_ For connecting Ultrasonic sensor , VCC to the positive rail and GND to the negative . Trig on pin6 and echo on pin7 .
_ For connecting servo , red wire to the positive rail , brown to the negative and orange to pin9 on Arduino .
_ Then connected the side switch by connecting it's middle pin to pin11 on Arduino then the left pin to the negative rail and the right to the positive .
_ Push button , one side on pin12 on Arduino and the other to the negative rail .
_ Finally , connecting IR sensor , VCC to the positive rail , GND to the negative and OUT to pin11 on Arduino .
After finishing building the circuit , opining Arduino IDE and start building the code .
Starting with defining the variables
Then , coding void setup by defining the pins , which is an input or output .
Then , coding the automatic mode .
Then , coding the manual mode .
Total void loop :
Firstly , I brought the components needed ( Arduino UNO , ultrasonic sensor , LEDs ( red & green ) , 220 ohm resistor , servo motor , side switch , push button , breadboard ) .
Then started building the circuit as it is in tinkercad .
After finishing building the code , I tested it to know if it works or not , but I found out that it doesn't work , as the Arduino give a light for a second then fading till losing the connection with laptop . An electrical short circuit often occurred !
To solve this problem ,
Firstly , I disconnected the wires from the Arduino to see if there were problems with it or if it was fine
Then, I reconnected the circuit once again then tested it and thanks god , it works .
Message problem
Arduino testing
Circuit retesting
As required in the final project to make a smart device so , it will contain smart components , these components need to be programmed as we want to work , and that we learned in this week .
Using Arduino , in this week , I faced many problems and knowing how to solve them was a great achievement for me .
We made a smart home . 🤩
I enjoyed building it and knowing new component like relay . 🥰