PartyBox log

From ESE205 Wiki
Revision as of 19:40, 2 April 2017 by Sarahchen (talk | contribs)
Jump to navigation Jump to search


1/22 - 1/28

  • Group finalized PartyBox project idea
  • General objectives: LED array, modular and connectable, response to live music, different modes, wireless (if time permits)
  • Wiki page published

1/29 - 2/4

  • Group met with TA Nathan to discuss project proposal and demo.
  • Developed finer ideas of project (center cube with processor and power, no wireless, only music and standby modes, and modularity with plugs flush to cube surface).
  • Drafted and finished a project proposal, including a Gantt chart.
  • Agreed upon minimum weekly meeting, Monday at 7pm

2/5 - 2/11

  • Met with Nathan and discussed issues with the previously submitted proposal, most importantly the need for an additional arduino on the second cube
  • Group meeting on 2/8/17:
    • Sketched out a basic picture of what we’re brainstorming
      • Add sketch to proposal?
      • LEDs 4 x 4 x 4 with none on bottom where Arduino is located
    • Reevaluated how we would get the two cubes to connect
      • Considered more complicated mechanisms, such as force sensors, but ultimately decided on just wiring the inputs and outputs of the two arduinos together using male/female plugs
    • Fix Budget
      • Removed items we previously thought we would need (micro-USB)
      • Add new objects to connect the cubes
        • Physically: Magnets? (Could be too expensive) 3D Print locking mechanism?
        • Plugs/wires straight from an output port of one Arduino to an input port of the other
      • Specify resistors
      • Magnets, microphones, acrylic adhesive, counters, transistors
    • Fix formatting of proposal
    • Adjust Gantt chart
      • More time for physical construction
      • More actions occurring simultaneously
    • Add more details to the overview in the proposal (size specifications, reason for two cubes)
  • Group meeting on 2/9/17
    • Dropped the plan for the second cube due to budget constraints
    • Adjusted Gantt chart accordingly to account for the change in objectives
    • Finalized budget
    • Spruced up project proposal


Lydia:

  • continued to research LED Matrix implementations. Used this tutorial


Graham:

  • began learning how to operate AutoDesk Inventor and the labs 3D printer

2/12 - 2/18

Meeting with Nathan 2/15/17:

  • We do not want to use the battery to power our testing. Therefore, we should purchase a wall adapter that will not take up any power
  • We need to add a circuit board to our budget. The lab supplies a prototyping circuit board that we can use for our initial circuit, but we need to purchase a permanent one that we solder our final circuit to so that it does not move while the box is in use.
  • After removing the second cube, our project is not as interactive as we would hope. We are considering options to make our cube more interactive, such as the ability for the user to change the light colors.
  • For Graham, who is working with 3D printing: Graham should print something very simple and something that we know works with the 3D printer to gain some experience with the 3D printer.
    • Graham should also print something with Nathan first so that he can then print without supervision.
  • Our objectives need to be formalized some more: mainly, "finished box" is not very clear nor does it give a good explanation of our project. We can get rid of it or explain more thoroughly.


Initial ideas for modules of the suspension structure with individual LEDs

Graham:

  • continued to learn Inventor, and began experimenting with suspension structure design


Concept sketch showing front left column of LEDs lit

Lydia:

  • Worked on concept design for LED matrix
    • Five LED sheets running horizontally with each sheet sharing a common voltage supply connection
    • Five perpendicular LED sheets would be used for the ground connection
  • Identified the following challenges:
    • How would the wiring in the corners of where two sides of the cube meet work?
    • Is it necessary for the ground connection to be at the top of the cube? Is there a way to keep the decade counter and transistors at the bottom?
  • Needed to check with Graham and his design for the structure to resolve these challenges
    • How much room would be in the hollow part of the support for the wires to run through?
    • Would there be enough room for the wires to loop back down through the support or was there only room for the wires to go one way?

2/19 - 2/25

Group Meeting 2/20/17:

  • Nathan suggested 1) addressable LED strips and 2) Bluetooth second cube. However, we ultimately decided not to use either of them -- but we will discuss with Nathan at our meeting on Wednesday.
    • 1) Our problem with the LED strips is that they cannot bend the way we want for the design of our cube
    • 2) We cannot afford a second cube, as just one cube nearly puts us at budget.
  • We decided on a time for our first evaluation.


Meeting with Nathan 2/22/17:

  • Nathan told us that we can cub the addressable LED strips and solder them back together, which eliminates our main concern with them. Furthermore, if we were to use these strips, it would take a huge burden off our shoulders as we would no longer have to wire 100+ individual LEDs.
    • The LED strips that Nathan linked us to has already been vetted.
  • We are not sure how much power we will need for our project (such as, lighting all the LEDs at a reasonable brightness). We can test what power supply we will need with power readouts in the lab, and use those readouts to figure out what our circuit will need.
    • In the meantime, we will remove our battery from our budget, but leave a reasonable amount of money for us to buy whatever power supply we ultimately decide on.
  • We are still hesitant about our microphone choice.


