Class 4: Rapid Prototyping


Home


The assignment for this class was to make and document a kinetic sculpture, integrating an electronic circuit with physical components. I love music and play the piano, so I decided to try and use music in my design. I wanted to do something that was actually plausible, so I stuck to trying to make drums. To do so, I made a circuit consisting of 2 motors with pieces from the board game Mouse Trap attached to the motors that would spin around and hit other pieces from the game, mimicing a drum. I orgininally wanted to glue the pieces to the motors, but, after they didn't stick well enough, I decided to use duct tape to make double sided tape and tape them together. While it's not a perfect solution, it worked well enough. The circuit also utilizes a potentiometer to allow me to slow down and speed up the beats. Pictures of the circut are below:

Circuit
PieceAndMotor

And here's a video of the drums in action:


Here's the code I used to make the motors spin using the potentiometer. I took Nathan's potentiometer code and editied it slightly to work with 2 motors instead of just 1.


    void setup() {
      pinMode(3, OUTPUT);   //Pin for M1
      pinMode(6, OUTPUT);   //Pin for M2

      pinMode(A0, OUTPUT);  //This will be GND for the potentiometer
      pinMode(A4, OUTPUT);  //This will be 3.3V for the pot.

      digitalWrite(A0, LOW);
      digitalWrite(A4, HIGH);
    }

    void loop() {
      int pot_value = analogRead(A2);   //pot wiper is on A2
      int motor_level = map(pot_value, 0, 1023, 255, 0); // map motor_level to pot_value so that zero corresponds to lowest speed.
      analogWrite(3, motor_level); //Motor 1
      analogWrite(6, motor_level);  //Motor 2
    }
    

Throughout this exploration, I learned quite a lot. I haven't really worked with circuits beforehand, and I really underestimated the difficulty of making these drums. I just assumed simple Elmer's glue would work and didn't think of alternate solutions. When the glue failed, I was a bit panicked. I had to do some thinking before I realized I could make double-sided tape, which ended up working. Overall, I think I learned more about how to think about problems and brainstorm more than one solution just in case. I also learned more about how to use the resources around me, as I originally had no idea what I could make a kinetic sculpture out of, and only found Mouse Trap after digging through a closet, but it proved crucial to my project.