Note, you might have to uninstall brltty if it conflicts with the Arduino ttyUSB0.
Here is the list of parts I used.
- MeArm (just the arm) comes with laser cut acrylic sheet, screws, nuts, and Turnigy TG9e servos
- JR servo straight extension wire 150mm to extend the cable to the gripper servo
- 12 way screw terminal (the servo connectors can be opened and the individual contacts can be put into the screw terminal)
- Arduino Diecimila with USB cable
- 2.1 x 5.5mm DC socket (one can solder wires to it and connect them to the screw terminal)
- 6V DC, 30 W power supply with 2.1 x 5.5 plug, 2.5 A would be enough though
- Adafruit Proto Shield with bread board
- insulated wire (colours red, black, and other colour)
- a computer
Install the dependencies as follows:
sudo aptitude install arduino-mk screen google-mock ruby-rspec ruby-serialport ruby-qt4
Create the initial calibration file:
cp calibration.hh.default calibration.hh
Note: You might have to change the BOARD_TAG in the arduino/Makefile. See /usr/share/arduino/hardware/arduino/boards.txt for supported board tags.
Then build the Arduino program using make:
You can also build and run the tests on the PC using the check target:
install on Arduino
The upload target will upload the program via /dev/ttyUSB0 to the Arduino board.
Warning: disconnect the servos from the power source while uploading the program to prevent erratic motion!
You can control the robot using the screen serial terminal:
screen /dev/ttyUSB0 115200
Examples of servo commands are:
- r: check whether drives are ready to receive more commands (1=ready, 0=busy)
- t: get time
- b: get base servo angle
- s: get shoulder servo angle
- e: get elbow servo angle
- g: get gripper servo angle
- B: get base servo pulse width
- S: get shoulder servo pulse width
- E: get elbow servo pulse width
- G: get gripper servo pulse width
- c: get current configuration (base, shoulder, elbow, and gripper)
- l: get lower limits for servos
- u: get upper limits for servos
- 45b: set base servo angle to 45 degrees
- -12.5s: set shoulder servo angle to -12.5 degrees
- 10e: set elbow servo angle to 10 degrees
- 30g: set gripper servo angle to 30 degrees
- 2400B: set base servo pulse width to 2400
- 1500S: set shoulder servo pulse width to 1500
- 1500E: set elbow servo pulse width to 1500
- 544G: set gripper servo pulse width to 544
- 1 2 3 4c: set configuration (base, shoulder, elbow, and gripper) to 1, 2, 3, and 4 degrees
- 1 2 3 4t: time required to reach the specified configuration
- ma: save teach point a (there are 12 teach points from a to l)
- 'a: go to teach point a
- pa: display configuration of teach point a
- x: stop all servos (in fact any undefined key should do)
You can exit the screen terminal using Ctrl-A \.
Warning: self-collisions of the robot can damage the servos!
Warning: closing the gripper too far on an object can damage the servo!
Note that because of the teach points the program is short on memory (1024 bytes on Arduino Diecimila). Memory corruption can cause self-collisions. However one can test the program without servos being powered.
- .: control software with tests
- arduino: software to upload onto Arduino board
- etc: prototype software, math, and simulations
You can edit the calibration.hh file and update the software on the Arduino. It is possible to specify the zero position and the resolution of each servo. Furthermore the limits for each servo can be adjusted in order to avoid self-collisions. The elbow and shoulder angles are limited against each other.
The zero configuration should look as follows:
- base aligned with platform
- shoulder pointing upward
- elbow horizontal
- gripper tongs at -45 and +45 degree
Thanks to Ian Patient for pointing out the Bernstein polynomials for achieving smooth robot motion.
- Arduino (also see forum)
- Instructions for MeArm with Arduino
- Google Test
- Turnigy TG9e servo (TG9e servo replacement)
- Control the position of a RC servo motor with your Arduino
- Multi-tasking the Arduino
- MeArm kinematics
- MeArm control using potentiometers
- MeArm inverse kinematics project
- Robot arm Arduino project for beginners
- MeArm 0.4 assembly
- Arduino Servo issues
- Compiling Arduino sketches using Makefile
- Arduino - The Documentary
- Sainsmart DIY 6-axis robotic arm
- ROS: Robot Operating System
- Orocos: Open robot control software
- Spong - Robot Dynamics and Control