Group Meeting 2/24/16:

  • In researching more about the LED strips and microphone, we have discovered the spectrum shield which will automatically process the data from the microphone we use.
  • Group decided to use LED strips and have them light the faces without the inside.
  • With the changes to our design, we are need to change our budget:
    • We are now getting rid of: the individual RGB LEDs, resistors, gauge wire (we discovered it would be provided by the lab), battery and switch (temporarily, until we finalize our power supply), decade counters, and transistors.


Lydia:

  • Scrapped current progress on the implementation of a matrix for the LED circuitry
  • Began researching LED strips and how addressable LED strips work

2/26 - 3/4

Group Meeting 2/27/17:

  • Edited our Gantt chart to reflect the new tasks that have surfaced with the recent changes in our design (eg. learning how to use the spectrum shield), as well as removed unnecessary ones.
  • We found a new microphone that has better reviews than our old one and updated the budget accordingly. We also sent it to Nathan for approval.
    • However, the cord of the microphone is 60" long, so there is the dilemma (Sarah's task) of how to place it into the cube.
  • Our budget has been approved (except for the microphone), so we decided to begin to order our items: we ordered the LED strips and the spectrum shield + headers.
  • We noted that the acrylic casing may not be needed depending on the final design of the suspension structure, but that is something that we can decide later on.


Graham:

  • began reworking 3D printed structure because of the inclusion of LED strip lights instead of LEDs
Main cube structure with slots for where the LED strips will exit and enter the cube


  • had first evaluation with Humberto

3/6 - 3/11

Group Meeting 3/6/17:

  • Reviewed comments from the first evaluation with Humberto and changed our tasks for this week...
  • This week,
    • Lydia: The LEDs arrived so she will work with the LEDs in order to be able to control a strip of LEDs to her liking. Also she will see how well she can control the brightness of the LEDS.
    • Graham: print the chassis of the cube.
    • Sarah: research/look into the videos that Nathan sent us about sound detection and LEDs; create code for button that we can use to switch between modes.
  • We established:
    • We will remove the "portable and self-contained" aspect of our project objectives, as it is not a key part of the end goal of our project.
    • We want to use the diffuser acrylic for the casing of the cube, so that the colors will blend together.

Meeting w/ Nathan 3/8/17:

  • The shield we ordered is for an Arduino Uno rather than Mega, which should be fine, but if we need more current for the pins, then we would have to map the pins of the Mega to the shield
  • Our ideal microphone should be one that processes and condenses
  • We need to start doing microphone work after Spring Break.
  • In our design for the box, we could use plastic 2.85mm wire as a pin to hold the box together.
  • We should test listening in the music the Lopata Gallery.

Spring Break

No group meetings, just individual work

LEDStripTest2.gif
  • Lydia:
    • Checked out Arduino UNO
    • Began working to understand the LED strips
    • Met with Nathan to work on physically connecting the strips to the Arduino
      • Cut off pre-attached connector
      • stripped the wire
      • soldered on piece of metal
      • covered in heat shrink for protection
      • ClockIn wire to 100 Ohm resistor to pin 13
      • DataIn wire to 100 ohm resistor to pin 11
    • Used Adafruit_DotStar library to test LED strip.
      • Used example program "StripTest" to send 10 colored LEDs through strip, alternating between red, green, and blue
        • Noticed comments in example code says that 0xFF0000 corresponds to red, but it actually corresponds to green
      • Learned how to control individual LEDs and manipulate color
PartyBox Button Work.gif

Sarah:

  • developed a simple version of the code we will use to switch between modes using a button
    • in this case, I am using the button built into the shield of my Arduino, but we will have purchased one for our project
  • with the button, I included debounce code that I found from the Arduino website combined with my own previous debounce code, and then added in my own code.
  • The general gist of the code is:
    • when a button push is detected, increase a variable called counter.
    • to determine which 'mode' to be on, or rather, which code to run, I have different if statements.
      • I determine which mode to enter by checking what (counter % numberOfModes) is. If it is 1, the it is Mode 1, etc..
      • Right now, it is simple code with LEDs; with PartyBox, I could simply make the code in the main loop be a method and have the method for each mode be outside of the loop so it does not clog up the file.
the debounce part of the code
the 'mode' part of the code

3/20 - 3/26

Group Meeting 3/20/17:

  • Graham showed the group his cube shell designs
    • We are concerned with wall thickness -- need to test this by printing
    • Could connect the LED strips from the separate pieces of the cube using the connectors that came attached with the strips
  • Lydia brought in the microphone we ordered over break and discussed her work with LED strips thus far (see individual log during Spring Break).
  • Sarah demoed her button debouncing and simple mode switching program, and explained how the code could be used for our end goal (see individual log).
  • Goal:
    • Lydia:
      • Getting exact control of individual LEDs (placement and color)
      • Beginning work on patterns
    • Graham: print cube pieces
    • Sarah and Graham: Attach shield and learn to understand the data from the microphone.

