Wiring Linuxcnc to stepper drivers

More
13 May 2016 09:15 #74589 by Wesolowski
Hello users :-)

I have one simple question:

Can I wire the cable directly from parallel port to a stepper driver input pulse connector?

My machine runs well but the wiring is based on DIY board which I don't understand. I would like to add x,y,z limits and one more switch to measure the tool height. As far as I understand: If we can configure 5V signals to one of the LPT pins, this should work just by direct connection between LPT and a stepper driver input - am I right?

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

More
13 May 2016 12:14 #74593 by andypugh

Can I wire the cable directly from parallel port to a stepper driver input pulse connector?


Yes.

All that the commercial breakout boards do is protect the parallel port. Given that parallel port cards are cheap, it is debatable if there is much point.

Note that parallel port pins are typically much better at sinking current than sourcing it and that the input pins of stepper drives are typically opto-isolators. So the best wiring for direct connection is 5V to driver OPTO+ and with the OPTO- to the parallel port pin.
You need to set the Parport pin _low_ to send a step pulse, which means inverting the pin in the LinuxCNC config.

My first conversion connected the parport direct to the drives. I then upgraded to a 7i43, but the outputs still connect direct to the drives.
The following user(s) said Thank You: Wesolowski

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

More
13 May 2016 12:41 #74596 by Wesolowski
OK, that's great :-)

The thing was to leave it as it is (because the 3 axis works as they should) but add limits and a probe by directly wiring them to the pins.

Thank's for the in put :-)

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

More
13 May 2016 12:59 #74597 by andypugh

The thing was to leave it as it is (because the 3 axis works as they should) but add limits and a probe by directly wiring them to the pins.


The safest (for the parport) way to wire those inputs is as simple switches between the parport pin and a parport ground pin.

You will almost certainly need to add a software debounce in HAL.

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

More
13 May 2016 13:05 - 13 May 2016 13:07 #74599 by Wesolowski
You mean this problem => www.eng.utah.edu/~cs5780/debouncing.pdf ??

I will use microswitches so I don't suspect the bouncing problem... Or am I mistaken ? :-)



COOL, All I need to to is to wire those microswitches in a loop between ground and a pin and then it will work as a charm! (This is my will spoken loudly ;) )
Last edit: 13 May 2016 13:07 by Wesolowski.

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

More
13 May 2016 13:35 #74601 by andypugh
In this context "debounce" is used to reject electrical noise spikes at the inputs. You just set it up so that it takes 10 consecutive readngs to be high before triggering a response. False-triggering of limit switches in the middle of a job is very annoying.
The following user(s) said Thank You: Wesolowski

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

More
13 May 2016 15:47 - 13 May 2016 16:16 #74607 by Wesolowski
Yeap, I would like to avoid this kind of false stops at a cost of rather not having the limits installed...

Anyway, thank you for your understanding, I am just trying to name problems and understand things clear enough to be able to deal with them and this is far from straightforward because my electronics skills are really low.

So I didn't think that swich can fool the machine... For me it was 0-1 kind of trigger.

You've mentioned HAL and seems that there is one thing more which is usually done by a break-out boards... It is understanding the signals sent by theese bouncing triggers as 0-1 signals which is obviously not happening when we wire the microswitches directly to the pins... So cool that it can be done via HAL but hell how? Now again I have something to read...

To make things simple, can you guide me through the HAL thing in this installation?
So far I started reading about how it works but I feel a bit uneasy that I may encounter some problems I won't b able to solve myself.

# 30 mins later... still reading about HAL basics... Seems that you basically could not write it easier... Anyway I still miss my knowledge but I'll do my best to understand what needs to be done...

#40 mins later=>> found what I need to add =>linuxcnc.org/docs/html/hal/rtcomps.html#_debounce
I love LinuxCNC forums ;-)
Last edit: 13 May 2016 16:16 by Wesolowski.

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

More
13 May 2016 17:49 #74614 by andypugh
This config file has a debounce on the X limit, and shows an example of how to do it.

github.com/LinuxCNC/linuxcnc/blob/2957cc...luto/lathe-pluto.hal

Just look at the lines with "debounce" in them.
The following user(s) said Thank You: Wesolowski

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

Time to create page: 0.080 seconds
Powered by Kunena Forum