Introduction: Bionic Iron Man Glove

About: The bionics wizards at Advancer Technologies are changing the world by helping homegrown inventors flex their creative muscles. From robots to video games to prosthetics, their muscle sensor, MyoWare™, g…

MyoWare 2.0 is now available! Check out the updated tutorial.

Step 1: Connect the Speaker to the Lilypad MP3

Next, we'll solder the speaker wire to the Lillypad MP3.

  1. From the topside of the board, insert the red/black wires into the Lilypad's left speaker pins (see picture).
    • The red wire should go in the positive (+) pin and the black wire in the negative (-) pin.
  2. Solder the wires to the board and clip off any excess wire.

You could alternatively use a 2-pin Molex, JST, or some other type of connector so the speaker can be disconnected from the rest of the setup.

Photo credit: Sparkfun

Step 2: Test the Lilypad MP3

Now that the speaker is connected. We should check to make sure this standard Lilypad MP3 setup is working properly before start hijacking pins for the NeoPixel and uploading new code.

The Lilypad MP3 comes with the Trigger sketch preloaded. This sketch will play a sound from the microSD disc when the associated trigger pin (T1, T2, T3, T4, and T5) are pulled to ground.

  1. Copy the sound files from our GitHub repository to the microSD disc.
  2. Insert the microSD disc into the Lilypad disc slot.
  3. Plug the LiPo batter into the JST battery port on the Lilypad
  4. Turn the Lilypad MP3 switch to ON.
  5. Using spare wire or alligator clips, connect/hold one end to the Lillypad's GND pin and tap any of the trigger pins. You should hear a different sound clip for each trigger pin.
    • If you don't hear any sound, double check that the positive pin on the speaker is attached to the positive left speaker pin on the Lilypad. Same with the negative pin.
    • If you still don't hear any sound, you might want to contact Sparkfun to help troubleshoot the Lilypad MP3.

Step 3: Wire the NeoPixel Ring

