UFactory uArm Swift Pro Instruction Manual

1 / 34
Developer Guide
V1.0.4
Oct. 2017

2 / 34
Contents
SAFETY INSTRUCTIONS ................................................................................................................................................ 3
GENERAL INFORMATION .............................................................................................................................................. 4
1.SOURCE FILE .................................................................................................................................................................. 4
2.REFERENCE FRAME ......................................................................................................................................................... 4
3.COORDINATE ................................................................................................................................................................ 5
4.MOUNTING ................................................................................................................................................................... 6
5. BUTTONS & INDICATOR LIGHTS ...................................................................................................................................... 8
6.EXTENSION DESCRIPTION ................................................................................................................................................ 9
SPECIFICATIONS .......................................................................................................................................................... 10
APPLICATION INFORMATION ..................................................................................................................................... 12
1.SEND COMMAND OVER USB CABLE ............................................................................................................................... 12
2.SEND COMMAND OVER BLUETOOTH .............................................................................................................................. 14
3.THE 2ND UART ........................................................................................................................................................... 17
4.ARDUINO.................................................................................................................................................................... 18
5.ROS & PYTHON .......................................................................................................................................................... 20
6.OPENMV DEMO ......................................................................................................................................................... 20
6.RECOVER FROM THE WRONG CODE ............................................................................................................................... 21
PROTOCOL .................................................................................................................................................................... 22
1.INTRODUCTION ............................................................................................................................................................ 22
2.EXAMPLE .................................................................................................................................................................... 22
3.COMMANDS(TBD)·...................................................................................................................................................... 22
UARM COMMUNITY ...................................................................................................................................................... 33
RELEASE NOTE ............................................................................................................................................................ 34

3 / 34
Safety Instructions
1. Please don’t put your hands between the arms when uArm is moving.
2. Please use the official power supply for safety reasons.
3. Please clear a space for uArm, in case of knocking down anything.

4 / 34
General Information
General information for the robot arm, and it’s good to know before
developing.
1.Source file
Source code of Firmware for Swift Pro:
https://github.com/uArm-Developer/SwiftProForArduino
Source code of ROS for Swift Pro:
https://github.com/uArm-Developer/SwiftproForROS
Python library for Swift Pro:
https://github.com/uArm-Developer/pyuf
OpenMV example for tracking:
https://github.com/uArm-Developer/OpenMV-Examples
To be continued…(Arduino, C++, Raspberry Pi)
2.Reference Frame
(Right Motor)
(Left Motor)
(Base Motor)

5 / 34
3.Coordinate
(The picture in the right also shows the dynamic payload range of uArm.
Test condition: G2202 F1000; Red point is the Tool Center Point.)
Detail size of each arm and base.
Origin of Base
Coordinate (0,0,0)

6 / 34
The origin of base coordinate is in the center of the base. But the tool center
point is different for different end-effectors. And we also offer the different
commands for different usages.
Suction Laser Hot End Universal Holder
Currently we offer 4 kinds of mode:
M2400 S0 : Normal mode (end-effector tools: suction)
M2400 S1 : Laser mode (end-effector tools: laser)
M2400 S2 : 3D printing mode (end-effector tools: Hot End)
M2400 S3 : Universal holder mode (end-effector tools: universal holder)
For the gripper, there is no special mode since gripper has the fingers and can rotate
horizontally.
4.Mounting
Position of Tool Center Point for each End-effectors
PEN

7 / 34

8 / 34
5. Buttons & Indicator Lights
Caution: By default, the user defined button is for switching between Bluetooth and USB mode.
Please ensure the button is UP while communicating with uArm via USB.

9 / 34
6.Extension Description
Details of 30P Base Extension

10 / 34
Specifications
Specifications
Weight 2.2kg
Degrees of Freedom 4
Repeatability 0.2mm
Max. Payload 500g
Working Range 50mm~320mm
Max. Speed 100mm/s
Connector Micro USB
Wireless Bluetooth 4.0
Input Voltage DC 12V
Power Adapter Input:100~240V 50/60Hz; Output: 12V5A 60W
Operation Temperature &
Humidity
0℃-35℃ 30%RH-80%RH
noncondensing
Storage Temperature &
Humidity
-20℃-60℃ 30%RH-80%RH
noncondensing
Hardware
Joint Type Customized Gearbox + Stepper
Position Feedback 12 bit Encoder
Reducer Customized ultra-thin Gearbox
Dimension(L*W*H) 150mm*140mm*281mm
Mother Board Arduino MEGA 2560
Material Aluminum
Baud Rate 115200bps
Extendable I/O Interface I/O *27,IIC *1,5V*1,12V*1,Stepper*1
Software
PC Control uArm Studio
App Control uArm Play
For Developer Python/Arduino/ROS
Feature Open Source
Joint Speed & Torque
Speed Lifetime Torque
Base Motor 40°/s >3000h 12kg⋅cm
Left Motor 40°/s >3000h 12kg⋅cm
Right Motor 40°/s >3000h 12kg⋅cm
End-effector Motor 60°/s 500h 2kg⋅cm

