Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: luther on November 18, 2007, 09:01:50 AM

Title: stepper motor help
Post by: luther on November 18, 2007, 09:01:50 AM
hello i made a cnc router and i used stepper motor for 'x','y',and the 'z' axis, i was wondering if its possible to convert stepper motor to servo motor so i don't lose steps? i did not what to replace the stepper motors.
Title: Re: stepper motor help
Post by: Rebelgium on November 18, 2007, 10:04:22 AM
Have you kept in mind that servo's can only turn 180° or 90° ?
Title: Re: stepper motor help
Post by: luther on November 18, 2007, 10:23:01 AM
yes but ther are servo that use ecoders for 360 degree rotation
Title: Re: stepper motor help
Post by: Admin on November 19, 2007, 09:00:18 AM
Why are your steppers skipping steps?

The reason I ask is because a DC motor with an encoder can also lose steps for the same reason . . .

Are you applying too much force on the motors?
Title: Re: stepper motor help
Post by: luther on November 19, 2007, 04:51:49 PM
i do not know why i lose step it seems to happen when the machine make a rapied move. i only lose a few steps because it only off by about  .015" of a inch but when it one inch thick and it has to go around 16 times  to carve through the piece of wood it make a difference.
Title: Re: stepper motor help
Post by: Admin on November 19, 2007, 05:05:46 PM
The reason you are losing steps is because you are applying a force greater than a single step could handle. Basically the force applied is forcing the motor into the next step, which isn't good. Try slowing it all down, so that the force is lower (both dynamic and static forces).

But if its waaay too slow, or you need more force . . .

If you buy/make an encoder and put it on the stepper motor, your controller can know when a step is skipped and correct for it as a closed loop system (steppers are open loop). Or you can buy some dc motors with built in precision encoders, too . . .
Title: Re: stepper motor help
Post by: luther on November 19, 2007, 05:12:35 PM
 how can i put encoders on the stepper motor to make the controller know when a step is skipped and to make a closed loop system?   
Title: Re: stepper motor help
Post by: Rebelgium on November 19, 2007, 05:29:08 PM
-put the encoders on the stepper (as shown on the dc motors, on the tutorial on SoR)
-measure every time the encoder rotates a bit.
-keep track of every step you send to the stepper motor
-compare them... if you see you have sent a step command, but the encoder shows the motor hasn't turned, then you know the step has been missed...

ofcourse keep in mind that 1 step is not equal to 1 encoder pulse you measure.
Title: Re: stepper motor help
Post by: luther on November 19, 2007, 05:42:49 PM
how do i hook the encoders to the controller
Title: Re: stepper motor help
Post by: Admin on November 19, 2007, 06:06:33 PM
http://www.societyofrobots.com/sensors_encoder.shtml

Just literally attach your encoder output pin to a digital port pin on your controller (which controller are you using?)

And of course a common ground . . .

Make sure you read about the PID in my tutorial.
Title: Re: stepper motor help
Post by: luther on November 19, 2007, 06:13:03 PM
will that keep the stepper from lose steps
Title: Re: stepper motor help
Post by: bens on November 19, 2007, 06:38:04 PM
No, it will allow you to detect lost steps when they happen and correct for them accordingly.  All the encoder is doing is telling you how much your motor is turning; it's up to you to act based upon that information.
Title: Re: stepper motor help
Post by: luther on November 19, 2007, 06:41:39 PM
is ther anyway for the steppers to correct themself
Title: Re: stepper motor help
Post by: Admin on November 19, 2007, 08:31:41 PM
nope - its open loop control, meaning no feedback or error correction