Welcome! Log In Create A New Profile

Advanced

single arm SCARA, all axis home problem

Posted by scara90 
single arm SCARA, all axis home problem
July 14, 2016 03:17AM
I made Scara type printer(prototype) for firmware test.
I used Arduino Mega and RAMPS 1.4 for board and used only motor not timing belt. Then I put DEFAULT_AXIS_STEPS_PER_UNIT as appropriate.
I used a firmware which Vitaminard modified at github

A first linkage of arm length is 150mm and second one is 90mm.
I put 100 to SCARA_offset_x and -100 to SCARA_offset_y. But I did not know how to put the value to THETA_HOMING_OFFSET and PSI_HOMING_OFFSET, so I put 0 to them. When I tested, I put 10, 20 or 60, 90 to them randomly.
And I put SCARA_offset_x to MANUAL_X_HOME_POS and (Linkage_1 + Linkage_2) + SCARA_offset_y to MANUAL_Y_HOME_POS.

Current motion is as follows: When operated by all axis home, motor Theta and Psi moved together. when a limit switch of Theta pushed twice, motor Theta is stopped. After that motor Psi moved and a limit switch of Psi pushed twice, the motor Psi is stopped. And then no further movement.
I used M114 for checking Serial Monitor and current position. For example:
When SCARA_offset_x and SCARA_offset_y is both 0, current position is X=240 and Y=0.
When SCARA_offset_x is -100 and SCARA_offset_y is -100, current position is X=140 and Y=-100.
But they did not move to those positions after all axis home.

When they operating by code G1, there were no exact motions. So, in the part of ‘SCARA_theta = ( atan2(SCARA_pos[X_AXIS],SCARA_pos[Y_AXIS])-atan2(SCARA_K1, SCARA_K2) ) * -1;’ in calculate_delta
function of file Marlin_main.cpp. I changed SCARA_K1 with SCARA_K2 and they acted exactly.
I tested both cases before and after changing SCARA_K1 with SCARA_K2, but there were same motions(two motor stopped after checking limit switch) after all axis home.
Now, when motion was operated by code G1 and changing K1 with K2, it moved in exact coordinate.

My aim is to make a motion that when I do all axis home, uses only motor Theta and pushes limit switch. Then uses only motor Psi and pushes limit switch and moves towards coordinates saved in MANUAL_X,Y_HOME_POS.

I modified only two sources, file Configuration.h(several arm lengths and settings) and file Marlin_main.cpp(changing only calculate_delta(inverse kinematic) K1 ,K2).

I need someone’s help who knows well about this.

Edited 2 time(s). Last edit at 07/14/2016 03:18AM by scara90.
Re: single arm SCARA, all axis home problem
July 16, 2016 12:32AM
Hello,

It's been quite a while since I've messed with my SCARA arm. I hope I can provide some insight.

I had great trouble creating a repeatable accurate automatic homing. Initially I tried using limit switches, which where cumbersome and I could never get them out of the way. Second, I created optical limit switches, but they where too inaccurate. Thirdly I tried using hall effect sensors but as life would have it I began working on other projects and my single SCARA arm robot has been collecting dust.

When I would use the SCARA arm, I would manually position both arms extending out and use a manual G92 X30 Y148. Then I could run G CODE or do any manual move. Be fore-warned that the firmware does not anticipate "illegal" moves! If you tried G0 Y200 for instance, the arm would most likely crash.

Attached is a rough diagram of the homing position (with the dimensions of my robot)...

SCARA_offset_x and SCARA_offset_y define where the base pivot is in relation to bed X 0 Y0. I don't believe THETA_HOMING_OFFSET or PSI_HOMING_OFFSET have any effect in my modified firmware.

Again, I ran out of steam while working on the project, but may revisit it again someday... let me know if you need some help.

Edited 2 time(s). Last edit at 07/16/2016 12:35AM by vitaminrad.
Attachments:
open | download - SCARA home.jpg (34.3 KB)
Re: single arm SCARA, all axis home problem
July 25, 2016 11:12PM
Thank you vitaminrad.

I had some success thanks to your advice.

I have been working in routine G28.

If I achieve my goals, I will share that information.

Thanks. smiling smiley
Sorry, only registered users may post in this forum.

Click here to login