Meeting w/ Nathan 3/24:

video of the shield reacting to the music; the shield is plugged into the phone with a cord
  • Soldered headers onto shield to connect to Arduino
  • Used example program found on the shield's hookup guide with a phone and speaker
  • Discovered that microphone we purchased does not do enough processing to be connected by aux to the shield
  • Ordered this microphone which was recommended in the hookup guide for connection to the shield via LGR pins
    • We are still unsure how this microphone will work with the shield, but we didn't want to waste any time so we went ahead and ordered it because it is returnable. We are still trying to learn how this connection will work.

Lydia:

  • Used FastLED library to control single LED, example program "FirstLight"
    • Discovered release of the FastLED library that said it supported the APA102 strip did not actually offer this support. Found later release with bug fix for this issue here
      • Note: not every file in the example folder supports the apa102, for example RGBCalibrate
    • Edits to standard files in examples:
      • NUM_LEDS = 60 (for 1 strip)
      • Uncomment line "FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);"
      • Change "RGB" in declaration to BGR
    • Learned to use their example colors from this page

PinkLEDcode.PNGPinkLED.gif

  • Discovered that the variable "NUM_LEDS" must be defined to the actual number of LEDs on the strip, though some example programs will define it as the number of LEDs the code is using, or the 13th LED will light up no matter what the rest of the code is doing.
  • Learned to make colors cycle through using the FastLED library
    • Created file for future use called "3rainbowLEDs.ino" which controls the LED strip as shown below
3 rainbowLED.gif

3/27 - 4/1

Group Meeting 3/27

  • Sarah shared information she learned about the lab sound sensor
    • Two outputs: analog and digital
    • Potentiometer
  • Note: goal of brightness being controlled by volume should be scrapped because perceived loudness is not the same loudness as detected by microphone
  • We plan to solder leads to the LGR pins on the shield so that we are are able to play around with the microphone breakout board without any permanent attachments to the board
  • Overall Goal for week: prototype with processed sound (using phone and speaker)
    • Lydia's goal: create several LED patterns to work with
    • Sarah's goal:
      • (by Wednesday) have understanding of microphone breakout board
      • Understand data coming from shield
      • Update Gantt chart (lol)
    • Graham's goal:
      • be able to use frequency bands
      • tempo detection with processed sound
        • Done with peak detection of multiple frequency bands. Noticed that the bass drum has the highest amplitude in the bass frequency; other bands have equivalent instruments.
Sample 160 Hz frequency band. Noticed highest peaks corresponded to bass drum hits.

Meeting with Nathan 3/29

  • We asked Nathan about connecting the breakout mic board by splitting the mic into two channels, he suggested we try to make it work with just one channel.
  • Put ourselves on schedule for 3D printing
  • Sarah soldered wires onto the breakout mic and onto the RGL pins on the shield
  • We scheduled our second evaluation for Wednesday at 4:30

Group Meeting 4/1

  • Finalized some basic details before evaluation next week
    • Updated Gantt chart on proposal page
    • Updated budget on proposal page
    • Updated objectives and project details on proposal page
  • Discussed physical aspects of the cube
    • Placement of buttons: squish together LEDs on top side, have buttons and microphone fit into the the top of the cube
    • Power connection: print cube with a piece of one bottom corner missing to feed wires from power source through so they can be connected to an outlet

Lydia:

  • Mapped out LED indices with position on cube
  • Began brainstorming patterns:
    • Standby pattern: Cluster of three LEDs. One LED in the cluster goes through cycle of red --> blue --> green with an additional brightness cycle. As one LED dims, another LED in the cluster brightens and goes through same cycle. This keeps it so that no more than 1/3 of all the LEDs are turned on to full brightness at once.
    • Bottom two lines of LEDs would light up in a dark color upon occurrence of lowest frequency band. Line above those two would light up with a slightly lighter color upon occurrence of second lowest frequency band. Higher frequency bands would correspond with LEDs distributed throughout the rest of the cube. Lighter color --> higher frequency. Higher on cube --> higher frequency. This pattern could be independent of tempo detection or the base color of the LEDs could go through a cycle that cycles at the rate of the tempo.
      • Note: Additional problem realized. When tempo detection is working, we will need to decide the conversion between audio tempo and LED cycle speed that makes sense visually
    • Stereotypical music visualizer pattern. 6 vertical lines on box would correspond to 6 bands, number of LEDs that light up per vertical line would depend on value of that frequency band
      • Note: this would need to be volume in relation to the other frequencies, otherwise all the bands would have roughly the same number of LEDs lit up
  • Because it is difficult to really create a pattern without input from the microphone, began working on basic patterns that will most likely be used in more complex patterns with input from shield
    • Created pattern that will consist of horizontal stripes rolling down cube when the LEDs are arranged properly
Standby.gif
HorStripe.gif
video of the LED strip reacting to a music input from a cellphone
video of the LED strip reacting to a music input from a cellphone