[Smart Mashrabya] Project Journal

Project Ideation

1- Tell us about the idea of your project. Why do you care about this? What were you inspired by? Include images and videos of similar projects

this project because it addresses one of my concerns regarding the sustainability of architecture and directly relates to my field of study and career. 

the Smart Mashrabya is a working model of a kinetic facade that works on maximizing natural lighting time inside of a building while minimizing the amount of direct sunlight that enters the building. 

bydoing so kinetic facades works on reducing the overall carbon footprint of a building by reducing energy consumption in artificial ventilation, lighting and air conditioning while improving the overall human experience inside the living space. 

Project Construction

2- Explain the CAD process of your project. How did you use the software to design your project? (List the softwares/tools/materials...etc that you used)

1- i started the design process by doing a chard board representation of the mechanism i wanted to achive and that lead me to the exact dimensions of my parts which i later built in fusion 360.

2- after many trials and errors a final design was reached for the moving bracket of the shade arm which has a pin/slot movement mechanism

3-the design was made in 1 half that was later mirrored. 

4- making the device in 2 halfs made it easier for design and also will help for fabrication since my smart device over all dimensions are bigger than the size of the sheet of plywood we use in the diploma. 

5 - all construction parts were modeled using fusion 360 and all were defined sketches. 

6- arm moving bracket with pin/slot

7- arm hinge design

8- nut pully (drive pin) 

8- stepper motor mounting plate

Final Assembled Design

3- Explain the fabrication process of your project. How did you use the machine to fabricate your project? (List the softwares/tools/materials...etc that you used)

LASER CUTTING after the finalization of the design use DXF for laser tool to export all construction parts to be ready for fabrication on laser works 

1- used RD works for nesting and parameter setting 

2-used 50/55 power and 35 speed 

3- used 1 sheet of plywood 76 cm*150 cm to cut all the wooden construction parts

3d printing after the finalization of the design use save as mesh tool to export all construction parts to be ready for fabrication on cura

1- used ultimaker cura for slicing the 3d printing parts.

2-used supports with support interface  and 30% infil  and 0.2 mm layer hight. 

3- each side of the project used 25 grams and took 2 hours 45 min

Project Electronics & Power Management 

4- Describe your electronic circuit. What are the input and action components? What is the function of each? How do the components integrate together to form your smart system? (List the softwares/tools/components...etc that you used)

arduino uno (brain)

LDR sensor module  [input component]

jumper wires 

LCD 4×20 with I2C module

[output component to present environment data , time and angle of shade arm] 

9V adapter [power source]

2 A4988 – Stepper Motor Driver on Expansion Board [output component to control the stepper motor]

DHT11 sensor module [input component]

2 Stepper Motor NEMA 17

[action components each controles a shade arm with a lead screw and nut] 

ethernet cable  [communication between the controle panle and window frame]

on/off switch

breadboard [different sizes]

ethernet wall socket [adapted for communication with the arduino with jumper wires]

RTC module [input component - keeps real time to be displayed on the LCD]

2 pushbuttons  [input component]

5- What is your power source? How did you select the suitable power source for your project? (List the softwares/tools/components...etc that you used)

for this project i used a 9 volt adapter since it would be the optimum voltage  for running all the components

1- 9 volt directly to run the stepper motor and arduino using the VIN pin 

2- 5 volt from the arduino to run all sensors [DHT11, LDR, LCD, stepper motor driver]

Project Programming

6- Describe the code of your project. How did you program each function of the project?  

1- including all the libraries that are required to run all the components

stating and defining all the pins and variables required to run my code smoothly 

2- defining the stepper motors pins

3- defining limit switch pins 

4- creating a variable to store the stepper homing mode (reset)

5- defining the analog pin for LDR (LDR1)

