Sentry Gun Project

Building or modifying BB, Airsoft, and Pellet type of guns. Show off your custom designs, find tips and other discussion. Target practice only!
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Thu Mar 17, 2011 8:42 am

Can you say "Lost zero"?
can you say 'OMG he knows that!!'? :D
Servos have position sensors...they KNOW where they are at all times
yeah, but this guy uses RC servos which can turn from -90 deg to +90 deg...

Sure, +-1 deg angle is ok for RC planes but a difference of 1 degree might mean a difference between missing and hitting the target...

Hey I can understand this guy... thx to RC servos he didn't have to worry about PIDs and stuff like that...
but I don't think it is up to the job - well unless you consider 15 meters to be long range

'Real' servos are motors with encoders... with a real servo you can put a gear on the motor shaft and get better precision than +-1 deg...
They even put encoders on step motors - that's one way to fix the problem you've mentioned

The other one is to use beefier motors with better drivers
Children are the future

unless we stop them now
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Thu Mar 17, 2011 9:45 am

jackssmirkingrevenge wrote: I think this was the conclusion we came to a while ago in this thread.

Sentry turret capable of tracking small fast targets -> servos

Sniper/artillery turret capable of hitting a point/slow moving target/coordinate -> stepper motors
Gippeto is correct but he has only noticed part of the problem with steppers. I'm not going to get into detail but the fundamental way steppers are told to move, by telling them to move x positions in y direction instead of just sending it a positions to try to reach, is the problem.
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Thu Mar 17, 2011 10:57 am

I'm not going to get into detail but the fundamental way steppers are told to move, by telling them to move x positions in y direction instead of just sending it a positions to try to reach, is the problem
uhmm I think it was established a few pages earlier

If a step motor moves 400 steps in one direction then you know it is 400 steps in that direction.... sure I know you used RC servos because they are easier to work with but don't write 'steppers suck' because that's not true...

Step motors are used for CNC machines... just because you didn't know how to get them to work the way you want doesn't mean that RC servos are better than steppers...


there is a simple library for controlling step motors here >> http://interface.khm.de/index.php/news/ ... r-library/
Children are the future

unless we stop them now
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Thu Mar 17, 2011 11:24 am

POLAND_SPUD wrote:uhmm I think it was established a few pages earlier

If a step motor moves 400 steps in one direction then you know it is 400 steps in that direction.... sure I know you used RC servos because they are easier to work with but don't write 'steppers suck' because that's not true...

Step motors are used for CNC machines... just because you didn't know how to get them to work the way you want doesn't mean that RC servos are better than steppers...


there is a simple library for controlling step motors here >> http://interface.khm.de/index.php/news/ ... r-library/
nah you're missing the point. I know all about steppers and have used them for plenty of projects. My point still stands. They are only good for 'dumb' machines -either something human controlled (RC turret, PTZ camera) or something that is just going through a list of motions (like a CNC machine). Feel free to prove me wrong by building an autonomous sentry with steppers. I dare you :)
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Thu Mar 17, 2011 1:41 pm

void absoluteSteps(int steps );//move to absolute target position
Have you actually checked the link I posted ?
Children are the future

unless we stop them now
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Thu Mar 17, 2011 2:45 pm

POLAND_SPUD wrote:
void absoluteSteps(int steps );//move to absolute target position
Have you actually checked the link I posted ?
Alright man, you're forcing me to teach you some things I was hoping you would figure out on your own.

Lets say you have a turret with steppers. It is aiming straight ahead. The software sees a target on the extreme right and tells the steppers to move x number of steps in y direction to aim at it. Now, BEFORE it has a chance to make it there, the software interrupts it and tells it to move x number of steps in some other direction because there is another target. Everything is fucked now. You might think, "well I'll solve that by making sure it waits long enough for it to make it to its first position." That is clearly retarded. You end up with a dumb, slow turret that STILL has a high chance of being off. Because of the way steppers work you are always just GUESSING what their position is when calculating how many steps in needs to move to go to the next position. Servos are far superior just for the simple fact that they have a potentiometer on their axis monitoring their TRUE position. No BS guessing is required.
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Thu Mar 17, 2011 4:45 pm

Servos are far superior just for the simple fact that they have a potentiometer on their axis monitoring their TRUE position. No BS guessing is required.
Servos are better.
But RC servos (your turret uses RC servos) are not true servos...

I don't know if you are aware of this but you can put an encoder on a step motor or geared motor - this will turn it into a servo... but you can't do anything to upgrade an RC servo - its precision is limited
Children are the future

