As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Saturday, June 11, 2016

JANE & ZIHAN MUGIC: VISUALIZING SOUND





Watch our video on https://vimeo.com/169865743

Mugic is a magic ball that can react to music and other sound. It can recognize the frequency of each sound waves coming into the microphone, and change color to green to blue to red by low to mid to high pitches. 

#include <avr/pgmspace.h>
#include <ffft.h>
#include <math.h>
#include <Wire.h>
#include <Adafruit_NeoPixel.h>

#ifdef __AVR__
  #include <avr/power.h>
#endif

#ifdef __AVR_ATmega32U4__
 #define ADC_CHANNEL 7
#else
 #define ADC_CHANNEL 0
#endif

Protoype 2 (Zihan & Jane)

video

Yes, we did it, we apply the arduino on to the neopixel. In order to let it fade from one code to another, I created a color strip function. From 0 to 1020, each number represent one color. This way, I can use for loop, slide from one color to another smoothly.



#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

#define PIN 6

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(160, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.

void setup() {
  // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
  #if defined (__AVR_ATtiny85__)
    if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
  #endif
  // End of trinket special code


  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

Physical Housing (Zihan&Jane)



8) Physical Housing Description
1. Acrylic White globe
2. Wood Plat as base
3. Acrylic 2.3/4 inches tube
4. Magnets

We poxy glue the magnet on the while acrylic globe and wood plat base. And we fit our arduino and bread board kit inside the acrylic tube and wrap the tube around with neopixel strips. For microphone, we solder it with very long wire and feed it through the tube and sticking out from the globe.

Friday, June 10, 2016

Prototype 1 (Zihan&Jane)



7) Prototype 1
We order a amplified microphone from adafruit. Using the FFT library to analyze voltage input from microphone into frequency arrays. And piccolo is a project by Adafruit visualize music on a 8X8 neopixel block. My goal was figuring out how is the code working, where is the input and how does it process it and output. Also, because the processing speed of this arduino board is very slow for doing ask like listening to music and analysing them all the time. It also use a command to tell arduino to run freely without stops.
So I built a prototype analyzing sound into one single RGB lights. Higher pitch -> green. Low pitch -> red.

Code:


#include <avr/pgmspace.h>
#include <ffft.h>
#include <math.h>
#include <Wire.h>

#ifdef __AVR_ATmega32U4__
 #define ADC_CHANNEL 7
#else
 #define ADC_CHANNEL 0
#endif

int redPin = 11;
int greenPin = 10;
int bluePin = 9;
int16_t       capture[FFT_N];   
complex_t     bfly_buff[FFT_N];  
uint16_t      spectrum[FFT_N/2]; 
volatile byte samplePos = 0;     
static const uint8_t PROGMEM
  
  noise[64]={ 8,6,6,5,3,4,4,4,3,4,4,3,2,3,3,4,
              2,1,2,1,3,2,3,2,1,2,3,1,2,3,4,4,
              3,2,2,2,2,2,2,1,3,2,2,2,2,2,2,2,
              2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,4 },
  eq[64]={
    255, 175,218,225,220,198,147, 99, 68, 47, 33, 22, 14,  8,  4,  2,
      0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0 };
void setup() {  
  Serial.begin(9600);
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
  ADMUX  = ADC_CHANNEL; 
  ADCSRA = _BV(ADEN)  | 
           _BV(ADSC)  |
           _BV(ADATE) | 
           _BV(ADIE)  | 
           _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); 
  ADCSRB = 0;                
  DIDR0  = 1 << ADC_CHANNEL; 
  TIMSK0 = 0;                

  sei(); 
}

Holly & Ying - NightWatch, Final Product




NightWatch

As much as we share so much of our lives over social media, many of us still value the privacy of our personal spaces. While appearing as a beautifully-glowing, but otherwise un-extraordinary pillow, the NightWatch lamp constantly communicates with a sensor attached near a place such as a door. When someone approaches the sensor, it relays this information to the lamp. The closer that person gets to the sensor, the more the circulating light turns from blue to pink and gets brighter, warning its user of an impending visitor.


The Sensor

