Loading...
Pages: [1]   Go Down
Author Topic: Servo Motor Position Control with potentiometer  (Read 461 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello
  i have a project about position control. In my project, servo must turn 5 10 15 20 25 30 35 40 45 50 55 60 degrees. When Motor turns 5 degrees then coming 0 position (e.g 5 0 10 0 15 0) angels adjustment with pot. if you have similar example, can you share me?

thank you
Logged

Johannesburg UTC+2
Offline Offline
Edison Member
*
Karma: 34
Posts: 1705
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not 100% sure what you mean, but in any case, have you looked at this tutorial?

And what have you tried so far?
Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Firstly, i am sorry for bad english. i will use 10k pot and angle change by potentiometer. for example, digital value 200 and motor have to run 5 degree clockwise after this, motor must come first position (0 degree). it's my first project at arduino board.  smiley-grin
Logged

Johannesburg UTC+2
Offline Offline
Edison Member
*
Karma: 34
Posts: 1705
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well first of all try that knob tutorial... then think about how to get it back to 0 each time
Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

your example tutorial http://arduino.cc/en/Tutorial/Knob  is  so basic. i used pic series for position control it's easy but i don't have an idea for turn back 0 position  so i search example code 
Logged

0
Offline Offline
Tesla Member
***
Karma: 50
Posts: 6533
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but i don't have an idea for turn back 0 position  so i search example code 

Generally you rotate the pot knob the opposite direction.
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

Johannesburg UTC+2
Offline Offline
Edison Member
*
Karma: 34
Posts: 1705
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but i don't have an idea for turn back 0 position  so i search example code 

Generally you rotate the pot knob the opposite direction.

Yeah but In think he means, once it's "parked" at the X degree position as dictated by the pot, it must go back to 0 by itself. That, of course, will leave the pot still sitting at the position calling for X degrees so not sure what OP expects to happen then.....
Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

Malaysia
Offline Offline
Sr. Member
****
Karma: 7
Posts: 385
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Then its better to use an encorder. But 1 work around that i could think of if he turn thr pot to 0 if every time he what to move the servo
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes i tried code and it's working good thanks but sometimes, there is a vibration on servo. How can i correct that? PID is useful for this mistake?

thank you for your answer smiley
Logged

Johannesburg UTC+2
Offline Offline
Edison Member
*
Karma: 34
Posts: 1705
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
sometimes, there is a vibration on servo

Does the servo have its own power supply or is it from the Arduino 5v? Lots of "funnies" go away when a servo has its own power.
Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

power supply is coming from arduino board.( 5v)
Logged

Johannesburg UTC+2
Offline Offline
Edison Member
*
Karma: 34
Posts: 1705
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try it with its own power, it might make a difference.... see my pic attached
Logged

IT Crowd:
Roy... "Have you tried turning it off and on again?"
Moss.. "Have you tried forcing an unexpected reboot?"

0
Offline Offline
Tesla Member
***
Karma: 50
Posts: 6533
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

power supply is coming from arduino board.( 5v)

Bad!
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

Pages: [1]   Go Up
Print
 
Jump to: