The Folding Star

1

  1. The Folding Stars

THE PROJECT IDEA is a movalble unit react to the moving of people infront ofit with open and close according to them by servo motor and ultra sonic sensor or using manual mode using reostat


THE INSPIRATION and THE SOURCE OF THE IDEA

Becuase I am architect i am very interest in the interactive building

and bring the units of the building to life

for increasing the function and range of using any architecture product

by changing the amount of opening in the building (in ceiling or in the wall ) it can be used for decoration in the wall of the space

it can be used for opening and closing window ass people move beside it for adding dimanizm to the building




HOW DOES IT WORK

The first Button : on/off switch

The second Buttom : manual/sensor mode

the slider : The manual mode

fusion and softwares work

IN 3D PRINTER using PLA

after save the G.Code in prusa

and checking the suppert and amount grams used and layers thickness

adding it in the memory of the 3dprinter

preheatthe nozzle and bed to remove the used color

then select the G.code to print


IN THE LAZER CUTTER using MDF 3MM

after saving the file in the lazer worker

switch on the machine from the side two witch in of the screen and other before the process of he cutting

move the nozzle to the point and select orgin to make it the orgin of the machine

open the file in the lazerwork and chech the lines and the overlabing

select download then in the machine select the downloaded file

Project Electronics & Power Management

A- the INPUT component are reostat , two buttoms and ultra sonic sensor

the function of 1- buttom 1 is to turn on the device

2 -buttom 2 is to turn fro the manual to the automatic mode

3 -the reostat is the manual mode used to open and close the unit manually

4 -the ultrasonic sensor is the automatic mode used to open and close the unit automaticlly


B- the OUTPUT (action)component are two servo motore

the two motor rotate opposite to each other used to open and close the movable unit

C- using arduino to connect them to gether to controll it by progamming to form smart system




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)

the two servo need only the supply from the 5 volt in the arduino (parallel)

and the ultra sonic sesnor power source is the 5 volt in arduino

so

the power supply is the 6volt adaptor and all component get power from the 5 volt pin

Project Programming

define the ultrasonic for sending and receiving ultrasonics

define varriables and servo motor

define the pins of the servo motor

the void loop using if condition for the (manual and automatic )modes

to move the servo moter in opposite direction anticlock and clock wise

long distance_y = 0;


#include <Servo.h>


Servo myservo; // create servo object to control a servo


Servo myservo_2; // create servo object to control a servo


int potpin = A0; // analog pin used to connect the potentiometer


int val; // variable to read the value from the analog pin


long readUltrasonicDistance(int triggerPin, int echoPin)

{

pinMode(triggerPin, OUTPUT); // Clear the trigger

digitalWrite(triggerPin, LOW);

delayMicroseconds(2);

// Sets the trigger pin to HIGH state for 10 microseconds

digitalWrite(triggerPin, HIGH);

delayMicroseconds(10);

digitalWrite(triggerPin, LOW);

pinMode(echoPin, INPUT);

// Reads the echo pin, and returns the sound wave travel time in microseconds

return pulseIn(echoPin, HIGH);

}


void setup() {

myservo.attach(9); // attaches the servo on pin 9 to the servo object

myservo_2.attach(5); // attaches the servo on pin 9 to the servo object

Serial.begin(9600);


}


void loop() {

// long distance=(map(distance_y,0,50,0,30));

Serial.print("switchc-/=");

Serial.println(digitalRead(2));


if(digitalRead(2)== HIGH) {

val = analogRead(potpin); // reads the value of the potentiometer (value between 0 and 1023)

// scale it to use it with the servo (value between 0 and 180)

myservo.write(map(val, 0, 1023, 0, 180)); // sets the servo position according to the scaled value

myservo_2.write(map(val, 0, 1023, 180, 0)); // sets the servo position according to the scaled value

}

else if(digitalRead(2)== LOW){

distance_y = 0.01723 * readUltrasonicDistance(6, 3);

myservo.write(map(distance_y, 0, 30, 0, 180)); // sets the servo position according to the scaled value

myservo_2.write(map(distance_y, 0, 30, 180, 0)); // sets the servo position according to the scaled value

delay(1000);

Serial.println(distance_y);

}

}

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)

first and check the mechanizm of this movement in the project

then i add the other parts

the main part connect the all part together

connection the other part with it with the component

Final Project Design Files