« Final Project: Wind | Main | Chris Sugrue »

Final: Pig


My vision
for this piece was to stimulate movement of a sculptural object based on the presence of a visitor in a gallery setting. Late in September, I decided on a large fabric pig as the sculptural object. I wanted the movement to either respond as a breathing or rocking motion. To accomplish this reaction, I used a PING))) Ultrasonic Distance Sensor (#28015). This sensor accurately detects distance measurements from about 3 centimeters to 3 meters. I wrote a program to respond to the data received by the sensor to start, stop, and vary the speed of a DC 9V-24V motor.

Click the link for the extended documentation including: concept, extended text pertaining to the sculptural and technology processes, photographs, video, project components, and code. Enjoy! ~Jessica

P1.jpg

P2.jpg

CONCEPT:
As apart of a consumer society, I have become fascinated with the current trends of social constructions of identity. Many consumerists are seduced by the idea of brands, labels, and names particularly by the fashion industry. I have become curious with how particular items (such as Louis Vuitton purses costing hundreds to thousands of dollars) entice “must-have�? attitudes. This sculpture represents consumption and how it has become central to modern life. This pig is a system reliant on you (the viewer/consumer) to sustain its life which becomes apparent by your presence causing him to rock back and forth. This rocking motion is the stimulation needed for the object to retain its importance. The faux leather is a similar material used by leading designers to make fashion handbags and is embellished with golden teats to seduce desire.

Pig sketch.jpg

THE SCULPTURAL PROCESS:
My vision for this piece was to stimulate movement of a sculptural object based on the presence of a visitor in a gallery setting. Late in September, I decided on a large fabric pig as the sculptural object. Due to very little sewing experience, I decided to first create a prototype pig (he is 11 inches from snout to tail) to see if I was able to sew well enough to create a large soft sculpture. This process was enjoyable yet challenging! The most challenging portions were figuring out how the cut pieces lined up for pinning and sewing, and then accurately maneuvering the pinned pieces through the machine to create smooth lines. I knew the challenges I encountered in the prototype would differ from creating the large faux leather sculpture. Once I completed the small-scale pig, I was very excited to create the large pig! I then made a mold of 6 silicon baby bottle nipples. Over several weeks, I used a 2-part resin to cast 80 nipples from the mold. After being cast, the nipples (teats) required filling any air bubbles with Lacquer Glazing Putty (#6390), filing off the mold lines and putty to even the surface, scuffing, priming, and painting the casts gold. While creating the cast teats, I worked on laying out the pattern just right to fit the piece of fabric I had selected. The only piece of fabric I could find in the Twin Cities area that suited the project was a vinyl remnant at Mill End Textiles that measured 54�? x 82�?. The largest pig I was able to create out of the fabric would measure 48�? from snout to tall (which satisfied the scale I had hoped to create) as long as the pattern was created as economic as possible (see image below). Next, I transferred the pattern with a projector, cut the pattern pieces, and began pinning and sewing one piece at a time to assemble the whole. Once all the pieces where sewn together correctly (I had to rip a couple of seams that I had mis-pinned), I stuffed the vinyl cavity with 8 bags of Polyfil to make sure all of the seam lines where precise. In order to attach the golden teats to the vinyl, I drilled a hole in each of the cast, cut the head off 75 machine screws, and sunk the headless screw coated with epoxy into the hole. I then laid a pattern of washers out on the belly of the pig and marked where each teat would be placed (see image below). The seam line on the belly had to be ripped out in order to use a leather punch to create the hole for each screw to go through, then re-sewn exactly as it had been so the teats would line-up correctly which meant the stuffing also had to be removed to re-sew this seam and also so the screws could be secured with a washer and nut inside. The final steps included: re-stuffing the form and hand sewing the 14�? opening on the back seam (which had to be left to re-stuff). This process took until the last week of November to complete.

P10.jpg
Pattern Layout to be projected onto the large piece of vinyl (which I stapled on my studio wall).

P11.jpg
The washers taped to the pigs stomach in the design that the golden teats will be fastened on permanently.

TECHNOLOGY SIDE OF THE PROJECT
While working on the sculpture, I was also learning the Arduino! To accomplish the motion reaction to someone’s presence, I employed a PING))) Ultrasonic Distance Sensor (#28015). This sensor accurately detects distance measurements from about 3 centimeters to 3 meters “by transmitting an ultrasonic (well above human hearing range) burst and providing an output pulse that corresponds to the time required for the burst echo to return to the sensor. By measuring the echo pulse width the distance to target can easily be calculated.�? The variables correlating to the pulses ranged 38 through 3100 when someone causes burst echoes, and the variables range around 4100 when no echoes are occurring. I wrote a program to respond to the data received by the sensor to control a DC 9V-24V motor. My program sets the motor speed to 120 when the variables are greater than 2500, but less than 3000; the motor speed increases to150 when the variables are greater than 2000, but less than 2500; the motor speed increases to 180 when the variables are greater than 1500, but less than 2000; the motor speed increases to 210 when the variables are greater than 1000, but less than 1500, the motor speed increases to 230 when the variables are greater than 500, but less than 1000, the motor speed reaches full speed at 255 when the variables are greater than 0, but less than 500. The speed increases (smoothly!) as the viewer approached the object. The code works perfectly!!! I can't believe how reliable the sensor is with the motor!

UNFORTUNATELY:
Torque and RPM of the motor was key to realizing the project. The motor I purchased at ABC Electronic was unstoppable at 9V and 2 RPMs, unfortunately adding the cam and the cam rider to the set-up changed everything. These additions drained the torque of the motor. So, instead I was forced to present the small-scale model of the pig. The abrupt scale difference made the movement nearly undetectable. So, my next step is to up the motor voltage to 24 from 9. Then I plan to remake a new, lightweight cam {with several drops (like the original cam) to cause a rocking motion}. This cam’s diameter will be only 2 1/5�? to conserve as much torque as possible. If these measures do not yield the results I’m hoping for, I will buy a different geared motor.

P3.jpg
The electronics are all concealed beneath the pedestal with the front of the Ultrasonic sensor visible. This sensor accurately detects presences from 3 centimeters to 3 meters by sending and reading waves. When the sent waves are interrupted they bounce back as echo waves. When echo waves are detected, the sensor sends a reading between 42 and 3000 (distance between a person and the sensor) back to the Arduino, which initiates the motor. The motor speed is dependent on the variable sent by the sensor.


CLICK TO WATCH THE VIDEO:
Download file
The movement of the small pig is easy to miss, so watch closely (it may be more evident to you if you watch the legs & shadow). It is most obvious right after the loud background noise.

What you will need:
DC Motor
PING)) Ultrasonic Distance Sensor (#28015)
Arduino
H-Bridge
Resistor
Transistor (?)
Push button (if desired)
Jumpers
Breadboard
External Power cord (9V)
Cam
Dowel
Wood (for casing the motor and electronics)
Screws
Pig


P4.jpg

P5.jpg

P6.jpg
Overall look at the “nuts & bolts.�?

P7.jpg
Close-up of the motor shaft, cam, and cam rider.

P8.jpg
Wiring of the Arduino, Breadboard, Motor, and Sensor.

P9.jpg
Close-up of the wiring from the Arduino to the Breadboard.

Blue wire connects the Ultrasonic Sensor to the Arduino.
Orange wires connect the H-Bridge to the Arduino.
Red wires denote power and black wires are ground.
(Push button will reverse the motor direction.)

Connect the push button and Ultrasonic sensor to the 5V power.
The motor I selected required minimum 9V power, so this was connected to the 8 pin of the H-Bridge.


HERE IS THE CODE:
LINK TO PROGRAM:
Download file

int motor1Pin = 3; //H-bridge leg 1
int motor2Pin = 4; //H-bridge leg 2
int motor2Pin = 4;
int speedPin = 9; //H-bridge enable pin
int switchPin = 2;

int ultrasoundSignal = 7; //Ultrasound signal pin replaces switch
int ultrasoundValue;
int timecount; //Echo counter
int motorspeed;

int val = 0;
int ledPin = 13; //LED

void setup() {
beginSerial(9600); //Sets the baud rate to 9600 (probably needs #
changed)
pinMode(speedPin, OUTPUT); //pin 9 as output (controls speed)
pinMode(motor1Pin, OUTPUT); //pin 3 as output
pinMode(motor2Pin, OUTPUT); //pin 4 as output
pinMode(ledPin, OUTPUT); //LED as output
pinMode(switchPin, INPUT);
}

