Author Archives: hanx633

Servo Motor – Xu (Week 8)

 

I want to use the potentiometer to control the servo motor. When the potentiometer rotates anticlockwise triggers the motor move.

Core components

Potentiometer
Servo Motor
Wires & jump wires
Arduino board
Breadboard

Circuit

How it works
When the potentiometer rotates anticlockwise triggers the motor move. if the potentiometer rotates clockwise at max, the motor will stop.

Code

#include <Servo.h>

Servo myservo;

int potpin = A0;
int val; // variable to read the value from the analog pin

void setup() {
myservo.attach(9);
}

void loop() {
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}

Final Project Proposal – Xu (Week 10)

 

Concept Statement:

Tears as a human bodily reaction have a strong connection to personality and communication. I want to visualize how the human process of tears not only reflects aspects of personal identity but also interactions between people or human with nonhuman, like a language.

Project Description:

I am going to do an installation which will make artificial tears and controlled by machine learning and Arduino.

Concept Diagram :

Schedule:

Phase 1: Week 11. Technical Research.

Machine Learning part: how to classify and code in machine learning; Is it possible to use existing machine learning code to do my project?

Physical computing: how can I control the tears and could tear generate smoothly like human’s real tears?

Phase 2: Week 12. Project Development — Tears machine. 

Phase 3: Week 13. Project Development — Combine Machine Learning with Arduino. 

Finish machine learning training, and then test new data. Try other new data like the actor or actress inside a movie. Combine Machine Learning with Arduino

Phase 4: Week 14. Construction. 

Setting for Major Major. How to set the dummy head, video, tears machine, tubes together in order to express my concept.

Test it and documentation.

Phase 5: Week 15.  Presentation Preparation. 

Create 3D renderings of final product for final presentation (6 images).Photograph and video record User experience.

Material List:

  • Arduino UNO
  • Stepper Motor
  • Motor Sheild
  • Jumper Wires
  • Power Supply

Precedence:

Tears collector

Yi-Fei Chen–Tears Gun

Wim Delvoye Cloaca—Poo Machine

Ernesto Klar – Invisible Disparities

 

Prototypes – Xu (Week 11)

Springe pump

I made a syringe pump which helps by an online open source. This syringe pump pushes out small, accurate amounts of liquid which helps the water dropping more similar than the real tears from human. The tears need to be more controllable, so this machine can smoothly control the water from forward and backward by using Arduino.

 

The components of this machine:

Arduino Uno R3, 17V stepper motor, Adafruit motor shield, mounting rail, threaded rod, shaft coupler, smooth rod, linear bearing, syringe, tubes, some nuts. And I 3D-printed 4 components. The motor rotates the shaft coupler, and shaft coupler rotates threaded rod which can trigger the rod mount plunger to move forward and backward.

Precedent:

Syringe Pump

Final Prototypes – Xu(Week 12)

Machine Learning
For general machine learning steps, I first need to get training data to train the network. I took pictures of myself with crying and normal images. Each of them was around 2000 images. These were the training data. The main technique used in my machine learning part is called CNN(Convolutional Neural Network)(11), it is a widely used technique in Deep Learning. By studying given dataset and corresponding labels (cry or not) the network is able to learn the underlying pattern of an image regarding if there is any characteristic of a crying person, for example, the shape of the mouth or shape of the eyes. 

Then based on the model that I have. I have a new set of data in order to see whether the training model is accurate. I chose a section of the movie Les Miserables which is a song called I dreamed a dream. This is a super emotional song which the actress cried and sang at the same time. I want to use this song as my final new-data in order to express the idea of how my facial classification read the movie. I saved each frame inside the movie and run them through the model that I had. The result showed which images were crying, which images were normal.

Then I wrote the result in stepper motor’s code from Arduino which illustrated by pushing the syringe forward or backward. If the current image in the video is classified as cry, then it will trigger the syringe from the tears machine to push. So that the dummy head drops water which can be seen as crying.

Final Project Documentation-XU

Name: The language of tears

For the psychological perspective of a human’s tears, from myself crying experience, I would like to have sad tears when seeing something have in common with my bad. Also, I’d like to weep when seeing somebody’s weep in front of me which could always trigger the sympathies in my heart. People like to mimic the other person’s facial expression when communication. It is easy to laugh inside a group of people who like to laugh. And it is also easy to cry inside a

sadness group. The emotions really communicate with people and influence other people’s feelings. I want to focus on these humanized interaction and build the emotional link between human and machines.

Machines may not have real emotions themselves but AI can help machines learn and do what humans teach them to do. I admit emotions are unpredictable and work as a key feature of being human. But the human facial expression, the physical situation always can trace a human’s emotion. For instance, we can get a conclusion whether one person is crying when seeing the facial expression of that human, or two light moving water traces emerging under the eyes. So does AI. They learn what kind of data expresses people’s emotions, like facial expressions. AI could learn and mimic human’s reaction based on what we have on our face.

