Introduction: DIY LED Muscle Sensor Hat
Hello my name is Tuong Phan and I am a student from Universtity of West Florida. I am planning to create a Muscle Sensor LED hat. When our teacher Thomas Asmuth started to show off sensors I had an Idea of using a sensor that is activated through the body. I decided to use Muscle sensor as a way to activated LED to a hat.
Step 1: Materials, Library, and Site References.
Hat of any kind your choice :D
EMG Electrodes (more than 3 for repeated use)
Silicone Wire (make sure to buy different color to tell which wire is which or buy tape and label)
USB micro cable (make sure that whatever Arduino your buying has the right cable if it use something else switch to that cable)
hot glue gun (to stop those pesky wire from getting out of those soldering points in the LED strip)
6v battery - I used a container that hold 4 aa battery
Step 2: Wiring the Muscle Sensor
For wireing the Muscle Sensor don't pull off the electrode or put them in just yet.
Before soldering the wires into the muscle sensor I would recommend measuring where you want to have the muscle sensor and where you would want the arduino (nano or UNO).
- for the symbol (-) I recommend using black wire for ground
- for the symbol (+) I recommend using red wire for power
- for SIG I would use a color that you like.
if you want to use a single color I would tape and label each wire. (like I did)
after soldering the wire into the 3 slots It is best to reinforcing it by braiding the wire as an example of the 2nd image.
(before you solder onto the Arduino it is best to test it out using a breadboard and jumper wires)
I solder my wires to male jumper wires to help plug it into the Arduino to test it out before finally soldering into the Arduino
- solder the (+) to 3v in the Adruino
- solder the (-) to GND
- solder the SIG to A0
Step 3: Coding the Muscle Sensor
Thanks to the amazing tip from Adafruit with the analog inout serial. The code from this example was used as a way to use an if else statement that is tied to the output of the code and I than input the neo pixel library and their codes to turn on the LED and test it.
use the example before putting the neo pixel strip library inside.
file - examples - analog(or basic) - analoginoutserial
and run the code into the Arduino to test out the muscle sensor.
Step 4: Coding and Wiring LED As Well As Glueing or Sewing It to the Hat
The LED will have 3 slot
like before I recommend putting wire of appropriate color on your LED to help identify it
I Also solder one end of the male jumper cable to each slot and bread board out the destination.
- GND will be connected to GND
- 5v to 5v
- Din to D6 (since my code is design to be put into D6)
now it is time to use the Neo Pixel Library.
I use the color wipe from the library to set each action in the if else statement with the value of the output. If the output is low it is blue, if the output is medium range it is green, if the output is high it is red, and if it is at maximum it will blink.
if the code works and if you revised it and it still worked it is time to start working on the hat
after all is done it is time to finally solder all the pieces together and put the strip on the hat. you can either sow on the LED or glue it on. I glued mine.
to solder the led together follow the arrow from the base to the point. The first base of the arrow will be connected to the Arduino.
Step 5: Conclusion
now that everything is solder together and working you can change and edit things to your liking.
there is an error with embing the video so here a link of the LED hat
It isn't the most perfect project and there much to improve.