View Full Version : Continuous Servo motors

10-22-2009, 05:04 AM
Am having problem with my continuous servo motor using the bs2 board as the interface for the program code. The code is suppose to rotate only from 0 to 180 degrees (back and fort) on one position but it keeps adding up in bits till it makes a 360 degree turn in groups of 180 degrees. pls view my attached code and see if anyone has any modifications·or ideas on how to program a continuous motor to rotate 180 degrees. Thanks

Mike Green
10-22-2009, 05:12 AM
You can't do it.

The way a continuous servo motor is made is to disable the feedback mechanism in a standard servo that allows it to be repositioned fairly accurately to the same position repeatedly. The only way to move a continuous motion servo back and forth is to move it at a specific speed for a known amount of time over and over again. Unfortunately, the speed control and the timing cannot be done accurately enough to consistently reposition the servo to the same position.

The only way to do this sort of movement is to go back to using a standard servo. You can buy some with extended motion (greater than 180 degrees). Some sold as winch motors for sailing ship models will turn 2-3 turns with control pulses over the 1-2ms range.

Another alternative is to use a wheel encoder that allows you to determine the wheel's position accurately and use that to stop the motor at a particular position.

10-22-2009, 05:15 AM
Thanks Mike Green and how do i get the wheel encoder?

Mike Green
10-22-2009, 05:22 AM
Parallax has a simple one designed for use with the BoeBot: www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/80/Default.aspx?txtSearch=wheel+encoder (http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/80/Default.aspx?txtSearch=wheel+encoder).

As another example, their Motor and Wheel Kit has a position encoder used with the position controller: www.parallax.com/Store/Accessories/MotorServos/tabid/163/CategoryID/57/List/0/Level/a/ProductID/507/Default.aspx?SortField=ProductName%2cProductName (http://www.parallax.com/Store/Accessories/MotorServos/tabid/163/CategoryID/57/List/0/Level/a/ProductID/507/Default.aspx?SortField=ProductName%2cProductName).

You could also do a web search for "wheel encoder" and you'll get a lot of robotics suppliers and some tutorials on how they work and how to use them.

10-22-2009, 05:25 AM
Thanks Mike Green

10-22-2009, 11:23 AM

If you are looking for the action of moving back and forth here is something that should help. You can set the servo to a known position and with some fine tuning in the code you can simulate a·sweep from·0° to 180°

If that doesn't work, you can always look at the products Mike suggested.


Joshua Donelson
www.parallax.com (http://www.parallax.com)

10-26-2009, 06:45 AM
Hi Please can anyone help me with a code that can rotate a continuous servo motor from 0 - 180 degree and 180 to 0 degree precisely without the counter adding one each time. Thanks

10-26-2009, 06:47 AM
i.e -

0 -- 180 degree ( clockwise)

180 -- 0 degree ( Counter clockwise)

Mike Green
10-26-2009, 07:50 AM
Again, you can't do it. You have to use a standard servo or a wheel position encoder.

10-26-2009, 08:47 AM
Maybe have a micro switch that is activated at the 90 deg position.That way you will have a reference to "home". Or just use the switch (in your case being 180 deg) as the limit of travel.