Need to run two 3-axis stepper controlled arms

More
08 Jan 2014 18:29 #42487 by grey1beard
Having nearly finished building two articulated arms, each controlled by three stepper motors at the 'joints', I'm looking to use Axis to control them.
I haven't yet explored the problems of a 6-axis controller, but as regards writing g-code for them, can I use xyz and uvw, so that I can integrate their movements ?

More questions later, but this seems to be the first one to get clear in my old head.
I'm using an Axis sim on my laptop for all my current 3-axis work, but can't find my way back to getting the initial gui that showed all the sim options, and though I remember a 9-axis sim, but not a 6-axis one.

John

Please Log in or Create an account to join the conversation.

More
08 Jan 2014 21:42 #42498 by andypugh

Having nearly finished building two articulated arms, each controlled by three stepper motors at the 'joints', I'm looking to use Axis to control them.
I haven't yet explored the problems of a 6-axis controller, but as regards writing g-code for them, can I use xyz and uvw, so that I can integrate their movements ?


What do you want the final result to be?

Do you want XYZ/UVW to control the joint angles directly, or do you want the end-points of each arm to move in cartesian space along paths defined in two XYZ axes?

In the first case you need to make a 9-axis config, (with at least an [AXIS_N] section for the unused A, B and C.
In the INI set [TRAJ] COORDINATES to XYZUVW
www.linuxcnc.org/docs/html/config/ini_co...tml#sub:TRAJ-section

At this point you have a system where G-code X-words send a position command to axis.0.motor-pos-cmd and W-words to axis.8.motor-pos-cmd. In HAL you only need stepgens for the number of actual joints, so you would probably use
loadrt stepgen step_type=p,p,p,p,p,p 
...
net X-pos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net Y-pos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net Z-pos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net U-pos-cmd axis.6.motor-pos-cmd => stepgen.3.position-cmd
net V-pos-cmd axis.7.motor-pos-cmd => stepgen.4.position-cmd
net W-pos-cmd axis.8.motor-pos-cmd => stepgen.5.position-cmd

Just try not to get confused about the axis/stepgen numbering.

If, on the other hand, you want the arm-ends to move in cartesian XYZ directions, then that would require a custom kinematics module.
But it would be rather fun to see and is eminently possible. You might want to look at the joints_axes4 branch for this though, as it separates the concepts of joints and axes rather better than does the normal branch. I am still hoping that 2.6 will be a joints_axes version.
The following user(s) said Thank You: grey1beard

Please Log in or Create an account to join the conversation.

More
09 Jan 2014 00:58 #42510 by grey1beard
Blimey, Andy. Most of that went in one eye and out the other !
However, I'll concentrate and give it several readings. One thing did get home though, and that's that I had been assuming that I would be moving the ends in a cartesian space.
This is the idea - I have built two identical arms, each with two steppers and some internal belt drives, set up so that movement by one stepper rotates the arm, and the other extends the reach, so in effect giving the arm the ability to scan an area. Third steppers give a vertical movement to the end of the outermost sections.

Unfortunately, the two arms overlap a central area, and I have yet to decide the best way of dealing with this, but I thought that if I could run the two arms with one controller, using X,Y and U,V as input codes to separate the instructions, the machine doesn't 'need to know' that it's two seperate devices !

I hope that gives you some indication of just how little I know. :unsure:

I'll try and sort out a photo for tomorrow's posting, after I've done some re-reading.

John

Please Log in or Create an account to join the conversation.

More
10 Jan 2014 01:12 #42555 by grey1beard
Finishing the last drive wires tonight, but herewith a couple of photos to give some reality to what I'm trying to do.
Please let me know if you need any explanation of what the photos show.
Close up of one of the arms. The lowest stepper swings the whole assembly horizontally. The next one, drives the inboard end of the arm, which is geared to the outer arm (the hammer) with a 2:1 drive with the result that the tip of the hammer arm moves in a straight line.

The upper small stepper controls only the vertical movement of the hammer arm.
The second photo shows the overall arrangement with the dulcimer( needs re-stringing ! ), with a red disc showing the striking positions.
By this you can see that there are only a limited number of positions that the hammers are needed to go to, and the 'resolution' is pretty low - of the order of +/- 2mm !

John
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Jan 2014 01:26 #42556 by andypugh
I suspect that writing a "dulcimerkins" for that system might be more trouble than it is worth.
It would probably suffice to define an O-word sub for each striking position that simply moved the hammers to the required (expermintally determined) points.

Having said that, the kinematics is probably fairly straightforward. You basically need to modify scarakins to handle 4 more joints:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...56bda9ab526e;hb=HEAD

Please Log in or Create an account to join the conversation.

More
10 Jan 2014 01:45 #42557 by grey1beard
Combine the words "end", "deep", and "thrown in at the" to make a common phrase or saying !

Thanks Andy.

I have just spotted a six axis breakout board on ebay, and combined with the driver boards I already have , perhaps I would have at least the hardware sorted ?
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Jan 2014 20:56 #42577 by andypugh

I have just spotted a six axis breakout board on ebay, and combined with the driver boards I already have , perhaps I would have at least the hardware sorted ?


I have frequently not bothered with breakout boards at all. You can typically wire stepper drives directly to the parallel port. There is some risk, but it is fairly small.

Parallel ports typically sink more current than they can source, so with a typical stepper drive with opto-issolated inputs the wiring is +5V to the input+, then wire the input- to the parallel port. Then when the p-port is 0 the current flows from the +5V line, through the opto, triggering the step, and then back into the parport to GND. When the parport is 1 then there is no voltage difference between the two sides of the opto, and no current flows.
Wiring this way does require that the parallel port pins are set up inverted, so "step" = 0 and "space" = 1. This is a tick-box against each pin in stepconf.
The following user(s) said Thank You: grey1beard

Please Log in or Create an account to join the conversation.

More
11 Jan 2014 00:05 #42580 by BigJohnT
John,

Pretty neat!

JT
The following user(s) said Thank You: grey1beard

Please Log in or Create an account to join the conversation.

More
11 Jan 2014 01:25 #42583 by grey1beard
Andy, that looks really neat. I shall have to investigate the posibilities of going that route.
Many thanks,
John

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum