Developer Guide V1.0.4 Oct.
Contents SAFETY INSTRUCTIONS ................................................................................................................................................ 3 GENERAL INFORMATION .............................................................................................................................................. 4 1.SOURCE FILE .............................................................................................................................................................
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.
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.
3.Coordinate Origin of Base Coordinate (0,0,0) (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.
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.
/ 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.
6.
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.
Accessories Pump Universal Holder Gripper OpenMV Camera 3D Printing Kit Laser Engraving Kit Suction Diameter 5mm~10mm Max. Pressure 33kPa Max. Lifting Weight 1000g Feature With feedback Weight 36g Dimension(L*W*H) 62mm*25mm*15mm Material Aluminum Holder Diameter 14mm 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 Focal Length 2.
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.
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”.
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.
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.
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”.
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.
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.
2. Find the file named Marlin.ino in the Marlin folder and open it 3.
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.
6.Recover from the Wrong Code Sometimes you might want to go back to the official firmware and it’s too complicated to download the Arduino source code and download it. Or you flashed bad code to the uArm and you can’t even run it. Please try the offline flash tool here : https://drive.google.
Protocol 1.Introduction • uArm Gcode is an important part of the uArm software. • Based on the standard gCode protocol, we add a new protocol head in front of the gCode so that it can be more easily to use and debug. • What’s more, it is designed to be compatible with the standard gCode. (We offer the code of decode the standard gCode) 2.Example • Sending command from PC “#25 G0 X180 Y0 Z150 F5000” //move to [180,0,150] with the speed 5000mm/min • Reply from uArm “$25 ok” 3.
command. (In the example above, PC sends the command with ‘#25’ and uArm replies the command with ’$25’) Command without the underline: it’s the standard gCode. Caution 1.There should be blank space between each parameter; 2.
GCode Command (v1.2) Description Feedback 1. #n is used for the debug, if you don’t want to use it please remove it directly. (For Example: G2202 N0 V90\n) 2. ‘\n’ is the symbol of line feed. Moving Command (parameters are in underline) #n G0 X100 Y100 Z100 F1000\n Move to XYZ(mm), F is speed(mm/min) $n ok \n or $n Ex \n (refer to Err output) #n G1 X100 Y100 Z100 F1000\n After entering the laser mode $n ok \n or $n Ex \n (refer to Err (M2400 S1), command G1 output) means laser on, G0 means off.
#n M2201 N0\n attach motor, N is ID of joints(0~3) $n ok \n or $n Ex \n (refer to Err output) #n M2202 N0\n Detach motor, N is ID of joints(0~3) $n ok \n or $n Ex \n (refer to Err output) #n M2203 N0\n Check if the motor is attached, N is ID of joints(0~3) $n ok V1\n (1 attached,0 detached) #n M2210 F1000 T200\n buzzer,F is frequency, T is time (ms) $n ok \n or $n Ex \n (refer to Err output) #n M2211 N0 A200 T1\n Read EEPROM N(0~2,0 is internal EEPROM,1 is USR_E2PROM, 2 is SYS_E2PROM), A is add
#n M2245 Vbtname\n Set the name of Bluetooth, 11 letters limited (Do not add #n in $n ok \n this command) #n M2304 P0\n Please check the Grove modules below #n M2305 P0 N1\n Please check the Grove modules below #n M2306 P0 V1000\n Please check the Grove modules below #n M2307 P0 V1\n Please check the Grove modules below #n M2400 S0\n Set the mode of arm (0:Normal 1:Laser 2:3D printing 3:Universal holder) $n ok \n #n M2401\n Set the current position into the reference position $n ok \n #n M24
#n P2231\n Get the status of pump $n ok V1\n (0 stop, 1 working, 2 grabbing things) #n P2232\n Get the status of gripper $n ok V1\n (0 stop, 1 working, 2 grabbing things) #n P2233\n Get the status of limited switch $n ok V1 (1 triggered, 0 untriggered) #n P2234\n Get the status of power connection $n ok V1 (1 connected, 0 unconnected) #n P2240 N1\n Get the status of digital IO $n ok V1\n (1 High, 0 Low) #n P2241 N1\n Get the status of analog IO $n ok V295\n (return the data of ADC) #n P224
E25 Operation failure Grove modules Grove Num 1 2 3 4 5 6 7 Module Chainable LED RGB Button Slide Potentiometer Vibration Motor Light Sensor Angle Sensor Air Sensor Quality Commands Description Support Ports Return #n M2304 P3\n Deinit 3, 4, 5 $n ok\n #n M2305 P3 N1 V2\n Init Module 1 in Port 3. V is the number of LEDs chained.
8 Sound Sensor #n M2306 P1 V1000\n Set report interval (ms) 1, 2, 13 @11 P1 N7 V583\n #n M2304 P1\n Deinit 1, 2, 13 $n ok \n #n M2305 P1 N8\n Init Module 8 in Port 1 1, 2, 13 $n ok \n #n M2306 P1 V1000\n Set report interval (ms) 1, 2, 13 @11 P1 N8 V583\n #n M2304 P0\n Deinit 0 $n ok \n #n M2305 P0 N9\n Init Module 9 in Port 0 0 $n ok \n 0 @11 P0 N9 X2.0 Y2.0 Z2.0 H2.0 T2.0\n Set report interval (ms) 9 XYZ is the rotation angle of each axis.
13 14 15 16 Fan Electromagnet Temperature Humidity & #n M2304 P4\n Deinit 4, 8, 9 $n ok \n #n M2305 P4 N13\n Init Module 13 in Port 4 4, 8, 9 $n ok \n #n M2307 P4 V120\n Set Fan speed(0~255) 4, 8, 9 $n ok \n #n M2304 P3\n Deinit 3, 4, 5, 8, 9 $n ok \n #n M2305 P3 N14\n Init Module 14 in Port 3 3, 4, 5, 8, 9 $n ok \n #n M2307 P3 V1\n 1:turn on 0: turn off 3, 4, 5, 8, 9 $n ok \n #n M2304 P0\n Deinit 0 $n ok \n #n M2305 P0 N15\n Init Module 15 in Port 0 0 $n ok \n #n M23
19 Infrared Reflective Sensor #n M2304 P3\n Deinit 3, 4, 5, 8, 9 $n ok \n #n M2305 P3 N19\n Init Module 19 in Port 3 3, 4, 5, 8, 9 $n ok \n @11 P3 N19 V1\n #n M2306 P3 V1000\n 20 EMG Detector Set report interval (ms) 3, 4, 5, 8, 9 1: object detected 0: no detected #n M2304 P1\n Deinit 1, 2, 13 $n ok \n #n M2305 P1 N20\n Init Module 20 in Port 1 1, 2, 13 $n ok \n #n M2306 P1 V1000\n Set report interval (ms) 1, 2, 13 @11 P1 V583\n #n M2304 P0\n Deinit 0 $n ok \n #n M2305 P0 N21
/ 34
uArm Community UFACTORY Official Forum uArm User Facebook Group Ask for Help 33 / 34
Release Note Version 1.0.0 1.0.1 1.0.2 1.0.3 1.0.