Saturday, February 1, 2020

Weather sensitive retractable shade

           I did my diploma regarding information technology in ESOFT metro campus and in order to do our last project we were split in to groups. As our last project, we made a weather sensitive retractable shade which is powered by Arduino technology. In ESOFT we weren't taught about a single word about Arduino technology. But using youtube and other websites we were able to learn some basic concepts of Arduino technology.
                     Firstly, we needed some kind of  layout of our project. So, we drew it and then we edited it according to the ideas of our team  members. After that we selected what should we use for our project. So we selected,
                        01) Arduino board
                        02) Bread Board
                        03) Servo Motor
                        04) LDR
                        05) Jumbo Wires
                        06) 10K resistor
                        07) LED Bulbs
                                                These are the things we used for our project. I've attached the circuit diagram below.
Circuit Diagram


  Though we used a bread board I was unable to attach it to the diagram because it wasn't in the diagram drawing site. However, we used a special arduino cord to give the signals which are coming from the LDR to the Servo mortor. LDR is giving analog signals to the arduino board but the servo motor is getting only the digital signals. In order to connect the equipments, we had to connect LDR to the analog input and servo motor to the digital output.  We connected the resistor to get considerable values for the serial monitor. Making the code wasn't easy. So, we referred to the YouTube and other knowledge sharing sites to do that role. I'll paste the code which we used to run our project below.



#include <Servo.h>
Servo Abc ;
void setup() {
  Serial.begin(9600);
  pinMode(A0,INPUT);
  pinMode(7,OUTPUT);
  pinMode(8,OUTPUT);
  pinMode(6,OUTPUT);
  Abc.attach(5);



}
int t=1000;
void loop() {
  int val;
  val=analogRead(A0);
  Serial.println(val);
 
  if (val>600){
    digitalWrite(8,HIGH);
     digitalWrite(7,LOW);
     digitalWrite(6,LOW);
      Abc.write(-100);
      delay(t);
    }
    else if(val<600 && val>300){
      digitalWrite(7, HIGH);
       digitalWrite(8,LOW);
       digitalWrite(6,LOW);
       Abc.write(180);
             delay(t);
}
      else{
        digitalWrite(8,LOW);
        digitalWrite(7,LOW);
        digitalWrite(6,HIGH);
        Abc.write(-100);
              delay(t);
}




  
  

}
 
         
             We used 6,7,8 digital pins to connect our LED's , 5 is for the Servo Motor and A0 analog pin for the LDR input. Motor's time delay is 1000 milliseconds. In other words it's 1 second. That will give some kind of grace period to the motor to make  some movement. During this period we faced lots of troubles. It's because of few reasons.
  1. Arduino technology was new for us
  2. Wiring wasn't very easy at the first place
  3. Sometimes the values on the serial monitor wasn't as expected  
             Eventually, we were able to pass through these problems. Next challengable thing was to make the mechanism of the shade. So, we had to get some serious help  from another person. Wishmika was the perfect person within our contacts. With his help we were able to make the retractable shade and attached it to the model home which we made.
             As we used LED's in this project, it was very easy to acknowledge that in what weather condition this shade working. As examples, Red LED would be turned on when it's very sunny , Blue LED will be turned on when it's working under the rainy time and the Green LED will be turned on when the weather condition is perfect.
            There is a simple concept in the whole project. When it's going to rain, the surrounding will go dark and when it's very sunny, it also make some serious value differants in the serial monitor. So, our whole project is based on this kind of simple concept. But, in the future, we are expecting to use a humidity and temperature sensor to measure the values. We just paused it, because we had to learn more thing regarding the Arduino technology  
            We can change the values to make changes of the rotation and due to the weather conditions can be differ from state to state we have to run a test run on 3 or 4 days and after completing it consumers can buy the shade.




Working on the project
Model of the Project


Model of the Project 2
Model of the project 3
On the Presentation Day