Robot arm v. 0.3.
Design Credit: Nikolaj Møbius, Mads Hobye and Nicolas Padfield, Bo Thorning.
We have made a super cheap (less than 1000 dollars) industrial robot arm to enable students to hack larger scale robotics and to enable small local productions to use robots in their processes without breaking the bank. It is a product of a 3 day sprint.
You can reproduce it yourselv with basic Fablab tools. All the diagrams and software are avaliable below. It is released under CC NC-BY.
More photos can be found here:
https://fablabruc.app.box.com/s/7d8s8wj5lszzbzeefliob6sq0lx58qhs
Video
First run:
Bruteforce testing:
Students experimenting with gesture control:
Gui
http://zapmaker.org/projects/grbl-controller-3-0/
https://github.com/grbl/grbl/wiki/Using-Grbl
How to build:
CNC Diagrams:
https://www.dropbox.com/sh/z767egd28nl7zxg/AAArs4eBXXDk09jff0cIiPuXa?dl=0
Parts (basic setup without hand):
- Arduino + Shield + Pins + Cables.
- Motorcontroller: dm860A (Ebay)
- Steppermotor: 34hs5435c-37b2 (Ebay)
- Kit ebay: http://www.ebay.co.uk/itm/151368935245?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
- M8x45+60+70 bolts and M8 bolts.
- 12mm Plywood.
- 5mm Nylon (Laser cut for gears).
- Blind washers 8mm.
- Wood Screws 4.5x40mm.
- M3 Counter sunk,
Wiring
This is the basic wiring of GRBL:
This is an image of our first version (without end-stops):
Green: Common enable.
Black: Common ground.
White: Dir XYZ.
Brown: Pulse XYZ.
The color codes on the steppermotors does not make sense. This is the order we found to be working:
Upload firmware
Installing firmware on Arduino - GRBL:
https://github.com/grbl/grbl/wiki/Compiling-Grbl
Note: You may get a conflict when compiling in Arduino. Remove all other libraries from your library folder (../documents/arduino/libraries).
Firmware setup
Set enable to newer timeout. Use a serial connection and write:
$1=255
Set homing:
$22=1
Remember to set serial to baud: 115200
Useful G-codes
Set zero point for robot:
G10 L2 Xnnn Ynnn Znnn
Use zero point:
G54
Typical initialization to center robot:
G10 L2 X1.5 Y1.2 Z1.1
G54
Move robot to position fast:
G0 Xnnn Ynnn Znnn
Example:
G0 X10.0 Y3.1 Z4.2 (return)
Move robot to position at specific speed:
G1 Xnnn Ynnn Znnn Fnnn
G1 X11 Y3 Z4 F300 (return)
F should be between 10(slooooow) and 600(fast)
Default units for X,Y and Z
When using default step/units settings (250 step/unit) for GRBL and
stepper drive set up for 800 step/rev the following units apply for all axis:
+- 32 units = +- 180 degrees
Processing code example:
This code can communicate directly with the Arduino GRBL.
https://github.com/damellis/gctrl
Remember to set serial to baud: 115200
Modified version with correct baud rate and homing command:
import java.awt.event.KeyEvent;
import javax.swing.JOptionPane;
import processing.serial.*;
Serial port = null;
// select and modify the appropriate line for your operating system
// leave as null to use interactive port (press 'p' in the program)
String portname = null;
//String portname = Serial.list()[0]; // Mac OS X
//String portname = "/dev/ttyUSB0"; // Linux
//String portname = "COM6"; // Windows
boolean streaming = false;
float speed = 0.001;
String[] gcode;
int i = 0;
void openSerialPort()
{
if (portname == null) return;
if (port != null) port.stop();
port = new Serial(this, portname, 115200);
port.bufferUntil('\n');
}
void selectSerialPort()
{
String result = (String) JOptionPane.showInputDialog(this,
"Select the serial port that corresponds to your Arduino board.",
"Select serial port",
JOptionPane.PLAIN_MESSAGE,
null,
Serial.list(),
0);
if (result != null) {
portname = result;
openSerialPort();
}
}
void setup()
{
size(500, 250);
openSerialPort();
}
void draw()
{
background(0);
fill(255);
int y = 24, dy = 12;
text("INSTRUCTIONS", 12, y); y += dy;
text("p: select serial port", 12, y); y += dy;
text("1: set speed to 0.001 inches (1 mil) per jog", 12, y); y += dy;
text("2: set speed to 0.010 inches (10 mil) per jog", 12, y); y += dy;
text("3: set speed to 0.100 inches (100 mil) per jog", 12, y); y += dy;
text("arrow keys: jog in x-y plane", 12, y); y += dy;
text("page up & page down: jog in z axis", 12, y); y += dy;
text("$: display grbl settings", 12, y); y+= dy;
text("h: go home", 12, y); y += dy;
text("0: zero machine (set home to the current location)", 12, y); y += dy;
text("g: stream a g-code file", 12, y); y += dy;
text("x: stop streaming g-code (this is NOT immediate)", 12, y); y += dy;
y = height - dy;
text("current jog speed: " + speed + " inches per step", 12, y); y -= dy;
text("current serial port: " + portname, 12, y); y -= dy;
}
void keyPressed()
{
if (key == '1') speed = 0.001;
if (key == '2') speed = 0.01;
if (key == '3') speed = 0.1;
if (!streaming) {
if (keyCode == LEFT) port.write("G91\nG20\nG00 X-" + speed + " Y0.000 Z0.000\n");
if (keyCode == RIGHT) port.write("G91\nG20\nG00 X" + speed + " Y0.000 Z0.000\n");
if (keyCode == UP) port.write("G91\nG20\nG00 X0.000 Y" + speed + " Z0.000\n");
if (keyCode == DOWN) port.write("G91\nG20\nG00 X0.000 Y-" + speed + " Z0.000\n");
if (keyCode == KeyEvent.VK_PAGE_UP) port.write("G91\nG20\nG00 X0.000 Y0.000 Z" + speed + "\n");
if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write("G91\nG20\nG00 X0.000 Y0.000 Z-" + speed + "\n");
//if (key == 'h') port.write("G90\nG20\nG00 X0.000 Y0.000 Z0.000\n");
if (key == 'v') port.write("$0=75\n$1=74\n$2=75\n");
//if (key == 'v') port.write("$0=100\n$1=74\n$2=75\n");
if (key == 's') port.write("$3=10\n");
if (key == 'e') port.write("$16=1\n");
if (key == 'd') port.write("$16=0\n");
if (key == '0') openSerialPort();
if (key == 'p') selectSerialPort();
if (key == '