One of our prime passions is to motivate the next great minds and ideas by posting informative step-by-step tutorials. To celebrate the launch of our fourth-generation muscle sensor, the MyoWare, we’ve revisited our most popular tutorial and simplified it down to just four major components!
This Instructable will teach you to build a bionic glove using our fourth-generation muscle sensor, the MyoWare. Simply flex your forearm muscle and hear the repulsor charge up, then relax your forearm to fire (lighting up the LEDs on your palm and playing explosion sound effects). As an added flair for realism, when you turn on the system, JARVIS’s voice takes you through the boot up and calibration sequence.
I AM IRON MAN!
Be sure to check out our Kickstarter campaign (running until June 6th) to pick up a kit that includes the four major components for this tutorial. As part of the campaign, we are donating one of our sensors for every five backers to Limbitless Solutions, a non-profit that builds and donates 3D-printed myoelectric prosthetic arms to children in need around the world.
About Advancer Technologies
Advancer Technologies is a company devoted to developing innovative biomechatronic technologies and applied sciences. Additionally, Advancer Technologies promotes all forms of interest and learning into biomechatronic technologies. To help cultivate and educate future great minds and concepts in the field, they frequently post free tutorials on how to build amazing projects using their technology. For more information, please visit www.AdvancerTechnologies.com.
Step 1: Gather the Materials
Materials
- Required:
- Small thin speaker – Adafruit, Sparkfun
- Lilypad MP3 – Sparkfun
- 3.7V LiPo Battery with JST connector – Adafruit, Sparkfun
- Note: Batteries less than 500mAh are not compatible with Lilypad on-board charger!
- 150mAh is used for this tutorial
- MyoWare™ Muscle Sensor – Kickstarter
- NeoPixel 12 LED Ring – Adafruit
- microSD card – Adafruit, Sparkfun, Amazon
- Optional, but makes things easier:
- Sticky-back Velcro* – Amazon
- Gloves* – Amazon (can substitute with others)
- Servo wire* – Amazon
Tools
- Soldering Iron & Solder
- 5V FTDI Cable* – Sparkfun
- LiPo Charger – Adafruit (suitable for both small and larger mAh batteries)
- Wire strippers
Software
Recommended reading
(Optional) Foam Armor:
The NeoPixel/LilypadMP3/MyoWare setup can be directly attached to any glove without making the painted foam armor as shown in the video. This tutorial will briefly go over how to make the foam armor at the end if you choose to go down that advanced route. However, the steps won’t be as in depth as the rest. There is a wealth of tutorials on how to make EPA foam Iron Man armor on the internet (YouTube, TheRPF.com).
Materials –
- 2mm EPA foam sheets – Ebay
- Dupli-color Toreador Red Metallic Spray Paint – Amazon, Advance Auto Parts
- Dupli-color Grey Scratch Filler Primer – Amazon, Advance Auto Parts
- Dupli-color Plastic Adhesion Promoter – Amazon, Advance Auto Parts
- Hot glue sticks
- Cardstock printer paper
Tools –
- Hot glue gun
- Exacto Knife
- Heat gun
Software –
* indicates the item can substituted with other similar products
Step 2: Rewire the Speaker
These thin speakers come with flimsy and fragile wires already soldered to them so we’ll want to first remove these and solder more robust wiring.
- Take out your soldering iron and remove the existing wires from the back of the speaker.
- Cut off a couple inches of the servo wire, rip off and throw away the yellow wire, and strip ~1/8 inch from each end of the red and black wires.
- Split one side of the red/black wire just enough to reach both solder tabs on the back of the speaker.
- Solder the red wire to the speaker’s positive (+) solder tab and black wire to the negative (-) solder tab.
Photo credit: Sparkfun
Step 3: Connect the Speaker to the Lilypad MP3
Next, we’ll solder the speaker wire to the Lillypad MP3.
- 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.
- 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 4: 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.
- Copy the sound files from our GitHub repository to the microSD disc.
- Insert the microSD disc into the Lilypad disc slot.
- Plug the LiPo batter into the JST battery port on the Lilypad
- Turn the Lilypad MP3 switch to ON.
- 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 5: 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.
- 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.
- 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 6: Connect the NeoPixel Ring to the Lilypad MP3
Next, we’ll solder the NeoPixel wire to the Lillypad MP3.
- 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).
- 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 7: 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.
- Connect the 5V FDTI programming cable to the Lilypad and a computer.
- Grab the Arduino NeoPixel test sketch from our GitHub repository and open it in the Arduino IDE.
- 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.
- 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.
- 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.
- The NeoPixel should turn on and loop through two light sequences.
Step 8: Wire the MyoWare Muscle Sensor
Almost done! All we have left is to connect up the muscle sensor and upload the final Arduino sketch.
- Measure the distance from your wrist to your elbow, cut off an equal length of servo wire, and strip both ends.
- 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.
- 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 9: Connect the MyoWare Muscle Sensor
Next, we’ll solder the MyoWare wire to the Lillypad MP3.
- 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).
- Solder the wires to the board and clip off any excess wire.
Step 10: 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.
- Snap three new electrodes onto the MyoWare sensor.
- 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.
- Plug the LiPo battery into the LilyPad and turn the LilyPad on.
- 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.
- 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 11: 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.
- Connect the 5V FDTI programming cable to the Lilypad and a computer.
- Grab the Arduino IronManRepulsor sketch from our GitHub repository and open it in the Arduino IDE.
- 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.
- 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.
- Disconnect the FDTI cable.
Step 12: 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.
- 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.
- Flex your muscle
- You should hear the power up SFX as the NeoPixel glows a dim red.
- 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 13: 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.
- Grab either the hot glue gun or the sticky backed velcro and the glove you’ve picked out.
- Attach the Lilypad and the speaker to the back side of the glove.
- 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 14: (Optional) Making the Foam Armor
- If you haven’t already, grab the armor files from the GitHub repository.
- Use Pepakura Viewer to open the finger armor files and print them on the cardstock paper.
- Open the palm armor files in Adobe Reader and print them on the cardstock paper as well.
- Cut out the paper pieces with an Exacto knife.
- Put on the glove and hold the finger armor pieces in their intended place to see if they are too big/small
- 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%
- 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.
- If they are not sized properly, you’ll need to adjust the scale in Pepakura.
- 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.
- Cut out the foam pieces with the Exacto knife.
- Cut 45 degree V-shaped grooves along the fold lines to get crisp bend lines.
- 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.
- 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.
- Apply a couple coats of plastic adhesion promoter on all the pieces. Follow instructions on the can.
- Apply a couple coats of the primer. Follow instructions on the can.
- Apply a couple coats of the toreador red paint. Follow instructions on the can.
- Apply a couple light coats of a clear coat to protect the paint.
- Hot glue the painted pieces to the base glove.
- Velcro the Lilypad MP3 to the back of the glove and fit the battery where ever there is room.
- Hot glue the NeoPixel to the palm.
Source: Bionic Iron Man Glove