In this tutorial you'll learn how to download and install the Artichoke V1.2 firmware for the Ada robotic hand. Artichoke is the version of hand control firmware designed for the Ada hand, running on the Almond board.
This tutorial is for:
You will need:
Artichoke includes full serial control of individual fingers and grip patterns, muscle control through EMG sensors and provides a framework for adding extra functionality to the hand (nunchuck/joystick control). As with all of Open Bionics developer materials, this firmware is completely free to download and use, and we strongly encourage you to incorporate this into your projects, to improve it and build upon it.
DOWNLOADING AND INSTALLING FINGERLIB.H
Before downloading Artichoke, you need to download and install FingerLib.h, a custom finger control library. FingerLib.h is designed to run on a number of different Arduino compatible microcontrollers, and manages all of the low level motor control and handling of timers, it also includes various example sketches for simple finger control applications.
- Navigate to our GitHub www.github.com/Open-Bionics/FingerLib
- Download FingerLib as a ZIP
- Extract FingerLib-master.zip and rename it to 'FingerLib' instead of 'FingerLib-master'
- Move the FingerLib folder to your Arduino libraries folder (usually My Documents\Arduino\libraries)
- Restart Arduino by closing it and opening it again
DOWNLOADING AND INSTALLING ARTICHOKE
After FingerLib.h has been downloaded, we now need to download Artichoke and upload it to the Almond board.
- Navigate to www.github.com/Open-Bionics/Artichoke
- Download OpenBionics_Artichoke as a ZIP
- Extract Artichoke-master.zip
- Open the file OpenBionics_Artichoke.ino in the Arduino IDE
- Power up and connect the Ada hand to your computer
- Select the Arduino board (Arduino Mega 2560 or equivalent)
- Select the appropriate COM port (Instructions for Mac or PC)
- Upload the Artichoke firmware to the hand (if it is a right hand, the thumb may twitch when uploading)
- Once uploaded for the first time, the hand may be in demo mode
- Whilst in demo mode, the hand cycles through all of the various grips and finger movements
- See the next chapter to exit demo mode
Once uploaded to the Ada hand, connect to the hand via the Serial Monitor. On the bottom right hand corner of the Serial Monitor, set the baud rate to 38400, and set the line ending to 'Carriage Return'.
You should first be greeted with a printout of the firmware version number and board name, followed by a list of possible serial commands. The demo mode should then start, and can be disabled by entering 'A0', without the apostrophes. Entering 'A0' toggles whether demo mode will run on start up (default enabled), and entering 'D' will run demo mode once.
At any time, if you enter '?' the hand will print the list of serial commands, and entering 'A1' will toggle whether the serial commands display on start up. Note that all characters must be uppercase.
To select whether the Ada hand is a left or right hand, enter one of the following commands:
- H1 Set the hand to be RIGHT
- H2 Set the hand to be LEFT
- H View whether the hand is LEFT or RIGHT
With demo mode disabled, if you enter 'G0' the hand should close in grip pattern 0 (Fist Grip), if you enter 'G0' again it should toggle the hand open in grip pattern 0.
Try this with 'G#' where # is a number between 0 - 5 to perform a movement in a selected grip pattern, the grip patterns are as follows;
- G0 Fist Grip
- G1 Palm Grip (Fist Grip but with thumb extended)
- G2 Thumbs Up
- G3 Point
- G4 Pinch
- G5 Tripod (Pinch using both index and middle fingers)
For a more detailed explanation on the grip patterns and how to create custom grips, visit this tutorial.
The fingers can be controlled individually by entering 'F#', where # is a finger number between 0 - 4.
- F0 Thumb
- F1 Index
- F2 Middle
- F3 Ring
- F4 Pinky
POSITION AND SPEED MODIFIERS
You can also set the fingers to move to a certain position (P0 - P100) for a selected grip or finger, for example if you enter 'G5 P50' the hand will move to the halfway position of the Tripod grip, or with 'F1 P10' the Index finger will be almost fully closed (P0 = fully open, P100 = fully closed).
The speed can be set in a similar manner by entering 'G# S???', where ??? is a number between 0 - 255 (note that due to the PWM frequency, the motors will struggle to move at any value below around 200).
Both the position and speed can be added to a grip (G#) or a finger (F#) command at the same time, e.g. 'F1 P50 S240'
Using an advanced command 'A#' allows different modes and settings to be configured, a full list of these settings can be seen by entering the '?' command.
Muscle Control & extras
For details on the different control methods available within Artichoke V1.2, visit out Control Methods Guide.
IMPORTANT NOTE ABOUT I2C
The 2 data lines passed through the 3.5mm headphone port on the Almond board are connected to both I2C pins and analogue pins (through a 10k resistor). If the headphone port is being used for analogue data (e.g. muscle sensors), you should not initialise I2C. When using I2C (e.g Nunchuck), the analogue pins need to be pulled high to act as the pull ups for the I2C lines.
pinMode(A6,OUTPUT); pinMode(A7,OUTPUT); digitalWrite(A6,HIGH); digitalWrite(A7,HIGH);