Pages: 1 [2]   Go Down
Author Topic: Turning a motor into a servo  (Read 1951 times)
0 Members and 1 Guest are viewing this topic.
Australia
Offline Offline
Full Member
***
Karma: 8
Posts: 161
You dont have to touch powerlines for them to kill you, even looking at them for too long will make them angry.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/playground/Code/PIDLibrary

Just found this, might be of interest to you.
Logged

"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent di

Overijse, VL
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I saw it too, thanks. I didn't try it but know I did. The motor does some strange stuff but that could be due to the constants I used.
I asked my professor of Control Systems class and he too recommended to use stepper motors for my application. They are better for specific angle positioning. So I'll probably get a setup but don't know which one. Personnaly I've been a Pololu customer and they helped me out on the forum so I'll get it there... The A4983 stepper motor driver with the unipolar/bipolar 42x48mm stepper motor is less then 40 dollars and that wil probably the final decision. It is a bit more expensive than Sparkfun's mix. But the motor has a good holding torque which is nice and the driver can deliver more current. Its what they call 'learning money' smiley.
I'll use my 2 DC motors and dual motor driver for another project (or sell it to a friend)!
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11730
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Yes indeed. It can make up to 20kHz PWM signals. But the limitation is the Arduino's PWM frequency limits I think.


You can produce 256 levels of PWM at upto 62.5kHz with the ATmega's timers if programmed with divide-by-1 prescale.  By default they are set at divide-by-64.

A 'scope may be useful to determine what's going on.
Logged

[ I won't respond to messages, use the forum please ]

Overijse, VL
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay so my motor driver is the limit smiley. I used  a simple method to change PWM frequency (bit-banging PWM - see http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM). I posted the used code earlier. It is probably not efficient but it is all the arduino needs to do. I did not yet tried the timer method.

Thanks
Logged

Pages: 1 [2]   Go Up
Jump to: