Using InMoov for a Prosthetic Arm

6908 views
Skip to first unread message

Brancante

unread,
Jun 16, 2013, 3:39:18 PM6/16/13
to inm...@googlegroups.com

Hello All, 

I have been playing around with an EKG/EMG Shield to detect a muscle movement to control the InMoov Hand.

 The progress is good, but needs a lot of work still.

 This is the first video I have made: http://www.youtube.com/watch?v=ZUIqR2JodlY

 

I am using the SHIELD-EKG-EMG from olimex: https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/

But this is a single Channel EMG and I am having a hard time decoding advanced movements. I have ordered a different shield with four channels.

I will continue the development and will post the updates and Tutorials.

gael langevin

unread,
Jun 16, 2013, 4:15:10 PM6/16/13
to inm...@googlegroups.com
Fantastic Brancante!
Didn''t expect through your email the other day, how advanced you were. I' m sure the Fablab of Rennes France will be happy to see this. This is full of promises!

Brancante

unread,
Jun 17, 2013, 7:14:51 PM6/17/13
to inm...@googlegroups.com
Thanks Gael.

As promised, here is a new video and the tutorial.

 

I have implemented new features, now I can make multiples movements controlled by the muscle with combination of specific modes. The modes can be configured by a smartphone and wifi.

 

Here is a small tutorial:

 

What you need:

 

InMoov Arm

Arduino uno R3

