Pages: [1]   Go Down
Author Topic: Servo Motor Position Control with potentiometer  (Read 1005 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
Faraday Member
**
Karma: 60
Posts: 3242
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

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

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
Faraday Member
**
Karma: 60
Posts: 3242
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

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

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: 114
Posts: 8911
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

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Johannesburg UTC+2
Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
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

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

Malaysia
Offline Offline
Sr. Member
****
Karma: 7
Posts: 393
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
Faraday Member
**
Karma: 60
Posts: 3242
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

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

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
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* one servo.jpg (889.78 KB, 2838x1473 - viewed 12 times.)
Logged

Have you looked for answers in the Learning, Reference, Products and Playground tabs on http://arduino.cc/en/ ?
Look here http://electronicsclub.info/ for basic electronics

0
Offline Offline
Tesla Member
***
Karma: 114
Posts: 8911
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Bad!
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Pages: [1]   Go Up
Jump to: