Project no. 1 – 62-362 Fall 2020 https://courses.ideate.cmu.edu/62-362/f2020 Electronic Logics && Creative Practice Tue, 29 Dec 2020 23:10:37 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.15 Initial Ideation: Arrows John https://courses.ideate.cmu.edu/62-362/f2020/initial-ideation-arrows-john/ Sat, 19 Dec 2020 00:42:35 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=10737 These are sketches and plans of some of the ideas I was planning for the third project.

I was considering a tombstone music box similar to the jewelry boxes with spinning toys inside.

 

I also was thinking of an event simulator where placing dolls on a board would place them in a simulation in unity. I also wanted to use a joystick to create a player controller for a model I animated with maya.

]]>
Barber Shop https://courses.ideate.cmu.edu/62-362/f2020/gates-documentation-john/ Fri, 18 Dec 2020 21:58:56 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=10734 I decided to make an automaton music box for this assignment. I never expected it could be so much work. Of all the projects this semester, I think I learned the most doing this one. In the process I accidentally fried 2 arduinos and a good handful of other electronics. While it was frustrating at the time, the other projects were much easier thanks to the knowledge I gained.

My friend Jackson made the 3 songs used after I gave him some small prompts, I was happy to get to include a piece of him in this odd little project.

The initial idea was a barber shop that caught on fire, not sure how well that was reflected but I was happy with the mood of the finished piece.

 

Electronics and Structure:

Some of the fabrication:

Some early sketches and plans:

 

Electronics:

arduino uno, 7408 quad AND gate, 7404 NOT gate, L293D motor driver, DFPlayer mini, 2 hobby gear motors, 1 continuous rotation servo, micro sd card, micro sd card reader/writer, 3 pushbuttons, 2 potentiometers, speakers, neo pixel ring, 4 yellow LEDs, 8 red LEDs, wires, resistor, breadboard, 5v power source

Materials:

wood, cardstock, cereal boxes, sewing pins, paperclips, wire, plastic bags, old clothing/fabric, thread, tissues, electrical tape, gaffer tape, duct tape, staples, boba straw, pebbles, Styrofoam

Tools:

soldering iron and fan, scissors, wire cutters, needle, pliers, precision knife, compass (drawing tool), stapler, pencils/pens, ruler, cutting mat

 

Code:

Everything but music:

#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

#include <Adafruit_NeoPixel.h>
#include <Servo.h>

#define PIN            9
#define NUMPIXELS      12

SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);

bool stage1 = false;
bool stage2 = false;
bool stage3 = false;

bool button1 = false;
bool button2 = false;
bool button3 = false;

bool song1 = false;
bool song2 = false;
bool song3 = false;

int value;
int angle;

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

uint32_t red = pixels.Color(250,0,0);

Servo myservo;

void setup() {
  pixels.begin(); //backlight 
  pixels.setBrightness(0); 
  pixels.show();         

  pinMode(5, OUTPUT); //m1
  pinMode(6, OUTPUT); //m2
  myservo.attach(3); //m3
  
  pinMode(7, INPUT); //button1
  pinMode(8, INPUT); //button2
  pinMode(4, INPUT); //button3
  
  pinMode(A0, INPUT); //p1
  pinMode(A1, INPUT); //p2

  mySoftwareSerial.begin(9600);
  Serial.begin(115200);

  Serial.println();
  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));

  if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to communicate with mp3.
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
    while(true);
  }
  Serial.println(F("DFPlayer Mini online."));

  myDFPlayer.volume(30);  //Set volume value. From 0 to 30
}