6- creating a variable to store the required angle to move the shade arm to (angle) [with equation to round it to the multiplications of 5 

7- creating a variable to track the shade arm current position (shade)

8- creating a variable to compare the shade current position and determine what action to take 

9- creates a void function that doesn't return anything to state what is displayed on the LCD and in what order

10- creates a function that runs once each time the loop is run but it only makes action once the first time you power the device. 

11- the shade arm  will go up until it hits the limit switch then changes the reset value to 0 (indicated to the whole code that the device now has finished it's homing ) 

12 - then makes the shade value = 1460 which it is the number of pulses required to close the shade 100% from the 90 degrees open position. 

13- creates a function that runs only if the device has done homing the arm of the shade to close it 

14- runs 50 pulses to rotate the stepper motor 0.25 of a full rotation 

15- reduces the shade value by 1 once each time the for loop runs 

16- that way the code will know the exact placement of the shade arm since we know that it takes 1460 pulses to close the arm completely 

17- creates a function that runs only if the device has done homing the arm of the shade to open it 

18- runs 50 pulses to rotate the stepper motor 0.25 of a full rotation in the other direction  

19- increases the shade by 1 value once each time the for loop runs 

20- that way the code will know the exact placement of the shade arm since we know that it takes 1460 pulses to close the arm completely 

21- the setup function runs once when the device is powered and it declares the pin mode for all the pins and start LCD and serial communication 

22- the loop function runs repetedly  

23- declares the values of all DHT input (temp, HUM) 

24- runs the displayLCD function 

25 - runs the homing function for both the arms of the shade 

26 - maps the reading of the LDR sensor over 0 to 1000 values.

27- declares the shade arm position requred compared with each value range from the LDR readings. 

28 - compares the shade position and dictates the direction the stepper needs to run

Project Integration & Testing 

7- Demonstrate with text and visuals how did you integrate the project’s modules together? What are the testing results? (Include a Demo video separately, showing a proof of functionality)

over the course of the last 3 weeks of the diploma i integrated modules and sensors i wanted to test for the final project to learn how it works and it's potential 

demonstrated and tested how to use an LDR to control the movement and direction of servo motor and how to make comparisons using code in WEEK 6

demonstrated and tested how to use an LDR to control the movement and direction of servo motor and how to make comparisons using code in WEEK 6

demonstrated and tested how to use an LCD with I2C communication and DHT11 sensor to read and present temp data and humidity  in WEEK 7

alse in the same week tested the concept of changing the mode of a device by storing the value of the mode in a variable that i can change using a push button.

demonstrated and tested how to use an HC-05 Bluetooth module to control the arm shade and the mode of the device   in WEEK 8

the assembly was a hard and tedious process. the project consists of over 40 3d printed and laser cut parts and more that 60 M3 screws

1-i started by laser cutting the one side of the assembly  for testing and experminting with the stepper motor range and code

demonstrated and tested the arm moving mechanism and homing action of the stepper and exact steps required to close the shade 100%

2-after figuring out all the design parameters and dimensions i fabricated all the laser cut parts

3- i started assembly with the 2 main arms for the device since every thing else built on that 

4- the lower horizontal connection is designed to be removed in order to reach all the wiring and connections

Sharing & Collaboration 

8- Did you ask for feedback? What are the ideas that others have contributed or suggested? What was someone else’s idea that you built upon? How did you help your peers? How did your peers help you?

i always asked of feed back form my instructors and peers 

1-amany(my instructor)  helped me in figuring out the best way of tackling the challenges in my code and in designing the 3d printed hinge. 

2- with instruction from her i was able to print the movinf slot pracket in the most optemum orientation to have the max strength 

3- mohamed adel (my instructor) helped me in figuring out the stepper coding and trouble shooting problems

4- ahmed saeed the program director helped me in troubl shooting my mechanism and figuring out the best angle for optemum functionality of the arm moving pracket and pin pully

5- tarek helped me find out the clearance and tolerance of the 3d printed in order to print interlocking parts

Overcoming Challenges 

9- When you got stuck, what/who did you turn to? At what point did you have to pause to research or learn more before moving on? What are some mistakes, pitfalls, or challenges that others can avoid if they were doing this project?

i had many snags and errors in the process of fabricating and designing the mechanism of my project 

arm moving bracket

1- the first one was a successful print but it turned out due to the slot orientation in the 90 degrees open position the pin moved freely with not adjacent action in the arm and that was not acceptable 

2- after trouble shooting and brain storming with saeed we figured out that i need to change the degree of rotation to be 15 degrees slanted over the vertical lead screw access and that worked perfectly since now the pin met the slot only in one point in each position

new and final solution

wrong orientation

3d printed hinge

1 - after designing the hinge with 0.2 clearance and print in place the plastic welded it self and the hinge came out as 1 solid part 

2- on instructions from amany i made the clearance 0.5 and changed the orientation to print the part standing up which also failed and it broke when i tried to free it 

3 - to save time and after trial and error i decided that it will print the hinge in 2 parts and connect them with a screw and even that took a lot  of post processing to be moving  smoothly  

2nd failed print (broke when i tried to move it) 

final moving hinge

Future Work

10- If you had more time, what is one thing you would change/ Do next in your project?

1- i would improve the enviorment and control panle and add lighting

2- i will improve the movement smoothesnes and how it reacts to light

 Final Project Design Files