Not quite correct, it is the computer that is needed to transfer the data and send the commands to mycobot.
Enjoy robots world
Posts made by ElephantRobotics
RE: myCobot 280-Ard conveyor control in an industrial simulation
myCobot 280-Ard conveyor control in an industrial simulation
This article was created by "Cang Hai Xiao" and is reproduced with the author's permission.
This article starts with a small example of experiencing a conveyor belt in a complete industrial scene.
A small simulated industrial application was made with myCobot 280-Arduino Python API and load cells. I use the toy conveyor belt to transfer the parts to the weighing pan and use M5Stack Basic as the host to build an electronic scale to weigh the parts coming off the conveyor belt and then transmit the weight information in the weighing pan to the PC through UART.
Using the PC as the host computer, a simple GUI was written in python to display the weights in real time and allow the user to modify the weighing values.
Here is a detailed video of how this project works.
The following is the detailed process of the project.
Burn Mega 2560 and ATOM firmware.(Check the Gitbook for details)
Write a weighing program and upload the program to M5Stack Basic.
The serial port is initialized and the connection mode is set. Establishing communication between the PC and M5stack Basic
Calculating ratio factors.The data read from the sensor using the M5Stack Basic are initial data and need to be calibrated with a 100g weight and a 200g weight to calculate the conversion factor into "grams". In this case we have calculated a ratio factor of -7.81.
Calculate the readings from the load cell and the conversion factor, and display as the weighing value.
Use UART1 to send the data in every 20ms. It is recommended to do an average or median filter to reduce the shock during the drop of the part from the hopper.
This is the event corresponding to the zero button, 100ms for button de-jitter
This is a simple electronic scale program written for UIFlow. It can also be sent to a PC via uart1 via TTL-USB and written to M5Stack Basic with a single click on Download. I have used the offline version of UIFlow for ease of connection and debugging.
Use myBlockly to debug the parameters for the press (drop arm) and release (lift arm) actions
Writing PC programs and installing pymyCobot.
(1) First, write the GUI interface by the Tkinter library. We can set the threshold for the weighing control. For example, in this commissioning, I set 5g.
(2) Importing pymycobot
(3) A callback to the OK button first allows the myCobot drop arm to power on the conveyor, the conveyor starts working, and the electronic scale monitors the weight in real time. The loading() function is responsible for reading the serial weighing data. Then determine if the threshold is reached and control the myCobot lift arm if the threshold is reached.
#============ # Function： # 1.Setting of the weighing values, displayed in the GUI. # 2.Use the processing bar to show the progress of the weighing # 3.When the target value of 99% is reached, a command is given to # myCobot to perform a stop operation. # date: 2022-11-10 # version: 0.2 # Joint Adjustment：Combined with the myCobot button and release #action #============ from tkinter import * import tkinter.ttk import serial import time from pymyCobot.myCobot import myCobot from pymycobot.genre import Coord #====Global variable initialisation global val #Measured weight val=0.0 global iset #Scale factor, based on set values,setvalue/100 iset=5/5 global c_set #Input box to form weighing judgement criteria c_set=0.0 global action_flag action_flag=False # Set download maximum maxbyte = 100 #======myCobot initialization mc = myCobot('COM23',115200) mc.power_off() time.sleep(2) mc.power_on() time.sleep(2) print('is power on?') print(mc.is_power_on()) time.sleep(2) mc.send_angles([95.97,(-46.4),(-133.3),94.3,(-0.9),15.64],50) #Arm lift time.sleep(2) #================== #Serial port initialization try: arduino = serial.Serial("COM25", 115200 , timeout=1) except: print("Port connection failed") ReadyToStart = True #Show processing bar function def show(): mc.send_angles([95.6,(-67.2),(-130.3),101.9,(-2.2),23.11],50) #down # Set the current value of the progress bar progressbarOne['value'] = 0 # Set the maximum value of the progress bar progressbarOne['maximum'] = maxbyte # Calling the loading method loading() #Process functions def loading(): global byte global val global action_flag c_set=setvalue.get() iset=100/float(c_set) #Calculation of scaling systems byte = arduino.readline().decode('utf-8') try: if len(byte) !=0 : val= byte else: pass except: pass if (1-(float(c_set)-float(val))/float(c_set))>=0.99 and action_flag==False: #Control myCobot movement when the remaining value is less than 5% print("triger") mc.send_angles([95.97,(-46.4),(-133.3),94.3,(-0.9),15.64],50) #up action_flag=True #Make sure you only act once, unless RESET # Set the progress of the processing bar pointer progressbarOne['value'] =(1-(float(c_set)-float(val))/float(c_set))*100 #float(val)*iset #Display of implementation weighing data in label4 strvar.set(str(float(val))) # Call the loading method again after 100ms progressbarOne.after(20, loading) #reset button callback function def reset_click(): global action_flag action_flag=False #Reset flag word to prepare for the next action pass #Reset flag word to prepare for the next action def ok_click(): show() pass #UI design=========== #Main window win = tkinter.Tk() win.title("mycobot") #Create a frame form object frame = tkinter.Frame (win, borderwidth=2, width=450, height=250) # Fill the form horizontally and vertically frame. pack () #Create "Position 1" Label1 = tkinter.Label ( frame, text="Set value (g)") # Using place, set the position of the first label from the upper left corner of the form (40,40) and its size (width, height) # Note that the (x, y) position coordinates here refer to the position of the upper left corner of the label (absolute positioning is performed with the upper left corner of NW, and the default is NW) Label1.place (x=35,y=15, width=80, height=30) # set data input setvalue setvalue = tkinter.Entry (frame, text="position2",fg='blue',font=("微软雅黑",16)) #,bg='purple',fg='white') #Use the upper right corner for absolute positioning, and the position is (166, 15) away from the upper left corner of the form setvalue.place(x=166,y=15, width=60, height=30) # set tab 3 Label3 = tkinter.Label (frame, text="Real Value (g)") #,bg='green',fg='white') # Set the horizontal starting position to 0.6 times the horizontal distance of the form, the absolute vertical distance is 80, and the size is 60, 30 Label3.place(x=35,y=80, width=80, height=30) # Set label 4, place the measured weight value, the default is 0.0g strvar = StringVar() Label4 = tkinter.Label (frame, textvariable=strvar,text="0.0",fg='green',font=("微软雅黑",16)) #,bg='gray',fg='white') # Set the horizontal starting position to 0.01 times the horizontal distance of the form, the absolute vertical distance to 80, set the height to 0.5 times the form height ratio, and set the width to 80 Label4.place(x=166,y=80,height=30,width=60) progressbarOne = tkinter.ttk.Progressbar(win, length=300, mode='determinate') progressbarOne.place(x=66,y=156) # Call a function using a button control resetbutton = tkinter.Button(win, text="Reset", width=15, height=2,command=reset_click).pack(side = 'left',padx = 80,pady = 30) # Call a function using a button control okbutton = tkinter.Button(win, text="OK", width=15, height=2,command=show).pack(side = 'left', padx = 20,pady = 30) #start event loop win. mainloop()
The program is debugged step by step:
（1） Debug the electronic scale to ensure that the weighing is correct, and use weights for calibration. Make sure the datas are correct.
（2） Connect myCobot to the conveyor belt, and install a simple button at the end of myCobot, which can trigger the power supply of the conveyor belt when the arm is lowered.
（3） Joint debugging. Set the threshold in the GUI, trigger myCobot to drop the arm, and then the conveyor belt starts to run (parts are transported and fall into the hopper, weighed in real time), and trigger the myCobot to lift the arm after reaching the threshold (5g).
This is a simulated industrial application to demonstrate the control function of myCobot 280 Arduino. We transmit the weighing data to the PC through the sensor plus M5Stack Basic and indirectly feedback on the running status of the conveyor belt. Receive the weighing data to monitor the transportation of parts on the conveyor belt. When the threshold is reached, the myCobot will trigger the arm-lifting action.
The program is elementary, and the host computer only has 150 lines. The difficulty is minimal and suitable for beginners to get started. Understanding, adjusting, and acquiring the robotic arm's electrical, mechanical, and parameters.
RE: A four-axis robotic arm ideal for industrial education |myPalletizer M5Stack-esp32
I'm very sorry about that. This forum does not allow GIFs.
Watch it on hackster if you're interested in watching it!
A four-axis robotic arm ideal for industrial education |myPalletizer M5Stack-esp32
What is the 4-axis robotic arm?
In the era of Industry 4.0, where information technology is being used to promote industrial change, robotic arms are essential in industry transformation. Automated robotic arms can reduce staff labor and increase productivity using automation technology combined with artificial intelligence, voice, and vision recognition. Robotic arms are now very relevant to our lives. Most robotic arms are built like human hands to perform more tasks such as grasping, pressing, and placing. The axes of a robotic arm represent degrees of freedom and independent movement, and most robotic arms have between two and seven axes. Here I will show you a four-axis palletizing robotic arm that is suitable for introductory learning.
What is the palletizing robotic arm?
Palletizing means neatly stacking items. Palletizing robotic arms grip, transfer, and stack items according to a fixed process.
Which kind of robotic arm is more suitable? A 4-axis robotic arm? Or a 6-axis robotic arm?
Let's look at the table.
The 4-axis palletizing robotic arm can only move horizontally up and down, backward and forwards, left and right, with the end fixed towards the bottom. This is a significant limitation in terms of application and is mainly used in high-speed pick-and-place scenarios. Six-axis robotic arms are suitable for a wide range of designs and can move without dead space to reach any position within the field. We will mainly look at the four-axis palletizing robotic arm.
A video was made about the movement of two types of robotic arms.
myPalletizer 260 M5Stack
The myPalletizer robotic arm shown in the video, with M5Stack-ESP32 as the central control, is a fully wrapped lightweight 4-axis palletizing robotic arm with an overall finless design, small and compact, and easy to carry. The weight of myPalletizer is 960g, the payload is 250g, and the working radius is 260mm. I think it is designed for individual makers and educational use. With the multiple extension interfaces, we can learn machine vision with the AI Kit.
Why would we recommend this arm as an introductory 4-axis palletizing robotic arm?
There are many four-axis (4DOF) robotic arms in industry, the mainstream being represented by palletizing robotic arms. Compared to 6-axis robotic arms, myPalletizer has a more straightforward structure, fewer joints, less stretching, faster reaction times, and faster-operating efficiency and is better to use than 6-axis robotic arms. It would be quite an excellent choice with palletizing robotic arms. Let's take a look at the myPalletizer 260-M5Stack parameter.
The suitability of a robotic arm for learning requires several conditions.
The robotic arm must support multiple functions.
If this robotic arm has a mainstream structure, there will be many models of industrial robotic arms to provide a reference value.
Supporting documentation for the robotic arm is available and provides the user with basic operating instructions.
What can we learn with myPalletizer 260?
When programming the robotic arm, we will learn about forward and inverse kinematics, DH model kinematics, Cartesian coordinate systems, motors and servos, motion mechanics, programming, machine vision, etc. Here is a brief introduction to what DH model kinematics is.
First, let's talk about forward kinematics and inverse kinematics.
Determine the position and pose of the end effector given the values of the robot joint variables.
The values of the robot joint variables are determined according to the given position and attitude of the end effector.
DH Model Kinematics:
Mainly by constraining the position of the joint coordinate system, the transformation between the joint coordinate system and the coordinate system is disassembled into 4 steps, each step has only one variable/constant, thus reducing the difficulty of solving the inverse kinematics of the manipulator.
With a robotic arm, we can learn more about robotic armics.
Open Source Information
Elephant Robotics provides relevant information about myPalletizer in Gitbook. There are basic operation tutorials in mainstream programming languages, such as programming in python language, and a series of detailed introductions from the installation of the environment to the control of the robotic arm, providing beginners with a quick way to build and use the robotic arm.
More open source code on GitHub.
Artificial Intelligence Kit
We also provide an artificial intelligence kit, a robotic arm is not capable of human work, and we also need a pair of eyes (cameras) to recognize, the combination of the two can replace manual work. A camera just displays the picture it shoots, we need to program it to realize the method of color and object recognition. We used OpenCV and python to recognize and grab the color of wood blocks and recognize and grab objects.
Let's see how it works.
The Artificial Intelligence Kit is designed to give us a better understanding of machine vision and machine learning. OpenCV is a powerful machine vision algorithm. If you want to learn more about the code, you can look up the project on GitHub.
myPalletizer is an excellent robotic arm for those just starting! I hope this article will help you choose your own robotic arm. If you still want to know more, feel free to comment below. If you enjoyed this article, please give us your support, and like us, your like is our motivation to update!
RE: My first try with the little six-axis robotic arm| mechArm 270-M5Stack
The m5stack-basic esp32 is mainly used for the Internet of Things. The robotic arm needs a bridge to connect to the computer, where the m5stack-basic esp32 development board is used, which also powers the arm. We have set up some microPython in the m5 to facilitate using some functions.
RE: My first try with the little six-axis robotic arm| mechArm 270-M5Stack
It looks great.Looking forward to your subsequent and more exciting projects about mechArm.
myCobot VS mechArm | Find your preferred desktop 6-axis robotic arm
In the future, it is undoubtedly that robots will replace human labor. Nowadays, the industrialization of robotic arms has become more mature, and more and more people are interested in robotic arms. Before getting to know about industrial robots, learning from educational robots is the most effective way. There are many robotic arms for education and science research, how do we choose in the robotics market?
Here we will provide two desktop six-axis robotic arms which are the preferred choices for individual developers who are new to robotics and want to create quick prototypes for personal or industrial use. And we will compare these two robots and help you find the best one for your needs.
First, Let’s introduce the differences between the industrial robotic arm and the collaborative robotic arm
Industrial robotic arm
As the name suggests, industrial robotic arms can replace humans working in factories, which can reduce production costs, improve productivity, and replace humans in dangerous positions.
Collaborative robotic arm
The collaborative robotic arm can interact directly with humans directly, which means that the collaborative robotic arm can work with humans together.Most industrial robotic arms are in centrosymmetric structure, and collaborative robotic arms are in UR structure.
We will start with the two robotic arms.
myCobot 280-M5Stack is a 6-axis collaborative robot powered by M5Stack-Basic with multiple functions, it is designed with UR structure.
mechArm 270-M5Stack is similar to myCobot, but the structure of mechArm is centrosymmetric.
Use the slider to control myCobot
MoveIt, Planning the movement of myCobot.
They can also work with AI(artificial intelligent) Kit to learn machine vision and robotic arm movements together.
The interfaces on the end of the robotic arm are the LEGO interfaces, we can use the accessories from Elephant Robotics or make by ourselves through 3D printing to complete our development needs.
Moreover, both of them support users to do secondary development, mainstream programming language development, and complete platform system development.
So what are the differences between them? Let’s look at their configuration.
The differences in working radius, positioning accuracy, and range of joint movements are due to their different structures.
The centrosymmetric structure of mechArm is currently the most widely used and classic type worldwide.
The mechArm’s joint 2, 3, and 4 are all bilaterally supported, allowing for a more stable and smooth arm movement, which is why the centrosymmetric structure has been used again for decades.
The UR structured robotic arm joint works without holding, so it has a wider working radius and can move very flexibly. However, there are some deviations in the movement. Because without the holding, the robotic arm needs to rely on the motors to keep stable.
Joint rotation range
mechArm is limited in terms of movement, and myCobot is more flexible.
mechArm is suitable for learning in the direction of industrial robotic arms, while myCobot is suitable for human-machine collaboration scenarios.
Both robotic arms represent the current mainstream types, each with advantages and disadvantages. We hope this article will help you choose a robotic arm that can meet your needs. If you still want to know more, feel free to comment below. If you like this article, please give us your support and praise. Your like is our motivation to update!
Learn more about us:
Home | Elephant Robotics
GitHub | Elephant Robotics
Shop | Elephant Robotics
RE: Desktop Dual-arm Cobot, myBuddy 280 Focuses on Education and Research with Various Functions
Thank you for your support. Yes, we are developing VR communication and the idea is to be able to control mybuddy from a remote location via VR to implement some projects.