void loop() {

  //part 1
  if (digitalRead(7) == HIGH) {
    analogWrite(5, analogRead(A0)/4);
    button1 = true; 
  } else {
    button1 = false;
  }

  //part 2
  if (digitalRead(8) == HIGH) {
    analogWrite(6, analogRead(A0)/4);
    button2 = true;
  } else {
    button2 = false;
  }

  //part 3
  if (digitalRead(4) == HIGH) {
    //m3
    value = analogRead(A1);
    angle = map(value, 0, 1023, 10, 170); 
    myservo.write(angle); 
    //backlight
    pixels.setBrightness(150);
    pixels.fill(red);
    pixels.show();
    button3 = true;
  } else {
    myservo.write(10);
    pixels.setBrightness(0);
    pixels.show();
    button3 = false;
  }

  //dfmini 
  stage1 = (button1 && !button2);
  stage2 = (button1 && button2 && !button3);
  stage3 = (button1 && button2 && button3);
  
  if (stage1 && !stage2 && !stage3 && !song1) {
    myDFPlayer.play(3);
    song1 = true;
    song2 = false;
    song3 = false;
  } else if (stage2 && !stage3 && !song2){
    myDFPlayer.play(1);
    song2 = true;
    song1 = false;
    song3 = false;
  } else if (stage3 && !song3){
    myDFPlayer.play(2);
    song3 = true;
    song1 = false;
    song2 = false;
  } 
  
  if (!stage1 && !stage2 && !stage3) {
    myDFPlayer.stop();
    song1 = false;
    song2 = false;
    song3 = false;
  }
  
}

 

dfmini controls:

/***************************************************
DFPlayer - A Mini MP3 Player For Arduino
 <https://www.dfrobot.com/index.php?route=product/product&product_id=1121>

 ***************************************************
 This example shows the basic function of library for DFPlayer.

 Created 2016-12-07
 By [Angelo qiao](Angelo.qiao@dfrobot.com)

 GNU Lesser General Public License.
 See <http://www.gnu.org/licenses/> for details.
 All above must be included in any redistribution
 ****************************************************/

/***********Notice and Trouble shooting***************
 1.Connection and Diagram can be found here
 <https://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299#Connection_Diagram>
 2.This code is tested on Arduino Uno, Leonardo, Mega boards.
 ****************************************************/

#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);

int counter = 1;

void setup()
{
  pinMode(7, INPUT);
  
  mySoftwareSerial.begin(9600);
  Serial.begin(115200);

  Serial.println();
  Serial.println(F("DFRobot DFPlayer Mini Demo"));
  Serial.println(F("Initializing DFPlayer ... (May take 3~5 seconds)"));

  if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to communicate with mp3.
    Serial.println(F("Unable to begin:"));
    Serial.println(F("1.Please recheck the connection!"));
    Serial.println(F("2.Please insert the SD card!"));
    while(true);
  }
  Serial.println(F("DFPlayer Mini online."));

  myDFPlayer.volume(30);  //Set volume value. From 0 to 30
}

void loop()
{
  
  if (digitalRead(7) == HIGH) {
    if (counter == 1) {
      myDFPlayer.play(3);
    } else if (counter == 2) {
      myDFPlayer.play(1);
    } else if (counter == 3) {
      myDFPlayer.play(2);
    } else {
      myDFPlayer.stop();
    }
    counter = counter + 1;
    if (counter == 5) {
      counter = 1;
    }
    delay(200);
  }

  if (myDFPlayer.available()) {
    printDetail(myDFPlayer.readType(), myDFPlayer.read()); //Print the detail message from DFPlayer to handle different errors and states.
  }
}

void printDetail(uint8_t type, int value){
  switch (type) {
    case TimeOut:
      Serial.println(F("Time Out!"));
      break;
    case WrongStack:
      Serial.println(F("Stack Wrong!"));
      break;
    case DFPlayerCardInserted:
      Serial.println(F("Card Inserted!"));
      break;
    case DFPlayerCardRemoved:
      Serial.println(F("Card Removed!"));
      break;
    case DFPlayerCardOnline:
      Serial.println(F("Card Online!"));
      break;
    case DFPlayerPlayFinished:
      Serial.print(F("Number:"));
      Serial.print(value);
      Serial.println(F(" Play Finished!"));
      break;
    case DFPlayerError:
      Serial.print(F("DFPlayerError:"));
      switch (value) {
        case Busy:
          Serial.println(F("Card not found"));
          break;
        case Sleeping:
          Serial.println(F("Sleeping"));
          break;
        case SerialWrongStack:
          Serial.println(F("Get Wrong Stack"));
          break;
        case CheckSumNotMatch:
          Serial.println(F("Check Sum Not Match"));
          break;
        case FileIndexOut:
          Serial.println(F("File Index Out of Bound"));
          break;
        case FileMismatch:
          Serial.println(F("Cannot Find File"));
          break;
        case Advertise:
          Serial.println(F("In Advertise"));
          break;
        default:
          break;
      }
      break;
    default:
      break;
  }
}

 

