Labels

Friday, 31 May 2013

MDDN 251: Motion Sensor Connection

The motion sensor has been purchased and the connection is as shown above. The resistor isn't necessary to run the motion sensor i have found despite stating on some websites that it is. They state that the SparkFun PIR motion sensor has an open collector output - this means that the sensor requires a pullup resistor so that the output is always high, and when triggered it will put the output low. I found this code that inputs "Motion Detected" when the sensor detects motion and "Motion Ended" when the motion is not detected.
The code is as follows:

/* PIR sensor tester*/

int ledPin = 13; // choose the pin for the LED
int inputPin = 2; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int val = 0; // variable for reading the pin status

void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare sensor as input

Serial.begin(9600);
}

void loop(){
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn LED ON
if (pirState == LOW) {
// we have just turned on
Serial.println("Motion detected!");
// We only want to print on the output change, not state
pirState = HIGH;
}
} else {
digitalWrite(ledPin, LOW); // turn LED OFF
if (pirState == HIGH){
// we have just turned of
Serial.println("Motion ended!");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}

Don't forget that there are some times when you don't need a microcontroller. A PIR sensor can be connected to a relay (perhaps with a transistor buffer) without a micro!

MDDN 251: Assignment 2 Proposal



Assignment One Prototype Description
In the previous brief, I had proposed to create an electronic object using the screen from an analog alarm clock and the microphone from a guitar tuner. This resulted in adapting the lights on the analog display LCD screen to light up and create patterns as a certain level of sound is recorded in the microphone. The volume of noise was put through Arduino and certain output on the serial monitor was read, which in turn displayed the speed of the patterns on the display.
This proposed design was reflected in the final prototype, which accurately displayed the effects that was trying to be achieved. When music, for example, was played into the microphone of the device, the lights would synchronize with the beat of the song. When there was a loud beat or a sharp tone, the lights would flash rapidly. When the song was quieter, the lights would disappear and the screen would be black. Also, when all of the instruments were played at their loudest, the lights would flash erratically and create a pattern. This was the proposed effect that had been achieved.

To further develop the designs from Assignment One, additional items would be required. For example, a larger LCD screen would make the project more intense and provide a larger area to work with. Incorporating different sensors rather than just a volume sensor, that can detect a larger variety of things such as motion sensors, infrared sensors, electro-optic sensor etc. could provide a larger potential of development to the prototype.

Proposal One
By connecting the Arduino program to Processing, a wide variety of outputs are now available to experiment with. To develop the use of responsive lights to an input of human interaction, using a sensor would be the main component to incorporate that interaction. Motion sensor would be the most effective component to use to develop the prototype to further achieve greatness.
Wiring the Arduino to a motion detector for the input would make the interaction movement which is a development from the sound sensing microphone. Then Arduino would be connected to Processing. This connection will allow the use of digital output rather than a physical output. Arduino would sense where the movement is occurring on the area that is being sensed by the motion sensor (in a designated space on the ground). The output from this motion interaction would be displayed from a projector connected to the computer running Arduino and Processing. On the screen would be a pattern that resembles the movement input.
For example, if the interaction was a person swinging their arm across the detection space, the output would be a flashing pattern across the screen. Or if a person jumped up and down in front of the detection space, the pattern would be flashing on the screen in an up/down motion.

Required Parts:
·        Arduino System
·        Processing System
·        Projector
·        Motion Sensor
·        Wires
·        Microcontrollers
·        Soldering Iron
·        Solder
        Other electronic components 

Proposal 2
            The addition of extra sensors to the device and an upgrade to the screen system would be a strong development on the previous prototype. In this proposal, there is an added motion sensor and light sensor to detect movement from the interacting person. There is an upgrade to the screen that is used so there are more lights and more possibilities in patterns from the lights. The lights will react to the type of the interaction it senses. The larger screen would make it so that there are more lights involved to experiment with and the outcome would have a greater effect.
For example, if there is sound received on the microphone, the lights would resemble the beats of the music or the beats of the sound.
If movement is received on a movement sensor then the lights will move to reflect the type of movement (for example if someone waves slowly at the sensor, the lights will flash from side to side in response to the waving).
Lastly, if there was a light shone on a light sensor, all of the lights will shine brightly in response to the brightness of the light. Therefore, if there was a light shone in the general direction of the sensor, the lights would response in a way that showed the closest LEDS to the light source.
This sort of response gives an output that has an effective interaction and can be more interesting than a simple input/output. There are multiple forms of interaction inputs that involve this proposal. This makes the proposed prototype a more interactive design than the other. Because of the multiple inputs, this design has a larger variety of outputs.

Required Parts:
·        Arduino System
·        Large LED screen
·        Motion Sensor
·        Microphone
·        Light Sensor
·        Wires
·        Microcontrollers
·        Soldering Iron
·        Solder
·        Other electronic components

Thursday, 2 May 2013

MDDN 241: Animated Turntable


MDDN 241: Animated StoryBoard


MDDN 241: Orthographic with Origin and Personality



MDDN 241: Character Movement



 Above is an image of the small characters chest and the compartment in his chest. Because of the lack of opposable thumbs, a little third arm stretches out of his chest compartment holding the fuel nozzle.
 The above image shows the rotating charger on the tall characters arm. It begins flat, then moves up to allow space for the pin to come out. This pin connects to the crank on the back of the small character and rotates rapidly, charging up the small character.

MDDN 241: Environment Images




Wednesday, 1 May 2013

MDDN 251: Short video for Musical Lights

Here is the final video for the Musical Lights.
Credit to Crystal Method for the music.

MDDN 251: Fritzing Schematic for Circuit



Because the screen was a reused screen from an alarm clock, there was no schematic that i could find to put on the circuit. Therefore, i have used a similar style LCD screen that has an accurate amount of pins for the lights.

MDDN 251: Description and Images


The purpose of my project was to get and LCD screen taken from an analog alarm clock to light up when a microphone connect registers a change in noise. When the microphone is directly interacted with, such as blowing on it, tapping it or talking to it very closely, the lights registered the change in volume and begins to flash rapidly, as if your interaction stimulated then screen.
When music is played to the microphone, a pattern in the screen is shown. When the music has louder drums or beats, the lights will play faster. Between these, if the music was quieter and slower, the lights wouldn’t play as frequently. Therefore, the prototype has been nicknamed “Musical Lights” (with reference to Musical chairs – When the music stops, so do the participants).
This was achieved by connecting the lights of the screen to two shift register microcontrollers that decreased the number of pins connecting to the Arduino to five instead of 20. The microphone was then connected to the Arduino also with a 100x amplifier that made the audio waves easier to register.
The video shows one particular song, Keep Hope Alive by Crystal Method (full credit). The techno type of music is most effective in creating these patterns, as there is an audible beat that the lights can duplicate.