Step 4: Electronics

Now it's time to make the box work! Follow these steps carefully, and it should work. You will need:

  • 1x Gemma M0
  • 1x Lithium Ion Polymer Battery
  • 1x Piezo
  • 3x LEDs
  • 3x 220 Ω Resistor (Red, Red, Brown, Gold)
  • 1x 10k Ω Resistor (Brown, Black, Orange, Gold)
  • 1x Medium Vibration Sensor
  • 2 yards of insulated wire
  • Something to make holes with!

 

adafruit_products_PokeToGif.gif

Take the top of your box and poke holes where you want the LEDs to come through. Make sure that you use the tree to measure where you want the LEDs.

adafruit_products_PokeTreeToGif.gif

Put the tree on to the box, and poke holes through it so that the LEDs can go through. In other words, poke holes in the tree even to the holes you poked into the box.

adafruit_products_LedToGif.gif

Put the LEDs through the holes on the box top. make sure to mark which side is positive and which is negative. Because of our layout, please put the positive side of the LEDs on the right.

adafruit_products_GlueTreeToGif.gif

Warm up your hot-glue gun and put glue on the back of the tree. Place it carefully on the box, making sure the LEDs go through the holes.

adafruit_products_SolderResistorToGif.gif

Connect the positive wire on the LED to a 220 Ω resistor. Then, solder the two together.

adafruit_products_SolderLedWireToGif.gif

Connect the resistors together. If needed, solder a wire to one of them so it can be extended.

adafruit_products_SolderLedWireAllToGif.gif

Now, solder all of the resistors together. You may need a lot of solder to do so.

adafruit_products_SolderToLedWireToGif.gif

Cut a 1 ½ inch wire, and strip both ends. Then, connect one side to the resistors you just soldered. Touch your soldering iron to the solder joint you just made, and add your new wire to it.

adafruit_products_SolderLedWireToGemmaToGif.gif

Take the wire you just soldered and make a hook on  the other side. Attach that to pin D0 on the gemma, and solder it.

adafruit_products_SolderNegativeLed1ToGif.gif

Next, we are going to solder the negative sides of the LEDs to the gemma. Cut 3 1 inch piece of wire and strip it. Then, solder them to the negative side of the LEDs. 

adafruit_products_SolderNegativeLedTogetherToGif.gif

Solder the 3 wires together, as shown in the picture.

adafruit_products_SolderLedNegativeToGemma2ToGif.gif

Cut another 1 inch wire and solder it to the LED's negative wires. Then solder the wire to the Gemma's Gnd pin.

adafruit_products_SolderWireShakePositiveToGif.gif

Get your vibration sensor out and connect the copper wire to a 1 ½ inch wire as shown in the picture.

adafruit_products_SolderWireShakeWireNegitiveToGif.gif

Take out your 10k Ω resistor and cut a inch long wire and connect them both to the middle wire. Then, solder them together.

adafruit_products_SolderWireShakeToGemmaToGif.gif

Take the first wire you soldered to the sensor and connect it to the 3vo pin on your Gemma. Then, solder it on.

adafruit_products_SolderResistorShakeToGemmaToGif.gif

Solder the resistor to Gnd on the Gemma board.

adafruit_products_SolderWiteShakeTriggerToGemmaToGif.gif

Solder the last wire to D1 on the Gemma board.

adafruit_products_SolderPiezoGndToGif.gif

Now it's time to set up the music! Cut a 1 ½ inch long piece of wire and solder it to your already used Gnd pin. To do so, place the tip of the iron onto the Gnd pin, and place the new wire onto the solder joint. Take off the soldering iron, and the joint will be complete!

adafruit_products_SolderPiezoGnd2ToGif.gif

Connect the other side of the wire to any pin on the piezo and solder it on.

adafruit_products_SolderPiezoPositive2ToGif.gif

Take another wire, about the same size, and solder it onto the other pin on the piezo.

adafruit_products_SolderPiezoPositive3ToGif.gif

Take that wire and connect it to pin D2 on the Gemma M0. Then, solder it on.

You're done with the hardware! Now let's open up Arduino and start coding!

This guide was first published on Dec 22, 2017. It was last updated on Dec 22, 2017. This page (Step 4: Electronics) was last updated on Dec 23, 2017.