Video: MyoWare Muscle Sensor demonstration with Maestro servo controller

Posted by Jon on 6 November 2015

Now that we are carrying Advancer Technologies’ MyoWare Muscle Sensor, it is time to update our demonstration video! I’ve had two whole years to add some mass to my biceps (during which time I continuously worked on those bad boys for a grand total of four weeks), and now I can proudly present to you these sick gains.

The demonstration is basically a redo of the original muscle sensor demo with the new sensor, except for a few small differences (honestly, my biceps are not that much bigger). In this setup, a 6-channel Maestro reads the muscle sensor’s analog voltage output and commands the position of a Power HD servo. The Maestro’s +5 V (out) pin supplies power to the MyoWare Muscle Sensor, and the servo and Maestro are powered by 4 rechargeable AA batteries. On a personal note, I found it really satisfying to use a single power source for this demonstration, which is not something you can do with the previous version of this muscle sensor, as it requires two supplies. (Be sure to check out the MyoWare Muscle Sensor’s product page to read about more ways the new muscle sensor improves upon the older version!)

This Maestro script is slightly more interesting than the script in the last demo, since the servo’s default direction of rotation was the opposite of the motion for a bicep curl (and we were already quite happy with the servo’s orientation with respect to my arm for the planned video footage). To get around this, and make the servo arm movement match the position of my arm during a bicep curl, I did some basic math and came up with an equation that you can see in the code below:

# Sets servo 1 to a position based on the analog input of the MyoWare Muscle Sensor.
begin
8000            # put this value on the stack (for why, see line 5)
0 get_position   # get the value of the muscle sensor's signal connected to channel 0
4 times minus    # y = -4x + 8000 , which is an equation we use to deal with the servo's
# default direction of rotation and scale the Maestro's Target
# value to roughly 4000-8000 (approximately 1-2 ms)
# which is the range of servo pulses that corresponds
# to the motion we want.
1 servo          # set servo 1 accordingly
repeat

You can, of course, use other devices to read the analog voltages from the MyoWare Muscle Sensor. If you have not already, you might try using one of our A-Stars!

If you have a project that uses the MyoWare Muscle Sensor, we would be pumped to hear about it!

HEY,

I'm trying to make the same thing as you (i'm swiss, sorry for my english) , I bought all the stuff you said, and assembled it and put the code in and nothing happened.

So I watched a video from you channel on youtube about the micro maestro 6-channel. I try just to simply move my servo power 3001HD and it doesn't work. When I'm in the maestro control center and move the slider from the correct pin my servo power doesn't move at all, it just make a little vibration noise.