unless we stop them now
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Thu Mar 17, 2011 6:39 pm

POLAND_SPUD wrote:Servos are better.
But RC servos (your turret uses RC servos) are not true servos...

I don't know if you are aware of this but you can put an encoder on a step motor or geared motor - this will turn it into a servo... but you can't do anything to upgrade an RC servo - its precision is limited
Yep, well aware of that too. You're missing the point again though. All an encoder is usually used for is to make the program controlling it come to a halt when the stepper has skipped too many steps (CNC machines do that for example). That doesn't solve the problem. Even if it did, then you have more problems to solve. They're much slower than RC servos (the fact that they are more precise doesn't make up for it. RC servos have more precision than what is needed for a turret), they have to be zeroed out every time you turn them on, they use a lot of power, etc.
User avatar
jackssmirkingrevenge
Five Star General
Five Star General
Posts: 26179
Joined: Thu Mar 15, 2007 11:28 pm
Has thanked: 543 times
Been thanked: 321 times

Donating Members

Thu Mar 17, 2011 11:08 pm

Feel free to prove me wrong by building an autonomous sentry with steppers.
Now that he's fiddling with Arudino, I would suggest that it would certainly make some contribution to the argument :)

The fact is that the sentry turret works great with servos for the purposes it is designed for.

An airsoft or paintball gun is hardly the 0.1 MOA sort of weapon that would benefit from extreme precision, and yes, 15 metres in this case is long range.

I'm pretty surethis thing doesn't run on RC servos, but then it can see targets coming and is capable of hitting them at ranges that demand extreme precision from whatever is moving the turret.
hectmarr wrote:You have to make many weapons, because this field is long and short life
User avatar
al-xg
Corporal 2
Corporal 2
Great Britain
Posts: 643
Joined: Fri Jan 19, 2007 12:29 pm

Fri Mar 18, 2011 12:12 pm

Wow that is a terrible video...
User avatar
ramses
Staff Sergeant 2
Staff Sergeant 2
United States of America
Posts: 1679
Joined: Thu May 29, 2008 6:50 pm

Fri Mar 18, 2011 3:24 pm

Depending on the stepper driver, you could interrupt it while it is moving.

Most real servos use incremental encoders that you give a pulse and direction. they set a counter to some number, then move the motor until the encoder registers the appropriate number of clicks. It then holds it there with PID. If the counter is changed, the PID seeks it out. If the counter gets high enough, the servo can loose it's zero (which flags the software)

the only disadvantages of a stepper with this type of arrangement is the finite number of steps, low torque at speed, and high power consumption.
POLAND_SPUD wrote:even if there was no link I'd know it's a bot because of female name :D
jimmy101
Sergeant Major
Sergeant Major
United States of America
Posts: 3197
Joined: Wed Mar 28, 2007 9:48 am
Location: Greenwood, Indiana
Has thanked: 5 times
Been thanked: 15 times
Contact:

Fri Mar 18, 2011 6:07 pm

JeffSinger wrote:Lets say you have a turret with steppers. It is aiming straight ahead. The software sees a target on the extreme right and tells the steppers to move x number of steps in y direction to aim at it. Now, BEFORE it has a chance to make it there, the software interrupts it and tells it to move x number of steps in some other direction because there is another target. Everything is [censored] now. You might think, "well I'll solve that by making sure it waits long enough for it to make it to its first position." That is clearly retarded. You end up with a dumb, slow turret that STILL has a high chance of being off. Because of the way steppers work you are always just GUESSING what their position is when calculating how many steps in needs to move to go to the next position. Servos are far superior just for the simple fact that they have a potentiometer on their axis monitoring their TRUE position. No BS guessing is required.
Yes it is true that if you control a stepper with stupid code then it'll behave in a stupid way. If you control a servo with stupid software it will also behave in a stupid way.

In the real world, particularly when precision is required, you don't tell the stepper to move X steps. You tell it to move 1 step and buffer the rest of the movement in software. If the target moves then you update the buffer. The software just looks to see if the buffer is non-zero then issues a single step command (with direction) and decrements the buffer. Telling the stepper to move 100 steps then, well before it has done that, you change the # steps is just stupid coding, not an intrinsic problem with the stepper motor.

The stepper has the advantage over the servo in that with proper control you can feed-forward the momentum of the motor+machinery, that is, the software knows how fast it has been issuing step commands and therefore knows the momentum state of the stepper and attached machinery. (Of course, feedback is always better than feed forward but feed forward is a lot easier to implement.) With a servo you don't generally have direct feedback as to what it is actually doing right now. If you do have feedback from a servo then you are partially defeating the purpose of the servo as a "go where I tell you without needing any further direction along the way".

