arduino controlled servo door lock
I was inspired from this idea, a way to lock and unlock your door through your smart phone
link: https://www.hackster.io/raghavdaboss/arduino-controlled-servo-door-lock-1c2239
i thought of making a full control of the door (to open it till 180 degree and close it).. i also thought about controlling buzzer to work and stop through the smart phone
I built a simple smart circuit on breadboard that contains a TWO action components that i can control wirelessly
I used servo motor, jumper wires, breadboard, buzzer, arduino uno, USB cable and bluetooth module.
I used arduino ide software to write code and upload it on arduino and tested my circuit to make sure it's working first using serial monitor
I used Arduino Bluetooth Control (GUI) to control the action components and display calculated distance values of US sensor
I used fritzing to make wiring diagram needed
my project
Code
At the beginning, I used my breadboard and electrical components to build my circui
1-first, i made 2 lines on small breadboard on the corners one for positive and other for ground and connected them to 5v and gnd of arduino.
2- second, i connected the buzzer (first action component) short terminal to ground of breadboard, long terminal to digital pin 2 on arduino
3- third, i connected the servo motor (second action component),it has 3 terminals, i connected red wire to positive on breadboard ,brown wire to ground in breadboard, and orange wire to pin 9 on arduino
4- At last, i connected bluetooth module, it has 4 terminals, vcc to positive in breadboard, gnd to gnd in breadboard, rx to tx in arduino and tx to rx in arduino (pins 1,2)
second, i started coding my project on arduino IDE, i coded it that if the data coming is "1 " the servo will rotate clock wise from 0 to 180 degree (by adding 10 degrees each time) and if the incoming data is "2" the servo will rotate anti clock wise from 180 to 0 degree (by subtracting 10 degrees each time)... if incoming data is "3" the buzzer will work and if it's "4" the buzzer will stop
first i displayed values on serial monitor so i removed bluetooth module
Then I connected the bluetooth module, connected it to my mobile's bluetooth, used Arduino Bluetooth Control app to remotely control the buzzer and servo by pressing on buttons from 1 to 4
At last, I used fritzy to make wiring diagram needed
I made the code that if the data coming is "1 " the servo will rotate clock wise from 0 to 180 degree (by adding 10 degrees each time) and if the incoming data is "2" the servo will rotate anti clock wise from 180 to 0 degree (by subtracting 10 degrees each time)... if incoming data is "3" the buzzer will work and if it's "4" the buzzer will stop
first i displayed values on serial monitor so i removed bluetooth module and it was working
(the video is attached)
my project working, presenting data on serial monitor
second, I connected the bluetooth module, connected it to my mobile's bluetooth, used Arduino Bluetooth Control app to remotely control the buzzer and servo by pressing on buttons from 1 to 4
(the video is attached)
yes, i have iphone, so i couldn't find mobile app to make my assignment... so i borrowed an android mobile from my colleague to complete the assignment
i got stuck at 2 points
first, when trying the led with bluetooth module code on serial monitor (tutorial video) , i had an error, so i sent this video to my instructor yassin, he told me to unblug bluetooth module, then upload the code, the plug the blue tooth module, and it worked
second, uploading the code on iphone bluetooth mobile app. i downloaded several apps and no one could read the bluetooth module
so i asked on communoty troubleshooting on slack and i knew from Mr. abdelrahman that it won't work on iphone
so i borrowed an android mobile from my colleagues to complete the task
I can use the bluetooth module to control the servo motor (control amount of candies the child can take) by smart phone
I attended an extra session with our instructor mohanad about 3D scanning.. it was so cool 😀
We used the kinect 360 to 3D scan ourselves
I adopted a persian cat, his name is SOKAR 😍