HYACINTH WENG

BABY AT THE BEACH
2020

About increasing human reliance on machines for menial everyday tasks, imaging a world where humans have essentially become babies, unable to do anything without the help of machines.
The assignment was to use a sensor in an interactive setting.

There are three states: umbrella open with LED off, umbrella closed with LED off, and umbrella closed with LED on. The first state is triggered by high light registered by the LDR, the second state is triggered by a low light, the third state is triggered by complete darkness or little to no light registered by the LDR.





Components

Ideation

I decided to work with a photoresistor, an LDR, to open and close an umbrella via servo motor. I wanted to make a small scale model-type that could sit on a desk to mimic what an automatic sun umbrella would be like at a full scale.

Fabrication & Logic

I started by figuring out the wiring and the code, to make sure the parts functioned and moved as I wanted.
In a loop, the value the LDR is reading is checked and executes an action accordingly. Upon reading a value above 550, the servo arm will raise. A value between 550 and 100 will lower the servo arm. 100 or below will lower the arm and turn the LED on.

        
          #include <Servo.h>
          Servo myservo;
          int upPos = 0;
          int downPos = 90;

          const int ledPin = 6;
          const int ldrPin = A0;

          void setup() {
            Serial.begin(9600);
            myservo.attach(9);
            myservo.write(0);

            pinMode(ledPin, OUTPUT);
            pinMode(ldrPin, INPUT);
          }

          void loop() {

            int ldrStatus = analogRead(ldrPin);

            if(ldrStatus >= 550){
              myservo.write(upPos);
              digitalWrite(ledPin, LOW);
              Serial.println(ldrStatus);
            }else if(ldrStatus < 550 && ldrStatus > 100){
              myservo.write(downPos);
              digitalWrite(ledPin, LOW);
              Serial.println(ldrStatus);
            }else if(ldrStatus <= 100){
              digitalWrite(ledPin, HIGH);
              Serial.println(ldrStatus);
            }
          }
        
      

To translate the servo motion to the umbrella, I attached a 16 gauge wire to the moveable part of the umbrella and connected it to the servo arm. I stabilized the umbrella and servo body in a piece of foam so the force of the servo would actually translate.
My original plan was to attach the LDR to the top of the umbrella, but I opted to put it on the side and create a small beach environment instead, covering the foam with paper and other materials. I wasn't able to fit the rest of the electronics in the foam, so they had to stick out the side.