Accurate Stepper Motor Timing
gtslabs
Posts: 40
I have a stepper driver for a Nema 23 motor. I need it to step at a very accurate rate of 1% but very slow around 1 pulse per second or slower. I need to send it step and directions at specific intervals but over long periods of time - up to 6 days.· Using a pause would introduce error in the timing.·
I was reading the propeller thread and came across them talking about a similar issue.
The propeller has some built in functions show here: http://forums.parallax.com/attachment.php?attachmentid=47508
Can the BS2 also use a similar approach? Is there any example equivalent code?
Thanks in advance
Steve
I was reading the propeller thread and came across them talking about a similar issue.
The propeller has some built in functions show here: http://forums.parallax.com/attachment.php?attachmentid=47508
Can the BS2 also use a similar approach? Is there any example equivalent code?
Thanks in advance
Steve
Comments
http://www.parallax.com/detail.asp?product_id=604-00005
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
-Phil
Over time it will have a certain amount of drift perhaps a few seconds slow or fast each month for example. Your question though is a little more complicated to explain. If I tell you its 10 seconds after 12:00 noon and you look at the clock and say no its 12 seconds after 12:00 noon we are both wrong because it is now 15 seconds after 12:00 noon.
The same logic applies to microprocessors. Since you have a clock that runs a certain number of instructions per seconds that puts a limit on the resolution you have to work with. I think the DS1302 has a 1 second resolution for OUTPUT. When you read the value for example, if you could read it 1/4 second after it changes from a 1 to a 2 then you would be 1/4 second off from the real time. If you read it just before it turned say a milisecond before it changed from 1 to 2 then you would be 999 milliseconds off. But that is not cumulative so the next reading you take could be within 1 millisecond. I guess if you poll it for a change the most you would be off is the time it takes to actually read the data.
You need to define your time criteria a bit more and your stepper output resolution over the time period you wish to operate the device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!