Week 8 - Journal

Ideation

Tell us about your assignment's idea for this week. Why do you care about this idea? What inspired you? (Please include images or links to sources of inspiration)

Smart Home Circuit

I started searching on the Internet, and I was inspired by the idea of making a control circuit for Smart Homes from the above picture, and I started to develop an integrated vision through which a control circuit is made that has the ability to fully control two circuits, one of which is direct current and the second is alternating current, and thus more than six outputs is controlled. I turned on Servo motor, DC motor (2 Directions), Buzzer, Seven Segment, LCD, RGB led (4 Colors) ,and AC bulb.  Then I started working on my Home Smart Circuit.



The Inspiration website Link:


https://www.hackster.io/embeddedlab786/home-automation-8058cf

Tool Chain

Which software/machines/materials did you use in the assignment? Why?

Arduino IDE

Adapters  (9 v)


Blutooth Module

DC Jack to terminal block converter

Arduino Bluetooth Control 

Software :

Arduino IDE

PCB way software

Fritzing

Material & Tools 



Resistor  220 Ohms

Jumper Wires (Male - Male, Male - Female)


Rugged Shield Power Strip 


Relay Module

7 Segment Display

Bread Board

H- Bridge

Piezo

Avometer

Servo Motor

Arduino Uno

RGB Led 

Bulb Lamp

Hobby DC Motor

LCD (I2C , 16 *2)

Fritzing Sotware

Design/Preparation Process

Explain the design and/or preparation process of your assignment. How did you use the tool or software to design and/or prepare your assignment before fabrication/implementation?

Smart Home Circuit Simulation on Fritzing

Pin 2 - Green RGB led 

Pin 3 - Blue RGB led 

 Pin 4 - Red RGB Led 

Pin 5  - Buzzer 

Pin 6 -  7 sigma B 

Pin 7   - 7 sigma A 

Pin 8 -   7sigma C  

Pin 9  - DC Motor input

Pin 10  - DC Motor input

Pin 11 - Servo Motor

Pin 12 - AC Bulb 

Pin A4 - SDA for LCD

Pin A5 - SCL for LCD



PCB Software 

(GUI Interface) 

Development/Implementation Process

Explain the development/implementation process of your assignment. How did you use the machine/tool to manufacture or implement the design of your assignment?

Line 1 to18 (Coding)

Line 19 to 36 (Coding)

Line 37 to 55 (Coding)

Line 56 to 74 (Coding)

Line 76 to 96 (Coding)

Line 97 to 117 (Coding)

Line 118 to 140 (Coding)

Line 141 to 153 (Coding)

Pseudo code 


I downloaded the Android app (PCB Way) to get a graphical interface consisting of 6 buttons to control the smart home circuit, and I made pseudo code as follows:




Button 1:

The LCD screen is controlled to write the following phrase “First Floor”, and the Seven Segment prints the number “1”, while the RGB LED lights up in white color.


Button 2:

Through it, the LCD is turned off, the 7-segment is turned off, the RGB Led lighting color is converted to blue, the DC motor is turned on to move clockwise, and the AC bulb is turned on.


Button 3:


Change the RGB lighting to green, change the DC motor to counterclockwise, and turn off the AC bulb.


Button 4 (Fire Alarm)

Turn on the servo motor (90 Degree), which represents the opening of the gates at the time of danger, turn on the buzzer, turn on the LCD to print the phrase “Fire Alarm”, change the RGB LED to turn red, and turn off the DC motor.


Button 7 (Safe Mode)


The LCD prints the phrase "Seventh Floor" and the AC Bulb is turned on, and the Servo motor returns to its original position ( Zero Degree) to close the gates due to the disappearance of the danger, and the Buzzer is turned off, and the RGB Led is also turned off.


Button 8 (Switched off Mode)


Turn off all of the above outputs.






Video for the Actual Circuit 

Smart Home Circuit.MOV

The coding relied on defining the components of the smart home circuit, whether inputs or outputs, and the library for servo operation was used, as well as the library for the LCD, which is LiquidCrystal_I2C.h, and a variable named incoming Data was defined to store the value entered from the PCB Way remote control application. The if function and the if else function were used, so that this includes several cases, namely 1, 2, 3, 4, 7, or 8, in order to achieve the outputs that he set according to the Pseudo Code above.