Useful references:

DFPlayermini

https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

https://www.instructables.com/Tutorial-of-MP3-TF-16P/

L293d

https://www.tinkercad.com/things/gigwXYoyaDb

Neopixel_ring

https://www.instructables.com/3D-Printed-NeoPixel-Ring-Butterfly-With-Tinkercad/

https://www.tinkercad.com/things/c4nyZ9UpWer

 

Libraries found on Github:

https://github.com/adafruit/Adafruit_NeoPixel

https://github.com/DFRobot/DFRobotDFPlayerMini

 

TinkerCad Circuits I used to troubleshoot:

https://www.tinkercad.com/things/0evKMIHM0Ai-fantabulous-inari/editel?sharecode=NX5CYihf8vkyRuLa-rzRwghpmeox1-OVk11WzY99hrU

https://www.tinkercad.com/things/7uIwm5bLp6N-copy-of-project-1/editel?sharecode=YA4F9Lz2rxujlDz2OgQx0Xv3PKQZNSbunOs2S8PjWWM

]]>
Dance Space https://courses.ideate.cmu.edu/62-362/f2020/gates-dance-space/ Fri, 18 Dec 2020 17:46:36 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=10694

Project Statement:
In order to capture and enhance my existing rountine of dancing in my living room, this dance space has been created. It is meant to be used as a place to let go of any stress, it may be added to a daily routine- or not. As you enjoy tea and dance, the space around you reacts to your actions. The idea is to move freely and unpredictably through the living space until the knit yarn pieces are lifted. I plan to complete this project with a final piece of documentation which will be a video of me dancing to music.

How to Use:
In order to turn the light on, the tea kettle must be lifted. in order to make the “worms” move up, three or more buttons one the ground must be pressed. Enjoy the space, move freely, and dance!

 

Process and Issues:

I ran into some issues while constructing the pieces. I didn’t predict well enough, how many things I would need into order to complete the project successfully. I think, for the time we were given I may have created a project that was a bit too big/complex in the manufacturing process. Another issue I ran into was not prdicting how long the clay was going to take to dry. Once dry, it will be spray painted the same shade as the chair.

The electronics/programming portion of the project ran pretty smoothly except for the uploading the program into the arduino. I didn’t have the library I needed for the code to run, so I downloaded the right library for the motor.
Looking back, I am happy with the direction this project has gone. If I were to change anything, it would most likely be the construction of my pulley system. Although it works, it is very fragile and I would have liked it to be more rigid so that there would be no risk in the whole system falling apart. I’m satisfied with the interactivity and tangibility of this project. I feel that I have achieved a very intuitive system as to how to operate the piece. Perhaps I could have have used less fragile floor pieces, however I enjoy how delicate they are- even the possibility of the clay cracking as I step on it.

 

Clay Floor Pieces

 

 

Electronics Setup

 

Planning

]]>
Process Blog Documentation: John https://courses.ideate.cmu.edu/62-362/f2020/process-blog-documentation-john/ Mon, 26 Oct 2020 00:47:37 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=10025 eyeball-mechanic sonicsensor-puppet

 

Materials:

  • antron fleece
    • https://puppetpelts.com/collections/true-colors-collection/products/splash
  • aluminum wire
    • https://www.homedepot.com/p/OOK-50-ft-10-lb-18-Gauge-Aluminum-Hobby-Wire-50176/100192917#product-overview
  • polyfoam
    •  https://foamonline.com/
    • cube/rect, dry fast, 24in length, 48in width, .5in height, medium firmness
  • contact cement
    • https://www.amazon.com/gp/product/B00BZXB2FI/ref=as_li_tl?ie=UTF8&tag=adamkre-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B00BZXB2FI&linkId=2064399a7cd3acf3959515713ca2defb
  • ping pong balls
  • 3d printed gears
  • many servos and micro servos

