Let's Make Robots!


How do you program a full continius servo (360 degrees) in a Picaxe 28x1 board?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

A standard servo is designed to have a range range of around 270 degrees (3/4 of a revolution) so if you're looking for 360 degrees from one of those, it's a non-starter.  There are also winch servos which can give you a couple of revolutions, with reduced resolution. These cost more than standard servos.

If, however, you have a servo modified for continuous rotation then you can control the direction and speed of rotation.  Depending on the controller board, you'll be able to get between 3 and 10 or so steps between stop and full speed.  I've found that digital servos give more control over this than analogue ones.

You'll need to find the centre (stationary) position, then speed control will be a few steps above and below this.  Centre will be around 150, but can be a bit either side. Also, it may drift a bit when in use - very annoying.

Here's a bit of (untested) code to play around with it.  Pot on ADC0, servo on output 1.

#picaxe 28x1
servo output1,150

    readadc 0, b0
    servopos output1,b0
    pause 200

The servo's that i am going to buy are continues rotation servo's.

And yeah they are expensive, but i don't want to hack into a normal servo.

Do you control them like a motor or how else??

I meaned continuous rotation, use still the same code.

I will try when i have the servo's

Is it a modified servo? If is, then this may help:

symbol servomotor = B.1 'Servo set on B.1

servo servomotor,150 'Servo stops at central position
pause 100
servo servomotor,130 'Servo goes backwards
pause 1000 
servo servomotor,170 'Servo goes forwards
goto main 'Repeats the loop