11 / 34
Accessories
Pump
Suction Diameter 5mm~10mm
Max. Pressure 33kPa
Max. Lifting Weight 1000g
Feature With feedback
Universal Holder
Weight 36g
Dimension(L*W*H) 62mm*25mm*15mm
Material Aluminum
Holder Diameter 14mm
Gripper
Weight 58g
Dimension(L*W*H) 92mm*50mm*18mm
Material Aluminum
Max. Force 750~800g
Max. Size of Object 40mm
Max. Speed 20mm/s
Drive Mode Electrically-driven
Working Voltage/Current 6V/300mA
OpenMV Camera
Focal Length 2.8mm
FOV 115°
F-number f2.0
Programmable Method Micro Python
Weight 16g
Dimension(L*W*H) 45mm*36mm*30mm
3D Printing Kit
Type E3D v6
Consumption 35W
Nozzle Diameter 0.4mm
Max Temp 270 ℃
Material PLA
Max. Printing Speed 20mm/s
File Format .gcode
Printing Size(L*W*H) 10mm*10mm*10mm
Laser Engraving Kit
Laser Power 500mW
Working Voltage/Current 12V/5A
Wave Length 405nm
Weight 140g
Dimension(L*W*H) 55mm*33mm*88mm
Materials to Engrave Wood, Plastic, Leather, Feather,
Paper, etc.

12 / 34
Application Information
We would introduce several ways to play with the robot arm in different platform.
1.Send Command over USB Cable
Power on the uArm and open the Arduino IDE. And setting the board like the picture below.
Please make sure the port you are choosing is the correct port of uArm.
Open the serial monitor in the right side of Arduino IDE. After clicking, and you could hear
a beep which means the uArm is connected.

13 / 34
Set the parameter of serial monitor in the right bottom. If the setting is correct, you would
receive the detail information from uArm like the picture below.
Now, you are able to send the command to the uArm. Let’s send “G0 X250 Y0 Z130
F10000”.

14 / 34
If uArm finishes the movement, it replies “ok”.
Please check the chapter of Protocol (Page 20) in this guide to test more commands.
2.Send Command over Bluetooth
Plug in the Bluetooth stick. And press down the button beside the power button.
Power on the uArm. When the Bluetooth stick is searching, the blue indicator keeps blink
until the wireless connection is built up between stick and uArm. And the blue indicators in both
stick and uArm become solid.

15 / 34
Open the Arduino IDE. And setting the COM port like the picture below. Please make sure
the port you are choosing is the correct port of Bluetooth stick.
(Driver of stick: http://www.ftdichip.com/Drivers/VCP.htm )
Open the serial monitor in the right side of Arduino IDE. After clicking, and you could hear
a beep which means the uArm is connected.

16 / 34
Set the parameter of serial monitor in the right bottom like the picture below.
Now, you are able to send the command to the uArm. Let’s send “G0 X250 Y0 Z130
F10000”.

17 / 34
If uArm finishes the movement, it replies “ok”.
Please check the chapter of Protocol (Page 20) in this guide to test more commands.
3.The 2nd UART
Sometimes the 2nd UART is important for our project, for example you want another
Arduino to communicate with uArm.
During the design, we have had it in mind. There is the 2nd UART in the 30P base extension.
All the pins of extension board are connected with the Arduino MEGA 2560 directly so it’s
TTL level. And voltage above 5V might burn the IO out.

18 / 34
So wiring the UART with the jump wire and also the GND. Then the hardware set up is
finished. Then we have to change the main communication port from USB to the 2nd UART port,
since the code only supports one port to deal with the command.
Sending “#0 M2500” command over USB cable to switch the port, and there are several
point you should know:
1. The port will be switched immediately (both ports receive the reply “ok”), and the USB port
can not be used as the communication port any more, only 2nd UART port would work for
sending Gcode.
2. There is no way to switch port any more, the only way to use USB port is reset the system
by power button.
If it’s not convenient for your project, please try to modify the source code following the
steps below:
1. Download the Arduino source file in Github.
2. Find the file named uArmSerial.cpp and modify the code in line 16 from _serial=&serial; to
_serial=&serial2; .
3. Find the file named uArmService.cpp and modify the code in line 693 from
commSerial.setSerialPort(&Serial); to commSerial.setSerialPort(&Serial2); .
4. Rebuild the files and download the code to uArm.
4.Arduino
The main code is written by Arduino IDE. Please check the link below:
https://github.com/uArm-Developer/SwiftProForArduino
How to compile and upload the file?
1. Download the code and extract it to your Arduino libraries folder (normally it’s in
C:/Users/ufactory/documents/Arduino/libraries/)

19 / 34
2. Find the file named Marlin.ino in the Marlin folder and open it
3. Plug in the USB cable and power port then turn on the power button

20 / 34
4. Select the correct port and type of Arduino board like the picture below
5. Click the upload button to finish the uploading
5.ROS & Python
Currently we released the library of Python and ROS. For more information please check the
link below.
Source code of ROS for Swift Pro:
https://github.com/uArm-Developer/SwiftproForROS
Python library for Swift Pro:
https://github.com/uArm-Developer/pyuf
6.OpenMV Demo
And also the demo of OpenMV:
https://github.com/uArm-Developer/OpenMV-Examples
You could find the details steps in quick start guide.
Other manuals for uArm Swift Pro
3
Table of contents
Other UFactory Robotics manuals

UFactory
UFactory uArm Swift Pro Operator's manual

UFactory
UFactory xArm User manual

UFactory
UFactory uArm Controller User manual

UFactory
UFactory LITE 6 User manual

UFactory
UFactory xArm6 User manual

UFactory
UFactory LITE 6 User manual

UFactory
UFactory uArm Swift Operator's manual

UFactory
UFactory xArm 5 User manual

UFactory
UFactory uArm Controller User manual

UFactory
UFactory xArm User manual