Loading...
Pages: [1]   Go Down
Author Topic: Motor/encoder calculations - Accell, Decell and Stopping Distance  (Read 256 times)
0 Members and 1 Guest are viewing this topic.
NZ
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I have a motor with an quadrature encoder attached.
Reading the encoder, I can get the counts okay.

I would like to be able to go to a certain position (count), using a set max speed, a set acell and decell rate, possible a S curve for smooth operation, including some sort sort of correction in case of over/under shoot.
I have searched this site but not found anything.
Google hasn't produced much either. Either some very theoretical paper or nothing complete

Any suggestion appreciated

K
Logged

Southern California
Offline Offline
Sr. Member
****
Karma: 5
Posts: 466
I like blinky lights
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You could use the AccelStepper library, keep track of the encoder counts while in your stepper.run() loop, then correct / stop / restart if what you expected to see isn't what the encoder says it sees.

Good luck!
Logged

http://en.wiktionary.org/wiki/magagna <-- My last name.  Pretty apt.

NZ
Offline Offline
Jr. Member
**
Karma: 1
Posts: 74
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, from what I can gather, I properly need to update speed/count/corrections every 1mS or so.
It seems that generally a PI function is used, instead of a PID, when it comes to motor control.

I'll spend some time trolling through PIC, Freescale, etc website looking for papers.
Some of the specific motor control chips may have some S/W that I can look at.

Thanks for the AccelStepper suggestion. Their site has some good stuff and the forum is usefull :-)
in case someone else is looking, here is the link
http://www.open.com.au/mikem/arduino/AccelStepper/

K
« Last Edit: October 30, 2012, 01:46:31 pm by fiddler » Logged

Pages: [1]   Go Up
Print
 
Jump to: