Hello Guest it is December 11, 2019, 06:10:03 AM

Author Topic: Trying to troubleshoot inputs  (Read 4287 times)

0 Members and 1 Guest are viewing this topic.

Trying to troubleshoot inputs
« on: August 08, 2010, 03:41:23 PM »
We're still trying to set up a new machine and we've got the outputs working, but now the inputs, particularly getting estop to work, is giving us a headache. Not sure I have all this figured correctly, so let me explain how I'm thinking this needs to be wired with the C10 and a normally closed physical switch for an estop switch.

There are two possible ways to do this, with Mach3 set to look for active low or with active low "off", or active high.

My first thinking is I'll set it to active low, because the default for pin 10 anyway. So, I set estop Mach3 to port 1, pin 10, active low.

Now, I wire +5v through my estop switch AND I set the input pull-up/pull-down resistors to "pull-down" (note I'm not talking about the other set of pull-up/pull-down resistors, this is the set for the input pins and is over near those pins). The thinking here is that when the switch is closed, I am sending 5v to the pin and on through to the computer. But when it opens, I want to make sure my pull-down setting goes the right way and "open" in this case should make sure that pin 10 goes to zero. I'm assuming that the pull-down will flow through and I now should be sending zero to my parallel port and all should be good.

Alternatively, I could set the estop in mach3 to active high instead. But to do this, I wire ground through my switch first. Now, I have to change my input jiumpers topull UP instead, because I want to get 5v when the switch is pressed and we have an open circuit. Now, even if the circuit is somehow dead to from pin 10 out of the C10, the natural state of the pin on the port itself is to be high anyway, so this should make sure that, when the circuit opens, I end up with a positive signal on my pin and should trigger the estop.

Now - the first question - does all of that make sense? Am I following the circuit logic correctly or is there something I've got screwed up?

Second point - none of this seems to be working!!! It doesn't seem to matter what way we configure the board, mach3 just says external estop pressed and we can't do a darned thing. I even thought it was the parallel port on the computer, but I set mach3 at active low and grounded pin 10 on the port itself (simulating what I should be getting from the C10) and it worked like a champ.

Can anyone offer any sage advice on this? If I had any hair, it would all be pulled out by now!

Thanks,
Don

Offline ASC

*
  •  59 59
    • View Profile
    • Automation Systems
Re: Trying to troubleshoot inputs
« Reply #1 on: August 09, 2010, 08:52:18 AM »
It sounds to me like your wiring an external +5v into your e-stop pin.  You should actually be getting your logic 5volts out of the parellel port and having a switch between this 5v and signal ground.  Active low would require a normally closed e-stop button, meaning the switch is normally shunting your logic 5volts to signal ground.
Mr. Creosote
Re: Trying to troubleshoot inputs
« Reply #2 on: August 09, 2010, 09:59:18 AM »
I thought about an issue with not tying the grounds together, but I kind of assume that's handled withing the breakout board itself. And the 5v is just the source that's on the breakout board since there's no 5v output/source on a parallel port that I'm aware of. Seems this is standard sort of wiring from what I've read. Do you have a suggestion on how to do what you're saying?

thanks,
Don

Offline ASC

*
  •  59 59
    • View Profile
    • Automation Systems
Re: Trying to troubleshoot inputs
« Reply #3 on: August 09, 2010, 10:10:08 AM »
Try wiring just a simple switch between the pin assigned as your e-stop input (port 1 pin 10) and signal ground (pins 18-25).  Toggle the switch a few times on your diagnostics page and you should see the LED for the emergency stop toggle along with the switch. 
Mr. Creosote

Offline ASC

*
  •  59 59
    • View Profile
    • Automation Systems
Re: Trying to troubleshoot inputs
« Reply #4 on: August 09, 2010, 10:14:35 AM »
ps the parallel port is a TTL level input output.  Logic low is 0V, logic high is +5v, so yes it acts as both a sink and a source, depending on the pin number.
Mr. Creosote
Re: Trying to troubleshoot inputs
« Reply #5 on: August 09, 2010, 11:28:19 AM »
That's the exact test I did when I said I grounded pin 10 on the port itself. I just jumpered from pin 25 to pin 10 with mach3 set to active low on estop and it worked perfectly. Well - at least functionally, it seemed to work. We weren't actually looking at the diagnostics page when we did it. But mach3 showed estop triggered/reset just as we expected it to.

The weirdest thing is that we also tested with the breakout board completely disconnected from the computer and checked the pinout from the board itself and got the expected voltages. And we've tested through the cable as well. But when we wire everything up, mach3 just sees the estop as triggered and never works properly - no matter what state it's in.
Re: Trying to troubleshoot inputs
« Reply #6 on: August 10, 2010, 08:00:42 AM »
Does anyone think that the problem could be that the board isn't tying the ground from the computer and the board power supply together?

Offline thosj

*
  •  368 368
    • View Profile
Re: Trying to troubleshoot inputs
« Reply #7 on: August 10, 2010, 08:17:10 PM »
You DO have 5v on the Enable terminal, right? Either the jumper which I think came there, or thru an Enable switch or something?
Re: Trying to troubleshoot inputs
« Reply #8 on: August 10, 2010, 10:10:49 PM »
Yep - board's all wired together right. :)

Looks like the problem is a noise issue. We upped the debounce interval to 100 and it slowed down - after about a minute and a half, it would trip again. Instead of playing with it and trying to find the "magic" setting, we're just going to put some .1uf caps on the input and be done with it. The debounce suggestion came from Arturo Duncan - that's a top notch fella!

Thanks everyone for replying. I'll be back if the caps don't do the trick, but I have a feeling they will.  :)

Don