Introduction: The Ultimate "Servo Claw Game"

About: Making neuroscience affordable and accessible to all with our DIY Neuroscience Kits

In this tutorial we will be creating a servo claw game which can be a fun way to make students learn about EMG and how the muscle signals can be used in controlling a prosthetic hand as the mechanism is almost the same in both the cases. When we flex our muscles, it produces muscle signals (EMG) which can be used as a trigger to move a servo motor which is attached to a claw, so whenever you flex your arm, the servo claw opens or close.

But before moving forward, let's understand a brief about Electromyography.

What is Electromyography (EMG)?

Electromyography is a technique that measures muscle response or electrical activity in response to a nerve’s stimulation of the muscle. We can use this electrical activity to detect neuromuscular abnormalities or create solutions for some crazy real-world problems like making artificial limb for amputees.

About Muscle BioAmp Shield:

Muscle BioAmp Shield is an all in one Arduino Uno Shield for Electromyography (EMG). It is perfect for beginners as it can be stacked on top of Arduino Uno to record, visualize and listen to the muscle signals to make amazing Human Computer Interface (HCI) projects. It also comes with various plug and play options so you can connect hundreds of devices like OLED screens, character displays, accelerometers, servo claw to name just a few using the I2C interface.

This is one of the product in the entire BioAmp series of sensors from Upside Down Labs which is designed in a way to teach you the basics of the instrumentation amplifier, active bandpass filtering, soldering, programming, neuroscience, Human Computer Interface (HCI), Brain Computer Interface (BCI), etc.

Supplies

HARDWARE:

DIY Neuroscience Kit Pro (Upside Down Labs Store | Amazon India | Tindie)

The kit includes:

  • BioAmp EXG Pill (Assembled)
  • Arduino Uno with USB Cable
  • BioAmp Cable (100cm)
  • 3 x Jumper Cables
  • NuPrep Skin Preparation Gel (25g)
  • Wet Wipes x 10
  • Repositionable Gel Electrodes x 3
  • Boxy Gel Electrodes x 100
  • Gel Electrodes (4 variants, 6pcs each)
  • Muscle BioAmp Band (EMG Band)
  • Brain BioAmp Band (EEG Band)
  • Heart BioAmp Band (ECG)
  • Electrode Gel (30ml)
  • Servo Claw
  • Muscle BioAmp Shield Kit
  • Muscle BioAmp Shield v0.3 (Assembled)
  • BioAmp Cable (100cm)
  • Muscle BioAmp Band (EMG Band)
  • BioAmp AUX Cable
  • Gel Electrodes (4 variants, 6pcs each)
  • STEMMA Cables x 6
  • 9V Snap Cable

1 nut bolt and a screwdriver

16 cubical blocks or 2 bowls with some handful of candies (depending on the kind of game you want to play)

SOFTWARE:

Arduino IDE

About DIY Neuroscience Kit Pro:

It is like your Neuroscience Lab in a Box which lets you explore the world of neuroscience by recording various biopotential signals of your body (EEG, EMG, ECG, EOG) and making amazing HCI and BCI projects.

Note: Alternatively for specifically making this project, you can get Muscle BioAmp Shield, Servo Claw, Arduino Uno with USB Cable, NuPrep Skin Preparation Gel, Electrode Gel seperately. But then you will have to assemble the Muscle BioAmp Shield on your own.

Step 1: Assembly

First of all, you have to assemble all the passive components on the Muscle BioAmp Shield PCB. For a step-by-step guide of the assembly, you can follow the video above or take a look at this interactive BOM.

Note: If you are getting the DIY Neuroscience Kit Pro, then it comes with the assembled version of Muscle BioAmp Shield. So you can skip this step in that case.

Step 2: Stacking on Arduino Uno

Stack the Muscle BioAmp Shield on top of Arduino Uno properly.

Step 3: Connecting Electrode Cable

Connect the BioAmp Cable to Muscle BioAmp Shield as shown in the connection diagram.

Step 4: Skin Preparation

Apply Nuprep Skin Preparation Gel on the skin surface where electrodes would be placed to remove dead skin cells and clean the skin from dirt. After rubbing the skin surface thoroughly, clean it with a wet wipe.

About Nuprep Gel:

Nuprep skin preparation gel is a mildly abrasive, highly conductive gel that should be applied before placing the electrodes on the skin to improve measurements. When applied gently, it strips away the top layer of skin and moistens the underlying skin layer which reduces the skin impedance with minimal skin irritation and discomfort.

Step 5: Electrode Placements

We have 2 options to measure the EMG signals, either using the gel electrodes or using dry electrode based EMG band. You can try both of them one by one.

Measuring EMG using Gel electrodes:

  1. Connect the BioAmp Cable to gel electrodes,
  2. Peel the plastic backing from electrodes
  3. Place the IN+ and IN- cables on the arm near the ulnar nerve & REF (reference) at the back of your hand.

Measuring EMG using Muscle BioAmp Band, a dry electrode based EMG band:

  1. Connect the BioAmp Cable to Muscle BioAmp Band in a way such that IN+ and IN- are placed on the arm near the ulnar nerve & REF (reference) on the far side of the band.
  2. Now put a small drop of electrode gel between the skin and metallic part of BioAmp Cable to get the best results.


Step 6: Download Arduino IDE

Download the Arduino IDE from the link given below:

https://www.arduino.cc/en/software

(We have used Arduino IDE version 1.8.19 for this project)

After downloading, connect the Arduino to your laptop using the USB Cable

Note: Make sure your laptop is not connected to a charger and sit 5m away from any AC appliances for best signal acquisition.

Step 7: Connect Servo Claw

Connect the servo claw to Muscle BioAmp Shield as shown in the video above.

Step 8: Coding Time!

Copy paste the Arduino Sketch given below in Arduino IDE and flash it on the Arduino board.

Claw Controller: https://github.com/upsidedownlabs/Muscle-BioAmp-Arduino-Firmware/blob/main/4_ClawController/4_ClawController.ino


Step 9: Testing of Servo Claw

The servo claw should work as shown in the video above. If it's working properly, then you can move ahead and move towards assembling it with Arduino Uno.

Step 10: Attach Servo Claw With Arduino Uno

Remove the Muscle BioAmp Shield from Arduino Uno.

Now attach the servo claw to Arduino Uno using a nut bolt as shown in the image above.

To make it look tidy, you can tie the wires around the holes using a thread or zip ties and then stack the Muscle BioAmp Shield on top of Arduino Uno again as we have done in the initial step.

Step 11: Connecting With Power Bank

To make this game portable, it's better to connect it with a power bank.

Step 12: Enjoy

Now you can create a game where you take 2 bowls, 1 empty and 1 full of candies. So your friends have to pick the candies from the filled bowl by clinching it in between the servo claw and then release it in the empty bowl. The goal can be to pick most candies in a limited time (maybe 60 to 90sec).

Alternatively you can have cubical boxes, so your friends have to stack them on top of each other and make 4 towers of 4 blocks each in 120 seconds. Whosoever builds it first, wins the game.

You can also think of some more creative ways to make similar games and have fun. We have already conducted various events in colleges and believe it or not but students are in awe of how unique the game is and everyone wants to give it a try.

Feel free to ask any questions in the comment box below. You can also mail us at support@upsidedownlabs.tech for any kind of support while making this project.