Following this instructables you will be able to build a hand prosthesis actuated through the myoelectric impulses read from Myo armband by Thalmic Labs. This guide also provides:
- the code to send this data into cloud by using Intel Edison + Arduino breakout board so that orthopedics can follow the progress of the user and can suggest him exercises and use methodologies to gain a perfect control of his prosthesis.
- the code to analyze EMG and IMU data with Wolfram Mathematica. This way, using machine learning
algorithms, the best calibration for each user can be reached.
The prosthesis realized in this case is ADAM'S Hand. More info on this project:
- Mail: firstname.lastname@example.org
- Youtube: https://www.youtube.com/channel/UCz0uiRMYbn6oa_eO...
- Facebook: www.facebook.com/AdamsHandProsthesis/
- Twitter: www.twitter.com/Adams_Hand_
- Website: www.adamshand.it
Step 1: Flash Custom Firmware on the Bluetooth Module
- BLE module with TI CC2540 / CC2541 chip. A good choice is HM-11
CC Debugger or Arduino Uno/Leonardo with CCLoader sketch
Custom firmware for TI CC2541
Microsoft Windows Machine
Soldering equipment, breadboard and Dupont jumper.
- Solder the Dupont jumper as in figure (the pins DebugData, DebugClock and Reset are only used for flashing firmware).
- Download the CCLoader from https://github.com/RedBearLab/CCLoader
- Load the sketch "CCLoader.ino" that you find in the folder CCLoader-Master -->Arduino on the Arduino Uno or Leonardo board.
- Wire the HM-11 with the Arduino as in figure.
- Download the file MyoBridge_CC2541 and put it in the folder CCLoader-Master --> Windows.
Open Command Prompt in the folder Windows and execute the command: CCLoader.exe PortNumber MyoBridge_CC2541.bin BoardType (where PortNumber is the number of the serial port where Arduino is connected and BoardType is 0 or 1 respectively for Arduino Uno or Leonardo).
Wait a few seconds to flash the firmware and the module is ready to use.
Step 2: Connect Arduino to Myo Armband Through HM-11
- Arduino Uno/Leonardo
- Myo armband by Thalmic Labs (store.myo.com)
- Soldering equipment, breadboard and Dupont jumper
- Connect the following pins, as shown in the figure:
- HM-11 TX to Arduino RX (in our sketch SoftwareSerial is used, then the RX pin is D2);
- HM-11 RX via voltage divider or logic level shifter to Arduino TX (in our sketch SoftwareSerial is used, then the RX pin is D3). The voltage divider or logic level shifter protects the HM-11 from 5V of Arduino; in this example 20kohm and 10kohm resistors are used;
- HM-11 VCC to Arduino 3.3V output;
- HM-11 GND to Arduino GND.
- Download MyoBridge library from: https://github.com/vroland/MyoBridge and add it to Arduino IDE.
- Load the sketch "ReadMyo.ino" to Arduino board.
- Power ON the Myo by connecting it to your pc through USB cable and wear it. Disconnect Myo USB cable and open Arduino Serial monitor. Keep attention to the baudrate (in the sketch it's set to 115200).
- You should now be able to read EMG, IMU and POSE data, as shown in the serial monitor figure.
NOTE: If you don't want to print POSE, EMG or IMU data comment respectively lines 77, 134 and 144.
Step 3: Connect Sensor and Servo Motor to Arduino and Control Them With Myo
- Myo + HM-11 + Arduino from previous steps
- LM35 Temperature sensor
- 2 servo motors
- Dupont jumper
- Connect the servos and the temperature sensor as shown in the image.
- Load the sketch "ReadMyoServo.ino" to Arduino boar.
- Open the Arduino serial monitor with 115200 baud rate to read the sensors data and to control the servo with Myo pose signals.
Step 4: Send Myo and Other Sensors Data in Cloud With Intel Edison
- Intel Edison + Arduino Breakout Board
Myo + HM-11 + Arduino + Sensors and servo from previous step
- Connect Arduino to Intel Edison + Arduino breakout board through the serial line (Arduino TX to Edison RX and viceversa).
Connect the GND of the two boards.
- Load the sketch "ReadMyoServo.ino" to Arduino board.
Load the sketch “DataCloud.ino” to Edison board through Arduino IDE (modifying the SSID and Password of your wireless network)
Open the Arduino serial monitor with 115200 baud rate to read the IP address of your Intel Edison.
Open your browser at the Edison IP Address (use 8080 port, for example 192.168.1.101:8080) to read the values of the sensors in real time.
Step 5: Analyze Myo Data With Wolfram Mathematica
- Myo + HM-11 + Arduino from previous steps
- Wolfram Mathematica
- Load the sketch ReadMyo.ino on the Arduino board.
- Download "SerialIO.zip" from library.wolfram.com/infocenter/Demos/5726/...
Install it in /Users/username/Library/Mathematica/Applications. If you need more info you can check williamjturkel.net/2011/12/25/connecting-...
- Open the file "MyoMath.nb" and initialize the serial connection by evaluating the red (* SERIAL CONNECTION - OPENING *) cell; keep attention to the COM port and the Baudrate selection!
- Evaluate the blue EMG cell or the green IMU cell and enjoy it!
- Remember to close the serial connection by evaluating the red (* SERIAL CONNECTION - CLOSING *) cell.
NOTE: the actual version of ReadMyo software support just IMU and EMG separated readings. For this purpose, if you evaluate the blue EMG cell make sure that in the Arduino file the lines 144 and 77 are commented and line 134 is uncommented. On the other side, if you evaluate the green IMU cell make sure that in the Arduino file the lines 134 and 77 are commented and line 144 is uncommented.