OK!... i know how to control the position of the standard servo! Woot!... but have no idea how to do it with the continuous servo... and still no idea how to incorporate the button
more progress through experimentation... continuous servo seems to run and stop eventually, but doesn't stop at specific points... will need to work on this more...
-edit-
furthur experimentation... continuous servo doesn't seem to follow rules... or its supposed to do that...
Initial Position Position change Outcome Angle
2000 1900 720ish
1598 1000 270 then back 180
1598 500 190 then back 360
2000 1000 540 then back 90
more progress through experimentation... continuous servo seems to run and stop eventually, but doesn't stop at specific points... will need to work on this more...
That is one problem associated with a continuous servo. The stopping point has to do with the timing of your program....not the servo itself. The servo rotates in the desired direction (depending on the pulse) until you tell it to stop.
A regular servo only positions itself to the pulse length. But it can not go in a full revolution.......so there are trade offs for each type.
A continuous rotation servo will do exactly that.· You give it a pulse that is non-neutral (other than about 1.5ms) and it will rotate continuously, provided you keep giving it pulses every 20ms.· If you give it pulse > neutral pulse, you get a rotation in one direction.· If you give it a pulse < neutral position, it goes the other direction.· These devices are no longer really "servos".· They're more like traditional motors when used this way, with a special front end.· These modified servos will not stop at specific points.· The best you can do is to stop them at specific times, which you will extrapolate to a certain amount of angular rotation.· If you need it to stop at a specific angle of rotation, you need to add an external shaft encoder.· Otherwise, you're back to using an unmodified servo. ;-)
The unmodified servos will go to a specified position, directly proportional to the pulse width that you give it, from 1.0 to 2.0ms, extreme to extreme.
If you want to stop a continuous rotation servo, you need to send it a neutral pulse.· and if you want to lock it there, you have to continue to send neutral pulses every 20 ms.·
If you want to move a continuous rotation servo just a little bit, that means you have to send it non-neutral pulses for a certain amount of time.· It will move for as long as you keep giving it these pulses, spaced 20ms apart.· The magnitude of the pulse determines the direction of rotation.· See above.·
A shaft encoder is a device that outputs a series of pulses as the shaft it is connected to spins. Some shaft encoders output a pulse train using quadrature output (2 signals, 4 values) that can be used to determine relative direction of rotation. Others output a discreet word that describes absolute position.
Don't worry about this.. this isn't what you need for your project. I think you need to step back and figure out what you are really trying to accomplish. Earlier in the thread, you stated that you knew how to move a standard servo, and a continuous rotation servo. So, now that you have both building blocks working, you should be good to go, right? Is the success that you stated above an accurate statement, or do you still have issues getting either to work?
sweet!! ok i got it to move like 1 degree stop and repeat... i know how to modify this so i'm gud... i just need to figure out the button portion of the code now
u have no idea how happy I am... thanx fo all the help... not there yet but getting there
Just remember that we have all been there. You must have patience and your results will eventually pay off.
The caveat is that once you are bitten by the bug it is usually here to stay, creating more and more challenges
for you to overcome along the way. Have fun!! enjoy the ride!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
button isn't workin still... i also came upon a problem... I'm makin this convier (don't know how to spell it) belt and apparently i didn't make them with even space... there are ten spaces... is it possible to make it move a certain amount for each time pressed?... like the first time it's some amount then the second time a different amount... then repeat for every ten
You need a repeat in your button_1 routine otherwise it will check the button and finish instantly.
The repeat should be before the if statement so it will keep checking the button, if it is pressed it will do one thing otherwise it will do the other.
alright sweet... got the button to react with the servo... now i need help with this portion...
I'm makin this convier (don't know how to spell it) belt and
apparently i didn't make them with even space... there are
ten spaces... is it possible to make it move a certain amount
for each time pressed?... like the first time it's some amount
then the second time a different amount... then repeat for
every ten
With the continuous rotation servos, you can't reliably get them to move the same amount every time you activate them (to move your conveyor belt [noparse][[/noparse]conveys stuff down the road or whatever]). If you need reliable positioning, you will need an external encoder of some kind. Look at Parallax's encoder for the BOE-BOT <http://www.parallax.com/detail.asp?product_id=28107>. This just counts the number of wheel holes that move by a sensor, but can provide fairly accurate wheel positioning data. You could attach a sensor belt to your conveyor belt, just a fabric or plastic/rubber strip with holes evenly spaced where you want the belt to stop. An IR sensor near your servo motor could sense when a hole comes by and cause the Propeller to stop the servo right there.
You could also put marks on the conveyor belt, and use an optical sensor to detect them. It sounds as if your belt is separated into zones or pockets. You could just have one mark per pocket, and program the Prop to stop when it sees the mark. If the belt will be used in a dirty industrial environment, holes would be better than marks, or even small magnets used with Hall-effect sensors or reed switches.
umm... well... here's the thing... 9 out of 10 of them are evenly spaced... one is off... i'll do some more modifications and see what happens... i do have a photo resistor... mayb i cud try and use that somehow...
Comments
-edit-
furthur experimentation... continuous servo doesn't seem to follow rules... or its supposed to do that...
Initial Position Position change Outcome Angle
2000 1900 720ish
1598 1000 270 then back 180
1598 500 190 then back 360
2000 1000 540 then back 90
is this normal or is there something wrong?
Post Edited (Somnium) : 10/18/2006 1:42:49 AM GMT
A regular servo only positions itself to the pulse length. But it can not go in a full revolution.......so there are trade offs for each type.
James L
A continuous rotation servo will do exactly that.· You give it a pulse that is non-neutral (other than about 1.5ms) and it will rotate continuously, provided you keep giving it pulses every 20ms.· If you give it pulse > neutral pulse, you get a rotation in one direction.· If you give it a pulse < neutral position, it goes the other direction.· These devices are no longer really "servos".· They're more like traditional motors when used this way, with a special front end.· These modified servos will not stop at specific points.· The best you can do is to stop them at specific times, which you will extrapolate to a certain amount of angular rotation.· If you need it to stop at a specific angle of rotation, you need to add an external shaft encoder.· Otherwise, you're back to using an unmodified servo. ;-)
The unmodified servos will go to a specified position, directly proportional to the pulse width that you give it, from 1.0 to 2.0ms, extreme to extreme.
If you want to stop a continuous rotation servo, you need to send it a neutral pulse.· and if you want to lock it there, you have to continue to send neutral pulses every 20 ms.·
If you want to move a continuous rotation servo just a little bit, that means you have to send it non-neutral pulses for a certain amount of time.· It will move for as long as you keep giving it these pulses, spaced 20ms apart.· The magnitude of the pulse determines the direction of rotation.· See above.·
Joel-
·
Don't worry about this.. this isn't what you need for your project. I think you need to step back and figure out what you are really trying to accomplish. Earlier in the thread, you stated that you knew how to move a standard servo, and a continuous rotation servo. So, now that you have both building blocks working, you should be good to go, right? Is the success that you stated above an accurate statement, or do you still have issues getting either to work?
Joel-
u have no idea how happy I am... thanx fo all the help... not there yet but getting there
James L
James L
Just remember that we have all been there. You must have patience and your results will eventually pay off.
The caveat is that once you are bitten by the bug it is usually here to stay, creating more and more challenges
for you to overcome along the way. Have fun!! enjoy the ride!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
button isn't workin still... i also came upon a problem... I'm makin this convier (don't know how to spell it) belt and apparently i didn't make them with even space... there are ten spaces... is it possible to make it move a certain amount for each time pressed?... like the first time it's some amount then the second time a different amount... then repeat for every ten
Button pushed add 1 to "X"
check "X" and move servo dependent on that number
When "X" reaches 10 erase and repeat over
I'm so confused as to how to do this... help plz!
The repeat should be before the if statement so it will keep checking the button, if it is pressed it will do one thing otherwise it will do the other.
Graham
any ideas and thoughts would be great
-Phil