Let's Make Robots!

Speed control with continuous rotation servo?

Hi everyone, I have a quick question regarding servos.

I've seen many similar posts around the internet but remain a bit confused. I have 2 standard, unmodified Hitec servos. I am using a Picaxe 28x1 to control these servos. I plan on using these servos as the motors that turn the wheels on my robot, and plan on modifying them for continuous rotation the most non-destructive way, without removing any circuitry. After modifications, I plan on simply sticking wheels to the servo horns and connecting my servos, coupled with appropriate resistors, to the digital output pins on my Picaxe.

The question however, is: Pretend I successfully modify and calibrate my servos, and after connecting them, if I write a line such as SERVO 2, 175, instead of turning to that position, it will instead start to spin in a certain direction at a certain speed. And then if I were to put SERVO 2, 160, will it continue to spin in the same direction but at a slightly slower speed? And then with a SERVO 2, 125, it will spin in the opposite direction at a speed faster than if I put SERVO 2, 140? So can I speed up and slow down my individual servos by simply changing the degrees of rotation? My final goal is to make the robot smoothly turn using the speed of the wheels, instead of turning them opposite directions to rotate my robot.

Sorry if my theory's way off, but don't worry about terminology and such. This isn't my first bot, just the first with this little twist... 

Comment viewing options

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

Ok, thanks a lot... one more thing though... does this apply to all standard servos, and would you happen to know whether in particular the Hitec 311 servo would be able to function like this?

OddBot's picture

Should work with any analog servo and most of the cheaper digital servos.

Ok, and one final tidbit, is it possible to somehow modify a servo for continuous rotation in a way that you can reverse the operation later and turn it back into a normal servo?

ignoblegnome's picture

This tip explains how to modify a servo and still have it work normally too.

However, it does require more modification and external electronics than a normal continuous servo mod.

OddBot's picture

That depends on how good you are and what servo you try and modify

Ok, well I'm done here. I think I'll go for it, thanks for your help.

So when I want to turn the robot, I could do something like SERVO 1, 170 and SERVO 2, 160 to make it turn towards the side Servo 2 is on since it will go slower than Servo 1?

OddBot's picture

Yes. Have a look at the picaxe code for Mr. General. Mr. General uses two continuous rotation servos.

OddBot's picture
You have got it right. For Picaxe 150 is theoretically the signal you send to make the servo stop. In practise you will have to experiment a bit. Also temperature can affect the servo control circuit so if you add a temperature sensor then you can compensate for temperature in your code.