Resistance is futile

People

  • Keunwoo Peter Yu
  • Dylan Bowman
  • Green Choi
  • Taejune Ham

Group Number
8
What we built
We’ve built a lighting system that reacts to the background light and pressure. We wanted to build a lighting system that automatically dims itself to save energy when there’s enough background light, and only turns on if necessary e.g. when a person is standing in front of the door thereby applying pressure to the sensor. Our system only turns on the LED lights when there’s pressure and low background light as intended. We picked arbitrary thresholds for background light and pressure, but in the future, we’d like to select these values after a more systematic analysis.
Sketches

Our idea applied to a closet

Our idea applied to a closet. Depending on the background light, the light bulb adjusts its brightness accordingly. Also, it only turns on when a person is standing in front of the closet looking for something, thereby saving energy.

Toilet

Our idea applied to the toilet. Depending on the background light, the brightness of the room is adjusted. Also, the light turns on only when you’re sitting in the toilet.

Entrance of a House

Our idea applied to the entrance of a residential house. Only when someone is standing at the entrance does the light turn on. Also, it adjusts its brightness based on the background light.

Storyboard
IMG_1190
Pictures and Video

This slideshow requires JavaScript.



List of parts

  • 2 10K Ohm resistors
  • 2 LED Lights
  • 1 Force-sensing Resistor
  • 1 Photo Sensor

Instructions
Complete the circuit as shown in the picture below.
20130303_013414

Code

// pin numbers for LED
const int greenLED = 11;
const int yellowLED = 10;
const int lightSensor = 0;
const int forceSensor = 1;
const int LIGHT_MAX = 255;
const int FORCE_THRESHOLD = 400;
const int LIGHT_THRESHOLD = 100;

// variables
int light = 0;
int force = 0;

void setup() {
  pinMode(greenLED, OUTPUT);
  pinMode(yellowLED, OUTPUT);
}

void changeLight(int light) {
  analogWrite(greenLED, light);
  analogWrite(yellowLED, light);
}

void loop() {
  changeLight(0);
  light = analogRead(lightSensor);
  force = analogRead(forceSensor);
  if (light < LIGHT_THRESHOLD && force > FORCE_THRESHOLD) {
    changeLight(LIGHT_MAX);
  }
}