We tried to imagine how one (such as a teenager) might be able to disguise something as large as the infrared sensor combined with the Arduino. We decided to contain the Arduino within a stuffed animal decoration and used the infrared sensor as the stuffed animal's eyes. Given a better way to hide wires, a parent may see this as no more than a teenager's quirky decoration, rather than a security measure.
The Lamp

From the beginning of this concept, we wanted the lamp to be something that was comforting and tactile to help soothe the user's anxiety, or to blend into their private environment. We considered stuffed animals, soft, wireless night-lights; as well as a pillow. Initially, we wanted to create character with this lamp by animating a face into the light patterns, but after seeing how soothing the LED strip was as the light circulated and diffused throughout the pillow, we left the lamp's output as simple, yet beautiful. We decided on the shades of pink and blue not because they were close to the Pantone Colors of the Year (Rose Quartz and Serenity) but because they were soothing, yet very different without eliciting a negative implication about someone approaching the door (such as what would happen with the cultural implications of red vs. green.)

Demonstration Video: https://vimeo.com/169809394

Design 387 - NightWatch, by Holly Chan and Ying Zheng from Holly Chan on Vimeo.

The Final Code:

Through online research of DotStar LED strip’s library and example codes of NeoPixel LED strip, Ying figured out how to control the brightness, and she built a small library of RGB colors in the code. The final code is below the cut:

Thursday, June 9, 2016

10) Dillon and Dwight - Final Video


Scoots is an infrared motion tracking spotlight designed to follow users with an infrared wearable tech. Scoots adds a dynamic element to stage performances and presentations without needing a spotlight operator.

The Final Video

Scoot's spherical design allows for a seamless 360 range of motion, giving the illusion of the head gliding over the body.
Infrared sensors on the head piece track the user's motion in each direction.
The simple design keeps the complex inner workings from view to create a sleek aesthetic.


6) Dillon and Dwight - Actuation Description

I feel that the previous blog post fits the requirements for this post, so instead I will describe the actual electronic parts we ordered for the final build and why we needed to buy them.


IR sensors - Ir Phototransistor/ IR detector, NPN 940nm

collector voltage 30 V DC
emitter-collector voltage 5 V DC
collector current 20 mA
spectral bandwidth 840nm - 1100nm

These were the basic IR sensors that our local electronic store provided for us. We used them in the final version of the lamp as well as all the prototyping. Cost about $3 for 10 of them.


Arduino Uno 



The brains of the operation. Supplied to us by our gracious instructor :)

Qunqi MG996R Metal Gears Digital RC Servo Motor


two vary powerful servo motors. Operate at a range of 4 - 7 Volts and each require a stalling amperage of 2.5. For these we needed to purchase a 5 V 10 Amp power source last minute because the previous one we bought was burned out 3 days before the project was due. Skip our mistake and buy the proper power source in the first place. Ordered off of Amazon.


Qunqi MG996R Metal Gears Digital RC Servo Motor High Torque For Helicopter Car Boat


12 V 30 Watt LED Halogen Tracklight Light Bulb



The bulb that supplied the light. We also needed to buy a socket for the bulb to plug into and a separate 12 V power supply because the Arduino cannot supply that much power.

SainSmart 4-Channel Relay Module


A relay that plugs directly into our Arduino that allows the it to turn on and off separate power sources. We plugged both the Light Bulb power source and the Servo Motor Power source into this to keep all of the electronics on the same circuit (VERY IMPORTANT: you must keep all of your power sources on a linked ground. If you do not this will cause digital noise and your devices will not operate correctly. For us our servos were acting up and by grounding them both through the power source ground and the Arduino ground we were able to solve this issue) Ordered through Amazon.
SainSmart 4-Channel Relay Module

Ultrafire Wf-501b Cree Infrared Ir 3w LED Night Vision Flashlight Torch

Ultrafire Wf-501b Cree Infrared Ir 3w LED Night Vision Flashlight Torch
The IR emitter that we used as our "greatest source of IR light in the room". Also required us to buy a special battery, does not run off any conventional batteries that you can buy at a store.

Finally here is a sketch of how everything is hooked up with all the wires and shit. Enjoy and good luck!