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.
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
]]>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.
Materials:
various sensors to act as various triggers:
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
]]>
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
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
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.