× Forum Header

pls help me find stepconf time for my DIY board

More
19 Dec 2013 14:46 - 19 Dec 2013 15:17 #41814 by nquantum
I build my Break Out board and Driver board.
- I use 4n25-Opto for protect my LPT-port
- I use L297 + L298 for driver board.
I've done some research/measure reading and by oscilloscope this is my result

1st pic is , I measure td (delay from input) 8.5us , tr 7.2us (rising edge max) , tf 3.4us (falling edge max) by oscilloscope
2nd pic is timing of L297 for driver board. tclk 0.5us , ts 1us , th 4us
3rd pic is how my calculate for STEP SPACE in StepConf that I use.




This is my question for StepConf setup
(1.) for STEP TIME ,
I do: tclk (of L297) + tr (rising of 4n25) + tf (falling of 4n25) = 0.5us + 7.2us + 3.4us = 11.1us or 11,100ns maybe I put 12,000ns for play safe. Am I correct?


(2.) for STEP SPACE ,
min space between each pulse.
So I do: th (of L297) + ts (of L297) - tclk (of L297)

but I need to add rising&falling of 4n25
So I do: [th (of L297) + tr+tf (rise&fall of 4n25)] + [ts (of L297) + tr+tf (rise&fall of 4n25)] - [tclk (of L297) + tr+tf (rise&fall of 4n25)]
= (4us + 10.6us) + (1us + 10.6us) - (0.5us + 10.6us)
=15.1us or 15,100ns maybe I put 16,000ns for play safe
am I correct or not?


(3.) for DIRECTION HOLD ,
I do: th (of L297) + tr (rising of 4n25) + tf (falling of 4n25) = 4us + 7.2us + 3.4us = 14,6us or 14,600ns maybe I put 15,000 for play safe. Am I correct?


(4.) for DIRECTION SETUP
I do: ts (of L297) + tr (rising of 4n25) + tf (falling of 4n25) = 1us + 7.2us + 3.4us = 11,6us or 11,600ns maybe I put 12,000 for play safe. Am I correct?


(5.) for delay of 4n25 (td) is 8.5us.
So I plus it with Base period Maximum jitter. Which my pc is : 7000ns
So I do 7000ns + 8.5us = 15.5us or 15,500ns maybe I put 16,000 for play safe.

But base on this: wiki.linuxcnc.org/cgi-bin/wiki.pl?Tweaki...ftwareStepGeneration "Making a step pulse requires at least two periods"
So I may plus 2times delay of 4n25: 7000ns + 8.5us + 8.5us = 24us or 24,000us maybe I put 25,000us for play safe

Which one is correct? 16,000ns or 25,000ns?


(6.) When I enter 25,000ns in Base period Maximum jitter. I get Max step rate. 12345Hz (number so cool!)
This is my 1st cnc , I plan to use
screw pit 5mm , step motor 1.8 degree per step , direst drive for micro step = 1.
So that I'll get: 360/1.8 = 200step/1 circle step motor turn ,
And: 200step/5mm = 40step/1mm
My max speed: 12345/40 = 308mm/s

Actually 10mm/s - 30mm/s is all I need for my cnc , so 308mm/s is acceptable for this machine.
Am I correct?


(7.) In theory , the maximum operating frequency for 4n25 of break out board should be : inverse number of the sum of tr (rising edge) and tf (falling edge)
So: 1/(tr + tf) = 1/(7.2us + 3.4us) = 94.33kHz
But that is only theory. Maybe in reality it going to be lower.
Am I correct?


I have lean that for add opto into circuit effect more on timing/speed decrease.
which is add delay to 8.5us , rising to 7.2us , falling to 3.4us. that is much.
But I think it more safe to my pc incase of short circuit of driver board and noise reduction.
So my next design I'll choose more faster opto or change to use rd-isolator

It long question please help me to correct these. And comment me anything. Or if my info is not enough please let me know.

Thank in advance!
Attachments:
Last edit: 19 Dec 2013 15:17 by nquantum.

Please Log in or Create an account to join the conversation.

More
19 Dec 2013 21:28 #41831 by andypugh

But base on this: wiki.linuxcnc.org/cgi-bin/wiki.pl?Tweaki...ftwareStepGeneration "Making a step pulse requires at least two periods"

That isn't actually true. With the "reset" function it is possible to create one step every base thread. The reset function runs last in the sequence, and waits until the step length time has expired then resets all the pins that have their "reset" property set. The drawback with this is that the whole machine stops while it is waiting, so for very long step times is it a bad idea. Your step times are long enough relative to your latency figures that it is probably best for you not to use "reset" (also known in some places as "doublestep")

Which one is correct? 16,000ns or 25,000ns?

Without the doublestep feature the shortest single step pulse will be exactly the base thread period (high on one run, low on the next). +/- the base thread dither. If you specify a step length which is longer than the base period, then it will end up as an integer multiple of base periods, and the same for the step space.

I would suggest starting cautiously, with the bigger numbers, and then consider lowering the figures if you find you need more speed. It is very likely that you will hit stepper motor physical limits before you hit step pulse generation limits.

Please Log in or Create an account to join the conversation.

More
20 Dec 2013 17:27 - 20 Dec 2013 17:33 #41865 by nquantum
I'll start experiment from bigger number 1st. Thank. :)
But I also want to know about my calculation also whether it right or wrong. Since it'll increse my understaning in using Pulse generation in Linuxcnc also help me to choose better electronice part in my next design.

Thank. Please do review my calculation.
Last edit: 20 Dec 2013 17:33 by nquantum.

Please Log in or Create an account to join the conversation.

More
20 Dec 2013 18:23 #41866 by nquantum
Coz I'd like to see where is limit of my design board. Also to see where am I in compare with commercial board. :)
Thank

Please Log in or Create an account to join the conversation.

Time to create page: 0.163 seconds
Powered by Kunena Forum