Concept Statement:

By using machine learning which can understand tears and mimic crying as a behavior, I want to build a poetic feeling of humanized communication between human and machines.

Precedents: 

Tears Gun

Eindhoven graduate designs a gun for firing her tears

Artificial Shit Machine

Cloaca – Art(ificial) shit machine

Invisible Disparities

INVISIBLE DISPARITIES, 2011 – ongoing

Presentation slides and Process:

 

Future Iteration

Because of the technical problems of combining python with Arduino, the result of this project couldn’t run the whole process in the real time. Instead, I wrote the machine learning results in Arduino code. I will still try to figure this technical problem out in the future.

And also, after getting some feedback from Major Major show, I think it will very interesting if I will not use the dummy head but put the tubes on my own face instead. The tears machine will help me to drop my tears. This project can be a wearable artistic and personal device which may build a deeper connection between AI and human.

I will keep exploring this topic and also my interest in language and human expressions in the future. Hope I can find some deep explorations on those topics in my Thesis.

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 :

int soundSensor = 2;
int LED = 3;

void setup() 
{

  pinMode (soundSensor, INPUT);
  pinMode (LED, OUTPUT);
}

void loop()
{
  int statusSensor = digitalRead (soundSensor);
  
  if (statusSensor == 1)
  {
    digitalWrite(LED, HIGH);
  }
  
  else
  {
    digitalWrite(LED, LOW);
  }
  
}

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 :

#include <boarddefs.h>
#include <ir_Lego_PF_BitStreamEncoder.h>
#include <IRremote.h>
#include <IRremoteInt.h>

#include <Stepper.h>

#define STEPS 32
int Steps2Take;
int receiver=6;

Stepper small_stepper(STEPS, 8,9,10,11);
IRrecv irrecv(receiver);
decode_results results;

void setup() {
// put your setup code here, to run once:
irrecv.enableIRIn();
}

void loop() {
// put your main code here, to run repeatedly:
if(irrecv.decode(&results))
{
switch(results.value)
{
case 0xFF629D:
small_stepper.setSpeed(500);
Steps2Take = 2048;
small_stepper.step(Steps2Take);
delay(2000);
break;
// case 0xFFA857:
// small_stepper.setSpeed(500);
// Steps2Take = -2048;
// small_stepper.step(Steps2Take);
// break;
}
irrecv.resume();

}}

Week 4 Xu

 

The goal of the project was to create a locker that green LED opened when the right color code was pressed. The red LED opened while the code remains wrong.

Components

1x Arduino

1 x breadboard.

1x green LED

1 x red LED

3 x buttons

2 x resistors (220 ohms) – resistors

4 x resistors ( 10K ohms) – buttons

Jumper Wires

How it works:

If it is in the right sequence, green LED will open
Press the button sequentially once a time with no repeat
Green led means unlocked (right), red led means locked (wrong)

Code:

const int blue = 3;
const int red = 4;
const int yellow = 2;
int ledRed = 13;
int ledGreen = 9;

int lastRed = LOW;
int lastBlue = LOW;
int lastYellow = LOW;

int i = 0;

void setup() {
// put your setup code here, to run once:
pinMode(blue, OUTPUT);
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
}

void loop() {
int redState = digitalRead(red);
int blueState = digitalRead(blue);
int yellowState = digitalRead(yellow);

if (redState == LOW && lastRed == HIGH) {
if (i == 2) {
i = 0;
} else {
i = i + 1;
}
}

if (blueState == LOW && lastBlue == HIGH) {
if (i == 2) {
i = 3;
} else {
i = 0;
}
}
if (yellowState == LOW && lastYellow == HIGH) {
if (i == 3) {
i = 4;
} else {
i = 0;
}
}

if (i == 5) {
digitalWrite(ledRed, LOW);
digitalWrite(ledGreen, HIGH);
}
else {
digitalWrite(ledRed, HIGH);
digitalWrite(ledGreen, LOW);
}

lastRed = redState;
lastBlue = blueState;
lastYellow = yellowState;
}

 

Link

A tricycle modified by Canadian artist Nicholas Hanna mimics the Chinese custom of writing temporary messages on the road with water. A computer strapped to the handlebars of the Water Calligraphy Device allows the rider to type the Chinese characters they wish to spell out. These characters are transmitted electronically to a set of valves, which release water droplets in programmed patterns as the trike moves forward.The Water Calligraphy Device (水!法器) is inspired by the Chinese custom of writing calligraphy in public spaces with a water brush as a contemplative and poetic act. Calligraphers writing passages of poetry, surrounded by a group of onlookers, are a lovely presence in Beijing parks.

 

 

This is another work from Hanna that I like.