Microbit - Myoware Muscle Sensor
by Thorsgaard Efterskole in Circuits > Microcontrollers
1179 Views, 2 Favorites, 0 Comments
Microbit - Myoware Muscle Sensor
![IMG_0895.jpg](/proxy/?url=https://content.instructables.com/FBO/LR6I/KV6O8ZFB/FBOLR6IKV6O8ZFB.jpg&filename=IMG_0895.jpg)
This is just a quick guide to show how you can connect a Myoware Muscle sensor to a micro:bit. The Myoware sensor can sense the tension of muscles, which is pretty cool, since it allows you to control your projects with your muscles.
Supplies
1 x Micro:bit
1 x Motor:bit
1 x Myoware Muscle Sensor
1 x 9 volt battery + battery holder
3 x Jumpwires (Male to female)
3 x Jumpwires (Alligator to alligator)
3 x Disposable Surface Electrode
Some wire (I use some in white, black and red)
Tools:
Soldering tools
Wire cutter
Soldering Wires to the Myoware Muscle Sensor
![IMG_0888.jpg](/proxy/?url=https://content.instructables.com/FRD/SO14/KV6O8ZFH/FRDSO14KV6O8ZFH.jpg&filename=IMG_0888.jpg)
So the first thing you want to do is to solder some wire to the myoware muscle sensor. From now on I shall just call it the muscle sensor.
I soldered
red to + (Voltage)
Black to - (Ground)
White to the last hole
Put the Electrodes on the Micro:bit
![IMG_0890.jpg](/proxy/?url=https://content.instructables.com/F5Z/2CPB/KV6O8ZFG/F5Z2CPBKV6O8ZFG.jpg&filename=IMG_0890.jpg)
Wiring
![IMG_0949.jpg](/proxy/?url=https://content.instructables.com/FTA/WO21/KV6O98T7/FTAWO21KV6O98T7.jpg&filename=IMG_0949.jpg)
![IMG_0950.jpg](/proxy/?url=https://content.instructables.com/F5M/Q4BD/KV6O98T6/F5MQ4BDKV6O98T6.jpg&filename=IMG_0950.jpg)
![IMG_0951.jpg](/proxy/?url=https://content.instructables.com/F1X/R3XS/KV6O98T8/F1XR3XSKV6O98T8.jpg&filename=IMG_0951.jpg)
Use the jumper wires to connect:
+ (Red/Voltage) to 5 volt on the motor:bit
- (Black/ground) to gnd on the motor:bit
Data (White wire) to pin 10 on the motor:bit
In theory the myoware sensor should be able to run directly from the micro:bit, but I find that its performance becomes to bad to really be useable.
Also connect the battery holder and battery to the motor:bit.
Programming
![Screenshot 2021-10-25 at 23.33.54.png](/proxy/?url=https://content.instructables.com/F5M/NVLH/KV6O99G2/F5MNVLHKV6O99G2.png&filename=Screenshot 2021-10-25 at 23.33.54.png)
The programming is rather easy. Remember I am danish, so the lanuage in the prorammer is sadly in danish.
First we go to the Makecode editor and start a new project.
We use AnalogRead on pin 10 where the myoware sensor is connected. The muscle sensor will give us a number betwen 0 and 1023, so we use the "map" block to get a number bewten 0 and 9 instead. We want the number to be a whole number, so we use the "Round off" block. We then show the number by using a "Show number" block in a "Forever" block.
You can also just find the program here.
Now Test It
![Myoware muscle sensor and microbit](/proxy/?url=https://content.instructables.com/F5V/QXXR/KV6O98TM/F5VQXXRKV6O98TM.jpg&filename=Myoware muscle sensor and microbit)
Put the eletrode pads on a big muscle group and try it out.
The myoware sensor is actuelly really sensitive when you use it with 5 volt and you will get a whole new level of awareness about when you tense or relax your muscles.