INTERACTION LAB RECITATION 4

Part 1:Recitation Documentation

On October 8, 2021, we did our fourth recitation right after we got back from the holiday. This time I learned about how to build a drawing machine and made our work in cooperation with my partner. I also learned how to use H-bridge to control the stepper motor.

Materials 

For Steps 1 and 2 

    • 1 * 42STH33-0404AC stepper motor
    • 1 * L293D ic chip (H-bridge)
    • 1 * power jack
    • 1 * 12 VDC power supply
    • 1 * Arduino kit and its contents

For Step 3 

    • 2 * Laser-cut short arms
    • 2 * Laser-cut long arms
    • 1* Laser-cut motor holder
    • 2 * 3D printed motor coupling
    • 5 * Paper Fasteners
    • 1 * Pen that fits the laser-cut mechanisms
    • 1 * Paper sheet

Step 1 Build the circuit

Pic.1.1 THE circuit (stepper_oneRevolution)

The circuit we built this time was complicated. What’s more, I didn’t get the point of H-bridge at that time. In the process of building it, I took a closer look and found out what H-bridge is about. In short speak, it is an electronic circuit that switches the polarity of a voltage applied to a load. In this circuit, it was used to switch voltage polarity, which eventually reversed motor direction.

Here is the code of stepper_oneRevolution:

 /*
 Stepper Motor Control - one revolution

 This program drives a unipolar or bipolar stepper motor.
 The motor is attached to digital pins 8 - 11 of the Arduino.

 The motor should revolve one revolution in one direction, then
 one revolution in the other direction.


 Created 11 Mar. 2007
 Modified 30 Nov. 2009
 by Tom Igoe

 */

#include 

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  // set the speed at 60 rpm:
  myStepper.setSpeed(60);
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one revolution  in one direction:
  Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(500);

  // step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(500);
}

Also, the power of the circuit was a little bit confusing to me at first. The stepper motor needed a voltage of more than 5V, so the Arduino needed to be charged not by a computer but by the jack of a high voltage power source. There was an additional power source attached to the H-bridge too.

Step 2 Control rotation with a potentiometer

Pic.2.1 The circuit with a potentiometer

In this step, I added a 10k potentiometer to the circuit in such a way as to allow the Arduino to read analog input. Then, we were asked to use the MotorKnob example to control the motor. I modified #define STEPS 100 to #define STEPS 200, since the 42STH33-0404AC Stepper Motor is a 200 step motor. After doing this, I found a place in the code to add a map function to control the motor with a potentiometer.

The code is here:

 /*
 * MotorKnob
 *
 * A stepper motor follows the turns of a potentiometer
 * (or other sensor) on analog input 0.
 *
 * http://www.arduino.cc/en/Reference/Stepper
 * This example code is in the public domain.
 */

#include 

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepper(STEPS, 8, 9, 10, 11);

// the previous reading from the analog input
int previous = 0;

void setup() {
  // set the speed of the motor to 30 RPMs
  stepper.setSpeed(30);
}

void loop() {
  // get the sensor value
  int val = analogRead(0);
int label = map( analogRead(0),0,180,0,200);

  // move a number of steps equal to the change in the
  // sensor reading
  stepper.step(label - previous);

  // remember the previous value of the sensor
  previous = val;
}

I tried to find out what step means when it comes to the stepper motor, and it turned out one circle of the motor is divided into steps. In the two hundred steps case, each step in the stepper motor moves 1.8 degrees.

Video.2.1 I’m using the potentiometer to control the motor

Step 3 Build a Drawing Machine

In this step, I combined my parts with my partner’s into a mechanical arm that can hold a marker on paper and used my potentiometers to make the motors turn. We successfully built a drawing machine.

Video.3.1 Our machine drawing

Part 2:Q&A

Question 1: 

What kind of machines would you be interested in building? Add a reflection about the use of actuators, the digital manipulation of art, and the creative process to your blog post.

I would like to build a kind of machine that can interact with humans with actuators that can move around and give out light. The actuators are used as outputs to enable the circuit or artifact with the ability to acts on the physical world. The digital manipulation of art is completed with the help of the H-bridge. My creative process is that I successfully adapted the map function into the code and turned the potentiometer several times to make the shape it drew more beautiful.

Question 2: 

Choose an art installation mentioned in the reading ART + Science NOW, Stephen Wilson (Kinetics chapter). Post your thoughts about it and make a comparison with the work you did during this recitation. How do you think that the artist selected those specific actuators for his project?

I choose Waves by Daniel Palacios. I think it is a wonderful art installation. Its actuators are motors just like our machine. However, compared with the drawing machine I built, the motors are used to create complex sound and visual wave oscillations with the help of elastic ropes attaching to them. What’s more, it responds to viewers’ motion, not some direct manipulation on it. I think it is wise of him to select motors since he intends to make waves, which are periodic and in a state of moving. Motors can satisfy these features.

Leave a Reply

Your email address will not be published. Required fields are marked *