Loading...
Pages: [1]   Go Down
Author Topic: DC motor position control using potentiometer - HELP!  (Read 1256 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there!
I would like to ask you if there is the possibility to control position of a DC motor using a potentiometer connected to the motor shaft.
Can somebody explain me step by step how to do this ????, it is the first time I'm working with Arduino. I know how a PID controller can be applied.
I have to use the following materials:

DC Motor (7V)
Potentiometer (I can turn it from 0 to 300 degrees)
transistor
diode
resistor
External adapter
Motor shield for Arduino

Please I need your help urgently.
Thank you for reading this message.
Logged

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

Why not use a servo?

What you're suggesting is basically what's inside a servo anyway as far as I understand it.

Oh wait, I see you have to use certain materials- is that constraint absolutely fixed? So you're actually building a servo?
« Last Edit: January 22, 2013, 01:34:16 pm by JimboZA » 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: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello JimboZA :
I'm very glad you have read my message. The problem I have to resolve is with the materials written before.
The challenge is to use a normal DC Motor (not servo), a potentiometer (It can be turned from 0 to 300 degrees). The potentiometer should be used like sensor to measure the motor shaft rotation angle. I have to use Arduino UNO board and motor shield.
I need to design a PID controller to control position of that DC Motor. I know how PID controller works but I have no experience working with electronics.
Could you help me with this challenge please ???
Thank you so much
Logged

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

Quote
Could you help me with this challenge please ???

I think that's beyond my skills I'm afraid.... that's why I buy servos not make them from DC motors  smiley-wink
Logged

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What speed does the motor turn at? At 10 rpm, you could read the potentiometer fast enough to stop the motor at a relatively precise location. At 36000 rpm, not a snowball's chance.
Logged

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

May I know how you control the position?
turning the potentiometer ? or by giving a signal?
Logged

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

The position of the DC motor should be detected by the potentiometer.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 311
Posts: 35470
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The position of the DC motor should be detected by the potentiometer.
You seem to have some bizarre expectation of the potentiometer. The motor could turn the potentiometer as it turns. Then, the potentiometer reading would relate to motor position. If the motor doesn't turn the potentiometer, then the potentiometer won't tell you squat about where the motor is.

You need to answer ALL the questions that are asked of you.
Logged

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

smiley-sad I think Arduino is not the best way in order to test a control strategy in real-Time. But I will try it once again. In spite of that I think a Data acquisition card should be the best choice. May be is more difficult but you can apply advanced control strategies. I dont know may be it is possible to do it with Arduino. For example if I want to test a linear quadratic controller, I dont know if Arduino will be able to calculate the state estimation of the system at each sampling time in order to apply a closed-loop control using, of course, the corresponding matrix gain, which can be obtained solving the Riccati Equation using the corresponding state-space representation of the analyzed system.
That's why I need to find, firstly, the state model of the system.
Which kind of input signal I can use for the DC motor and how can I deal with the potentiometer if I can just turn it from 0 to 300 degrees. It is difficult. I'm waiting some advice.
Thank you for reading
Logged

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

Quote
I think Arduino is not the best way in order to test a control strategy in real-Time

Well, it depends on just what you are trying to do and what your electro-mechanical setup will be. You are somewhat sketchy on how the motor will be operating.
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

Offline Offline
God Member
*****
Karma: 9
Posts: 836
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you planning on gearing this DC motor ?

The problem is,  most DC motors are not actually designed to hold a particular position in a "stalled"
condition.   Some are,  but most are not.

Thats why you can buy a servo to accomplish the same thing.
Logged

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

Thats why you can buy a servo to accomplish the same thing.

Seems to me that this is a project to basically build a servo from first principles....
« Last Edit: January 24, 2013, 12:07:02 am by JimboZA » Logged

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

Pages: [1]   Go Up
Print
 
Jump to: