Inspiration
https://youtube.com/shorts/Ow3xSBkGPXE?si=McSEoKk0uL-xZpasI choose to Build smart circuit I chose to create a system that simulates smart doors using a circuit consisting of a servo motor, Arduino, and an IR sensor.
Using thinker CAD to build and simulate the circuit
Electronics I used in the Assignment
servo motor
arduino UNO
IR Sensor
jumper wires
crocodile wires
1st step building Circuit on Thinker CAD
Components Kit
input Devices : IR sensor
Output Devices : Servo Motors
brain : the Arduino UNO board
Power Management : from the Arduino
BUILDING MY CIRCUT
Connect the sensor's positive (VCC) to power, the negative (GND) to ground, and the signal (SIG) to pin 5 on the Arduino.
Then, I connected the servo motor: the positive (VCC) to power, the negative (GND) to ground, and the signal (SIG) to pin 9 on the Arduino.
Start coding Arduino on Thinker CAD using blocks
Add Arduino and Circuit Components
Drag an Arduino Uno from the components list.
Drag an IR Sensor (Infrared sensor).
Drag a Servo Motor.
Connect the IR sensor to Pin 5 on the Arduino.
Connect the Servo Motor to Pin 9.
Enter Coding Mode (Code Blocks)
Click on Code at the top of the screen.
Choose Blocks + Text mode.
Add an "if" Condition Block
From the Control section, drag an if-else block.
Read the Sensor Input
From the Input section, drag read digital pin.
Change the number to 5 (because the sensor is connected to Pin 5).
Set it to check if the value is HIGH (meaning an object is detected).
Move the Servo Motor Based on Sensor Reading
From the Output section, drag rotate servo on pin.
Set the pin to 9 (because the motor is connected to Pin 9).
Set the angle to 180 degrees when an object is detected.
Add the Reverse Movement
In the else section, add another rotate servo on pin block.
Set the angle to 0 degrees when no object is detected.
Run and Test
Click Start Simulation to test the circuit.
Place an object in front of the sensor, and the servo will move to 180 degrees.
Remove the object, and the servo will return to 0 degrees.
Final Result
I installed the blade and turned on the device. After completing the design process, I started assembling the components inside the box after putting it together.
Follow the wiring steps as shown in TinkerCAD. When an object is placed in front of the IR sensor, the servo motor will move.
I asked about the challenges I faced while preparing the files, and the trainers played a big role in overcoming the obstacles.
When I faced difficulties in writing and organizing the code on ThinkerCAD, I turned to an instructor for guidance in understanding and fixing errors. At times, I had to pause and research how to structure the code more efficiently within the platform, as well as ensure the correct connections between different components in the circuit.
One of the challenges I encountered was identifying the main error in the code, as it was not always immediately clear. Additionally, organizing the code in a way that made it easy to read and modify was another hurdle. However, I learned the importance of adding comments within the code and breaking tasks into smaller parts.
For anyone working on a similar assignment, I recommend avoiding trial and error alone. Instead, start by researching the fundamental concepts of ThinkerCAD and the relevant programming principles. Consulting someone with experience can save a lot of time, especially when dealing with unclear errors. Lastly, keeping notes during the process can help prevent repeating mistakes in the future.
I can use ThinkerCAD to design initial electronic circuits for the project before implementing them practically.
Arduino programming will help me add smart features like automatic lighting, sensors, or even remote control in the product.
The coolest thing I’ve learned this week is how ThinkerCAD can be used to simulate circuits before actually building them, making prototyping much easier and error-free.
Something I’ll never forget from this week is how Arduino programming can turn simple components into interactive, smart systems. Seeing how a few lines of code can control lights, sensors, or even small robots was truly fascinating!