Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: SDConcepts on May 03, 2008, 05:29:20 PM

Title: hooking up limits
Post by: SDConcepts on May 03, 2008, 05:29:20 PM
i'm using optical limits as my home and limit switches for my mill.  the switch when triggered sends a +5volt signal to the computer.  however, pins 10, 11,12, 13 have 4.5 volts on them when the optical switches aren't connected.  my optical switches are wired to send 5 volts to the computer to create a trigger event.  i thought that pins 10-13 were input pins?  what am i doing wrong?
Title: Re: hooking up limits
Post by: Chip on May 03, 2008, 05:46:22 PM
Hi, SDConcepts

Change the Active Low state on the Inputs should do it.

Hope this Helps, Chip
Title: Re: hooking up limits
Post by: Greolt on May 03, 2008, 06:38:52 PM
To send a signal to Mach you must make the input change state. 

So if it is high (5v) you must pull it low (0v) and vice versa.

Input pins on a standard LPT are high when not connected. 

Some BOBs pull the inputs low with on board resistors. So they are now low when not connected.

Can your optical limits be wired to pull the pin to ground (0v) when active ?

Or you may be able to install a pulldown resistor of the appropriate value so that the pin is low until the switch becomes active and pulls it high.

You need to refer to the documentation of your BOB.

Greg
Title: Re: hooking up limits
Post by: SDConcepts on May 04, 2008, 07:40:58 AM
I'm not using a BOB, i'm wired directly to the parallel port.  my last adventures try to cnc through a bob were useless. do i need to add a resistor parrallel with the input to pull the parallel port pin down to 0?
Title: Re: hooking up limits
Post by: SDConcepts on May 09, 2008, 01:00:57 PM
OK, i got the limits all hooked up and they work on the diagnostic screen.  however, i still get an e-stop trigger and it tells me a limit is triggered.  how do you trace something like this when nothing is showing up in the diagnostics?
Title: Re: hooking up limits
Post by: Hood on May 09, 2008, 01:32:56 PM
Sounds like noise, try setting the Debounce Interval to 2000, if that works reduce it until you have problems again then step up slightly. Make sure your limits have shielded cables grounded only at the control end.
Hood
Title: Re: hooking up limits
Post by: SDConcepts on May 09, 2008, 02:17:07 PM
Hood,

thanks for the tip.  i tried that and it worked for a while but ended up triggering the limits sooner or later on its own again.  any other tips other than shielding the cables? 
Title: Re: hooking up limits
Post by: Hood on May 09, 2008, 02:41:10 PM
If you are still getting problems with 2000 then shielding is the way to go, in fact shielding is a must in my opinion, its the first thing that should be done to any wire carrying 5v signals. The difference between Hi and Lo is so close it is very easy for electrical interference to cause false triggers. I have 24V on things such as limit switches and then convert the 24V signal to 5V as near to the computer as possible and still have all the 5v signals shielded. The reason is the difference betwen Hi and Lo in a 24V system is much greater than a 5v system and so noise is hardly ever an issue.
Hood
Title: Re: hooking up limits
Post by: Johannescnc on September 04, 2008, 11:31:14 AM
Great tip on the 24v signals...
Title: Re: hooking up limits
Post by: Kristin D on September 04, 2008, 12:10:28 PM
I have 24V on things such as limit switches and then convert the 24V signal to 5V as near to the computer as possible and still have all the 5v signals shielded. The reason is the difference betwen Hi and Lo in a 24V system is much greater than a 5v system and so noise is hardly ever an issue.
Hood

Hood,

Very interesting can you post a schematic or description of how you do the 24v to 5 v ?

Kristin
Title: Re: hooking up limits
Post by: Hood on September 04, 2008, 01:53:50 PM
I have used several methods, one is a board that cncbuildingblocks made, it is used on my lathe to convert the limits switch 24v to 5v, sadly Ed is no longer making his boards :( I also use relays to convert the 5v to 24v and vice versa. On the mill I am presently doing I made up a board with 7 relays on it, I can have the switched contacts of the relays either all in series, all seperate or a mixture of both just by placing jumpers accordingly. The idea behind this was I could connect a load of limit switches to the board and as the switched contacts were in series I would only need 1 input to Mach. I also have a similar one that takes outputs from Mach at 5V and has 24V accross the switched contacts, I use this for the Inputs to my servo drives which are 12 to 24V.
Hood
Title: Re: hooking up limits
Post by: Kristin D on September 04, 2008, 02:26:17 PM
I have used several methods, one is a board that cncbuildingblocks made, it is used on my lathe to convert the limits switch 24v to 5v, sadly Ed is no longer making his boards :( I also use relays to convert the 5v to 24v and vice versa. On the mill I am presently doing I made up a board with 7 relays on it, I can have the switched contacts of the relays either all in series, all seperate or a mixture of both just by placing jumpers accordingly. The idea behind this was I could connect a load of limit switches to the board and as the switched contacts were in series I would only need 1 input to Mach. I also have a similar one that takes outputs from Mach at 5V and has 24V accross the switched contacts, I use this for the Inputs to my servo drives which are 12 to 24V.
Hood

What sort of buffer/driver do you use for the outputs? Another thought (dangerous stuff this thinking!) way back I was building automated handling equipment with TTL logic, we used gold plated switch contacts on all our limit switches, one fine day our purchasing agent "got a deal" on a batch of microswitches that were silver plate, within a month I was running all over the country replacing 10-12 switches on every machine as the switches oxidized and were not working reliably. So that brings me to the relays, since there is so little current flowing I wonder if the contacts exhibit similar behaviours with out using some higher current by way of a resistor network and transistor or IC buffer.

Kristin
Title: Re: hooking up limits
Post by: Hood on September 04, 2008, 02:44:55 PM
The outputs from Mach are through the breakout boards I have, one is a PMDX122 and the other a CNC Building Blocks Acustep, from there they go to the relay coils.
 The relays I have have gold plated contacts and so far no problems :)

Hood
Title: Re: hooking up limits
Post by: Kristin D on September 04, 2008, 02:57:40 PM
The outputs from Mach are through the breakout boards I have, one is a PMDX122 and the other a CNC Building Blocks Acustep, from there they go to the relay coils.
 The relays I have have gold plated contacts and so far no problems :)

Hood

Thanks,

That answered all my questions. Now for the relay hunt to begin!

Kristin
Title: Re: hooking up limits
Post by: Hood on September 04, 2008, 03:01:42 PM
I use these ones, nice and compact for fitting on the board I made :)
http://www.rapidonline.com/Electronic-Components/Relays-Solenoids/PCB-Relays/Subminiature-relay-SPCO-1A/29518/kw/60-0795#techspec
 Not sure how easy they are to get in other parts of the world.

Hood
Title: Re: hooking up limits
Post by: Kristin D on September 04, 2008, 04:55:49 PM
I just saw some fijutsu relays in a surplus catalog now I need go to their website and check the P/N as it has a different suffix than the ones on your catalog page. But they also have some others and all about $1USD ea or 10/$8.50 so it may pay to order up a bunch if they have gold contacts. They also had an inexpensive solid state contactor I could use direct for spindle control for $6.50 ea.

Kristin