Controlling 3-axis robot arm with RAMPS 1.4 and Arduino Mega - Other Hardware / Robotics - Arduino Forum

https://forum.arduino.cc/t/controlling-3-axis-robot-arm-with-ramps-1-4-and-arduino-mega/571619/2

I am currently doing exactly what you are asking about. My robot arm is a dobot clone. I am using ramps 1.4, Arduino mega and A4998 drivers.

You need to decide what your goals are in terms of controlling the robot.

If you run Marlin, it greatly simplifies the use of G code for control. However, with Marlin, or any other software designed for 3D printing, you will lack inverse kinematics for anything other than a SCARA arm. In other words, when the G code tells the arm to move in the X axis, instead of moving solely in the X axis as a 3D printer that has its motors and movements laid out in cartesian coordinates would, the arm will move one of its joints that you have designed as X. That movement however will be not solely in one cartesian direction. When you move one joint of a robot arm, the end movement will be in multiple directions, affecting Y and Z for example.

I found numerous discussions on the internet about modifying Marlin's various files to add in custom inverse kinematics, but I never found anyone who had done it, nor sufficient description of the various Marlin files to understand what all needs modifying.

I have used the AR-2 software, with a modified version of Arduino software, and it works great for learning and repeating complex motions, but I was never successful in setting up the inverse kinematics for a configuration that worked with a 3 axis arm, instead of the 6 axis that it was designed for. It works great for moving the arm to a location, operating a servo for a claw for instance, and recording that point as a stored location, and adding more and more movement to create a complex script that can be repeated over and over, or repeated with offsets, or modified based on sensor input (that part I never tried).

I don't have a lot of time this afternoon to write a more detailed answer on the various types of software I have tried and the results I have gotten, but if you are interested in my various attempts, I will continue.

Here is a link to my work so far with my dobot clone arm:

https://forum.arduino.cc/index.php?topic=576820.0

It's not perfect, there is some bug in the circle drawing part of the program that I have to sort out, as it sometimes seems to draw a circle in a clockwise motion instead of counter cw, or vice versa when using the circle commands G2 or G3.

The separate Arduino program that I wrote, does all the inverse kinematics on the Arduino itself. You communicate with it using the serial monitor, or using the short python code I wrote, it will read script from a file. The scripts contain something similar to G Code, but not in the exact format of standard G Code.

1 year later

MicroMental

So did anyone get any further with this? im trying to make a robot arm but i want a controller to control it and i have already got stepper motors and a ramps1.4 etc... just need help on the code side

1 month later

ribbonman

Apr 2020post #10

Just commenting to find post later.

Very interesting and hope to start my own project soon.

1 year later

Closed on May 6, 2021

Related topics

Topic list, column headers with buttons are sortable.

TopicRepliesViewsActivity
Dobot with inverse kinematics ramps 1.4 Robotics 11 7.4kSep 2019
3D Printer Project General Guidance 15 7.2kApr 2021
Robotic arm with stepper motors Motors, Mechanics, Power and CNC 8 1.3kJul 2023
3D printer programming Arduino Mega with ramps v1.4 and a4988 Programming 3 469Jul 2019
Question about remodeling marlin firmware General Guidance 5 709Nov 2022

1 month later

ribbonman

Just commenting to find post later.

Very interesting and hope to start my own project soon.

1 year later