With adequate feedback (e.g., position sensors) there is no real difference in precision or speed between a stepper and a servo.

Steppers have one common advantage over servos: they generally have much higher holding torque than does a similar sized and powered servo. Furthermore, steppers tend to be much more precise in situations where very little error can be tolerated. That is why CNC machines are almost always steppers and not servos. That little bit of wiggle as the servo uses its potentiometer and PID to get to where it is supposed to be is unacceptable in a precision milling machine.

And, it isn't true that "Servos are far superior just for the simple fact that they have a potentiometer on their axis monitoring their TRUE position. No BS guessing is required." It entirely depends on the setup. If the servo has it's own internal controller then the feedback can only fix the error if the motor has enough power to do so. Without feedback to the external (master) controller then the fact that the servo knows it is wrong is of no use, it is still wrong and the master controller doesn't know that. That is the exact same problem that steppers have. In both cases for a highly accurate system you must have feedback to the master controller, feedback to something like a servo's local controller isn't optimal, or even significantly better than just using a properly sized stepper with no feedback.

Overall the whole discussion of which is better is really kind of dumb. Each type of motor excel as some things and sucks at others. You can prove that is the case just by considering that huge numbers produced and large range of sizes of both types of motors that are available. If one type was clearly superior to the other then the crappy one wouldn't exist in the market place in thousands of different sizes and manufactured by dozens of different companies.
Image
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Fri Mar 18, 2011 7:39 pm

jimmy101 wrote: In the real world, particularly when precision is required, you don't tell the stepper to move X steps. You tell it to move 1 step and buffer the rest of the movement in software. If the target moves then you update the buffer. The software just looks to see if the buffer is non-zero then issues a single step command (with direction) and decrements the buffer. Telling the stepper to move 100 steps then, well before it has done that, you change the # steps is just stupid coding, not an intrinsic problem with the stepper motor.
You can't really trust the software to keep accurate track/time of stepper movement. CPU load is usually maxed out in image/video processing. When that happens some timers (threads) stop all together. I know what advantages steppers could have. The problem is that there isn't a stepper out there that you can just give a position command to like an RC servo. You'd have to build some sort of RC servo-stepper mutation where you somehow took the PPM board and POT from a servo and mounted it to a stepper. You'd have to create a controller that was a mix of stepper and servo so that you fed it position commands instead of steps and instead of sending out DC current to a regular DC motor, it controlled the movement of a stepper. As far as I know, nothing like that exists.
User avatar
POLAND_SPUD
Captain
Captain
Posts: 5402
Joined: Sat Oct 13, 2007 4:43 pm
Been thanked: 1 time

Sat Mar 19, 2011 2:34 am

You can't really trust the software to keep accurate track/time of stepper movement. CPU load is usually maxed out in image/video processing. When that happens some timers (threads) stop all together
That's why I suggested a microcontroler.... I've used code from the link I posted earlier in the thread and it works... you just send the absolute position through serial and the motor gets there... you might as well use ramp function that deals with inertia

Also if you think that mounting or torque is a big problem just get a step motor with a gearbox and you're set
Overall the whole discussion of which is better is really kind of dumb
Yeah, true but I don't like ppl who say that something is the bestestest :wink: and the other thing sucks... just because the product they advertise uses the former

Ohh BTW check this guy's turret...
https://sites.google.com/site/projectsentrygun/video-s
Children are the future

unless we stop them now
JeffSinger
Private 2
Private 2
Posts: 27
Joined: Sat Jan 23, 2010 11:26 am

Sat Mar 19, 2011 9:45 am

POLAND_SPUD wrote:That's why I suggested a microcontroler.... I've used code from the link I posted earlier in the thread and it works... you just send the absolute position through serial and the motor gets there... you might as well use ramp function that deals with inertia
You still don't get the fundamental problem. You'll just have to come to that obstacle yourself I guess (If you ever do any real development).
POLAND_SPUD wrote:Ohh BTW check this guy's turret...
I've seen it. It is just as bad as the others. The problem with the open source attempts is that there is a threshold of usefulness and they don't come close to crossing it. It is real obvious that they were made by some high school kid... which is fine. It's just that I personally needed something that actually worked well. These videos speak for themselves.
Last edited by JeffSinger on Sat Mar 19, 2011 11:33 am, edited 1 time in total.
Post Reply