Stepgen and 4-phase steppers

More
21 Nov 2010 17:49 #5494 by Mihara
My stepgen runs drives in step_type=10. That involves four phase pins per motor (or in my case, per axis, but that's beside the point). It runs, but there's a problem.

When the drives are moving, everything is fine and they're nice and cool. But when a drive is held in a stationary position for an extended period (which, with stepgen configured like that, is any stationary position as long as the power to the controller is on) it starts to heat up, which, I imagine, can't be good for them. I imagine there would not be a problem if I could expose an enable pin from the controller that would cut power to the drives, but my parallel port is fresh out of output pins. (4*3=12, poof)

Is there a way to make stepgen set all phase output pins low if the drives are not moving, or failing that, when "machine on" pin is low?

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

More
21 Nov 2010 20:50 #5499 by BigJohnT
It is normal for steppers to get hot when standing still with holding torque applied. Smart drives reduce the holding force after a period of time. You could do what you want using HAL and hijack the pins before going out to the drive... not sure if that would solve your problem or not. Imagine if your on a half step and every time you stop you go to the nearest full step or something like that, it wouldn't take long for EMC to loose track of your actual position without feedback from encoders like servos use.

John

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

More
21 Nov 2010 20:57 #5500 by Mihara
Sure, that would introduce a deviation. But since I don't have encoders, I've already enabled VOLATILE_HOME=1 in my ini file, so I need to rehome the axes after every machine off anyway. Turning the pins off at machine off would do fine.

Is there a simple way to do that?

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

More
21 Nov 2010 21:09 #5502 by BigJohnT
You could use axis.n.amp-enable-out as it is on when EMC is powered up and off when you power down.

www.linuxcnc.org/docview/html//man/man9/axis.9.html

John

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

More
21 Nov 2010 21:12 #5503 by Mihara
That's already connected to stepgen.X.enable pins, and doesn't make stepgen turn the phase pins off:

net xenable axis.0.amp-enable-out => stepgen.0.enable

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

More
21 Nov 2010 21:18 #5506 by BigJohnT
You can use the xenable signal as many times as you like and combine that with and9 component to turn off your parallel port pins...

John

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

More
21 Nov 2010 21:21 #5508 by Mihara
I was hoping for a simpler way, but thank you, that should work.

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

More
22 Nov 2010 01:44 - 22 Nov 2010 12:41 #5516 by andypugh
You could possibly do it in hardware, by modifying a charge-pump circuit
www.artofcnc.ca/ChargePumpSafety.pdf
The relay could switch the drives into a lower-current mode.

Do the drives have any current limit, or are you running at DC and relying on the motor resistance to limit the current? That is a very hot and low-performance way to do it.

It might be best to buy some off-the-shelf step-direction chips with current limiting and choppers. Though when 4-axis chopper drives are $60 on eBay it might not be worth the trouble. You would gain a lot more pins too,

(edit)
I just remembered who you are, and we have already been through this. Sorry.
Last edit: 22 Nov 2010 12:41 by andypugh.

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

More
16 Aug 2020 10:48 #178381 by Skec
Replied by Skec on topic Stepgen and 4-phase steppers
Hi,
may I ask you a question. I would like to control a small stepper motor with a L298N driver via parallel port. For this I need 4 wires/pins because it is not step/direction method. How shall I configure linuxcnc for such a task? I think there was a video on youtube how to do it, but unfortunately I cannot find it anymore.

I would like to know how to connect A B C D wires to parallel port and how to configure stepconfig.

Thanks!

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

More
16 Aug 2020 11:29 #178390 by tommylight
You can wire both enable pins to the same output or just wire them to +5V logic, but the other two input need outputs for control.
On the LinuxCNC side make a normal stepper config and edit the hal file to stepgen mode 2 as that would give quadrature signals on two outputs instead of the usual step/dir signals.
So in the hal file near the top of it, there should be something like this
loadrt stepgen step_type=0,0,0
Edit that to this
loadrt stepgen step_type=2,2,2
P.S.
Beware that the cheap L298 drives do not have current limiting and will burn to a crisp if powered by more than 5 to 8V, depending on the motors used.

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

Time to create page: 0.225 seconds
Powered by Kunena Forum