The goal of the project was to control remote an LCD display.
I started connecting the LCD and then the remote receiver.
When trying to test the remote control it got burned.
My original hypothesis was that the potentiometer was responsible but I believe the component was defective because the remote control battery exploded a few hour later. Continue reading
W02_Assignment
Group member: Chyelle, Tress, Weilin, Xu
W06_Assignment
PART 1
Goal:
I’m making a sound visualization project using Arduino as an input and Processing as an output.
Arduino: I’m using a photocell sensor to detect the light from the environment and map the data to use in Processing to control the alpha value of the floating points.
Processing: I’m using minim library to visualize the audio file and created 300 points floating with it.
Core components
1* photocell sensor
1 * 10k resistor
Wires & jumpwires
Arduino board
Circuit/Schematics
Code:
Arduino: StandardFirmata
Processing:
import cc.arduino.*;
import org.firmata.*;
import processing.serial.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import cc.arduino.*;
Minim minim;
AudioPlayer song;
FFT fft;
Arduino arduino;
int num = 300;
PVector[] posArray = new PVector[num];
float pTime = 0;
float vel;
PVector[] noiseArray = new PVector[num];
int sensorPin = 0;
int sensorVal = 0;
float newSensorVal;
void setup() {
size(1000, 800, P3D);
minim = new Minim(this);
println(Serial.list());
arduino = new Arduino(this, Arduino.list()[1], 57600);
song = minim.loadFile(“1.mp3”, 512);
song.loop();
fft = new FFT(song.bufferSize(), song.sampleRate());
for (int i = 0; i < num; i++) {
float r = random(300,400);
float theta = random(TWO_PI);
float y = r*sin(theta);
float x = r*cos(theta);
noiseArray[i] = new PVector(x, y);
posArray[i] = new PVector(0, 0);
}
arduino.pinMode(sensorPin, Arduino.INPUT);
}
void draw() {
background(0);
pushMatrix();
translate(width/2, height/2);
scale(1.5);
fft.forward(song.mix);
noStroke();
println(arduino.analogRead(sensorPin));
sensorVal = arduino.analogRead(sensorPin);
newSensorVal = map(sensorVal,800,960,50,250);
//float a= random(100,200);
fill(random(0,255),random(0,255),random(0,255),newSensorVal);
for (int i = 0; i < num; i++) {
ellipse(posArray[i].x, posArray[i].y, 2, 2);
}
popMatrix();
update();
}
void update() {
float time = millis()*0.001;
float dt = time – pTime;
println(dt);
pTime = time;
float level = song.mix.level();
float fftVal = fft.getBand(300);
vel = map(fftVal, 0, 0.1, 0.05, 0.5);
for (int i = 0; i < num; i++) {
noiseArray[i].x += vel * dt;
noiseArray[i].y += vel *dt;
float xScale = map(noise(noiseArray[i].x), 0, 1, -1, 1);
float yScale = map(noise(noiseArray[i].y), 0, 1, -1, 1);
posArray[i].x = xScale * 300;
posArray[i].y = yScale * 300;
}
}
PART 2
Communication protocols:
Motors (Week 8)
The Difference Between Servo Motors, DC Motors, and Stepper Motors
Servo: A servo motor is capable of precise control of linear or angular motion. This is particularly useful when you want to control the degree of the rotation. Projects that need precision control, such as robotic items, typically use servo motors. Servos determine angles by sending a pulse of electricity for an amount of time. The length of the pulse will determine the angle. A drawback, however, is the range. The rotation is limited to 180 degrees back and forth.
Stepper: A stepper motor uses toothed electromagnets arranged around a central gear. When an electromagnet is powered it attracts the gear’s teeth and aligns them. This process continues for each of the electromagnets creating a rotation. Each of these movements is called ‘steps’ and can make a full 360-degree rotation. A pro feature of this motor is that it doesn’t require power to hold its position. Functionality is quite precise because the steps are built in, however, it sacrifices speed.
DC Motor: DC motors or direct current motors are continuous rotation motors. Unlike a servo motor, where the PWM controls the range of movement, here it controls the speed. The percentage of time spent cycling between on and off determines the speed of the motor. DC motors are fast and have a high RPM, making them good motors for things such as wheels and fans.
Bluetooth Mailbox Notification (Week 7)
- Goal: To create a wireless notification device. The mailbox in my apartment building is on the first floor. However, I live on the fourth floor. It takes extra effort to go downstairs to check the mailbox only to discover that nothing has arrived. So, this project is an Arduino Bluetooth-enabled device that sends a notification to my desktop and my cell phone that the mailbox has been opened, thus alerting me to the presence of mail. Continue reading
Capacitive Children’s Book_Light&Sound (Week 6)
- Goal: The goal of this project was to create an interactive book that would play into both the physical and digital spaces. I chose to use light and sound from the digital element, Processing. Conceptually, this book serves is for a prototype children’s book to help very young ESL students learn the English onomatopoetic sounds of various animals. When children press the pages of the book, they will hear the sound of the animal displayed. Continue reading
Week 8 Assignment
- Write a simple paragraph or any graph to show the difference between DC, Stepper, and Servo Motors.
- Make a circuit using any of the new things you learned today- H bridges/ controlling high current loads OR work with a motor you haven’t worked with before OR Try making a circuit using multiple motors. Document it on the blog per the usual format.
Week 8: Mechanics of Movement
Week 6 Xu- Translate sound into light
Goal:
I want to hook up the sound sensor to an array of LED lights which will beat with music, clapping or knocking.
Components:
– Arduino Board
– Sound Sensor
– LED
– 220 ohm Resistors
– Mini Breadboard
– Wires
Connections :
Code :
Week 7 Xu- IR remote control a Stepper Motor
I want to control the stepper motor by using the remote control.
Use IR sensor to control the motor run or stop.
Core components
IR sensor
remote control
Stepper Motor
Stepper Motor driver board
Wires & jumpwires
Arduino board
Breadboard power supply
Circuit
How it works
Press UP: do a full rotation one way
Press DOWN: stop
Code :