I used all the outputs in the kit, and I was able to do that through downloading the Servo motor library, as well as downloading the LCD library, I also used the electrical resistors of 220 ohms, as well as 1 kilo ohm resistors, which helped me control the size of the voltage inside the circuit, as well as the use of the Motor Driver, which helped me control the DC motor(H-bridge), and the Delay helped me control the AC bulb, and through Arduino I downloaded the code for controlling the smart home circuit, and by completing the pairing process between the Bluetooth unit and ( PCB Way )software, this helped me control the smart home circuit.


At the first of the loop function the Arduino reads incoming data coming from Bluetooth, so if I choose button 1 then The LCD screen is controlled to write the following phrase “First Floor”, and the Seven Segment prints the number “1”, while the RGB LED lights up in white color.


So if I choose button 2,Through it, the LCD is turned off, the 7-segment is turned off, the RGB Led lighting color is converted to blue, the DC motor is turned on to move clockwise, and the AC bulb is turned on.


So if I choose button 3, Changing the RGB lighting to green, change the DC motor to counterclockwise, and turn off the AC bulb.


So if I choose button 4,Turning on the servo motor (90 Degree), which represents the opening of the gates at the time of danger, turn on the buzzer, turn on the LCD to print the phrase “Fire Alarm”, change the RGB LED to turn red, and turn off the DC motor.


So if I choose button 7, The LCD prints the phrase "Seventh Floor" and the AC Bulb is turned on, and the Servo motor returns to its original position ( Zero Degree) to close the gates due to the disappearance of the danger, and the Buzzer is turned off, and the RGB Led is also turned off.


So if I choose button 7,Turn off all of the above outputs.




Coding Link



https://drive.google.com/file/d/1kaBs5CHXf8WCzBc35PHMtAl-1YnHoDCL/view?usp=sharing



Overcoming Challenges

What kinds of challenges or problems did you face while doing the assignment, tutorials, or exercises?  How did you solve them? Did you ask for help from an instructor or peer? Please provide a link to the tutorial or article that you used to solve your problem (if any)

Connect a wire and Resirtors between  TX Pin in Arduino and 

RX in Blutooth Module ( Challenge)

Overcoming Challenge

The challenge is how to connect wires and 3 resistors of the type 1 kilo ohm between the TX pin in the Arduino board and the RX pin in the Bluetooth module, so as not to cause any damage to the Bluetooth module, which cannot bear the current value of 5 volts coming from the Arduino board. The picture in the PowerPoint slides in the tutorial was not clear enough, and accordingly, I sent this problem to the trouble shooting group on the Slack h application of the Maker Diploma batch, and through the help of a colleague, I was able to figure out the correct delivery method and it overcame me This challenge, and I made the connection according to the picture on the right, and thus I was able to complete the rest of the circuit.



Final Project

How can you use the skills and knowledge that you've acquired this week in your final project?

Hazard Mode

Safe Mode

I think that I have become able to deal with the Arduino-Uno control board in a much better way, and I have become able to use the pseudo code and coding to do programming, and I have also become able to integrate and make several outputs and Bluetooth Module to  work harmoniously together, and I have also become able to use Mobile app to have full remotely control on my Smart home Circuit, in addition to that I feel a great development in the ability to think logically based on problem-solving and creating Alternatives and thinking about the development of problems that may face the end user with the development of the largest number of solutions which will greatly reflect on facilitating work on my final graduation project.


I also gained logical thinking to visualize problems and develop the necessary solutions, as I was able to move between several modes, including, for example, but not limited to the "Safe Mode" and "Hazard Mode"





WOW!

What is the coolest thing that you've learned this week? What is something that you will never forget from this week?

Smart Home Circuit.MOV

Full Smart Home Circuit Video 

PCB software

The most enjoyable thing for me is that I was able to Design, write programing code and have the full remotely control on my Smart Home Circuit, taking into account User Experience including simplicity, and aesthetic form, which is one of the most important customer requirements in products.

Weekly Digest [OPTIONAL]

Tell us about any other cool things that you've made this week: in the Hands-on activity, tutorial examples, exercises, or any other cool mini-project that you tried out aside from the assignment.

Assignment Design Files