Standard Servo Oscillates when sweeping
DrD
Posts: 8
My standard servo oscillates about the position rather than sweeping smoothly thru the range when gradually increasing the pulsout length from 1000uS to 2000uS.
· I have tried different servos and different power sources. I· have varied the pause period from 1-200mS
How can I fix this?
Post Edited (DrD) : 11/24/2005 2:22:09 AM GMT
· I have tried different servos and different power sources. I· have varied the pause period from 1-200mS
How can I fix this?
Post Edited (DrD) : 11/24/2005 2:22:09 AM GMT
bs2
5K
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
PULSOUT vertout,vert
PAUSE 20
FOR horiz = 500 TO 1000 STEP 5
PULSOUT horizout,horiz
PAUSE 20
GOSUB Read_GP2D12 ' Read Sensor Value
GOSUB Calculate_Distance ' Convert Value To cm
SEROUT TX, LcdBaud, [noparse][[/noparse]LcdLine1,"Distance: ",DEC2 cm]
SEROUT TX, LcdBaud, [noparse][[/noparse]LcdLine2,"vert",DEC4 vert,"horz",DEC4 horiz]
NEXT
NEXT
END
·· Well, I give you an e for effort...But that is not the complete code.· Pasting that into my editor to try it won't even compile.· I think if more people attached their code too, instead of pasting into the message, more people, including myself would be more inclined to open it in our Stamp Editor and actually try it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I have attached the code file to my original posting
·· See, now this gives a much clearer picture of what's going on...First of all you won't be needing 20 mS pauses in the loop because you're doing too much other stuff in between.· I question whether or not the servos will even be refreshed enough as it is.· Another thing is that if you're going to call these two routines in·a·row each time, you may as well make it one subroutine and save jumping around in the program so much.· I will have to check more, since without the full hardware setup this will be a little more involved to check out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
thank you. putting the vertical sweep in the fast loop and eliminating the Gosubs and lcd outputs makes a very smooth sweep now I just need to get the fast loop timing right