various sensors to act as various triggers:

  • sound sensor
  • heat sensor
  • light sensor
  • sonic sensor

 

Resources:

super useful site, makes svg files for gears based on your input.

http://hessmer.org/gears/InvoluteSpurGearBuilder.html?circularPitch=8&pressureAngle=20&clearance=0.05&backlash=0.05&profileShift=0&gear1ToothCount=30&gear1CenterHoleDiamater=4&gear2ToothCount=8&gear2CenterHoleDiamater=4&showOption=3

 

very well made eye mechanisms

6 Animatronic Eye Mechanisms You Can Download and 3D Print

 

]]>
Group Check-in No. 2: John https://courses.ideate.cmu.edu/62-362/f2020/group-check-in-no-2-john/ Sun, 25 Oct 2020 13:18:59 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=10000 These are all the electronics all set up, and the code that goes along with it

 

Libraries found on Github:

https://github.com/adafruit/Adafruit_NeoPixel

https://github.com/DFRobot/DFRobotDFPlayerMini

 

Useful references:

DFPlayermini

https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

https://www.instructables.com/Tutorial-of-MP3-TF-16P/

L293d

https://www.tinkercad.com/things/gigwXYoyaDb

Neopixel_ring

https://www.instructables.com/3D-Printed-NeoPixel-Ring-Butterfly-With-Tinkercad/

https://www.tinkercad.com/things/c4nyZ9UpWer

 

]]>
Process Blog Check-in: John https://courses.ideate.cmu.edu/62-362/f2020/process-blog-check-in-john/ Sun, 25 Oct 2020 13:07:37 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=9992 more fabrication

]]>
In Progress Critique: John https://courses.ideate.cmu.edu/62-362/f2020/in-progress-critique-john/ Sun, 25 Oct 2020 12:59:06 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=9976 This is some fabrication in progress and some tinkerCad files I’ve been doing testing with.

they were just for tests so I didn’t finish them, but if you want to see, these are the links

https://www.tinkercad.com/things/0evKMIHM0Ai-fantabulous-inari/editel?sharecode=NX5CYihf8vkyRuLa-rzRwghpmeox1-OVk11WzY99hrU

https://www.tinkercad.com/things/7uIwm5bLp6N-copy-of-project-1/editel?sharecode=YA4F9Lz2rxujlDz2OgQx0Xv3PKQZNSbunOs2S8PjWWM

]]>
Group Check-in No. 1: John https://courses.ideate.cmu.edu/62-362/f2020/group-check-in-no-1-john/ Sun, 25 Oct 2020 12:52:33 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=9964 I decided to make an automata of a barber. These are some of the sketches of the idea.

]]>
Initial Ideation 1: John https://courses.ideate.cmu.edu/62-362/f2020/initial-ideation-1-john/ Sun, 25 Oct 2020 12:34:50 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=9952 Initial Ideation:

Slot Machine Toy:

A fun toy for a fun child. Bet quarters, win or lose, it’s up to fate. Let children experience the rush and risk of gambling.  Fisher Price style.

Need to make quarter slot and payout. There will be lots of pretty lights around it. Could also add speakers and have sound effects.

not sure how to tell what the slot stops at using continuous servo. Maybe a light sensor could be used to see what color the slot has stopped on.

Drawing machine:

Pretty simple 2 servos act as joints. 4 buttons control the joint, turn left or right.

Should remain within bounds of paper. Kind of like an etch a sketch

Mastermind (board game):

I used to play this game with a friend. The goal is to guess the code set within 10 attempts.

I use LED’s to act as the pegs, and I’ll use puppet hands to show how many you guessed correctly. I included a link to the rules if anyone is interested in the how to play.

way to scroll between previous guesses, and how many you got correct. counter showing how many times you have guessed.

 

 

Mastermind Board Game Rules: How do you play Mastermind?

]]>
Love && Logic https://courses.ideate.cmu.edu/62-362/f2020/love-logic/ Fri, 09 Oct 2020 21:14:55 +0000 https://courses.ideate.cmu.edu/62-362/f2020/?p=9803 Sorry, but you do not have permission to view this content. ]]> Sorry, but you do not have permission to view this content. ]]>