void loop(){
timecount = 0;
val = 0;
if (digitalRead(switchPin) == HIGH) {
digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high
}
// if the switch is low, motor will turn in the other direction:
else {
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge high
digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge low
}


pinMode(ultrasoundSignal, OUTPUT); //switch signalpin to output
/*Send low-high-low pulse to activate the trigger pulse of the
sensor*/
digitalWrite(ultrasoundSignal, LOW); //send low pulse
delayMicroseconds(2); //wait for 2 microseconds
digitalWrite(ultrasoundSignal, HIGH); //send high pulse
delayMicroseconds(5); //wait for 5 microseconds
digitalWrite(ultrasoundSignal, LOW); // Hold off
/*Listening for echo pulse*/
pinMode(ultrasoundSignal, INPUT); //switch signal pin to
input...check above
val = digitalRead(ultrasoundSignal); //append signal value to val
while(val == LOW) { //loop until pin reads a high
value
val = digitalRead(ultrasoundSignal);
}
while(val == HIGH){ //loop until pin reads a high
value
val = digitalRead(ultrasoundSignal);
timecount = timecount +1; //count echo pulse time
}
/*Writing values to the serial port*/
ultrasoundValue = timecount; //Append echo pulse time to
ultrasoundValue
//motorspeed = (((ultrasoundValue - 50)*255)/1650);
if (ultrasoundValue > 3000 ){

analogWrite(speedPin,0); // this sets the speed of the motor to the
value of the scaled ultrasound
}

if (ultrasoundValue > 2500 && ultrasoundValue <3000){
analogWrite(speedPin, 120);}

if (ultrasoundValue > 2000 && ultrasoundValue <2500 ){
analogWrite(speedPin, 150);}

if (ultrasoundValue > 1500 && ultrasoundValue <2000 ){
analogWrite(speedPin, 180);}

if (ultrasoundValue >1000 && ultrasoundValue <1500 ){
analogWrite(speedPin, 210;}

if (ultrasoundValue > 500 && ultrasoundValue <1000 ){
analogWrite(speedPin, 230);}

if (ultrasoundValue >0 && ultrasoundValue <500 ){
analogWrite(speedPin, 255):}


serialWrite('A'); //Example identifier for the sensor
printInteger(ultrasoundValue);
serialWrite(10);
serialWrite(13);
// if (digitalRead(ultrasoundValue) < 2000){
// digitalWrite(speedPin, HIGH); //set leg 1 of the H-bridge high
// digitalWrite(speedPin, LOW); //set leg 2 of the H-bridge low
// }
// else {
// digitalWrite(motor1Pin, 100); digitalWrite(motor2Pin, 0); }

/* Delay of program*/

delay(100);
}

Thank you to Diane Willow for encouraging me to take this course! I know it will inform the work I make in the future.
Thank you to Ben Faga for your help troubleshooting the electronics and code. I have learned so much!
Thank you to Wade Stebbings for the many conversations during class and introducing me to ABC electronics!
Thank you to the entire class! I enjoyed our time together and learning this technology with all of you.

Stop by my studio anytime! (E240)
Take care,
Jessica