Stepper motor control with Propeller - Connect with Mach3?
CassLan
Posts: 586
Hi all,
Nothing too special but I thought I'd share, did some stepper motor control with the prop and some transistors. Enjoy [noparse]:)[/noparse]
http://www.youtube.com/watch?v=1V6K8QIia7E
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NYC Area Prop Club
Prop Forum Search (Via Google)
Post Edited (CassLan) : 8/12/2009 6:19:41 PM GMT
Nothing too special but I thought I'd share, did some stepper motor control with the prop and some transistors. Enjoy [noparse]:)[/noparse]
http://www.youtube.com/watch?v=1V6K8QIia7E
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NYC Area Prop Club
Prop Forum Search (Via Google)
Post Edited (CassLan) : 8/12/2009 6:19:41 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Stan Dobrowski
Getting ambitious about the stepper control...I decided to try to hook it up to a PC running Mach3, which is CNC software that can be used in various circumstances.
The connection is made via PC Parallel Port (DB25) and 1 Pin determines the step direction and 1 Pin causes a step (Thats how its supposed to work [noparse];)[/noparse]
As it turns out the width of the pulses coming from the Mach3 Software to step seem to be about 5us (checked on a scope), and my code is not seeing this, I tried with another CNC program called KCAM which has sigificantly longer pulses and I can read/react to them.
Is seeing a 5us pulse doable with SPIN?
Thanks,
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NYC Area Prop Club
Prop Forum Search (Via Google)
·
I'm no super stepper expert, but I have done a few stepper projects in the past.· Here are a couple of thoughts that you may take or leave as you wish...
Regardless of the voltage spec on the stepper motor, it is really the current that is the limiting factor, and it is current that creates a magnetic field.· It is common for many stepper applications to use a much higher voltage than what is actually specd for the motor, and instead control the current (typically with some kind of pwm).· The higher voltage allows the field to build up more quickly, resulting in better speed and performance.
While you can control the current with a pwm signal generated from the processor, often it is more efficient to use a dedicated chip for the task, such as the common L297/L298, LMD18200 or similar.· Allegro also has some cool driver chips.· These have the benefit of incorporating current sensing and a chopper pwm circuits so that the steppers get the correct amount of current.· Really what youv'e got here is a closed loop PID controller where you are constantly monitoring the motor current and making adjustments to keep it at a preset level.
Several of these chips also include micro stepping features.· In recent years I have noted that assembled modules are very price competitive, so they bear consideration as well.
Typically I use the processor for only the logic and dedicate the actual power handling to these external devices.· The benefit is reduced processor utilization and·better performance.
Also, any dc inductive circuit like motors should include clamping diodes at the motor terminals... when the current is shut off the coil field creates a pretty big spike that can damage parts.
Just my 2p from personal experience.
edit - a poor pic of my stepper controlled Etch-A-Sketch attached ;-)· Used a touchpad salvaged from a dead Dell laptop to draw.
Post Edited (Agent420) : 8/12/2009 8:31:50 PM GMT
I agree, at the moment the Prop is driving the motor via the transistors, it was just sort of an experiment to see if I could have that be driven by an external source, but with the prop handling the Logic again I need to have it catch a 5us pulse from the parallel port. Thanks for the input I will take your advise about the diodes and see about getting another part for the power other than those transistors.
Rick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NYC Area Prop Club
Prop Forum Search (Via Google)
·
http://www.stepperboard.com/
Cheers!
Paul Rowntree
EDIT : As Nick points out (next post) the ramping is best left to Mach3, but it cannot be used with a Step/Dir systems anyway since it requires knowledge of the final position to determine ramps rates etc. My point was just to note that these boards are flexible in a number of very different applications.
Post Edited (TreeLab) : 8/14/2009 3:56:17 AM GMT
It's best to let Mach do the ramping.
Serious stepper-drivers can be obtained from here: <http://benezan-electronics.de/>
10 A, 80 V, with current limit, microstepping (10-fold). Not the cheapest ones, but rock-solid.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
use the sherline mode , should work then (draws out the pulse longer) its a checkmark you select
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
www.tdswieter.com