When testing axis only moves in one direcion

More
25 Jan 2013 09:23 #29110 by madmanmoe64
I'm trying to set up a shapeoko machine but have run into problems almost immediately.

At the moment I'm just trying to run one axis off of one a4988 pololu driver board .

I've got it hooked up to 12v and 5v and pins 2 & 3 from a parallel cable are hooked up to it (I have also grounded pins 18-25).

I've set all the pins as unused except for 2 & 3 which are x step and x dir.

Anyway when I come to test the axis in stepconf, it only jogs in one direction. The micro-stepping is working fine, and I've had it running smoothly at up to 70mm/s. But it always runs in the same direction, regardless of which one of the jog buttons I press.


This lead me to believe that there was a problem with the dir pin. But after testing all my connections I can't find any fault. I've tried various different driver timing settings from the recommended value for my drivers (200) all the way up to the 'should work with most drivers' value of 200000.

also inverting the dir pin in stepconf had no effect, (I can't figure out it that's significant)


If anyone has any idea where I've gone wrong, I'd appreciate the help :)

- Tom

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

More
25 Jan 2013 10:09 - 25 Jan 2013 10:10 #29113 by Kirk_Wallace
The driver description indicates there are no pull up or down resistors on the inputs. The parallel port specification has the pins as sink outputs, so some sort of pull up might be needed. Parallel port outputs are very low power and can be 3 volts instead of 5, so a breakout board with buffers or drivers and if desired isolators should be used. Add on PCI parallel ports tend to have better pin drivers and are cheap. Blowing out a PCI parallel port is much cheaper to fix than a motherboard port. For now, I would wire up a couple of current limiting resistors between 5 Volts and each step and direction circuit. The rule of thumb for parallel port output pins is they will source nothing and sink 3mA. V=IR, 5=.003R, R=1.6kOhms
5V ---1.6k---+
             |
PP pin-------+-------------------Step or Dir

The pull up will make the signal high by default. When the parallel port signal is active, it will pull or sink the circuit to ground or 0Volts. You can see the effect of pull ups on this study of the charge pump pin on a G540 dirver: wallacecompany.com/machine_shop/G540/

Sorry, if you know all this already.
Last edit: 25 Jan 2013 10:10 by Kirk_Wallace.

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

More
25 Jan 2013 11:20 #29118 by madmanmoe64
Yeah sorry, I've used 10k pull down resistors on both the step and direction lines. Would it be better to switch these out for pull up?

For the most part I've been following This schematic for the buildlog 4 stepper breakout board.
So at the moment both lines have 10k pull down resistors, they have 0.1uf filtering capacitors as well as 10R in line resistors. I haven't yet implemented the schmitt triggers (I have some on order) but otherwise, my setup resembles that diagram.
I don't think noise or isolation is my issue though, I'm not getting missed steps or unexplained movement, my x axis runs fine, just only in one direction :(


Unless anyone has any suggestions I think my next step is to scrap my current board and start fresh when the new parts get here. Although I would like to debug this before wasting more time / components.

- Tom

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

More
25 Jan 2013 13:33 #29122 by Kirk_Wallace
In my opinion, a 1 or 2k pull up is needed. The 10k pull down works with the capacitor to filter noise, but makes it even harder for the parallel port pin to drive the circuit. Well it can't drive the circuit. It can only override or sink a pull up. A voltmeter or oscilloscope on the circuit will most likely show the voltage never gets above a Volt the way it is now.

I like the Schmitt trigger chip to help fight noise. It's not easy to find, but the HC family datasheet web.mit.edu/6.111/www/s2007/datasheets/hctfamspec.pdf shows that the outputs can source or sink 24mA which is plenty.
--
Kirk Wallace
www.wallacecompany.com/machine_shop/
The following user(s) said Thank You: madmanmoe64

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

More
28 Jan 2013 14:18 #29220 by madmanmoe64
Thanks for the help. I've rebuilt the circuit, properly this time. The schmitt triggers seem to be doing their job.

At the moment I've just got 6 step / direction lines hooked up. I still need to wire up some limit switches and possibly a relay or two.

Do I need to isolate all inputs and outputs?

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

More
28 Jan 2013 17:34 #29221 by cncbasher
shapeko ? theirs no need to isolate inputs .
isolated inputs are mostly for servo machines which produce noise on the wiring or for difficult cases , with such a small machine and with no major noise issues it should not be required
however it's good practice to use shielded cables for low voltage wiring such as limits and relays .

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

More
29 Jan 2013 01:57 #29229 by Kirk_Wallace
The parallel port outputs are very delicate. They can only tolerate currents of ones or tens of milliamps within a voltage range of plus 0 to 5 Volts. A very brief voltage of -.1 or 5.1 Volts can fry the port output. For signals that control motors and relays, often through long cables, the loads and induced signals can easily go outside of these limits. Isolators prevent those signals from going back to the parallel port pins, even if the isolators output gets fried. The parallel port just sees that it is lighting up an LED. Even with an isolator, it is good practice to have a buffer, current limit resistor and regular diode on the parallel port circuit. The resistor controls current. The isolator has a diode, the LED, but they typically have a low reverse breakdown voltage so a regular diode protects against reverse voltage. Often, the device you are connecting to the parallel port, such as motor driver or speed controller will have these diodes and isolators built into their inputs. If so, just a buffer would be needed.

Beyond protection, since an isolator can tolerate wildly different signals on the output, one can also use them to control high voltage and/or high current signals, such as 24 Volt control relays or even AC signals.

The down side of opto-isolators is that they can be slow, so they aren't usually good for high frequency signals, unless one looks for a device designed for high speed.
--
Kirk
www.wallacecompany.com/machine_shop/

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

Time to create page: 0.354 seconds
Powered by Kunena Forum