Xuan-LAZY LAMP

Is this situation ever freak you out that when you are ready to bed, after turning off the light, you cannot see anything. Has it ever happened to you that when you are chilling on your bed, somehow you are too sleepy to get up turn off the switch?

If so, let’s make a lazzzie lamp which can detective the motion( by a motion sensor) and volume(microphone) of your room. So if you are getting sleepy, and stopping moving or making any sound, the lamp will get dimmer till turn off.

IMG_5917IMG_5934

Want to build your own one? Let’s go.(check the Instructable here)

Tools:

  • Wire strippers;
  • Soldering iron;
  • Lathe;
  • Laser cutter;
  • Table saw;
  • Blend saw;
  • (Or 600$ + 3D printing);

Materials:

  • Arduino Uno;
  • Motion sensor;
  • Microphone:
  • Breadboard:
  • Acrylic;
  • Breadboard wires;
  • Solder;
  • Dotstar LED stripper

Step 1: Soldering and Connecting Circuit

Step 2: Coding

#include
#include

#define NUMPIXELS 20 // Number of LEDs in strip

// Here’s how to control the LEDs from any two pins:
#define DATAPIN 13
#define CLOCKPIN 12
Adafruit_DotStar strip = Adafruit_DotStar(
NUMPIXELS, DATAPIN, CLOCKPIN);

int brightness = 255; // rudamentary brightness value output to the dotstars (0-255)
const int sampleWindow = 50; // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;

int micrphonePin = A0; // Analog input pin that the microphone is attached to
int sensorValue = 0; // value read from the microphone (0-1024)

int inputMotion = 11; // Digital input pin that the motion sensor is attached to
int motionValue = 0;

int fadeAmount = 4;
int plus = 10;
int line = 400;

unsigned int signalMax = 0;
unsigned int signalMin = 1024;

void setup() {

pinMode (inputMotion, INPUT); // digital pins can be either inputs or outputs so we have to define which it will be this time

strip.begin(); // Initialize pins for output
strip.show(); // Turn all LEDs off ASAP

// initialize serial communications at 9600 bps:
Serial.begin(9600);
}

void loop()
{
int sample = soundSample();

motionValue = digitalRead(inputMotion);

Serial.print(“\t microphone sample = ” );
Serial.print(sample);
Serial.print(“\t motion = ” );
Serial.print(motionValue);
Serial.print(“\t brightness = “);
Serial.println(brightness);

if(brightness >0){
if(sample >= line || motionValue == 1){
brightness = brightness + plus;
if(brightness>=255)
{
brightness=255;
}
}

if(sample < line && motionValue == 0){
brightness = brightness – fadeAmount;
}
}

fillAll(strip.Color(brightness, brightness, brightness));
if(brightness<50)
{
delay(100);
}
delay(50);
}

int soundSample()
{
unsigned long startMillis= millis(); // Start of sample window
unsigned int peakToPeak = 0; // peak-to-peak level

// collect data for 50 mS
while (millis() – startMillis < sampleWindow)
{
sample = analogRead(micrphonePin);
if (sample < 1024) // toss out spurious readings { if (sample > signalMax)
{
signalMax = sample; // save just the max levels
}
else if (sample < signalMin)
{
signalMin = sample; // save just the min levels
}
}
}
peakToPeak = signalMax – signalMin; // max – min = peak-peak amplitude
return sample;
}

void fillAll(uint32_t c)
{
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
}

strip.show();
}

Step 3: Making the shape of the lamp

1.Laser cut acrylic

  1. Stripper: the width of the stripper is a little bit wider than the LED stripper,  so that you can glue them on later.
  2. Circles for the bottom.IMG_4405

2.Build dowels

  1. Glue wood sheets together overnight;IMG_4245
  2. Use table saw to cut the cuboid;IMG_4259
  3. Use lathe to make your own dowels;
  4. use blend saw to cut them in pieces;IMG_4274

3. Bend your acrylic.

  1. Use tape glue the pieces together and fix it with clamps;
  2. Heat the acrylic;IMG_4298
  3. Bend it;
  4. Cool down;IMG_4333
  5. Untaped
  6. A little bit sanding

4. Glue

Steps 4: Assembled each part

IMG_4438

 

Xuan week10 homework

1.Arduino

arduino.png

2. Ideas

1.  interactive wall.

When you near the wall, the LEDs will light up. For example

Context:  I am thinking put on this wall so that when the guest walks in, they will be impressed by PoD.

It needs a motive sensor(or lots of motive sensors).

屏幕快照 2017-11-13 5.12.22 PM.png

 

2.  Lamp

IMG_3499.JPG

The shape might be very organic as the picture shows.

The ideas come from: when I sit on my bed doing stuff and then I get sleepy. I am too sleepy to turn off the light. But I need to turn it off.

So the idea is that the lamp has sound and motive sensors which can detective the sound and movement of the environment.  If the environment is getting quiet and nothing move, the lamp will getting dark and turn off by itself.

Basically,  it has 3 models:

  1. Normal model: As same as the normal lamp: Turn it on and off by hand.
  2. Quite model: When you are ready to bed but won’t fall asleep immediately, turn on this model. As the environment getting quite and you are not moving, the light will be getting dark.
  3. Party model: When you want to have a party in your bedroom( I don’t why ). Turn this model on. The light will change color and interactive with the music (and ideally interactive with people near it)

 

3. Music box.

Need a sound sensor. When you play music near this music box, the dancer on top it will be dancing.

 

Team Rhea, Hannah, Micah, Xuan

#1  Suggests you the colors of shoes that would go with your clothing of the day.

This product would have a camera/ color sensor which detects the color of your clothing. The system then (through built-in code) would display colors of shoes that could go with those colors.

 

#2  Gold picker: This product is for people looking for conductive metal in the trash bags on the roads.

The product is a glove with a magnetic sensor and an LED attached to the glove. The glove, when put in the trash bin conducts electricity whenever it gets in touch with a conductive/ magnetic metal. It also attracts the metal thereafter.

 

#3  Scream Box: This is a box made for people to release their anger in and make them feel better.

To release the frustration and anger, users scream as loud as they can in this Scream Box. The microphone sensor attached at the end of the box reads the intensity and displays a cool and appropriate neoPixel visual as a result.

Blushing Mask——Xuan

Sorry for uploading a little bit late.

This Mask is for a Halloween Party. The girl who wears this Blushing Mask is playing a human-size ragdoll. Let’s talk about this ragdoll.

Let’s talk about this ragdoll. She was made by an old grandpa who really missed his granddaughter — Emily. So grandpa wanted to bring Emily back to life in a ragdoll body. When he finished the whole body and was about to give her makeup on the face, he died.  And Emily back to life without makeup. So she looks a little bit scary, but actually, she is a very shy and kind girl inside. However, the outlook stops people to come to talk her, and she is too shy to talk to others. One day, Emily met another ragdoll, Tylor, she likes him a lot. Suddenly, her cheeks started glowing red light–she is blushing. Tylor thought she is so cute. And you know what happened next~~

Meet Emily.

 

See some Details

IMG_2293IMG_2291IMG_2300IMG_2303

I intended to make a beautiful mask for a little girl. But its really hard to make a pretty one. And I thought about a makeup from FACEOFF. So I decided to make a scary one. And at the end, Emily is scary but cute when she is blushing.屏幕快照 2017-10-11 下午10.53.05.png屏幕快照 2017-10-05 上午10.42.18

At last. It’s me~