![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Stepper Motors and Drives Discuss stepper motors, drivers and related topics here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I'm interested in controlling a stepper with a microcontroller. Starting with a NEMA 23 just for experimenting with my code and all. In order to get the best performance possible I'm looking into a chopper driver such as the KL5042 (attached). I don't quite understand the step/direction pulses. Is there a direction pulse that precedes every step pulse? Or is it a constant high or low depending on direction. Secondly, I'm trying to figure out the timing calculations and need to clear up 1/2, 1/4/, 1/8 stepping and so on. On a 200 step per rev. motor set 1/4 step on the driver, my microcontroller needs to put out 800 steps for a full revolution. The driver i'm considering requires 1.5uS pulse duration. Is that 1.5 uS required for the low pulse as well? So one step would be Direction Pulse 5uS + 1.5uS step high + 1.5uS step low? Just the 800 high low pulses would bring me to around .0024 seconds for a full rotation (not counting direction). So obviously I'm worried about having to pulse the direction every time if required. Thanks in advance, darren |
|
#2
| ||||
| ||||
| Direction is held high or low, and then the driver will move the motor on the leading or falling edge of the step pulse. Typically, the physical movement of the motor is so much slower than the electronic pulse width that there is no issue. Each step will be 0.000003 seconds so 0.0024 seconds per revolution at 800 steps or about 416 RPM maximum. If you need to spin faster, you would need to transition to half step or full step. |
|
#3
| |||
| |||
| Your controller will run at 300 khz maimum = 3.33 us per pulse With 1.5 us minimum pulse = less than 50% duty cycle At 1/4 step = 800 pulse per revolution 300,000 / 800 = 375 rev per second = 22,500 RPM (much faster than your stepper can run) You forgot to multiply by 60 to get rev per MINUTE You can run much higher resolution than 1/4 step Direction pin only changes when you change direction George |
|
#4
| ||||
| ||||
| Arrrgh... I can't believe I missed that 60! And I was /just/ telling my daughter to always include units when doing calculations while I helped her with science homework. /and/ I had a feeling something was wrong there... Thanks for catching that George. |
|
#5
| |||
| |||
| Thanks guys for clearing up the direction thing. I'm back to the drawing board with to timing, the micro i'm using doesn't utilize a PAUSECLK command like some of the others i've used so my timing resolution is not going to be anywhere near the 1.5 uS range, unless I can find a nifty trick with PWM or PULSOUT. Doubt it but I'll keep looking. Do you guys see any problems with .0005 second timing resolution? It would be easier to go with .001 in my programming but that would only yield 150 rpm in full step. I've heard complaints about resonance, vibration, and stuttering. Also, do any of you have suggestions for better high speed microcontrollers for embedded stepper control? |
| Sponsored Links |
|
#6
| |||
| |||
| Why do you need such very high motor speed? If you can provide more details about the project and what the motor will actually be driving, people may be able to offer you suggestions for the best way of doing the whole project. |
|
#7
| ||||
| ||||
| dmiller, The spec of the 1.5 usec pulse width is the MINIMUM pulse width at which controller will operate reliably. If you used a pulse width of .001 sec (1 ms) and it was a square wave (also 1 ms low time) then your pulse rate would be 500 Hz giving you 96 RPM (at 800 pulses per revolution). You just need to ensure that the pulse duration on the step pin is longer than 1.5 usec. Suppose you set it up so that your pulse duration was 10 usec. If you delivered those pulses at a 50 Khz rate (one pulse every 20 usec) you would have a square wave pulse waveform. If you drop the rate back to 20 Khz, you would have a 10 usec pulse followed by 40 usec low. 20 Khz pluse (step) rate would give you about 1500 RPM which is faster than the midband resonance on most steppers. How fast do you need to run them? Steve |
|
#8
| |||
| |||
| Again thanks for the replies. You guys seem to have some questions about my motives here, so I'll try to eloborate. I have a few plans to control some x-y type machines with embedded microcontrollers, thereby bypassing the cost of a PC, operating system, and CNC control software. The operations of these machines will be simple point to point hole drilling and maybe a turning operation in the future. No advanced cutter control, cam programming, or cnc software is really needed. I'll probably catch some flack for this, but I'm developing the MEANS by which to do this with a BASIC STAMP 2. I know there alot of limitations to these controllers but they are easy to program and utilize, hence R&D times are fast. The STAMP's finest resolution for a pause in the program is .001 seconds. I don't really need much help with the math to determine Hz, pulse duration, and rpm (based on stepping mode). And high rpm is not necessary, 300 will do. What I'm after is a range of rmps in which to operate, as well as a the ability to use half or quarter step mode on the driver if possible. You see, I am basing my operations off of the micro's timing, and working my way down the line from there. Making sure I can achieve appropriate cutting speeds, and rapid speeds before I proceed to buy the drivers and parts and start the build. I used PULSOUT and PAUSE to create a square wave with much longer lows than highs. 1 millisecond increments for one and 2 microsecond increments for the other. Highs and lows can be configured for either way. I don't know if this is good, bad, or neither?? 1 mS and 20uS will give me around 294 RPM in full step (200 per rev.). Any suggestions? |
|
#9
| |||
| |||
| I'm not sure how good the Basic Stamp2 will be for long term (ie higher performance stuff) but if you can work easily and quickly with one now then why not jump in the water and start building. ![]() If you buy stepper drivers that have a number of microstep modes, ie; full/half/4/8/16 etc then you can try different modes and see what speeds work best for you, and they also allow some upgrading later where you can still use the same drivers and control them with a PC parallel port etc. I think you can do better timing resolution on the Stamp2 if you can access TMR0 directly rather than just use 1mS delays. There are some real smart guys on the Basic Stamp forum, I'm sure some of them have already made code for stepper operation and can answer your questions on how to make the step pulses you need and things like accel and decel speed ramps etc. |
|
#11
| |||
| |||
| Yeah, the BS2 isn't going to do much for high performace. The microcontroller embed thing is probably just gonna be for a simple x-y point to point drilling project. I've been registered on the Parallax forums for a while, just reading. I guess it's time to post some questions. I like the idea also of running EMC2 on a old pentium. I used to work at a local community college I'll probably try to hit up for some of their back room dinosaurs. Last I saw they had some old Dell Optiplex 260's piled up. The one I got at the time had a P4 processor. Probably pretty good for Linux? Vger, do you use Linux and EMC2 personally?? I have never even seen the OS running on a computer. But for me, new stuff is always exciting so I've been on the LinuxCNC.org - Home site looking around. I'm sure there's a forum here for Linux and/or EMC2. I'll have to check it out. Thanks for the shove, vger, now I'm into ANOTHER new thing. My wife is gonna kill me if I don't quit picking up new hobbies to learn about and engross myself with. Tips, tricks, and suggestions are always welcome. Thanks for the replies and advice. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hiwin cad details | eloid | Linear and Rotary Motion | 2 | 12-30-2009 08:20 PM |
| Need help: molding 12 details 100 pcs each | Litografa | Moldmaking | 9 | 04-20-2009 03:14 PM |
| details for G1 A3 ERROR IN M-410 HW | NASOS | Fanuc | 0 | 01-19-2009 02:06 PM |
| What Bit for fine details? | teamtexas | DIY-CNC Router Table Machines | 0 | 05-11-2008 09:15 PM |
| A Homemade Servo Driver Input Request | teilhardo | General Electronics Discussion | 5 | 04-19-2004 04:05 AM |