Sound Box

by emr0x in Circuits > Arduino

129 Views, 0 Favorites, 0 Comments

Sound Box

IMG_9264.jpg
EMR0X SOUND BOX

Welcome to my page! Today I'm going to guide you through the instructions of my Arduino Nano 2040 & Circuit Playboard sound box. This fun little speaker box allows you to swipe through your music playlist using right and left gestures, with a strip lights that light up depending on the volume of the music. Along with this, we have a button that turns our little box on and off. I named my box the "Emr0x Sound Box", but you can name it anything you want!

You can also add any set of sounds that fit into your Arduino and have a fun time swiping through your beautiful tunes.

Supplies

  • Arduino Nano 2040
  • Arduino Pin Board
  • Arduino Pin Board wires
  • Button
  • Circuit Playboard
  • Stemma QT APDS-9960
  • Alligator Clips
  • Strip lights/LED lights
  • Paint
  • Paintbrush
  • Woodbox/Any box
  • Speaker
  • CPB battery box
  • Arduino battery box

Making the Box

IMG_9237.jpg
Screen Shot 2021-12-09 at 1.18.36 PM.png

To make my sound box, I used the laser cutter to cut out 6 pieces of wood. You can use any type of material you want for the box, even cardboard! The dimensions I used were: Base and Top (4in x 3in), Sides (4in x 2in), Sides (3in x 2in). For the top of my box, I also cut out 2 holes for the wires to come out of with approximately a 1 inch diameter. I chose to make my holes have a groovy little shape as well for design purposes. I also inserted another approximately 1 inch diameter hole on the side of the box for my battery pack wires to come out of. With all of you box dimensions cut out, it is time to assemble! Using some super glue, connect each of the pieces to form an open top box-- do not glue on the top of the box as you will need it open to put your wires and machinery inside.

Downloads

Painting Time

IMG_9240.jpg
IMG_9239.jpg
IMG_9259.jpg
Screen Shot 2021-12-09 at 1.20.11 PM.png

Now comes the fun part! With your box all assembled it is time to paint it up. I chose to paint the sides of my box a forest green, and the top and bottom a nice yellow green. For the inside of it, I painted it a bright orange. You can use any colors you want, so paint out your heart's desires! When the painting is dry, rub some cutting board oil over each side of the box so it looks more finished and glossy.

Arduino Nano 2040 Coding Time

IMG_9256.jpg
download.jpg

Now it is time to code it all up! We will first code up the Arduino portion of this project. Make sure the speaker, APDS 9960, and button is all connected to your pin board. For my sound box, I want it to turn on when the button is pressed, and use right and left gestures to go forward and back through my sound playlist. When I want to turn the sound box off, I just press the button one more time.

For my playlist, I loaded 5 MP3 songs into my Arduino which are: Fever by Dua Lipa, Me or Sum by Nardo Wick, Knocking on Heaven's Door by Bob Dylan, Dawn by Jean-Yves Thibaudet, and Self Control by Frank Ocean. A nice variety of pop, rap, rock, R&B, and classical. You will want to convert these sound files into the appropriate size for your Arduino, and I did this using Audacity. Here is Adafruit's tutorial on how to do this: https://learn.adafruit.com/adafruit-wave-shield-au...

Once your sound files are ready, you can begin coding. You can find my code attached to this step!

Circuit Playboard Coding Time

Now we need to code up our CPB with strip lights so the lights react when sound is played. Here you can find the code I used to do this.

Assembly Time

IMG_9264.jpg

Now it's time to put all the parts together! Place you Arduino and the board into the box, along with the CPB. Now, through the two holes on the top of the box, you want to loop the wires connecting to the speaker out of one, and the wires connecting to the APDS 9960 and button out of the other. For the whole of the side of the box, you want to loop through the wires connecting to the Arduino battery, CPB battery, as well as the strip lights. Once the wires are stretching out of the holes, attach the APDS 9960, button, speaker, and batteries to the appropriate wires. The finished product should look like the picture above.

Congratulations! You just finished making your sound box. Have a fun time gesturing left and right, and listening to your lovely tunes.