Control the positioning of a continuous servo with a potentiometer and arduino

preview_player
Показать описание
This is a quick attempt to control the positioning of a continuous rotation servo with just a potentiometer. With the first code I check the exact middle point (where the servo stops, 1500 theoretically); in the second one I take control of the servo.

DISCLAIMER: Because of the big inaccuracy of these motors, you can't express rotation in degrees and there is no angle feedback; so the positioning will be always very approximate. Any improvement or suggestions would be greatly appreciated!

Code:

Basic wiring:

I also recommend this library:

Servo I used:
PARALLAX STD PM BB HT HS

Coffee?

#arduinotutorial #servomotor #potentiometer
Рекомендации по теме
Комментарии
Автор

This! Thanks! Was wondering why servos seemed so basic.

OMNI_INFINITY
Автор

Hi.
very good video.
I got a question, should I start the variable "potStop" with what value?

henriquecoala
Автор

Could you use millis() as a way of limiting the rotation? Is the speed and acceleration of the motors at a given pulse width consistent enough?

dritslem
Автор

What is 65000 in the code, can u explain why 65000 is used for, this would of great help.

chakradharv
Автор

Bro.. Please help me out..
The servo is rotating continuously.. The rotation is not corresponding to the potentiometer value.. Just the speed of rotation is being affected i think.. I used the same code and same connections as shown in the video..
What should I do?

sacheth
Автор

codes link is not found. can you reupload ?

abungsubangga-ouby
Автор

Is the acuraccy good enough ? I was thinking about using this method instead of stepper motor for controlling lens focus. What do you think ?

sWetPlays
Автор

I have a question can I use the same code for Arduino Uno too ? And also can I use two servos and potentiometers in the setup ?

unknownmultipurpose
Автор

Could I use a micro servo (180 degrees) to control the position of the Potentiometer, and program it to represent every degree of movement of the micro servo/pot as 2 degrees of movement on the continuous servo? I need 360 degree of positional control for a project, but I don't wanna spend $60 on a sail winch servo, or program an encoder. Any suggestions ?

theonlyplaymaker
Автор

Hey man, cool video!! If you still have your code could you update your description link… It doesn’t seem to be working

nikan
Автор

hey man, just wondering if you could upload an updated link for the code? i was feeling pretty hopeless about this project im doing until i saw this :C

Jimmy-rvdh
Автор

I am working on something like a vending machine in my graduation project and I am using cont. rotation servo motor but I discovered that the position is not fixed even when I specify an interval for it, the position changes. Is there any solution in your opinion? can I use something like this to fix the position by potentiometer I want to hear from you

remi
Автор

Hello !! Continuous rotation servomotor can be controlled without potentiometer? Thanks !!

carlosandressaldana
Автор

What is the difference between using a normal motor and a continuous servo?
And
How to differentiate between a normal servo and continuous servo?

domtoretto
Автор

Link with codes has been expired. Could you refresh it or give another in the comments, please!

kentavarxd
Автор

I really need the code for position control.... And the drive link is not working 😢.... Please help @sandro

mohammedsohailsheikh
Автор

Which servo motor is this and what is the exact model?

printerautomations
Автор

Can you share the code please? I'm working in a project that needs position control on the servo. Thanks!

Iam.paradox-
Автор

update Drive link please, it is not working

mohamedelshami
Автор

Hi,
Thanks a lot, its really greate effort and great knowledge.
i need to do a project for a preset position linear actuator with a DC motor abd a stepper motor, with Arduino Mega or UNO but i am not able to write the code and the scheme, can you please help.
Regards

kifahzaidan