element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Design For A Cause 2021
  • Challenges & Projects
  • Design Challenges
  • Design For A Cause 2021
  • More
  • Cancel
Design For A Cause 2021
Blog Design for a Cause 2021 - Robotic Hand (Blog #6) – Project Complete (Part 1)
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dwinhold
  • Date Created: 27 May 2021 11:12 AM Date Created
  • Views 587 views
  • Likes 8 likes
  • Comments 2 comments
  • design for a cause 2021
  • robot hand
  • dwinhold
  • arduino nano 33 iot
Related
Recommended

Design for a Cause 2021 - Robotic Hand (Blog #6) – Project Complete (Part 1)

dwinhold
dwinhold
27 May 2021

Design for a Cause 2021 - Robotic Hand (Blog #6) – Project Complete (Part 1)

 

Material:

  • Arduino Nano 33 IOT
  • 5 – Servos
  • 50lb Fishing Line (Simulate Tendons)
  • 3D Printed hand
  • INA828 Precision Instrumentation Amplifier chip
  • Surface Electrode Pads (Attach to arm)

 

 

Cost to complete the project:

· $185.00 CDN

· 50+ hours of time (Estimate)

 

 

Overview:

 

This project had to be the most challenging for me. Designing the hand to be 3D printed took a lot of time. I am very new to 3D printing so I through myself into the deep end with this. The sensor was fun to figure out how to make it work.

The 3D printed circuit board worked well but something I won’t do again until I learn more. It was a good thing I bought 2 INA828 sensors since I fried the first one (To many volts by accident).

Setting up the sensor pads was quite easy, just strap them on and plug into the board. The code to make the Arduino read the sensor was a new experience for me, but it went well.

My biggest issue with this whole project was deciding which to use, servos or stepper motors. Up to 4 days ago I was using stepper motors but found the ones I had didn’t have the strength to move the fingers fully. The servos I had worked great (Programming them is more involved).

 

 

Sensor:

 

The sensor is quite impressive!! The EMG sensor (electromyography sensor) measures small electrical signals generated by your muscles when you move them. EMG sensors and systems are used extensively in the fields of ergonomics, sports science and medical research.

The EMG sensor electrode pads are placed in the innervation zone of both tendons for better detection quality. The electrodes detect the electrical activity of the muscle which is amplified by the INA828 microchip. This signal is then sent to the Arduino to figure which finger to move. By setting parameters of the signal strength makes it easy to decide which servo to activate. I found that the location of the electrodes greatly changes the signal strength. Once I got the location pin pointed, each finger movement had specific signal strengths.

 

 

Example:

 

We’ll use the base signal of no muscle movement as 0.

 

The following are the signal strength of each finger:

     Small Finger: 200 - 300

     Ring Finger: 300 - 500

     Middle Finger: 900 +

     Index Finger: 700 - 900

     Thumb: 500 - 800


With this information I programmed the Arduino for finger movement.

 

 

Arduino Code:

 

Once I got started into programming the Arduino Nano 33 IOT it went fairly smooth. I did run into a few minor issues but that is what the internet is for. Below is the working code for the robotic hand.

 

 

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

#include "EMGFilters.h"

#include <Servo.h>

#define TIMING_DEBUG 1

#define SensorPin A0 // input pin number

EMGFilters myFilter;

SAMPLE_FREQUENCY sampleRate = SAMPLE_FREQ_500HZ;

NOTCH_FREQUENCY humFreq = NOTCH_FREQ_60HZ;

Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;

static int Threshold = 0;
const int stepsPer = 200;
int envlope = 0;
const int ledPin = 13;


unsigned long timeStamp;
unsigned long timeBudget;

int sensorValue = 0;         // the sensor value
int sensorMin = 200;        // minimum sensor value
int sensorMax = 0;           // maximum sensor value

void setup()
{
  myFilter.init(sampleRate, humFreq, true, true, true);
  Serial.begin(115200);
  timeStamp = micros();

  myservo1.attach(2);
  myservo1.attach(3);
  myservo1.attach(4);
  myservo1.attach(5);
  myservo1.attach(6);

    // turn on LED to signal the start of the calibration period. 1 second start notice
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);
  delay(250);
  digitalWrite(ledPin, LOW);
  delay(250);
  digitalWrite(ledPin, HIGH);
  delay(250);
  digitalWrite(ledPin, LOW);
  delay(250);
  digitalWrite(ledPin, HIGH);

  // calibrate during the first fifteen seconds
  while (millis() < 15000) {
    timeStamp = micros();
    int Value = analogRead(SensorPin);

    // filter processing
    int DataAfterFilter = myFilter.update(Value);

    int envlope = (sq(DataAfterFilter));
    // any value under threshold will be set to zero
    envlope = (envlope > Threshold) ? envlope : 0;
    
    sensorValue = envlope;

    // record the minimum sensor value while relaxed
    if (sensorValue < sensorMin) {
      sensorMin = sensorValue;
    }
  }

  // signal the end of the calibration period. 1 second notification to start program
  digitalWrite(ledPin, LOW);
  delay(250);
  digitalWrite(ledPin, HIGH);
  delay(250);
  digitalWrite(ledPin, LOW);
  delay(250);
  digitalWrite(ledPin, HIGH);
  delay(250);
  digitalWrite(ledPin, LOW);
  
}

void loop() {
    timeStamp = micros();
      
    int Value = analogRead(SensorPin);

    // filter processing
    int DataAfterFilter = myFilter.update(Value);

    int envlope = (sq(DataAfterFilter));
   
    envlope = (envlope > Threshold) ? envlope : 0;

      
    if (envlope < sensorMin){
    Serial.println("0");
    Serial.println(envlope);
    } 
     
    if (envlope > sensorMin + 200){
      
       if (envlope > sensorMin + 199  && envlope < sensorMin + 300){ //Small finger
       servo1(); //Goto function servo1
       Serial.println("1");
       Serial.println(envlope);
       delay(100);
       
      }
       
       if (envlope > sensorMin + 299 && envlope < sensorMin + 500){ //Ring Finger
       servo2(); //Goto function servo2
       Serial.println("2");
       Serial.println(envlope);
       delay(100);
       
      }

      
       if (envlope > sensorMin + 499  && envlope < sensorMin + 800){ //Thumb
       servo3(); //Goto function servo3
       Serial.println("3");
       Serial.println(envlope);
       delay(100);
       
      }
       
       if (envlope > sensorMin + 699 && envlope < sensorMin + 900){ //Index Finger
       servo4(); //Goto function servo4
       Serial.println("4");
       Serial.println(envlope);
       delay(100);
       
      }

       if (envlope > sensorMin + 899 && envlope < sensorMin + 5000){ //Middle Finger
       servo5(); //Goto function servo5
       Serial.println("5");
       Serial.println(envlope);
       delay(100);
       
      }
     
     delay(100);

  }
}

void servo1(){
  myservo1.attach(2); //Power to servo
  delay(15); //Short delay
  myservo1.write(180); //Turn servo 180°
  delay(1000); //Delay 1 second
  myservo1.write(0); //Return servo to 0°
  delay(1000); //Delay 1 second
  myservo1.detach(); //Power off to servo
}

void servo2(){
  myservo2.attach(3);
  delay(15);
  myservo2.write(180);
  delay(1000);
  myservo2.write(0);
  delay(1000);
  myservo2.detach();
}

void servo3(){
  myservo3.attach(4);
  delay(15);
  myservo3.write(180);
  delay(1000);
  myservo3.write(0);
  delay(1000);
  myservo3.detach();
}

void servo4(){
  myservo4.attach(5);
  delay(15);
  myservo4.write(180);
  delay(1000);
  myservo4.write(0);
  delay(1000);
  myservo4.detach();
}

void servo5(){
  myservo5.attach(6);
  delay(15);
  myservo5.write(180);
  delay(1000);
  myservo5.write(0);
  delay(1000);
  myservo5.detach();
}

Photos:

 

Below are photos of the finished robotic hand!!

 

image

 

 

 

image

 

image

 

image

 

image

 

image

 

Working Video:

 

I have been awake since 2am doing the final touches on this project. I will be uploading the video this afternoon to show how it all works!!

 

 

 

 

I want to thank our sponsor for organizing and supplying us with the Arduino Nano 33 IOT. This is a challenge that could help may people!!

 

Dale Winhold

  • Sign in to reply

Top Comments

  • javagoza
    javagoza over 4 years ago +1
    NIce! You did it! Congrats!
  • neilk
    neilk over 4 years ago +1
    Hi Dale Fantastic piece of work. well done!! Neil
  • neilk
    neilk over 4 years ago

    Hi Dale

     

    Fantastic piece of work. well done!!

     

    Neil

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • javagoza
    javagoza over 4 years ago

    NIce! You did it!

    Congrats!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube