Go Down

### Topic: sort of delta robot/polygraph (Read 3622 times)previous topic - next topic

#### kerimil

##### Nov 21, 2012, 05:07 pmLast Edit: Nov 21, 2012, 05:09 pm by kerimil Reason: 1
Hi,
I want to build something that works vaguely along the lines of this>>

Essentially use 2 step motors, some steel cable/wire and arduino to control azimuth and elevation of a pneumatic launcher (well in this case it would be more like a mortar since the gun would be attached to the ground by a universal joint).

It should work more less like this -> I set azimuth and elevation and the sketch in processing does some maths and translates that into commands for arduino that in turn order each step motor to move X and Y number of steps.

If you can visualise that you'll realise it's pretty clever. Unfortunatelly, I am totally lost when it comes to maths. Can anyone offer some insight into this or post some links ?

#### Boffin1

#1
##### Nov 21, 2012, 05:27 pm
With so many variables ( some dynamic like the wind ) you might be better at starting with a rough guess, and having 4 buttons -  " up a bit " ,"down a bit " , " left a bit" and " right a bit "  , just like real mortars have been aimed for years :-)
45 years of editing projects with a knife and soldering iron, then I found Arduino !

#### kerimil

#2
##### Nov 21, 2012, 05:43 pmLast Edit: Nov 21, 2012, 06:24 pm by kerimil Reason: 1
external ballistics is completelly different topic... whether or not the projectile hits the intended target depends on more variables but first I have to deal with the end effector here so to speak - ie. what calculations are needed to translate my request -> azimuth 120.5deg; elevation 42deg into numer of steps for the two step motors

#### Boffin1

#3
##### Nov 21, 2012, 06:49 pm
Yes, I was suggesting that even working out the angle of the tube, compared to motor steps, would be complicated.
You  might be better mapping out the result after incrementing each motor, and refer back to the map for subsequent firings.

45 years of editing projects with a knife and soldering iron, then I found Arduino !

#### kerimil

#4
##### Nov 21, 2012, 07:10 pm
well the beauty of this design is that the mathematic formula takes care of everything... hardware is simple so is setting up

..but since I don't have the damn formula I am pretty much f#### :-D

#### Boffin1

#5
##### Nov 21, 2012, 07:57 pm
well with each angle of the tripod changing with each step, lets see if anyone can come up with a formula :-)
45 years of editing projects with a knife and soldering iron, then I found Arduino !

#### kerimil

#6
##### Nov 21, 2012, 07:58 pm
It is possible - trust me

but...
I can barely understand trigonometry in 2d... so 3d is out of my league

#### justone

#7
##### Nov 21, 2012, 09:57 pm
The tube being fixed at one end and the other end of the tube moves then the moving end becomes a point on a sphere.

Look into spherical to rectangular conversion.

#### justjed

#8
##### Nov 22, 2012, 02:01 am
I think I would punt and either:
* determine it empirically by driving the motor n steps and measuring the angle before and after, or
* use servos instead of stepper motors. servos are already designed to go to angle X and stay there.

OTOH, I don't see a huge math problem here. You just want to determine degrees of rotation?

So, imagine a 180 step stepper motor. So each step is 2 degrees. If you want 0.5 degree per step, then you'll need a 1:4 drive ratio.

Here are some stepper motors. Note these are all 1.8 degree steps. Or, you could by a 20-step per turn motor, then each step is 360/20 degrees -- for that, 1:20 drive ratio would get you 1 degree per step.

http://www.hansen-motor.com/step-motor-19.php -- 7.5 and 15 degree steppers. You can also get steppers with attached reduction gearboxes.

This is just multiplication and division, to determine how many degrees you get, based on your drive ratio.
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

#### kerimil

#9
##### Nov 25, 2012, 09:22 pm
Thx for all the replies but you've been wrong. I think I know how to do it.
The best thing I can do is to model the entire setup in 3D using processing - keeping all the dimensions... that is I've got to setup up a gun model that can move to set elecation and azimuth and then use dist function to get distance from the barrel breacket where the wires are attached to both the step motors

I know it's kind of retarded but it will work, so I am fcking happy and feel damn intelligent (while feeling kind of dumb for not being able to come up with a formula) :-D

#### justjed

#10
##### Nov 27, 2012, 02:42 am

Thx for all the replies but you've been wrong.

So, you're trying to do this by pulling on your barrel with wires, at some distance away from the pivots? Oooph.
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

#### PeterH

#11
##### Nov 27, 2012, 03:34 pm
If you know how to calculate sin, cos and tan then you can reduce the 3D problem to a set of 2D problems and solve them simultaneously. It's not rocket science. Well, technically it is. But it's not especially hard - it just needs you to solve some simultaneous equations. I'm too lazy to solve them for you, though. If you can use Processing's 3D rendering engine to get it to do the calculations for you, that strikes me as a very sensible approach to take. I suspect that in order to get any sort of accuracy you'll need to use successive approximations anyway, so the accuracy of the initial azimuth/elevation calculation is not critical; the angles you're giving as input are themselves only approximate solutions to the real problem of hitting a specified landing spot.
I only provide help via the forum - please do not contact me for private consultancy.

#### kerimil

#12
##### Dec 01, 2012, 09:30 am
I kind of know how to do it in 2D - I wrote a few lines of code that translate carthesian 2D (x,y - where the mouse is pointing) to numer of steps for the motors. So pretty much something like a typical drawbot.
Sure it isn't 100% accurate as I have to convert from float (returned by dist) to integers (number of steps) I would have to do it anyway
Quote
So, you're trying to do this by pulling on your barrel with wires, at some distance away from the pivots? Oooph
Yeah that's pretty much the idea - say what you want but since it would require only TWO motors and very limited hardware to cover 360 deg arc and wide range of elevations - so I guess it's kind of cool idea. If this approach prove to be inaccurate then I might as well switch to theaded rods

Quote
the angles you're giving as input are themselves only approximate solutions to the real problem of hitting a specified landing spot
external ballistics IS very complex - I can assure you I am aware of it and I know there are lots of variables that have effect on it. Whether or not the projectile is stabilised (and how well it's stabilised), its BC value, muzzle velocity etc.

Mind you this post is pretty much about building a platform that can point the launcher in the right direction. It's in no way a complete system.

anyway have a look at this -> not mine but pretty cool >> http://www.spudfiles.com/forums/viewtopic,p,185036.html#185036

Go Up

Please enter a valid email to subscribe