CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Step Motor Positioner - trajectory/pulses , how to do it?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Eduardo__



Joined: 23 Nov 2011
Posts: 197
Location: Brazil

View user's profile Send private message

Step Motor Positioner - trajectory/pulses , how to do it?
PostPosted: Mon Feb 25, 2013 4:59 pm     Reply with quote

Step Motor Positioner - trajectory/pulses calculator library


Please, anyone have a step motor positioner library? I want to put the position, acceleration and maximum speed. Then, the function calculates and outputs the pulses(generating the ramp according acceleration, speed and target position).


If not, anyone knows the best way to do it?(using timers or any other idea) I appreciate any suggestions.


I want to create something like the "LM628/LM629 Precision Motion Controller Chip", but for stepper motor(LM628/9 is only for servo motor).

Thanks
Eduardo
_________________
Eduardo Guilherme Brandt
Eduardo__



Joined: 23 Nov 2011
Posts: 197
Location: Brazil

View user's profile Send private message

PostPosted: Thu Mar 21, 2013 4:35 pm     Reply with quote

any help?
_________________
Eduardo Guilherme Brandt
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Thu Mar 21, 2013 5:35 pm     Reply with quote

Sounds like a high value 'library' you are seeking

R U talking about:

whole step ?
fractional step?
speed ramp calcs?
got a CIRCUIT to show ?
TTM values?


explanation of the application?

write any code yourself, or hoping to crib for free??
Quote:

knows the best way to do it?

YEP BTDTGTTS Very Happy Very Happy Very Happy Very Happy Very Happy
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 21, 2013 7:40 pm     Reply with quote

There are a large number of projects with sample code out there
if you Google for this:
Quote:
PIC stepper motor controller program
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Mar 21, 2013 7:44 pm     Reply with quote

Major query ...what are you planning to use for feedback/position sensors?

Encoder, pot....?

Range of servo motion ? 180*,270*,360*,??

Which stepper motor/drive setup?

Speed ? response time?


Last steppers I used were from slo-syn.About 2HP each using LSI-11s for the brains.From that experience I've found it is far easier to use 'linear' servos.far snoother,better precision,position control,etc.

Basic control strategy should be given by the mfr. of the drive/motor unit.After that you can 'tweak' it based on real lab testing as no amount of 'simulation' will nail down the 'details'.

hth
jay
Eduardo__



Joined: 23 Nov 2011
Posts: 197
Location: Brazil

View user's profile Send private message

step motor ramp generator
PostPosted: Wed Apr 03, 2013 3:32 pm     Reply with quote

No, I´m not planning using encoder. But it´s useful for build a system like the LM628 LM629chip.
I build a driver(several years ago) for using these chips with PIC(LM628/9),... but I need to translate to English before posting.


ABout the step motor, I´ve not found any library for step motor ramp/pulse generation.

So I decide build one library for this, using timer2 and timer3. But at this moment I´ve no time to finish the work. But in my tests, It was working well up to about 2KHz output(or more) in a 40MHz PIC18.

When I finish, I´ll post it here.


Despite of that, thanks for all people!!!
_________________
Eduardo Guilherme Brandt
temtronic



Joined: 01 Jul 2010
Posts: 9226
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Apr 03, 2013 5:38 pm     Reply with quote

The reason I asked about 'feedback' sensor is you really need 'something' to verify you're 'at position'.
Just stepping out xxx number of pulses and hoping you're 'at station' is risky. With feedback, you can confirm you're really where you thought you should be.

Also, with active feedback, you can compensate for different loads on the 'thing in motion'...giving you the abilty to 'change' the commands to get you there faster.

hth
jay
Eduardo__



Joined: 23 Nov 2011
Posts: 197
Location: Brazil

View user's profile Send private message

PostPosted: Wed Apr 03, 2013 7:19 pm     Reply with quote

Dear temtronic.

Thanks for answer and consideration. I would like to add some information in what you said. I think that step motors usually work very well if correctly installed. You can trust in it.
But if it is not correctly installed(with a good driver and motor also), you´ll have things like this, loosing the reference(loosing some steps). Vibration can be a problem in lower speeds also.

But if you´ve a servo system(motor with encoder and a compensation software running together), of course it would be better, but more expensive also. I´ve used systems like LM628 and others systems. LM628 is an excelent ASIC servo controller system.

I remember one day, when I tried to made a servo system for motor controller with an Atmel chip. It was very difficult to put the ramp generator run well.
I think that a good ramp generator is the most difficult thing to do if we are planning to develop a servo positioner system, as the compensator(PID) is simple to implement. Of course it would be necessary also a hardware to make encoder readings(it depends on encoder type).


I see you Smile
_________________
Eduardo Guilherme Brandt
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group