EMS Shild - https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/ (

Wifi Shield (UDP compatible)- http://www.ebay.com/itm/UART-WiFi-Server-Client-Module-Kits-Arduino-Compatible-with-shield-for-Arduino-/130766449058?pt=LH_DefaultDomain_0&hash=item1e7249a9a2

Software TouchOSC (for smartphone and Workstation) - http://hexler.net/software/touchosc

 

The Wifi Module should be configured as UDP Server with fixed IP (ip and network from phone hotspot) and 57600 bps

 

This is the TouchOSC Layout:

https://dl.dropboxusercontent.com/u/14231908/EMG.touchosc

 

 

This is the code for Arduino:

 

  #include <Servo.h>

  #include <compat/deprecated.h>

#include <FlexiTimer2.h>

#define SAMPFREQ 256                      // ADC sampling rate 256

#define TIMER2VAL (1024/(SAMPFREQ))       // Set 256Hz sampling frequency                   

volatile unsigned char CurrentCh=0;         //Current channel being sampled.

volatile unsigned int ADC_Value = 0;    //ADC current value

volatile unsigned int ADC_Value1 = 0;              //ADC current value

 

Servo myServo1;

Servo myServo2;

Servo myServo3;

Servo myServo4;

Servo myServo5;

Servo myServo6;

 

  int pos = 0;    // variable to store the servo position

  int modo = 0;

  int oscMsg[12];    // buffer for incoming OSc packet 

  int inByte = 0;    // incomming serial byte 

  int inbyteIndex=0;   // incomming bytes counter  

  float msgVal=0;    // resulting message value 

  void setup() 

  { 

 

 

   Serial.begin(57600);   // debug port 

  

 

  

myServo1.attach(13);   // pulso

myServo2.attach(8);   //dedo mindinho

myServo3.attach(9);  //dedo2

myServo4.attach(10);  //dedo3

myServo5.attach(11, 576, 2384); //indicador

myServo6.attach(12);  //poegar

 

  } 

  void loop(){ 

   

         int value99 = 0;  //contador de numero de vezes

         int value98 = 0;    //contador de ups

      

       while (value99 < 500) { //Here finds the muscle pattern.

      

      

             if (Serial.available()) {     // if we have new byte from LAN 

           

    if (getOscMsg()==1){        // add it to message while is is not ready

 

    if (byte(oscMsg[1]) != 32){   //para evitar o envio de mensagem vazia

     Serial.print(oscMsg[1]);  // or print the OSC message name 

     Serial.print(" / "); 

     Serial.println(msgVal);     // and vaule 

     int value = msgVal;

 switch(oscMsg[1]){

 

  

    case'a':

 

  if(value > 0 && value <= 180){

  modo = 1;    //variavel para determinar o movimento

          Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

  case'b':

 

  if(value > 0 && value <= 180){

  modo = 2;    //variavel para determinar o movimento

          Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

  case'c':

 

  if(value > 0 && value <= 180){

  modo = 3;    //variavel para determinar o movimento

        Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

    case'd':

 

  if(value > 0 && value <= 180){

  modo = 4;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

      case'e':

 

  if(value > 0 && value <= 180){

  modo = 5;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

        case'f':

 

  if(value > 0 && value <= 180){

  modo = 6;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

 }      

    }

    }

           }

      

      

         delay(1);

    

       

        

         ADC_Value = analogRead(CurrentCh);

         value99 = value99+1;

         if(ADC_Value > 400){

           value98 = value98 + 1;  //caso tenha o valor alto, adiciona um no contador

         }

           if(ADC_Value < 250){

           value98 = value98 + 1;  //caso tenha o valor alto, adiciona um no contador

         }

       }

 

      

      

        if (value98 < 25){ //off

        Serial.print("off");    //this is packet header for my application

        Serial.println(ADC_Value);

    

  myServo1.write(90);

  myServo2.write(10);

  myServo3.write(10);

  myServo4.write(10);

  myServo5.write(10);

  myServo6.write(10);

  delay(1);

 

     

        }

        else if (value98 >= 45){   //on

                  Serial.print("on");    //this is packet header for my application

        Serial.println(ADC_Value);

        Serial.println(value98);

       

      if(modo <= 1){ 

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // fechado

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(150);

  delay(1);

      }

           if(modo ==2){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(10);   // pinca

  myServo3.write(10);

  myServo4.write(10);

  myServo5.write(140);

  myServo6.write(150);

  delay(1);

      }

            if(modo ==3){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // aponta

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(15);

  myServo6.write(20);

  delay(1);

      }

                  if(modo ==4){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(15);   // Spider

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(15);

  myServo6.write(20);

  delay(1);

      }

   

             if(modo ==5){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // Joia

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(20);

  delay(1);

      }

                 if(modo ==6){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(15);   // hang

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(20);

  delay(1);

      }

   

        }

   

   

   

   

   

   

   

   

   

   

   

   

  }

 

 

 

 

 

 

 

 

 

 

 

  // function to process simple OSC message sent by TouchOSC for iphone / ipad

  float getOscMsg(){ 

   inByte=Serial.read();              // read next serial byte 

   if (inByte == 47){                 // if byte = slash it's message start 

    inbyteIndex=0;                  // and we set array pointer to 0 

   } 

   if ((inbyteIndex <= 11) && (inbyteIndex >= 0)){   // is it time to finish or can we start? 

    oscMsg[inbyteIndex]=inByte;            // we add the byte to the array  

    inbyteIndex++;                  // increase array counter 

   }  

   if (inbyteIndex == 11){              // end of the message 

    inbyteIndex=-1;                  // set the pointer to -1 so we stop processing  

    union u_tag {                   // this is array to float conversation routine 

     byte bytes[4];                 // I copied from Arduino.cc forum 

     float buffer; 

    }  

    u; 

    u.bytes[0]=oscMsg[11];              // to decode we have to supply bytes inr everse order 

    u.bytes[1]=oscMsg[10]; 

    u.bytes[2]=oscMsg[9]; 

    u.bytes[3]=oscMsg[8]; 

    msgVal = u.buffer;                // byte array to float 

    return 1;                     // signal we are ready to display value  

   }  

   return 0;                      // in this case the message is not ready yet  

Alan Hart R & D Robotics

unread,
Jun 19, 2013, 5:58:07 AM6/19/13
to inm...@googlegroups.com
Just had a look at your video and one of the comments  We would like to put the motors outside of the arm (for disabled people) and Gael langevin comes to meet us in Rennes at the end of June with Nicolas Huchet to explore solutions
 
This person must have been reading my mind, I am thinking of the possibility of the inmoov parts being printed in a way that they can be worn.  Having the motors on the outside in this case would enable a person that needs to have their hand / finger muscles restrengthend in physio. The hand could be worn and would help stop some of the muscle wastage. I have a friend that has nerve damage in her leg and has to have regular sessions where her carers just bend her legs up and down etc etc.
 
 
Alan
 

gael langevin

unread,
Jun 19, 2013, 8:00:54 AM6/19/13
to inm...@googlegroups.com
Fantastic Brancante,
I'm glad you have published this. I also heard you got in contact with the FabLab of Rennes, and they were impressed about your work. I beleive this prosthetic system could really be benefic for low budget help.
I have been looking for very small linear actuators to integrate the hand or in the forarm to reduce even more the space used by the servos. The challenge in Rennes is that the person, Nicolas Huchet, is missing the hand, and therefor the forarm isn't needed. So the idea is or to create a socket on the forarm with the actuators, or to totally modify the InMoov hand for to integrate small actuators inside.
This being said, it seems that linear actuators are slow, expensive and not very powerfull and I wonder how this could be processed differently.

Jackie Huen

unread,
Jun 19, 2013, 3:22:39 PM6/19/13
to inm...@googlegroups.com
This is a great project. I am a stroke survivor with engineering background, Can you give me some pointer to where I can get information/material regarding how to decode the signal and placement of the pad.
My goal is to make device to retrain the hand function of the stroke survivor.

Thanks for sharing

-Jackie

gael langevin

unread,
Jun 20, 2013, 3:20:46 AM6/20/13
to Jackie Huen, inm...@googlegroups.com
Hi Jackie,
If Brancante doesn't respond here, maybe it is best you get directly in contact with him. He has posted a more recent video with tuto and sketchs.


2013/6/19 Jackie Huen <yfh...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
To post to this group, send email to inm...@googlegroups.com.
Visit this group at http://groups.google.com/group/inmoov.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brancante

unread,
Jun 20, 2013, 10:07:27 AM6/20/13
to inm...@googlegroups.com
Hello Galel,

Sorry for the delay.

The guys from FabLab are doing a great project, I have seen their blog and I am very happy to be of help.

I think integrate actuators in the hand is a great way to solve the problem, but, because of their power and speed, you will probably have to reengineer the fingers, take a look at this article: http://www.sciencedirect.com/science/article/pii/S0957415813000172

I have order some very small servos, maybe if we extend the back of the hand, they could fit in, what do you think?
They are very cheap, so might be worth the test...

Finger.jpg

Brancante

unread,
Jun 20, 2013, 10:24:03 AM6/20/13
to inm...@googlegroups.com

Hello Jackie,

 

As myoelectric is something relative new, I could not find material about it.  My tip is start on the big muscles and attached to the computer to find your patterns and than take down to lower platform like arduino. I have ordered a myoelectric sensor with more channels so soon I will be able to decode more complex movements. For now I am combining the myoelectric stimulation with different modes chosen on a smartphone to be able to do practically any movements.   

 

Have you seen this: http://pranoysaji.wordpress.com/2013/05/30/myo-the-band-that-control-the-computer-by-listening-to-our-muscle-movement/

 

I think might be of help.

gael langevin

unread,
Jun 20, 2013, 11:14:17 AM6/20/13
to Brancante, inm...@googlegroups.com
@Jackie, did you get in contact with him?
@Brancante, yes this is the kind of mechanism that should be thought of, althought creating such small system with our printers isn't realistic. It would be too fragile. I was thinking of making the finger being the mechanism, instead of inserting a mechanism.
The little servos you got aren't expensive and should be nice for testing, I would suggest maybe some servos with metal gears for later. Good progress!


2013/6/20 Brancante <bran...@gmail.com>

--

Jackie Huen

unread,
Jun 20, 2013, 12:21:15 PM6/20/13
to Brancante, inm...@googlegroups.com
Thanks for the quick response. My goal is to show a virtual hand or like you to control a robot. Stroke survivor might be able to send signal to the
muscle, but the signal is weak due to brain injury, or the muscle is weak because of lack of use. Most of the time they don't 'see' the movement
and thinking that they cannot make the hand move, hence use the hand less. This a bad feedback loop. The less frequency to use the hand, the weaker the muscle. 
I hope to build the device to give the survivor a positive feedback, to show them a virtual hand or robot hand to give them visual feedback.

Just wondering if there is any material on the principle of decoding the signal ?
BTW, what is you system configuration ? Ant block diagram for me to learn from.
I hope Myo has a sdk for use to develop on.


Thanks



--
You received this message because you are subscribed to a topic in the Google Groups "InMoov" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/inmoov/vI1sG6WvnQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to inmoov+un...@googlegroups.com.

Brancante

unread,
Jun 20, 2013, 5:28:25 PM6/20/13
to inm...@googlegroups.com, Brancante

@ Jackie,

 

I see now what you mean! That is a good project. 

Since the muscle might have atrophy, the fine-tuning can be hard, but can be done. 

Everything I use is Arduino based. A Shield from Olimex to get the signal( OLIMEX-EKG/EM) and I a PC Software to see the patterns. The software is ElecGuru. (https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/resources/ShieldEkgEmgDemo.zip)

 I started with try and error to manage the first movements, but since you are going to have weaker signals, I recommend you reading this article:

http://www.stanford.edu/~shenoy/GroupPublications/RiveraAlvidrezEtAlIEEEEMBC2010.pdf

 

 

 

 

@ Gael,

 

Yes, that ought be very fragile, thus, not practical! 

 

Have you seen this Linear Servos?

http://www.hobbyking.com/hobbyking/store/__24184__Hobbyking_Ultra_Micro_Linear_Servo_HK_15006_AUS_Warehouse_.html

 

I am developing an Open Source Myoelectric Prosthetic Arm and the size and power consumption of the SparkCore will be decisive.  

Take a look:

 

http://youtu.be/38SnocWQFkM

Jackie Huen

unread,
Jun 20, 2013, 8:07:52 PM6/20/13
to Brancante, inm...@googlegroups.com
Brancante

I may need to duplicate your system and start experimenting on myself.
Thanks for the pointer.

-Jackie

10beema...@seecs.edu.pk

unread,
Oct 4, 2013, 7:12:07 AM10/4/13
to inm...@googlegroups.com
Hi,

I have started working on same idea as part of my electrical engineering major project but my area of focus is sEMG feature extraction and recognition. I used this single channel olimex emg shield but I need to get other shield with multiple channels. Despite of lot online search, I haven't been able to find one. Could you tell me what multi-channel EMG shield have you ordered?

Abrar Satar

unread,
Oct 9, 2013, 12:11:32 AM10/9/13
to inm...@googlegroups.com
Looks like there wont be much action going on on this thread, but I am doing a Mechanical Engineering Senior Design prosthetic arm and I will be using a mixture of Arduino and INMOOV. 
I think the shield he ordered was:

and it has the electrode attachment on the bottom of the page.

10beema...@seecs.edu.pk

unread,
Oct 9, 2013, 12:23:34 AM10/9/13
to inm...@googlegroups.com
Yes, I have this emg-ekg shield but it is single channel but my requirement is multiple channels. I have heard about multiple channel ads1298 pdk from texas instruments but seems its difficult to be used with arduino through SPI interface. Bracante has above mentioned that he has ordered a different shield with multiple channels, so I wanted to know which shield it is to use it in my project.

gael langevin

unread,
Oct 9, 2013, 4:30:22 AM10/9/13
to 10beema...@seecs.edu.pk, inm...@googlegroups.com
Hi, I will try to see if Brancante can answer directly. He hasn't been around for a while.

--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.

Uhebe UAV

unread,
Oct 11, 2013, 3:17:40 AM10/11/13
to inm...@googlegroups.com
Guys Awesome Project !

 I want to get started , my 3D printer will be arriving soon , and need to plan , I want to build a right hand and fore arm . to eventually evolve into my end goal which a bionic hand with super strength. this leaves me with a few questions. hope some one can help. with the InMoov hand as is what is the current grip force that the hand can deliver ? equal to human ? more ? less ? other question what is the total cost of manufacturing for a hand and forearm ? i want to start by designing a skin for the hand that has feeling.

Erin

unread,
Oct 21, 2013, 11:49:13 PM10/21/13
to inm...@googlegroups.com
Hi Every one, 

I have just completed an Honours thesis on "Controlling a Prosthetic Hand Using Surface EMG". I used the InMoov for my presentation. I did a lot of work on the signals analysis to clean up raw EMG data from the muscle and get an accurate classification of basic motion. I am now moving into Neural networks and AI to look at classifying complex motion using up to 8 EMG channels. 

I have attached a picture of my InMoov here. I will be doing a video in a few weeks and will also post that. Then finally when my honours paper is written I can share with you some of my data. Of course Geal you and all the open source community here have been credited with giving me the ability to build a functioning arm in my own lab. 

There is a lot of potential for this project. I personally have done most of my work in signals analysis and software but this work combined with mechanical improvements can make an accessible, cheap product for potential amputees. 
photo1.JPG
photo2.JPG

on track

unread,
Oct 22, 2013, 12:42:49 AM10/22/13
to Erin, inm...@googlegroups.com
Congratulations


Sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "InMoov" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/inmoov/vI1sG6WvnQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to inmoov+un...@googlegroups.com.

To post to this group, send email to inm...@googlegroups.com.
Visit this group at http://groups.google.com/group/inmoov.
For more options, visit https://groups.google.com/groups/opt_out.
<photo1.JPG>
<photo2.JPG>

Muhammad Abdullah

unread,
Oct 22, 2013, 7:15:38 AM10/22/13
to on track, Erin, inm...@googlegroups.com
Hello Erin,
Congratulations on your successful thesis.
I am working on the same project as my senior design project. Now-a-days I am focusing signal processing using matlab and lab chart.
What surface EMG data acquistion system did you use? I am just wondering is there a possibility of portable data acquisition system for EMG?
--
Muhammad Abdullah,
SEECS, NUST, Islamabad

Oleg Galtsev

unread,
Oct 25, 2013, 10:38:25 AM10/25/13
to inm...@googlegroups.com
I read about Bebionic hand and that guys use servos in the hand. I found some information how they build there fingers. It seems very easy(see point (C)): http://www.rehab.research.va.gov/jour/2013/505/images/belter505f02th.jpg
Full description about hands you can find by this link: http://www.rehab.research.va.gov/jour/2013/505/belter505.html

gael langevin

unread,
Oct 25, 2013, 11:16:37 AM10/25/13
to Oleg Galtsev, inm...@googlegroups.com
@Erin congratulation for your Thesis! I wrote to you some place to congratulate you, but I don't remember where.
@Oleg thanks for the links, I would have liked to get that in july when I was designing the new fingers for InMoov.

There is tonight 25/10/13 a Google Hangout about prosthetic with Adafruit and I will be talking about the new model which, I hope, will help the prosthetic community.


2013/10/25 Oleg Galtsev <ogal...@gmail.com>
I read about Bebionic hand and that guys use servos in the hand. I found some information how they build there fingers. It seems very easy(see point (C)): http://www.rehab.research.va.gov/jour/2013/505/images/belter505f02th.jpg
Full description about hands you can find by this link: http://www.rehab.research.va.gov/jour/2013/505/belter505.html

--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
Message has been deleted

Brancante

unread,
Oct 30, 2013, 6:57:43 PM10/30/13
to inm...@googlegroups.com
Hello All,

The Shield I ordered that can combine multiple channels is this: http://www.advancertechnologies.com/p/muscle-sensor-v3.html

But there is no need to combine many, you can work well with one or two. The point is to combine sequences of stimulations to execute different movements. You can also use the wifi on the phone to change the working mode of the prosthetic. 

gael langevin

unread,
Oct 31, 2013, 9:24:20 AM10/31/13
to Brancante, inm...@googlegroups.com
Hi Brancante,
Good to hear from you again. I tried to contact you about Make the world prosthetic, but you come back just a bit too late. :)
As you maybe saw in the last post I have been working on a new hand. That's the one I plan to set on my Beta Tester, Izgi that is her name.
Also, this new hand is not going to work with servos but with motors and potentiometers for feedback.
I'm ready to try to make this whole thing work but I certainly will need help to understand how to get it all operated.
I saw you have made a wiki page about prosthetic project, but I didn't go deep in details yet.
Besides the kit from Advancer, what do you recommand to get this quickly done?
Can you post here the link to your wiki page, I can't find it back right now.



Message has been deleted

Joel Hackett

unread,
Nov 5, 2013, 12:09:07 PM11/5/13
to inm...@googlegroups.com, Brancante
hi gael
a quick a dirty way to get your hand up and running it to transplant the circuit board out of a servo and wire it up to you're motor and pot, just need to use a servo with the same size motor or bigger and it should be fine. 

gael langevin

unread,
Nov 5, 2013, 6:48:09 PM11/5/13
to Joel Hackett, inm...@googlegroups.com, Brancante
Thanks guys,
I'm getting prepared for London and can't do a proper answer now, but I have read all your posts and will write again.


2013/11/5 Joel Hackett <jo...@thehackettfamily.org>

Oleg Galtsev

unread,
Nov 6, 2013, 12:28:05 AM11/6/13
to inm...@googlegroups.com, Joel Hackett, Brancante
Good luck!

среда, 6 ноября 2013 г., 2:48:09 UTC+3 пользователь gael langevin написал:

gael langevin

unread,
Nov 10, 2013, 4:23:16 AM11/10/13
to Oleg Galtsev, inm...@googlegroups.com, Joel Hackett, Brancante
Okay back from London, and a list of 62 emails waiting for answer :)
@brancante, I still didn't order the Advancers sensors, nor the mini Arduino. Next thing to do.
Once I have that I will seak into powering, let me know what you find best.
@jhack, yeah I had tried to hack a servo board with one of my pololu, but it was acting strange. The motor was jittering so I figured maybe it wasn't a good idea at the time. But if you say it is possible, if I respect the size of motor I will try again.



2013/11/6 Oleg Galtsev <ogal...@gmail.com>

Oleg Galtsev

unread,
Nov 21, 2013, 5:23:51 AM11/21/13
to inm...@googlegroups.com, Oleg Galtsev, Joel Hackett, Brancante
Gael, when do you planning to finish and show a new design of the hand?

John McGrath

unread,
Dec 4, 2013, 6:02:29 PM12/4/13
to inm...@googlegroups.com
Are you picking up all these different actions at once or are you changing the grip modes? in other words, could i simply do different actions with my hand to get this outcome or are you switching it from a fist to a point...

On Monday, June 17, 2013 7:14:51 PM UTC-4, Brancante wrote:
Thanks Gael.

As promised, here is a new video and the tutorial.

 

I have implemented new features, now I can make multiples movements controlled by the muscle with combination of specific modes. The modes can be configured by a smartphone and wifi.

 

Here is a small tutorial:

 

What you need:

 

InMoov Arm

Arduino uno R3

EMS Shild - https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/ (

Wifi Shield (UDP compatible)- http://www.ebay.com/itm/UART-WiFi-Server-Client-Module-Kits-Arduino-Compatible-with-shield-for-Arduino-/130766449058?pt=LH_DefaultDomain_0&hash=item1e7249a9a2

Software TouchOSC (for smartphone and Workstation) - http://hexler.net/software/touchosc

 

The Wifi Module should be configured as UDP Server with fixed IP (ip and network from phone hotspot) and 57600 bps

 

This is the TouchOSC Layout:

https://dl.dropboxusercontent.com/u/14231908/EMG.touchosc

 

 

This is the code for Arduino:

 

  #include <Servo.h>

  #include <compat/deprecated.h>

#include <FlexiTimer2.h>

#define SAMPFREQ 256                      // ADC sampling rate 256

#define TIMER2VAL (1024/(SAMPFREQ))       // Set 256Hz sampling frequency                   

volatile unsigned char CurrentCh=0;         //Current channel being sampled.

volatile unsigned int ADC_Value = 0;    //ADC current value

volatile unsigned int ADC_Value1 = 0;              //ADC current value

 

Servo myServo1;

Servo myServo2;

Servo myServo3;

Servo myServo4;

Servo myServo5;

Servo myServo6;

 

  int pos = 0;    // variable to store the servo position

  int modo = 0;

  int oscMsg[12];    // buffer for incoming OSc packet 

  int inByte = 0;    // incomming serial byte 

  int inbyteIndex=0;   // incomming bytes counter  

  float msgVal=0;    // resulting message value 

  void setup() 

  { 

 

 

   Serial.begin(57600);   // debug port 

  

 

  

myServo1.attach(13);   // pulso

myServo2.attach(8);   //dedo mindinho

myServo3.attach(9);  //dedo2

myServo4.attach(10);  //dedo3

myServo5.attach(11, 576, 2384); //indicador

myServo6.attach(12);  //poegar

 

  } 

  void loop(){ 

   

         int value99 = 0;  //contador de numero de vezes

         int value98 = 0;    //contador de ups

      

       while (value99 < 500) { //Here finds the muscle pattern.

      

      

             if (Serial.available()) {     // if we have new byte from LAN 

           

    if (getOscMsg()==1){        // add it to message while is is not ready

 

    if (byte(oscMsg[1]) != 32){   //para evitar o envio de mensagem vazia

     Serial.print(oscMsg[1]);  // or print the OSC message name 

     Serial.print(" / "); 

     Serial.println(msgVal);     // and vaule 

     int value = msgVal;

 switch(oscMsg[1]){

 

  

    case'a':

 

  if(value > 0 && value <= 180){

  modo = 1;    //variavel para determinar o movimento

          Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

  case'b':

 

  if(value > 0 && value <= 180){

  modo = 2;    //variavel para determinar o movimento

          Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

  case'c':

 

  if(value > 0 && value <= 180){

  modo = 3;    //variavel para determinar o movimento

        Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

    case'd':

 

  if(value > 0 && value <= 180){

  modo = 4;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

      case'e':

 

  if(value > 0 && value <= 180){

  modo = 5;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

        case'f':

 

  if(value > 0 && value <= 180){

  modo = 6;    //variavel para determinar o movimento

       Serial.print("MODO ");

          Serial.println(modo);

  value = 0;

  break;

  }

 

 }      

    }

    }

           }

      

      

         delay(1);

    

       

        

         ADC_Value = analogRead(CurrentCh);

         value99 = value99+1;

         if(ADC_Value > 400){

           value98 = value98 + 1;  //caso tenha o valor alto, adiciona um no contador

         }

           if(ADC_Value < 250){

           value98 = value98 + 1;  //caso tenha o valor alto, adiciona um no contador

         }

       }

 

      

      

        if (value98 < 25){ //off

        Serial.print("off");    //this is packet header for my application

        Serial.println(ADC_Value);

    

  myServo1.write(90);

  myServo2.write(10);

  myServo3.write(10);

  myServo4.write(10);

  myServo5.write(10);

  myServo6.write(10);

  delay(1);

 

     

        }

        else if (value98 >= 45){   //on

                  Serial.print("on");    //this is packet header for my application

        Serial.println(ADC_Value);

        Serial.println(value98);

       

      if(modo <= 1){ 

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // fechado

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(150);

  delay(1);

      }

           if(modo ==2){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(10);   // pinca

  myServo3.write(10);

  myServo4.write(10);

  myServo5.write(140);

  myServo6.write(150);

  delay(1);

      }

            if(modo ==3){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // aponta

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(15);

  myServo6.write(20);

  delay(1);

      }

                  if(modo ==4){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(15);   // Spider

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(15);

  myServo6.write(20);

  delay(1);

      }

   

             if(modo ==5){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(150);   // Joia

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(20);

  delay(1);

      }

                 if(modo ==6){

          Serial.print("MODO ");

          Serial.println(modo);

  myServo1.write(90);

  myServo2.write(15);   // hang

  myServo3.write(150);

  myServo4.write(150);

  myServo5.write(150);

  myServo6.write(20);

  delay(1);

      }

   

        }

   

   

   

   

   

   

   

   

   

   

   

   

  }

 

 

 

 

 

 

 

 

 

 

 

  // function to process simple OSC message sent by TouchOSC for iphone / ipad

  float getOscMsg(){ 

   inByte=Serial.read();              // read next serial byte 

   if (inByte == 47){                 // if byte = slash it's message start 

    inbyteIndex=0;                  // and we set array pointer to 0 

   } 

   if ((inbyteIndex <= 11) && (inbyteIndex >= 0)){   // is it time to finish or can we start? 

    oscMsg[inbyteIndex]=inByte;            // we add the byte to the array  

    inbyteIndex++;                  // increase array counter 

   }  

   if (inbyteIndex == 11){              // end of the message 

    inbyteIndex=-1;                  // set the pointer to -1 so we stop processing  

    union u_tag {                   // this is array to float conversation routine 

     byte bytes[4];                 // I copied from Arduino.cc forum 

     float buffer; 

    }  

    u; 

    u.bytes[0]=oscMsg[11];              // to decode we have to supply bytes inr everse order 

    u.bytes[1]=oscMsg[10]; 

    u.bytes[2]=oscMsg[9]; 

    u.bytes[3]=oscMsg[8]; 

    msgVal = u.buffer;                // byte array to float 

    return 1;                     // signal we are ready to display value  

   }  

   return 0;                      // in this case the message is not ready yet  

  } 

 


On Sunday, June 16, 2013 5:15:10 PM UTC-3, gael langevin wrote:
Fantastic Brancante!
Didn''t expect through your email the other day, how advanced you were. I' m sure the Fablab of Rennes France will be happy to see this. This is full of promises!

gael langevin

unread,
Dec 4, 2013, 6:56:29 PM12/4/13
to John McGrath, inm...@googlegroups.com
Hi John,
Brancante is using a smartphone or a Ipad for to switch modes, check his other videos it is very interresting.

Muhammad Abdullah

unread,
Dec 5, 2013, 8:36:47 AM12/5/13
to gael langevin, John McGrath, inm...@googlegroups.com
Hi,
Can somebody working on olimex emg shield, guide me how to use it? I am constantly getting noise on the Electric guru interface and it doesn't detect any muscle flexing or contraction?


On Thu, Dec 5, 2013 at 4:56 AM, gael langevin <hair...@gmail.com> wrote:
Hi John,
Brancante is using a smartphone or a Ipad for to switch modes, check his other videos it is very interresting.

--
You received this message because you are subscribed to a topic in the Google Groups "InMoov" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/inmoov/vI1sG6WvnQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to inmoov+un...@googlegroups.com.

To post to this group, send email to inm...@googlegroups.com.
Visit this group at http://groups.google.com/group/inmoov.
For more options, visit https://groups.google.com/groups/opt_out.

Oleg Galtsev

unread,
Dec 16, 2013, 9:48:30 AM12/16/13
to inm...@googlegroups.com

mick

unread,
Feb 15, 2014, 6:12:26 AM2/15/14
to inm...@googlegroups.com
Hi, Erin I m working on the similar project to yours can you help me with it?

Hema Palaniappan

unread,
Mar 4, 2014, 5:53:45 AM3/4/14
to inm...@googlegroups.com


  HI Brancante

i am actually developing an automated physiotherapy device...bt im nt sure how to detect the muscle movement via electric guru using olimex ekg shield...cn u let me know?

ahmed zikry

unread,
Mar 5, 2014, 12:01:54 PM3/5/14
to inm...@googlegroups.com

Hi ALL,

I'm New to this and i want to ask about two things 
1- from where can i buy the INMOOV arm and if there are more than version of it
2- Is there a manual for it showing the spec and how to make a controller over it 

Thanks in advance :)

Freddy Mike Angel Morando Hernandez

unread,
May 7, 2014, 1:55:57 PM5/7/14
to inm...@googlegroups.com
Hi Erin, I am trying to do the same project, but I have problems to find the patterns for each move of the fingers, can you suggest me a solution for classify the movements with a single channel? Thank you!

Dalia Danila

unread,
Jun 3, 2014, 1:37:22 PM6/3/14
to inm...@googlegroups.com
Hi Brancante,

I saw that the first time, you placed the electrods on different muscles. There is any particular reason for doing so?

Thanks,
Dalia



On Sunday, June 16, 2013 10:39:18 PM UTC+3, Brancante wrote:
> Hello All, 
> I have been playing around with an EKG/EMG Shield to detect a muscle
> movement to control the InMoov Hand.
>  The progress is good, but needs a lot of work still.
>  This is the first video I have made: http://www.youtube.com/watch?v=ZUIqR2JodlY
>  I am using the SHIELD-EKG-EMG from olimex: https://www.olimex.com/Products/Duino/Shields/SHIELD-EKG-EMG/But this is a single Channel EMG and I am having a hard time decoding

Mohit Chaudhary

unread,
Aug 16, 2014, 6:41:56 PM8/16/14
to inm...@googlegroups.com
Hey group,

I just came across this group when I was searching for help with the Olimex EMG/EKG shield.

I've already built a servo-driven prosthetic arm that is controlled by a bluetooth. (here's a link of a demo video - https://www.dropbox.com/s/k52t7q9jdi88el4/Robotic%20Hand%20Demo.MOV)

I am now looking to work on an upgraded version that is smaller in size, better grip, more hand configurations but ALSO will take a myoelectric input.

For now, I just simply want learn how to be able to turn on an LED when I flex a muscle! It may sound real juvenile but I have no clue how to register/record the input.
I'm running a macbook and its kinda old so I am not able to run electricguru. I'm not sure if its relevant but thought to share.

I could use some guidance and/or help! Thanks in advance!

- Mohit

Lei Shi

unread,
Aug 30, 2014, 9:34:26 PM8/30/14
to inm...@googlegroups.com
Hi All,

I'm undergoing a project related to EMG. I want to identify the finger movements with EMG signals so that we can use the finger gesture to type in any surface. 
Related projects like https://www.youtube.com/watch?v=X1r2TYvGpHo. In order to do that, I may need 6-channel EMG signals. Do you think I can do that with SHIELD-EKG-EMG, or do you have other sensors to recommend?

Best,
Lei


在 2013年10月30日星期三UTC-4下午6时57分43秒,Brancante写道:

Akshay Ravindran

unread,
Feb 1, 2015, 9:37:46 AM2/1/15
to inm...@googlegroups.com
Sir , i am building an arm similar to that of yours. We have managed to extract the emg signal and make the arm. i wish to replicate individual finger movements . Could you help us out by telling us as to how you managed individual finger movement classification from the input emg? how was the separation of individual movements done?

Gustavo Brancante

unread,
Feb 2, 2015, 6:46:46 AM2/2/15
to Akshay Ravindran, inm...@googlegroups.com
Hello Akshay,

Great that worked!

Can you share a video of it?

The individual finger movement are not from the emg, we do it by 2 different ways, by a combination of fast movements, for example if you do 3 fast movements in sequence means that is set for grab mode, if 2, point mode and so on. The other way is setting the mode in the smartphone....

Best,

Gustavo

Sent from Outlook




--
You received this message because you are subscribed to a topic in the Google Groups "InMoov" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/inmoov/vI1sG6WvnQc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to inmoov+un...@googlegroups.com.
To post to this group, send email to inm...@googlegroups.com.
Visit this group at http://groups.google.com/group/inmoov.
For more options, visit https://groups.google.com/d/optout.

gael langevin

unread,
Feb 2, 2015, 9:50:25 AM2/2/15
to Gustavo Brancante, Akshay Ravindran, inm...@googlegroups.com
Hi Gustavo, it's been a long time!

@Akshay
Using two sets of sensors will let you have a double way to control the hand.
Here (link) is a Arduino script used for to control the InMoov hand with two sets of Advancer Technologies for Nicolas Huchet.

Gael


--
You received this message because you are subscribed to the Google Groups "InMoov" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inmoov+un...@googlegroups.com.
new_bionico_rome14.ino

Gustavo Brancante

unread,
Feb 2, 2015, 9:56:36 AM2/2/15
to gael langevin, Akshay Ravindran, inm...@googlegroups.com
Hi Gael! 

I have also tried with too, but 1 to set the mode and the second for action. Is this how he has done? 

Best,
Gustavo

Sent from Outlook




gael langevin

unread,
Feb 2, 2015, 10:24:01 AM2/2/15
to Gustavo Brancante, Akshay Ravindran, inm...@googlegroups.com
Yes this is the way it is done
-One for mode
-One for action

Akshay Ravindran

unread,
Feb 2, 2015, 11:14:33 AM2/2/15
to gael langevin, Gustavo Brancante, inm...@googlegroups.com
Thank you so much gael and gustavo for the valuable suggestions .
@gabriel ,il share the video as soon as its uploaded. Right now i am trying to classify individual finger movements based on the emg signal features . do not know of its feasibility or ease but trying the same.
--

Regards,


Akshay S Ravindran

Hub Student Representative 

Travancore Hub| IEEE LINK  |

Chairman | IEEE SB TKMCE

+91-9447160653
✉ akshay.s....@gmail.com

Ali Lemus

unread,
Feb 4, 2015, 6:48:45 PM2/4/15
to inm...@googlegroups.com, hair...@gmail.com, bran...@gmail.com
Hi Guys!

I was pretty impressed by Microsoft's video of finger control, we have been struggling with this problem for some time :(, here are some experiments we have done: 

It is *very* hard to get "per finger" movement... I think the sensors (especially with only one sensor) are not accurate enough to pull it off... and *good* sensors such as OttoBock's are not only very expensive, but very hard to get :(

we ended up designing our own shields/booster packs in order to get more channels, but still those low cost sensors won't pull it off for everyday usage and get expensive after a while (need to be constantly replaced).
I really think the best choice right now for sensors is the myo (https://www.thalmic.com/en/myo/) since it gives you 8 high quality myoelectric sensors with a high reuse rate, bluetooth, battery, open source SDK, RAW data, etc. for USD $200... 
really cheap when you consider that professional sensors cost about USD $800 each! and they won't sell you just the sensor... 

c ya!

Ali Lemus

unread,
Feb 5, 2015, 11:35:58 AM2/5/15
to gael langevin, inm...@googlegroups.com, Gustavo Brancante
thanks for the video Gael!
I had seen the video in the InMoov website, I guess you guys were using a computer between the arduino and the Myo?

We are kinda waiting for the official launch of the Myo in order to get the source code so we can connect directly with the microcontroller (right now there are some limited hacks out there).
Today our patient is coming in and were going to do the Myo tests on him, will share results with the community. 

On Wed, Feb 4, 2015 at 7:11 PM, gael langevin <hair...@gmail.com> wrote:
Here is a video of the first test we have done with the myo arm band and the InMoov hand.
The main problem is the initialization sequence of the thalmic which  normally requires finger movements for calibration. Of course it is a problem when you are an amputee. Though it has been possible to bypass that calibration procedure.


gael langevin

unread,
Feb 5, 2015, 12:00:51 PM2/5/15
to Ali Lemus, inm...@googlegroups.com, Gustavo Brancante
Yes at the moment the Thalmic cannot correspond directly to the Arduino, we still need a computer in between. But the next launch should let us use the data directly which will be of course better.
Although the computer could be a small Odroid or Rasperry board, it adds extra components that could be avoided, such as batteries and wires.

I just saw the video you posted on YouTube, it's nice to see that your patient, even a with a short muscle proportion, can control the Advancer Tecnologies myo sensors and the InMoov hand. The voice control to change of actions seems to be working good as well.

Abheerup Bhalla

unread,
Feb 28, 2015, 12:23:43 AM2/28/15
to inm...@googlegroups.com
hey brancante, I've been working on designing such a multi finger prosthetic arm(emg controlled) using the same OLIMEX EKG EMG SHIELD & passive electrodes by OLIMEX.
As far as ElecGURU is concerned, the ECG, EMG signals are fine.
But i suppose we cannot just do the "per finger" decision making without interfacing this shield to MATLAB & doing some preprocessing (digital signal processing) on the shield data.
Is it true? Or is there any other way to actuate motors without it.?
What approach did you apply?

Kindly Reply.
...

gael langevin

unread,
Feb 28, 2015, 5:59:59 AM2/28/15
to Abheerup Bhalla, inm...@googlegroups.com
My recent tests with the MYO are posted here under. The results are impressive, I like the fact the MYO "remembers" calibration even if you remove it from your arm.
This makes the MYO a very possible option for everyday use.
I have created a script which relates my real fingers actions to the Inmoov2 hand. It is a bit laggy and I wonder if this is due to the different levels, MYO/computer/Arduino/driver/Motors or to my script.
Alessandro, Kevin and I are re-working a new script to check.
I will post a new video when done.
http://youtu.be/WNhZKFth9EM

--

Abheerup Bhalla

unread,
Feb 28, 2015, 3:40:11 PM2/28/15