QD022 Robot Arm Tutorial V1.3
QD022 Robot Arm Tutorial V1.3
com
Perface
Our Company
ACEBOTT STEM Education Tech Co.,Ltd
Founded in China's Silicon Valley in 2013, ACEBOTT is a STEM education solution
leader We have a team of 150 individuals, including members from research and
development, sales, and logistics. Our goal is to provide high-quality STEM education
products and services to our customers. We are working together with STEM
education experts and our business partners to produce successful STE products
together Our self-own factory also provides CEM services for our clients including
Logo customization on product packaging and PCB.
Our Tutorial
This course and robot arm learning kit are designed for children and teenagers aged 8
and above. It aims to provide a deeper understanding of the ESP32 controller board,
robot arm knowledge, and electronic hardware. If you want to learn about robot arms,
this kit offers knowledge and operational steps to help you build your own robot arm.
Overall, the ACEBOTT robot arm is a learning kit designed specifically for beginners
and is based on the ESP32. Using this kit, users can gain a comprehensive
understanding of the controller board and servos in a robot arm. By following the
tutorials provided in the kit, students of different age groups can acquire valuable
knowledge about robot arms and successfully build their own robot arm projects.
Customer service
ACEBOTT is a dynamic and fast-growing STEM education technology company that
strives to offer excellent products and quality services that meet your expectations.
We value your feedback and encourage you to drop us a line at [email protected]
with any comments or suggestions you may have.
Follow Us
Scan the QR codes to Follow Us for troubleshooting & the latest news.
We have a very large community that is very helpful for troubleshooting and we also
have a support team at the ready to answer any questions.
Contents
A robot arm consists of three basic parts: the main body, the drive system, and the
control system. The main body primarily includes the chassis, shoulder, Elbow, and
end effector. Depending on different application scenarios, the main body of the robot
arm can be divided into four-axis, five-axis, six-axis, or even multi-axis configurations.
The drive system includes power devices and transmission mechanisms, with the core
components being the reducer and servo motor, which drive the robot arm to perform
corresponding actions. The control system issues command signals to the drive
system according to the input program, controlling the movement of the robot arm.
The robot arm in this tutorial is a four-axis robot arm. The first axis is the chassis servo,
the second axis is the shoulder servo, the third axis is the elbow servo, and the fourth
axis is the claw servo.
The robot arm in this tutorial uses a mainstream ESP32 controller board as its main
controller, and programming in the Arduino IDE. Control methods include joystick
control, web control and app control.
How is the robot arm specifically controlled? Let's continue with the tutorial and learn
together.
1
E-mail:[email protected] https://acebott.com
Ⅰ.Hardware Understanding
2
E-mail:[email protected] https://acebott.com
Ⅱ.Software Installation
In the robot arm project, we will primarily use the Arduino IDE as the programming
software. It is an open-source programming platform compatible with various boards
such as Arduino UNO, ESP32, ESP8266, STM32, and more. Using the Arduino IDE,
you simply write your program code within the IDE and then upload it to the controller
board. The program will instruct the controller board on what actions to perform.
3
E-mail:[email protected] https://acebott.com
4
E-mail:[email protected] https://acebott.com
②Select JUSTDOWNLOAD.
③When the following screen appears, it indicates that the Arduino IDE is
downloading.
④When the download is complete, the icon file will appear. Click Install software.
5
E-mail:[email protected] https://acebott.com
⑤After installation, the following screen appears and select "I Agree".
⑥After selecting "I Agree", the following screen will appear and select "Next".
6
E-mail:[email protected] https://acebott.com
⑦Select "Next" and the following screen will appear. Select "Install".
7
E-mail:[email protected] https://acebott.com
⑩After installation, a shortcut icon of Arduino IDE will appear on your desktop.
8
E-mail:[email protected] https://acebott.com
9
E-mail:[email protected] https://acebott.com
②Select JUSTDOWNLOAD.
④When the download is complete click the download icon in your browser and find
the Arduino IDE installer.
10
E-mail:[email protected] https://acebott.com
⑤Click on the install package to appear the installation screen, just select the Arduino
IDE icon, move to the Applications to install the program.
⑥In the workbench, find the Arduino IDE and open it.
11
E-mail:[email protected] https://acebott.com
Generally, after installing the Arduino IDE software for the first time, it is necessary to
install the serial port driver to transmit the edited program to the controller board.
The USB-to-serial chip of the ESP32 controller board is CH340, so you need to install
the driver for this chip. After connecting the controller board to the computer with a
USB cable, the driver will usually install automatically on MacOS and Windows
systems. If the driver fails to install automatically, you will need to install the driver
manually.
The Driver can be downloaded from the Internet, or you can find the folder named
"CH340 Driver" in the resource package provided by us. Choose the appropriate
package according to your computer system type, and then follow the steps below to
install the driver.
②When connecting the ESP32 controller board to the computer for the first time,
right-click "My Computer" -> "Properties" -> click "Device Manager." Under "Other
devices," you will see "USB-Serial" or "Unknown Device."
12
E-mail:[email protected] https://acebott.com
③Right-click on the device and select the top menu option ("Update Driver Software"),
as shown in the image below.
④You will then be prompted with "Search automatically for updated driver software"
or "Browse my computer for driver software," as shown in the image below. On this
page, select "Browse my computer for driver software."
13
E-mail:[email protected] https://acebott.com
14
E-mail:[email protected] https://acebott.com
⑥After the software installation is complete, you will receive a confirmation message.
Once the installation is finished, click "Close."
⑦To confirm if the installation was successful, plug one end of the USB cable into the
ESP32 controller board and the other end into a USB port on your computer.
Right-click "My Computer" -> "Properties" -> click "Device Manager". Once the
controller board is connected, the successful installation will be shown as indicated in
the image below.
15
E-mail:[email protected] https://acebott.com
Before installing, go to "System Preferences "->" Security & Privacy "->" General" and
select ->"Mac App Store and identified developers "under the heading" Allow
applications to be downloaded from the following addresses "so that the driver will
work correctly.
16
E-mail:[email protected] https://acebott.com
17
E-mail:[email protected] https://acebott.com
④When using OS X 10.9 through OS X 10.15, click Restart to restart your computer,
and perform the following steps after restarting.
18
E-mail:[email protected] https://acebott.com
2)Install the dmg format driver(Attention:If the pkg file of Step A is successfully
①Install the dmg driver, click the dmg file and drag "CH34xVCPDriver" into the
application folder of the operating system.
19
E-mail:[email protected] https://acebott.com
20
E-mail:[email protected] https://acebott.com
When you open the Arduino IDE, select Tools>Board, you will find that the Arduino
IDE only has Arduino AVR Boards and no ESP32.
21
E-mail:[email protected] https://acebott.com
③Copy the URL in the lower text box and add it to "Additional Boards Manager URLs"
22
E-mail:[email protected] https://acebott.com
http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://www.arduino.me/package_esp32_index.json
23
E-mail:[email protected] https://acebott.com
24
E-mail:[email protected] https://acebott.com
⑥Search for "ESP32" in the BOARDS MANAGER's search bar and install it.
Attention: Please install version 2.0.12 of ESP32 because the newer versions
are incompatible with the tutorial's libraries, which may cause errors in the
program! If you have already installed version 3.0, please uninstall it and
reinstall version 2.0 of ESP32.
⑦When the following interface appears, please wait until the installation is complete,
then close Arduino IDE.
25
E-mail:[email protected] https://acebott.com
⑧Reopen Arduino IDE, select Tools > Board, and you will see the esp32 board
appear.
26
E-mail:[email protected] https://acebott.com
②Select the serial port (you can check the serial port number in the computer's
Device Manager, then see if the corresponding port appears below. Since each board
has a different COM number, choose the COM number displayed accordingly).
27
E-mail:[email protected] https://acebott.com
28
E-mail:[email protected] https://acebott.com
Ⅲ.Understanding Servos
1.Introduction to servos
The main structure of the servo is shown in the following figure, which mainly has
several parts: shell, variable speed gear set, motor, adjustable potentiometer, control
circuit board, and steering wheel.
Its working principle is to control the circuit board to receive control signals from the
signal source and drive the motor to rotate. The gear set reduces the speed of the
motor many times and amplifies the output torque of the motor accordingly. The
29
E-mail:[email protected] https://acebott.com
potentiometer and the final stage of the gear set rotate together to measure the actual
angle of rotation of the servo shaft. The control circuit board receives feedback from
the potentiometer to determine the actual angle of the motor and compares it with the
target angle. If there is an error, it controls the servo to rotate to the target angle
position.
②Servo pin definitions: Brown wire - GND, Red wire - 5V, Orange wire - signal.
③Connect the servo to the ESP32 controller board according to the following
diagram.
ESP32 Controller
Servo Diagram
Board
Red wire 5V
30
E-mail:[email protected] https://acebott.com
Attention: Please make sure to strictly follow the wiring instructions when
connecting the module to the ESP32 controller board. Incorrect wiring may
cause a short circuit and damage the ESP32 controller board.
3.Servo testing
①Connect the four servos as shown in the diagram.
Attention: To maintain a stable power output, you need to install 18650 batteries
in the battery holder, connect it to the controller board's power port, and switch
it to the "on" position before operating.
31
E-mail:[email protected] https://acebott.com
③If the servo is functioning properly, it will rotate from 0 degrees to 180 degrees, then
from 180 degrees back to 0 degrees, and finally settle at the 90-degree position.
32
E-mail:[email protected] https://acebott.com
Ⅰ.Parts List
33
E-mail:[email protected] https://acebott.com
Base plate 1
Pin 4
Chassis disk 1
Disk bracket 1 1
34
E-mail:[email protected] https://acebott.com
Disk bracket 2 1
Shoulder bracket 1 1
Shoulder bracket 1 1
Elbow bracket 1 1
Elbow bracket 2 1
Claw component 1 2
Claw component 2 2
Ⅲ.Assembly Steps
Attention: If you want to watch the assembly video, please click the link
below.
https://www.youtube.com/watch?v=RtOe7knGhkI
35
E-mail:[email protected] https://acebott.com
36
E-mail:[email protected] https://acebott.com
37
E-mail:[email protected] https://acebott.com
Attention: When the joystick module is connected to the dupont wire, the actual
Dupont wire color may be different from the figure, so you only need to follow
the pin identification on the joystick module to connect.
This step requires connecting the wires from the two joystick modules to the
mainboard first. For the left joystick module, connect SW to pin 34, X to pin 32, Y to
pin 33, and connect VCC and GND to the VCC and GND pins in the same row as pin
32. For the right joystick module, connect SW to pin 39, X to pin 35, Y to pin 36, and
connect VCC and GND to the VCC and GND pins in the same row as pin 35.
Attention: Please make sure to strictly follow the wiring instructions when
connecting the module to the ESP32 controller board. Incorrect wiring may
cause a short circuit and damage the ESP32 controller board.
38
E-mail:[email protected] https://acebott.com
39
E-mail:[email protected] https://acebott.com
Part List
Name Quantity
Servo 1
Chassis Servo Mounting Plate 1
M2*10 Round Head Screw 2
M2 Nut 2
Attention: servo
shaft orientation.
7.Install pin
Part List
Name Quantity
Pin 4
.
40
E-mail:[email protected] https://acebott.com
Attention: Do
not press the
pin too hard
to prevent the
pin from
breaking.
Attention: Install
the steering wheel
with the protrusion
facing the circular
hole.
41
E-mail:[email protected] https://acebott.com
42
E-mail:[email protected] https://acebott.com
Attention: ①Before this step of installation, first connect the servo to the GPIO5
pin of the controller board, and then turn on the power of the controller board to
keep the servo in the 90° position.
②In order to avoid damage to the steering gear during installation, please do
not rotate the shaft of the steering gear.
43
E-mail:[email protected] https://acebott.com
Shoulder Bracket 1 1
Elbow Bracket 1 1
M3*35 Nylon Column 1
M3*10 Flat Head Screw 2
M3 Nickel-Plated Lock Nut 2
44
E-mail:[email protected] https://acebott.com
Part List
Name Quantity
Servo 2
Shoulder Bracket 2 1
M2*10 Round head screw 4
M2 Nut 4
Attention: the
steering shafts.
②Then, the threaded hole on the chassis disc is gently rotated to align with the
threaded hole on the bottom plate, and then the dupont lines of the shoulder
servo and elbow servo of the robot arm are passed through the two threaded
holes.
45
E-mail:[email protected] https://acebott.com
Elbow servo
Shoulder servo
③Connect the shoulder servo wire to GPIO16 pin, and the elbow servo wire to
GPIO17 pin.
④Then turned on the power again, and keep the chassis, shoulder and elbow
servos at 90° position.
Part List
Name Quantity
M2.54 Round Head Screw 1
M3*10 Flat Head Screw 1
46
E-mail:[email protected] https://acebott.com
Attention:The shoulder
bracket should be
installed vertically to the
ground before tightening
the screws of the servo
motor and nylon column.
Attention: Use
longer nylon
column here.
47
E-mail:[email protected] https://acebott.com
Attention: Install
the steering wheel
with the protrusion
facing downwards.
white ABS
nylon gasket
3mm diameter
Attention: The
claw component 1
with the steering
wheel should be
positioned below.
48
E-mail:[email protected] https://acebott.com
49
E-mail:[email protected] https://acebott.com
Attention: Do
not tighten the
M3*22 flat
head screws.
white ABS
nylon gasket
3mm diameter
50
E-mail:[email protected] https://acebott.com
51
E-mail:[email protected] https://acebott.com
Attention: For this step, please power on the controller board and ensure the
claws servo remains at the 90° position.
Part List
Name Quantity
M2.5*4 Round Head Screw 1
6MM White ABS Nylon Gaske 1
M3 Nickel-Plated Lock Nut 1
Attention: The
initial form of the
claw is closed. white ABS
nylon gasket
6mm diameter
M3 nickel-plated
lock nuts
52
E-mail:[email protected] https://acebott.com
Part List
Name Quantity
Half Straight Steering Wheel 1
Ebow Bracket 2 1
M1.7*6 Large Round Flat Head Tapping Screws 2
M3*10 Flat Head Screw 2
M2.5*4 Round Head Screw 1
53
E-mail:[email protected] https://acebott.com
bracket and
shoulder bracket
are installed at a
90° angle. M2.5*4 round
head screw
54
E-mail:[email protected] https://acebott.com
Attention: Please make sure to strictly follow the wiring instructions when
connecting the module to the ESP32 controller board. Incorrect wiring may
cause a short circuit and damage the ESP32 controller board.
55
E-mail:[email protected] https://acebott.com
56
E-mail:[email protected] https://acebott.com
Attention: Ensure
all four servo
motor wires are
connected to the
controller board
before tightening
the screws.
57
E-mail:[email protected] https://acebott.com
58
E-mail:[email protected] https://acebott.com
The robot arm uses a total of 4 servos, with their corresponding pin numbers as
follows:
Pin Servo
NO. Figure
Number Position
Elbow
2 GPIO17 Elbow
Shoulder
3 GPIO16 Shoulder
Chassis
4 GPIO5 Chassis
59
E-mail:[email protected] https://acebott.com
3\Joystick_test, connect the ESP32 controller board to the computer with a USB
cable, select the correct controller board, processor, and port, Upload the code to the
ESP32 controller board.
Sample Code:
60
E-mail:[email protected] https://acebott.com
void setup() {
pinMode(left_key, INPUT);
Serial.begin(115200);
}
void loop() {
X1 = analogRead(left_X);//Read the right X value
Serial.print(X1);
Y1 = analogRead(left_Y);//Read the right Y value
Serial.print(" ");
Serial.print(Y1);
Z1 = digitalRead(left_key);//Read the right Z value
Serial.print(" ");
Serial.println(Z1);
delay(1000);
}
61
E-mail:[email protected] https://acebott.com
Sample Code:
62
E-mail:[email protected] https://acebott.com
void setup() {
ARM.ARM_init(5,16,17,18);//The parameters are four Servo pins
ARM.JoyStick_init(32,33,34,35,36,39);//Joystick initialization
}
void loop() {
ARM.get_JoyStick();
if (ARM.JoyY1 < 50) {//chassis left
ARM.chassis_angle = ARM.chassis_angle + 1;
ARM.JoyChassisCmd(ARM.chassis_angle);
}
if (ARM.JoyY1 > 3500) {//chassis right
ARM.chassis_angle = ARM.chassis_angle - 1;
ARM.JoyChassisCmd(ARM.chassis_angle);
}
if (ARM.JoyX1 < 50) {//Shoulder down
ARM.shoulder_angle = ARM.shoulder_angle + 1;
ARM.JoyShoulderCmd(ARM.shoulder_angle);
}
if (ARM.JoyX1 > 4000) {//Shoulder up
ARM.shoulder_angle = ARM.shoulder_angle - 1;
ARM.JoyShoulderCmd(ARM.shoulder_angle);
}
if (ARM.JoyX2 < 50) {//Elbow up
ARM.elbow_angle = ARM.elbow_angle + 1;
ARM.JoyElbowCmd(ARM.elbow_angle);
}
if (ARM.JoyX2 > 4000) {//Elbow dwon
ARM.elbow_angle = ARM.elbow_angle - 1;
ARM.JoyElbowCmd(ARM.elbow_angle);
}
if (ARM.JoyY2 > 4000) {// Claws open
ARM.claws_angle = ARM.claws_angle + 1;
ARM.JoyClawsCmd(ARM.claws_angle);
}
if (ARM.JoyY2 < 50) {// Claws close
ARM.claws_angle = ARM.claws_angle - 1;
ARM.JoyClawsCmd(ARM.claws_angle);
}
}
63
E-mail:[email protected] https://acebott.com
64
E-mail:[email protected] https://acebott.com
Ⅳ.Extending Tasks
Based on the basic operational patterns of the joystick on the robot arm, next we can
achieve the functionality of using the joystick to control the robot arm for object
handling tasks.
Task description:
Using the joystick module control method, maneuver the robot arm to pick up an
object from point A and transport it to point B for placement.
65
E-mail:[email protected] https://acebott.com
66
E-mail:[email protected] https://acebott.com
67
E-mail:[email protected] https://acebott.com
The forward kinematics problem can be solved through matrix transformations, that is,
by comparing the transformation matrix of each joint coordinate system with the
coordinate transformation formulas of the robot arm to determine the angles of each
joint. The inverse kinematics problem is usually more complex, requiring the solution
of a set of nonlinear equations and often having multiple solutions.
In this tutorial, we will mainly build a Cartesian coordinate system with the center of
the Chassis steering wheel as the origin point. When the specified position
coordinates (X,Y,Z) are entered, the library file in the tutorial will automatically use the
inverse kinematics algorithm to calculate the coordinates of each joint of the
mechanical arm, and then convert them into the angles of each joint steering gear.
Thus, the end of the manipulator is controlled to reach the position of the target point
on the space coordinate.
68
E-mail:[email protected] https://acebott.com
69
E-mail:[email protected] https://acebott.com
However, due to the gear precision during installation, it's not guaranteed that the
Chassis servo and steering gear will be exactly at 90 degrees. They might slightly tilt
left or right. Therefore, at this point, we need to calibrate it in the program. For
example, if it tilts 8 degrees to the right, we need to increase the deviation value. So, in
the parentheses of the 'ARM.Chassis_angle_adjust()' command, you would enter 8. If
the shift is 8 degrees to the left, then you need to subtract the offset value,
"ARM.Chassis_angle_adjust()" parentheses with -8.
70
E-mail:[email protected] https://acebott.com
The first parameter corresponds to the robot arm's X positive semiaxis. If the end
effector tilts 1 degree to the right, you would write 1; if it tilts 1 degree to the left, you
would write -1. If there is no tilt, you would write 0.
The second parameter corresponds to the robot arm's X negative semiaxis. If the end
effector tilts 1 degree to the right, you would write 1; if it tilts 1 degree to the left, you
would write -1. If there is no tilt, you would write 0.
Next please borrow the coordinate diagram, according to the space coordinates
below the program and your actual situation, adjust the calibration parameters.
Sample Code:
71
E-mail:[email protected] https://acebott.com
void setup() {
ARM.Chassis_angle_adjust(8);
ARM.Slight_adjust(0,2);
ARM.ARM_init(5,16,17,18);//The parameters are four Servo pins
Serial.begin(115200);
}
void loop() {
if (Serial.available()) {
String input = Serial.readStringUntil('\n');
int x, y, z, claws;//Define variables for coordinates x, y, z, and claws
sscanf(input.c_str(), "%d %d %d %d", &x, &y, &z, &claws);
if (claws < 90 || claws > 180) {
Serial.println("Invalid claw value. Claw value must be between 90 and 180.");
return;
}
Serial.print("X:");
Serial.print(x);
Serial.print(",Y:");
Serial.print(y);
Serial.print(",Z:");
Serial.print(z);
Serial.print(" Claws Angle:");
Serial.print(claws);
Serial.println(" ");
ARM.ClawsCmd(claws);
delay(1000);
ARM.PtpCmd(x, y, z);
}
}
72
E-mail:[email protected] https://acebott.com
After uploading the program, enter four values in the serial monitor: the X coordinate,
the Y coordinate, the Z coordinate, and the claw opening angle (ranging from 90
degrees to 180 degrees). These four values need to be separated by spaces. After
entering the values, press Enter.
If the coordinates are correct, the robot arm will move to the specified point in space. If
the serial monitor displays "Out of range!" after entering the coordinates, it means the
input values exceed the arm's reachable range, as the movement range is within a
spherical area. In this case, you need to adjust the values and re-enter them.
73
E-mail:[email protected] https://acebott.com
With the advancement of technology and market demand, robot arm palletizing
technology will see broader applications in the future. Therefore, in this lesson, we will
learn to implement basic palletizing functions using a robot arm.
74
E-mail:[email protected] https://acebott.com
First, stack two blocks vertically and place them at the (-7,13) coordinates on the robot
arm map, ensuring that the center point of the blocks aligns with the coordinate point.
Sample Code:
75
E-mail:[email protected] https://acebott.com
void setup() {
ARM.Chassis_angle_adjust(8);//Chassis error calibration
ARM.Slight_adjust(0,2);//Small calibration error
ARM.ARM_init(5,16,17,18);//The parameters are four Servo pins
Serial.begin(115200);
}
void loop() {
while(i < count) {
ARM.ClawsCmd(openAngle);//open claws
delay(1000);
ARM.PtpCmd(startx, starty, startz-i*2);//The target point is the upper object
delay(1000);
ARM.ClawsCmd(closeAngle);//close claws
delay(1000);
ARM.PtpCmd(startx, starty, midz);//Lift the object after picking it up
delay(1000);
ARM.PtpCmd(endx, endy, midz);//Rotate above the target point
delay(1000);
ARM.PtpCmd(endx, endy, endz+i*2);//Placing Objects
delay(1000);
ARM.ClawsCmd(openAngle);
delay(1000);
ARM.PtpCmd(endx, endy, midz);//Raise arms
delay(1000);
i = i + 1;
}
ARM.Zero();//Servo initialization
}
76
E-mail:[email protected] https://acebott.com
After uploading the program, we can observe that the end of the robot arm will reach
the initial coordinates of the blocks, then grab the upper block, transport it to the
destination coordinates, and place it down. Next, it will return to the initial coordinates
of the blocks, grab the lower block, transport it to the destination coordinates, and
finally stack it on top of the first block.
Ⅱ.Extending Tasks
Based on the robot arm's coordinate map, we already know the palletizing pattern of
the robot arm. As long as we know the position coordinates on the map, we can make
the robot arm complete the palletizing function. Next, we will use the map to complete
the robot arm's palletizing function.
Task description:
Based on the palletizing program example, try modifying the initial position
coordinates and the endpoint coordinates of the objects in the program to enable the
robot arm to achieve palletizing at different positions.
Attention: The two blocks need to be placed stacked together. Ensure the
coordinates entered do not exceed the map range. Additionally, during the
robot arm's grabbing process, there may be some errors due to placement or
precision issues.
77
E-mail:[email protected] https://acebott.com
Teaching a robot arm can be divided into three steps. The first step is the teaching
action, where the operator sets a fixed motion path for the robot arm. The second step
is the storage action, where the robot arm's control system records the taught actions.
The third step is the reproduction of the teaching, where the robot arm repeats the
actions recorded during the teaching process.
In this lesson, we will use the joystick module to teach and learn the robot arm's
movements.
Ⅰ.Teaching Program
Open "Memory_Controlled_Robot_Arm.ino" in English\Arduino\2.Arduino
program\Lesson 6\Memory_Controlled_Robot_Arm, connect the ESP32 controller
board to the computer with a USB cable, select the correct controller board, processor,
and port, Upload the code to the ESP32 controller board.
Sample Code:
#include <ACB_ARM.h>//Add the Robot arm libraries
ACB_ARM ARM;
void setup() {
ARM.ARM_init(5,16,17,18);//The parameters are four Servo pins
ARM.JoyStick_init(32,33,34,35,36,39);//Joystick initialization
Serial.begin(115200);//set the baud rate to 115200
}
void loop() {
ARM.JoyStick_Memory();//JoyStick memory mode
78
E-mail:[email protected] https://acebott.com
Attention: ①When determining the first and last position points of the robot arm,
it is necessary to save them promptly;
②The memory function can save up to 20 action groups at a time.
79
E-mail:[email protected] https://acebott.com
Ⅱ.Extending Tasks
Based on the basic operational rules of teaching and learning for the robot arm, next
we can use the joystick module to achieve teaching and learning functions for
transporting objects with the robot arm.
Task description:
Use the joystick module to control the robot arm to pick up a block from point A on the
coordinate map, transport it to point B, and then return to the initial position. This
80
E-mail:[email protected] https://acebott.com
Next, we will use a web page to remotely control the operation of the robot arm.
81
E-mail:[email protected] https://acebott.com
After successfully connecting, enter "192.168.4.1" into the address bar of your
browser. The web page interface will appear as shown in the following image.
82
E-mail:[email protected] https://acebott.com
Web Page
No. Function Description
Functionality
Control the movement of the robot arm through buttons on
1 Button control
the web page.
III.Extending Tasks
According to the way of robot arm web page control, next we use three control
methods to realize the function of action saving for robot arm in the web page.
Task description:
(1)Use buttons to control the claws of the robot arm to draw square-like actions on the
map and save them in mode1;
(2)Use the slider to control the claws of the robot arm to draw a square-like action on
the map and save it in mode2;
(3)Spatial positioning is used to control the robot arm paw to draw a square-like action
on the map and save it in mode3.
83
E-mail:[email protected] https://acebott.com
84
E-mail:[email protected] https://acebott.com
Ⅰ.APP Download
(1)If you are using an iOS device, search for the keyword "ACEBOTT" in the App
Store and download it. If you are using an Android device, search for the keyword
"ACEBOTT" in the Google Play Store and download it. The icon is shown as below.
Attention:
①This tutorial is applicable to ACEBOTT APP version 2.0 and above. You can click
the settings button in the upper left corner of the APP to view the software version
number. Please make sure that the software version you are using meets the
requirements;
②If you need to update the ACEBOTT software version, you can refer to the method
prompted in this tutorial to download the latest APP version.
85
E-mail:[email protected] https://acebott.com
(4) Enter the robot arm control interface (it cannot be controlled directly yet, as the
program needs to be uploaded).
86
E-mail:[email protected] https://acebott.com
1.Upload the Arduino program for APP control of the robot arm.
Before using the APP to control the robot arm, you need to upload the Arduino
program that enables communication between the robot arm and the APP to the robot
arm.
87
E-mail:[email protected] https://acebott.com
Attention: The hotspot name and password are predefined in the program, but
users can customize them. When we have multiple robot arms, we can
distinguish each one by using different WiFi names.
88
E-mail:[email protected] https://acebott.com
After completing the above operations, return to the interface shown below again, and
then the control of the robot arm can be realized. The main control actions are: slider
control, input box control, custom mode (start, end, save, run, reset), space
positioning function and position recovery function.
(1)Slider control: Move the sliders corresponding to different servo motors of the
robot arm to adjust its posture and orientation.
(2)Input box control: Next to each slider, there is an input box where you can enter
the desired servo angle to control the posture and orientation of the robot arm.
89
E-mail:[email protected] https://acebott.com
(3)Action saving: Click "mode1", there will be 6 modes to choose from (Mode 1~6),
and 20 different action groups can be saved in each mode. Click "Run" to perform a
memorized action, click "Loop" to repeat the memorized action, and click "Reset" to
clear the memorized action. The specific operation process is the same as web page
control.
90
E-mail:[email protected] https://acebott.com
(4)Spatial positioning: Enter the x, y, z spatial coordinates, and the robot arm will
move to the specified spatial coordinate point.
Attention: Due to the structure of the robot arm, there are limitations on its
range of motion. When entering coordinates, if the values exceed the robot
arm's range of motion, you can enter them again.
(5)Position initialization: Click on the refresh icon at the top left corner, and the robot
arm will return to its initial position.
91
E-mail:[email protected] https://acebott.com
Follow Us
Scan the QR codes to Follow Us for troubleshooting & the latest news.
We have a very large community that is very helpful for troubleshooting and we also
have a support team at the ready to answer any questions.
92