Home Automation
Since my childhood, I want to make a system which give me a full control in everything in my room, Such as open/close my room's lamb , on/off fan and so on.
So, I decided to make a simple smart home with my mobile phone.
I found this project in YouTube, And I decided to make it as my own project.
Arduino uno to take inputs and perform action.
ArduinoBluetooth controller to control circuit using bluetooth.
Circuit Simulation
First, I begin to implement the circuit in fritzing and check its functionality.
So, I began to connect components like relay module and light bulb, Servo motor and Bluetooth module.
1- I started to implement code using Arduino IDE.
At First, I make variables to control Light Bulb, And I put it in pin 2 in Arduino board.
Secondly, I made an object called myservo to control my Servo motor.
2- In void setup function, I activated serial monitor and give it a buad rate of (9600) to be able to use it for Bluetooth module.
Then, I begin to setup all pins as outputs/ inputs in my circuit.
Light Bulb as output in pin 2 .
Servo Motor as output in pin 6 (PWM).
Void Setup Section
At First, I made while that allow to Bluetooth module to recieve data while it was sending only to avoid noise.
I made char var called a to store data sent by mobile phone on it.
Then I made a switch case that checks data sent.
If a equal 1 : Light Bulb will be lighten.
If a equal 2 : Light Bulb will be off.
If a equal 3 : Servo Motor will write angle of 90 degrees.
If a equal 4 : Servo Motor will write angle of 0 degree.
If a equal 5 : Servo Motor will write angle of 180 degrees.
Void Loop Section
Circuit Implementation
First, I begin to implement the circuit in real using my components.
Connect all components with each others.
I begin to upload Arduino code (.ino) into Arduino uno board.
I downloaded software "Arduino Bluetooth Controller" From Google Play into my phone to allow to me to control and send data to Bluetooth module and Bluetooth module sent this data to Arduino.
Finally, I Started to test my circuit in real, And Check its functionality.
It was a cool project, I enjoyed it and I want to make it control my room in the future.
Final Outcome
The first problem I faced that Fritzing software doesn't contain all components that I need like Light bulb and relay.
Then, Alaa told me that I should download components libraries and this link helped me a lot
The second problem I faced is my Bluetooth module didn't recieve any data and I didn't know Why..
Then, I asked Menna and she told me that my Bluetooth module is broken, And Finally I used another Bluetooth Module. That's It :)
I think I may use this week assignment in my final project to allow to players to play using Laser beam or using his/her mobile phones.
This will happen when he/she pressed on mobile phone on the number of LDR which they must shoot the laser beam on it.