Assignment Idea:
Β
My assignment idea is to build a Wireless Door Lock & Buzzer Alarm.
The system uses a servo motor to lock/unlock the door and a buzzer to create an alarm sound.
Both components are controlled wirelessly using a Bluetooth connection and a smartphone app.
I care about this idea because it combines security and convenience in a simple smart device.
My inspiration came from modern smart home security systems that allow people to control locks and alarms remotely.
Online tutorials and DIY projects on Arduino smart locks and alarm systems also inspired me.
Tinkercad
πΉ Software/Machines:
Tinkercad β to design and test the circuit before building it.
ArduinoBluecontrol App : for control the car
πΉ Electronic Components:
Jumper wires & crocodile clips β to connect the circuit parts.
Breadboard β to assemble the circuit easily without soldering.
Resistor β to control the current and protect the components.
Buzzer β alarm when time ends.Β
5V Power Supply/USB Cable β to power the system.Β
Servo Motor (SG90) β for locking/unlocking the door.Β
HC-05 Bluetooth Module β for wireless communication.
πΉ Craft Materials (for the model):
Cardboard & white paper β for the body of the bell model.
Cutter, pencil, ruler β for measuring and cutting the shapes.
Glue β to fix the parts together.
Servo Motor (SG90
HC-05 Bluetooth ModuleΒ
Arduino
Jumper wires
I designed the smart circuit around an Arduino UNO to control two action components:
A servo motor connected to pin 6 β used as the wireless door lock.
A buzzer connected to pin 8 β used as the alarm system.
I added an HC-05 Bluetooth module to enable wireless communication with a phone. The module sends characters (β1β, β2β, β3β, β4β) to the Arduino, which are then processed in the code.
Before building, I created a wiring diagram in Tinkercad to plan the connections. This helped me decide how the servo, buzzer, and Bluetooth module would be wired on the breadboard.
I used second Aurduino instead of Bluetooth to use 4 pins
Because there is no Bluetooth in Tinkercad.
In the Arduino code, the Servo.h library was included to control the servo motor by angle.
In setup():
Serial.begin(9600) starts Bluetooth communication.
myServo.attach(9) attaches the servo to pin 9.
The buzzer pin (6) is set as an OUTPUT.
The servo is initialized at 0Β° (door closed) and the buzzer is set OFF.
In the loop():
The Arduino waits for commands from the Bluetooth app.
If the app sends β1β, the servo rotates to 90Β° β door opens.
If the app sends β2β, the servo returns to 0Β° β door closes.
If the app sends β3β, the buzzer turns ON.
If the app sends β4β, the buzzer turns OFF.
I prepared the GUI using the Arduino BlueControl app on my phone. Each button in the app was assigned to send one of the four characters (β1β, β2β, β3β, or β4β) to the Arduino.
After designing the circuit and code, I implemented the project on a breadboard, uploaded the program using the Arduino IDE, and tested the system.
I built the smart circuit on a breadboard using an Arduino UNO, a servo motor, a buzzer, and an HC-05 Bluetooth module.
The servo motor was connected to pin 9 to control the door lock movement.
The buzzer was connected to pin 8 to act as the alarm.
The Bluetooth module was wired to the Arduinoβs RX and TX pins for wireless communication.
I programmed the Arduino UNO using the Arduino IDE in C language. The program includes the Servo.h library to control the servo by angle.
In the setup section of the code:
Serial communication (Serial.begin(9600)) was started for Bluetooth commands.
The servo was attached to pin 9 and set initially to 0Β° (door closed).
The buzzer was set to OFF at the beginning.
In the loop section:
The Arduino continuously checks if any command is received from the Bluetooth module (Serial.available()).
Based on the character received from the phone app:
β1β β Servo rotates to 90Β°, simulating the door opening.
β2β β Servo returns to 0Β°, simulating the door closing.
β3β β Buzzer turns ON, acting as the alarm.
β4β β Buzzer turns OFF.
I used the Arduino BlueControl app on my phone as the GUI. Four buttons were assigned to send these commands (β1β, β2β, β3β, β4β) wirelessly to the Arduino.
After uploading the code, I tested the system: the servo responded correctly to open/close the door, and the buzzer switched on and off as commanded.
servo with cardboard like a room with door
One of the main challenges I faced was that Tinkercad does not include the HC-05 Bluetooth module in its component library. This made it difficult to simulate the wireless part of my project.
To solve this, I asked several of my colleagues for advice. One of them suggested a good workaround: replace the Bluetooth module with another Arduino in the simulation and use 4 pins (serial communication) to mimic the Bluetooth connection. This allowed me to test the sending and receiving of data in Tinkercad, even though the real hardware used the Bluetooth module.