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 support@ccsinfo.com

NCO useage for stepper motor control/acceleration
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
JamesW



Joined: 23 Apr 2007
Posts: 91
Location: Rochester, England

View user's profile Send private message Visit poster's website

PostPosted: Thu Feb 12, 2015 3:05 am     Reply with quote

We've got it on one of our own stepper drive units, and are running it at 40V.

On the bench we've achieved 10,000rpm- and pinching the cog we've got on the end, with a cloth it seems to have quite a bit of torque.

Watch this space.

James
Ttelmah



Joined: 11 Mar 2010
Posts: 19326

View user's profile Send private message

PostPosted: Thu Feb 12, 2015 3:16 am     Reply with quote

Unless you are actually measuring the speed with a tacho, don't 'assume' that because you are stepping at a particular rate, and the motor is not making typical "I've missed a step" noises, that it is actually 'doing' the speed you ask for. Do a search on 'harmonic cogging', which is standard behaviour for a stepper when you try to run it faster than it actually wants to go.
You'll also find that the behaviour of the bearings in the stepper itself will degrade rapidly as the lubricant dries, and temperature changes. A stepper that will 'happily' spin at 4000RPM 'new' will often not even achieve half of this from the same drive a few months later....

Understand a simple thing. If the manufacturer felt that this motor could reliably be used at these sort of rev's, they would say so. They want to sell to everyone who might be able to use their product.

Compare the graph going to 2500rpm on the stepper, to the one on these BLDC motors:
<http://www.electrocraft.com/products/bldc/RP17/>
or these.
<http://www.anaheimautomation.com/products/brushless/brushless-motor-item.php?sID=143&pt=i&tID=96&cID=22>

or for real simplicity, this model (rated to 6300RM), with the option of all the electronics already included:
<http://telcointercon.com/nema-industrial-brushless-dc-motor-id31.html>

The whole point about data sheets, is to learn to use them. While for a single 'home' project, it may well be OK to try something like massively over-clocking a PIC, for anything that expects reliability, you need to work inside the data sheet recommendations.

Try cleaning up dust off a flagstone floor, with a rake. Then realise why using a brush is a much better idea.
JamesW



Joined: 23 Apr 2007
Posts: 91
Location: Rochester, England

View user's profile Send private message Visit poster's website

PostPosted: Thu Mar 05, 2015 12:38 pm     Reply with quote

Just a quick update,

In a pressurised chamber with fluid in it, with the disk spinning inside we've just managed 7200rpm. (Motor drive running at +48V, taking about 350mA).

Using a CCP port - is it possible to read the frequency back from the encoder, to a decent accuracy? (Never used the CCP ports before).

If not - what's the best means of measuring frequency using a pic.

Thanks for all your help

James
temtronic



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

View user's profile Send private message

PostPosted: Thu Mar 05, 2015 3:01 pm     Reply with quote

3 options for feedback

1) a 'regular' PIC might be able to handle the encoder,depends on what else it has to do.

2) a PIC with QEI 'Quadrature Encode Interface' should be able to do it


3) a US DIGITAL encoder interface chip WILL do it.

I've used #3 for the past 10-12 years. Simple,cheap,accurate and offloads the PIC so it can do 'other things'. They also have great encoders.


Jay
asmboy



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

View user's profile Send private message AIM Address

PostPosted: Thu Mar 05, 2015 3:03 pm     Reply with quote

if you had a very symmetric output from your encoder i suppose you could use the capture feature of the PWM module, but it can be quite easy to use timer 1 or 3 instead .

the best approach then depends on several factors:

* max and min frequency generated in the normal operating range of the encoder
*pic clock frequency to a lesser extent.
* how often you want an update of the rotation rate.

i'll assume you are using a pic 18 or pic16 .

one simple way is to feed the encoder output into the external clock input of timer1 (or timer3) and read/reset timer1 from inside a master clocked - say timer0 - interupt routine.

the 16 bit value you accumulate between resets is then subjected to the appropriate math in main() and gives you rpm /rps/or whatever
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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