We would like to express our sincere gratitude to MK Tech Lab for sharing their case study with us. Original article link:
https://mktechlab.net/2024/10/14/mycobot-280-pi-for-2023-setup/.
We have obtained permission from the author to reprint and translate the content.
IntroductionThe MyCobot 280 series by Elephant Robotics (Shenzhen, China) is a compact and lightweight 6-axis robot arm. It features a payload capacity of 250g and a weight of only 860g, making it exceptionally lightweight for a 6-axis robot arm. The "280" signifies an arm movement radius of 280mm, and there is also a lineup with a larger movement radius of 320mm.
The robot arm is available in different models depending on the control board used, including a model using the M5Stack microcontroller module from M5Stack (Shenzhen, China), a Raspberry Pi 4B-based model, and models utilizing Jetson Nano or Arduino. Regardless of the model, all feature an M5Stack ATOM Matrix at the arm's tip (the green glowing part in the left photo), primarily responsible for controlling the motion algorithms of the MyCobot manipulator (as referenced in the official Q&A under "Questions about the Structure, " item "A3").
https://docs.elephantrobotics.com/docs/mycobot-pi-en/14-IssueFAQ/14.3-hardware.html
The first Raspberry Pi model was released in 2021, followed by the 2023 version. Differences between the initial and 2023 models include updates to the casing components and changes to the servo motors in the J1 to J3 joint sections, though there are no changes to the catalog specifications. Similarly, the M5Stack version also received a 2023 update.
For details on the specifications of the MyCobot 280 Raspberry Pi 2023 (hereafter referred to as "MyCobot"), please refer tothis link.
Although there are official documents available, many are geared towards the M5Stack version rather than the Raspberry Pi version. Additionally, much of the available information pertains to the M5Stack version. Therefore, we decided to summarize the steps necessary to run the latest environment (as of July 7, 2024) and sample programs on the Raspberry Pi version.
SetupThe detailed setup instructions are summarized on the official page. Here, we focus on key observations and notes from our actual testing.
The following are the minimum connections required to operate MyCobot:
● Connection of the included AC adapter DC plug: The compatible adapter is 12V (3-5A), with a DC plug size of 5.5mm outer diameter and 2.1mm inner diameter.
● Monitor connection: Use one of the two Micro HDMI ports on the Raspberry Pi 4B for video output.
※ If purchasing a Micro HDMI cable separately, note that the height around the Micro HDMI port is narrow, approximately 8mm.
● Keyboard and mouse connection: Connect a standard USB keyboard and mouse.
● Wired LAN: If a wired connection is needed, connect an Ethernet cable.
● Fixing base for MyCobot:
○ G-Base (Clamp) for MyCobot 280: Fix it to the edge of a table using the clamp.
※ This product is discontinued. It was used for this setup.
○ G-Shaped Base for MyCobot 280: Fix it to the edge of a table using the clamp.
○ Flat Base for MyCobot 280: Fix it on the tabletop using suction cups.
※ Suitable for tables with surfaces such as glass or marble where suction cups adhere well.
The OS (Ubuntu Mate 20.04) and various software are pre-installed from the factory, so you can start testing and development immediately after booting.
If you want to revert to the initial environment, you can download the image from this page under "Image Download – Product: myCobot 280 PI – Ubuntu Mate 20.04." The image file size is approximately 4.9GB.
For this setup, we used the image file downloaded as of October 14, 2024, from the link above
(myCobot_280_ubuntu_V20230222_20.04Pi_aarch64_shrunk.img.gz).
After extracting the downloaded file, we wrote the OS image
(myCobot_280_ubuntu_V20230222_20.04Pi_aarch64_shrunk.img) to a microSD card using an SD card writing app like balenaEtcher.
After turning on the power at the back of the MyCobot and waiting for a while, the system will automatically log in with the username "er" (Elephant Robotics), and the Ubuntu Mate desktop screen will be displayed.
The minimum required settings are as follows.
For network settings such as WiFi and VNC connection procedures from Windows, please refer to this link.
WiFi Configuration:
The system's default connection is set to "ElephantRobotics_AP." If you select "Disconnect, " the system will automatically search for available access points, allowing you to select the appropriate one.
Since "ElephantRobotics_AP" is automatically enabled every time, follow these steps to disable it:
[Menu] → [Preferences] → [Startup Applications], then uncheck [WiFi_AP] under the [Startup Programs] tab to disable it.
Click the WiFi icon at the top-right of the screen, then click [Edit Connections…]. In the [General] tab of the WiFi settings, check [Connect automatically with priority] and set the priority to 1.
Keyboard Configuration:
The default setting is for the English layout, so if you are using a Japanese keyboard, you need to specify the Japanese layout. The specific steps are as follows:
[Menu] → [Preferences] → [Keyboard], then in the [Layouts] tab, click [Add], select "Japanese" from the [By Language] tab, and click [Add]. After adding "Japanese, " select it and click [Move Up] to move it to the top.
Next, update the firmware (FW) for the ATOM (AtomMain). Connect the USB port on the back of the MyCobot to the ATOM at the arm's tip using a USB Type-A to Type-C cable. Then, launch [myStudio] from the desktop, Dock, or the [Elephant Robotics] menu.
Click on the MyCobot 280 image, select [Type] as "MyCobot 280 for Pi, " and ensure that the [USB Port] is set to "M5 Stack-atom" if connected to the ATOM. Finally, click [LOGIN].
From the menu on the left, select [Basic], then choose FW (AtomMain) version v6.2 and click [Flash] to execute the write operation.
Other FW versions, such as v6.4, do not work with the default pymycobot v3.0.1 (2022-12-9). Additionally, versions v6.5 and later fail to write (the process does not complete). Therefore, FW version v6.2 is used for this setup.
If writing FW versions v6.5 or later fails, make sure to write a successfully tested version (like v6.2) to avoid abnormal behavior.
Operation VerificationMyCobot is compatible with the following environments/software:
Below is a summary of the execution procedures for each environment/software.
myBlocklymyBlockly is pre-installed and can be launched from the desktop, Dock, or [Elephant Robotics] -> [myBlockly] in the Menu. For detailed instructions, refer to the "myBlockly View" section on the official page.
Below is an example program for testing its functionality.
● In the Init block, set the following:
"MyCobot",Port: "/dev/ttyAMA0",Baud rate: "1000000"
● Connect the Set Angle block from the [MDI Control] section on the left to the Init block. Set the following: J1 to J6: 0,Speed: 10
● Connect the Sleep block from the [Time] section on the left to the Set Angle block.
● Connect another Set Angle block from the [MDI Control] section on the left to the Sleep block. Set the following: J2: 90,J3: -90,Speed: 10
● Click [Run] in the top-right corner.
The sample programs are summarized in the section "How to run the sample code."
ROS1/ROS2The environment is already set up and can be launched from the desktop or Menu under [Elephant Robotics] -> [ROS1 Shell] or [ROS2 Shell]. Several sample programs are also provided. For details, refer to the official page.
Here, we verify operation using ROS2. Launch [ROS2 Shell] from the desktop, Dock, or Menu under [Elephant Robotics], then execute the following command:
ros2 launch mycobot_280pi slider_control.launch.py
Control is possible by increasing or decreasing the sliders in the Joint State Publisher window using the mouse.
※ Note: Even slight movements of the sliders can result in significant robot arm motion, so proceed with caution.
The environment is already set up (the "Environment Building" steps linked are not required), so it can be executed via the [Mate Terminal] from the Menu or Dock. Sample programs using various APIs are also available.
For more details, refer to the official page.
Below is an overview of running the pymycobot sample program (basic.py).
Operation Verification with the Python Environment pymycobot Sample Program (basic.py)
The procedure and logs during operation verification are as follows:
er@er:~/pymycobot/demo$ python3 basic.py
--------------------------------------------
| This file will test basic option method: |
| set_led_color() |
| send_angles() |
| get_angles() |
| send_angle() |
| send_radians() |
| get_radians() |
| send_coords() |
| get_coords() |
| send_coord() |
--------------------------------------------
1 : /dev/ttyAMA0 - ttyAMA0
Please input 1 - 1 to choice:1
/dev/ttyAMA0
Please input baud(default:115200):1000000
1000000
Wether DEBUG mode[Y/n]:n
Start check basic options
::set_color() ==> color 255 255 0
::send_angles() ==> angles [0, 0, 0, 0, 0, 0], speed 100
::get_angles() ==> degrees: [0.52, 0.26, -0.52, 0.7, 0.79, 0.52]
::send_angle() ==> angle: joint1, degree: 90, speed: 50
::send_radians() ==> set radians [1, 1, 1, 1, 1, 1], speed 100
::get_radians() ==> radians: [1.005, 1.011, 0.996, 0.986, 0.983, 0.982]
::send_coords() ==> send coords [160, 160, 160, 0, 0, 0], speed 70, mode 0
::get_coords() ==> coords [160.8, 162.6, 152.1, -0.87, 3.4, 1.7]
::send_coord() ==> send coord id: X, coord value: -40, speed: 70
::set_free_mode()
=== check end ===
er@er:~/pymycobot/demo$
Operation Verification with MyCobot Controller
For details, refer to the "2 MyCobot Controller" section on the official page. As of October 14, 2024, the app is not available on the Google Store, so you need to download the APK file from the "Download Installation package" link and install it manually. The app version is 1.0.1, and although a message saying "This version is not supported" appeared when running on Android 14, the app was confirmed to function properly.
Below is an overview of running the app in practice.
Following the steps for “MyCobot PI” in “2.4 How to use MyCobot Controller”
Based on the procedure outlined in the "2.4 How to use MyCobot Controller" section for "MyCobot PI, " the following steps were performed.
er@er:~$ cd pymycobot/demo/mycobot_pi_bluetooth/
er@er:~/pymycobot/demo/mycobot_pi_bluetooth$ sudo systemctl restart bluetooth
er@er:~/pymycobot/demo/mycobot_pi_bluetooth$ python3 uart_peripheral_serial.py
Skip adapter: /org/bluez
GATT application registered
GetAll
returning props
Advertisement registered
Next, enable Bluetooth on your smartphone and launch the MyCobot Controller app.Tap the Bluetooth icon to connect to MyCobot Pi, then tap the hand icon (to the right of the Bluetooth icon) to enable control mode. The values of each joint will then be reflected. Next, tap the home icon to move the robot to the home position.
After that, switch between the Joint Control and Coords Control tabs. You can control the robot by tapping the cursor icon next to each axis/coordinate value. Holding down the cursor icon enables continuous motion; however, as the value changes incrementally, the movements are very slow.
SummaryIn summary, this article provided a brief overview of the MyCobot 280 Pi setup, from preparing the bootable microSD card to verifying operation across various environments/software.
The MyCobot 280 series, including the MyCobot 280 Pi 2023, is compact and weighs less than 1kg, making it easy to carry. It supports various environments/software, which lowers the entry barrier for those who want to try out a robot arm or use it for educational purposes.
However, while the setup procedures and documentation for the environments/software are well-organized, it can be challenging to find the necessary information. Additionally, most available information pertains to the M5Stack version rather than the MyCobot Pi, so users may need to conduct additional research and experiments.In the future, I plan to document my experiences using the MyCobot 280 Pi in various scenarios and introduce projects combining it with a pico projector.
Once again, we would like to sincerely thank MK Tech Lab for sharing such a detailed user guide with us. If anyone has more case studies, feel free to share them with us anytime!
Comments