OK by this point, the Lilypad MP3 should be able to play sound through the speaker you've attached. Now, we're going to work on hooking up the NeoPixel ring to make an awesome glove repulsor.

  1. Cut off a reasonable length of servo wire (or three strips of wire if you're not using servo wire) and strip ~1/8 inch from both ends.
  2. From the bottom side of the board, insert the servo wire into the NeoPixels pins.
    • The red wire should go in the power (PWR / 5V DC Power) pin, the black wire in the ground (GND) pin, and the yellow wire in the input signal (IN / Data Input) pin.

You could alternatively use a 3-pin Molex, JST, or some other type of connector so the NeoPixel can be disconnected from the rest of the setup.

Photo credit: Adafruit

Step 4: Connect the NeoPixel Ring to the Lilypad MP3

Next, we'll solder the NeoPixel wire to the Lillypad MP3.

  1. From the bottom side of the board, insert the NeoPixel wires into the Lilypad's pin shown in the picture. The red wire should go in the positive (+) pin next to the JST battery port (labeled VBATT from below), the black wire in the negative (-) pin, next to the JST port (labeled GND from below), and the yellow wire in the ROT-LEDB pin (yellow arrow in the picture).
  2. Solder the wires to the board and clip off any excess wire.

Notes:

  • The ROT-LEDB pin connects to the D5 pin of the microcontroller.
  • The VBATT pin is unfortunately not switched which means the NeoPixel is always on when the battery is connected; you'll need to disconnect the battery when you turn off the Lilypad MP3 to avoid draining the battery. Or add a switch between the battery and the JST port. Or use a connector to wire the NeoPixel to the LilyPad and disconnect it when not in use.
  • You may have noticed the Lillypad uses a 3.3V based microcontroller and the NeoPixel is designed for 5V and are scratching your heads a bit on how this setup works. This setup (as recommended by Adafruit) works because the 3.7V of the battery powers the NeoPixel while the control signal is 3.3V and this difference is not too great for the NeoPixel's drivers to overcome. This is why the NeoPixel isn't connected to the 3.3V pin of the Lilypad.

Step 5: Test the NeoPixel Ring

Time to test the NeoPixel ring. To do this, we'll need to upload new test code to the Lilypad MP3's microcontroller.

  1. Connect the 5V FDTI programming cable to the Lilypad and a computer.
  2. Grab the Arduino NeoPixel test sketch from our GitHub repository and open it in the Arduino IDE.
  3. In the Arduino IDE, click on Tools and make sure the board is set to "Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328".
  4. Upload the sketch to the Lilypad MP3.
    • Note: Make sure the Lilypad MP3's power switch is set to ON. You'll get a sync error otherwise.
  5. Disconnect the FDTI cable, connect the LiPo battery, and turn the Lilypad on.
    • The NeoPixel should turn on and loop through two light sequences.
      • The first is a "rainbow comet" where the light travels around the ring in a clockwise fashion changing colors as it goes,
      • The second will "wipe" along the ring coloring each LED green and then pulse in brightness a few times before "wiping" the LEDs off.
    • These are the same sequences that occur when turning on the completed glove.

Step 6: Wire the MyoWare Muscle Sensor

Almost done! All we have left is to connect up the muscle sensor and upload the final Arduino sketch.

  1. Measure the distance from your wrist to your elbow, cut off an equal length of servo wire, and strip both ends.
  2. Insert the yellow wire into the muscle sensor's output signal pin (SIG), the red wire into the power (+) pin, and the black wire into the ground (-) pin.
    • Note: Unfortunately, the servo wire color order does not match the sensor's pin order so make sure you're connecting the wires correctly.
  3. Solder the wires to the muscle sensor board and clip off any excess wire.

You could alternatively use a 3-pin Molex, JST, or some other type of connector so the sensor can be disconnected from the rest of the setup.

Step 7: Connect the MyoWare Muscle Sensor

Next, we'll solder the MyoWare wire to the Lillypad MP3.

  1. From the bottom side of the board, insert the servo wire into the Lilypad's pins (see picture). The red wire should go in the 3.3V pin, the black wire in the ground (GND) pin, and the yellow wire in the first trigger pin (T1).
  2. Solder the wires to the board and clip off any excess wire.

Step 8: Test the MyoWare Muscle Sensor

You'll want to test the MyoWare to be sure it is setup correctly before uploading the new Arduino code.

  1. Snap three new electrodes onto the MyoWare sensor.
  2. Peel off the the electrodes and stick the MyoWare sensor to your forearm.
    • Place one of the electrodes that are connected directly to the MyoWare board in the middle of your forearm muscle with the other electrode placed along the length of the muscle.
    • Place the reference electrode nonadjacent to the muscle body that the other electrodes were placed.
  3. Plug the LiPo battery into the LilyPad and turn the LilyPad on.
  4. Turn the MyoWare sensor on if it isn't already.
    • The MyoWare sensor power LED should turn on at this point. If it does not, check your connections and make sure the LiPo is charged.
    • The second LED represents the output signal. If this LED does not turn off when your muscle is relaxed, check your connections and electrode placement.
  5. Next, make sure the MyoWare sensor is setup correctly by flexing your forearm muscle.
    • The second LED on the sensor board should light up when you flex your muscle and turn off when you relax. If it does not, check your connections and electrode placement.

Step 9: Upload the Arduino Sketch

You're so close!

By now...

  • the speaker has been tested and plays the sound clips from the Lilypad,
  • the NeoPixel has been tested and the Lilypad is able to turn
  • the MyoWare sensor has been tested and it's on-board LED lights up when flexing

It's time to upload the Arduino sketch.

  1. Connect the 5V FDTI programming cable to the Lilypad and a computer.
  2. Grab the Arduino IronManRepulsor sketch from our GitHub repository and open it in the Arduino IDE.
  3. In the Arduino IDE, click on Tools and make sure the board is set to "Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328".Yup, that's right; you need a 5V FDTI but use the 3.3V board setting... it's a bit unusual.
  4. Upload the sketch to the Lilypad MP3.
    • Note: Make sure the Lilypad MP3's power switch is set to ON. You'll get a sync error otherwise.
  5. Disconnect the FDTI cable.

Step 10: Test the Completed Hardware

Because you've been testing the system step-by-step, all that's left is to test to make sure the sketch was uploaded correctly.

  1. Snap on your MyoWare sensor, plug in the battery, and turn the bionic system on.
    • You should hear the start up SFX as the NeoPixel goes through its start up lighting sequence.
  2. Flex your muscle
    • You should hear the power up SFX as the NeoPixel glows a dim red.
  3. Relax your muscle
    • You should hear the firing SFX as the NeoPixel intensifies to a bright white.
    • After the firing sequence finishes, you should hear the power down sequence as the NeoPixel dims back to red.

Troubleshooting Tips (besides going back and testing phase individually)

  • If you feel like you have to flex too hard to get the system to trigger, you have a couple options:
    • Increase the MyoWare gain - get a screwdriver and turn the gain potentiometer on the sensor clockwise to increase the gain of the sensor. Warning - this could increase false triggering.
    • Decrease the system threshold in the Arduino code - the default threshold is just a suggestion you can increase it to make the system require a stronger flex to trigger or decrease to require a weaker flex. Warning - this could increase false triggering.
    • Adjust the MyoWare placement - improper electrode placement can lead to a smaller signal detected by MyoWare
  • If you are getting false triggering of the system, you have a couple options:
    • Decrease the MyoWare gain - get a screwdriver and turn the gain potentiometer on the sensor counter-clockwise
    • Increase the system threshold in the Arduino code
    • Adjust the MyoWare placement - improper electrode placement can lead to muscle cross-talk. Cross-talkbbb is when the signal from an adjacent muscle gets mixed in with the intended muscle's signal.

Step 11: Attaching the System to the Glove

If you aren't going to build the foam armor for the glove, the next step is pretty straight-forward.

  1. Grab either the hot glue gun or the sticky backed velcro and the glove you've picked out.
  2. Attach the Lilypad and the speaker to the back side of the glove.
  3. Attach the NeoPixel to the middle of the glove's palm.

Congratulations! You've just built your own bionic blaster glove. Now get started on the glove for the other hand!

Step 12: (Optional) Making the Foam Armor

  1. If you haven't already, grab the armor files from the GitHub repository.
  2. Use Pepakura Viewer to open the finger armor files and print them on the cardstock paper.
  3. Open the palm armor files in Adobe Reader and print them on the cardstock paper as well.
  4. Cut out the paper pieces with an Exacto knife.
  5. Put on the glove and hold the finger armor pieces in their intended place to see if they are too big/small
    1. If they are not sized properly, you'll need to adjust the scale in Pepakura.
      • Click on 2D Menu, go to Change Scale, and select either Scale Factor, Increase Scale 10%, or Decrease Scale 10%.
      • Scale Factor will allow you to change the scale in increments other than 10%
    2. You might need to repeat this step a few times before you get the scale correct. The armor in this tutorial was increased by 10% and then trimmed one at a time to get the fit to feel correct.
  6. Once satisfied with the scale, use the cardstock pieces and a sharpie pen to trace their outline on the foam sheets.
    • Make sure to label the foam pieces accordingly.
    • To make the opposite hand, simply flip the pieces over.
  7. Cut out the foam pieces with the Exacto knife.
    • Cut 45 degree V-shaped grooves along the fold lines to get crisp bend lines.
  8. Glue the pieces together with the hot glue.
    • For the palm armor, attach the knuckle piece to the lower palm piece first making sure to place the pieces that boarder the repulsor such that they form as close to perfect circle as you can. Take your time and make sure to get this part right. These are the most important pieces since the repulsor is the focal point of the armor and it will really stand out if the pieces boarding the circular repulsor aren't quite right.
    • Only glue the top palm upper piece at the end opposite of the Velcro section. This was used to embedd the speaker into the top of the glove.
    • Figure out how you want to position the Lilypad MP3 between the glove and foam armor upper palm. Cut a slot in the upper palm bottom section to allow the speaker to be slid through.
    • Position the speaker between the top and bottom upper palm pieces and cut out a circle in the top piece smaller then the diameter of the speaker.
    • If you used a connector to attach the NeoPixel to the Lilypad, cut a hole in the lower palm and thread the wire through such that the NeoPixel can be Velcroed/Glued to the foam armor but the wire can be threaded between the foam armor and the glove to the Lilypad on the upper palm.
  9. Gently wisk hot air over all the pieces's surfaces with the heat gun to seal the EPA foam.
    • Don't heat the foam too much or it will melt. Quickly waving the gun back and forth over the foam should be enough.
    • As the foam seals, you should be able to see the foam turn slightly shinier. Makes it easy to tell were the hot air has passed over already.
  10. Apply a couple coats of plastic adhesion promoter on all the pieces. Follow instructions on the can.
  11. Apply a couple coats of the primer. Follow instructions on the can.
  12. Apply a couple coats of the toreador red paint. Follow instructions on the can.
  13. Apply a couple light coats of a clear coat to protect the paint.
  14. Hot glue the painted pieces to the base glove.
  15. Velcro the Lilypad MP3 to the back of the glove and fit the battery where ever there is room.
  16. Hot glue the NeoPixel to the palm.
Coded Creations

Participated in the
Coded Creations

Halloween Costume Contest 2015

Participated in the
Halloween Costume Contest 2015

Mind for Design

Participated in the
Mind for Design