Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: greenene on May 03, 2014, 04:14:31 PM

Title: Odd behavior with probe wiring
Post by: greenene on May 03, 2014, 04:14:31 PM
I have decided to use a z probe for setting the tool height. I connected the board to a spare terminal on the c10 breakout board and configured the probe input in Mach 3.  When I touch the copper plate with the alligator clip, Mach 3 shows a good contact. It works as it should.  However, if I use the tool on the router, nothing happens.  If I pull out the tool, the input lights up. That is, when the tool makes contact with the router , the probe no longer works.
Somehow, the router is interfering with the circuit, and I can't figure out why.
After all, I am only using the tool for closing the circuit.
The router is a hitachi plugged in its own 110volts line Clearly, the router is interfering with the circuit.

Any clues?
tony
Title: Re: Odd behavior with probe wiring
Post by: mbele on May 04, 2014, 06:31:01 AM
Here's how it works for me (I think I have c10, too):
- my router is grounded (it seems that yours is too), so I do not have to ground the tool with aligator clip wired to breakout board ground
- PCB is connected to breakout board input
- the same input is connected to +5V (right next to input) via resistor (2k2 1/4W i think), so that normaly, open circuit is "high" signal state
- when tool touches PCB, it grounds probe input (brings it "low")
- mach is configured so that open circuit is "high", and closed "low" (Active low)
HTH
Mihael
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 08:36:23 AM
When I wire the pins as described, I get a lot of noise. I am using INput pin 13 for the probe. tony
Title: Re: Odd behavior with probe wiring
Post by: mbele on May 04, 2014, 08:51:06 AM
I find that odd, I only had problems with noise with grounded PCB, +5V on tool and active-high circuit logic. Have you tried connecting capacitor (ceramic 0.1uF) between input and ground ?
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 09:26:25 AM
Here's the great puzzle:
The probe connected on one input line works properly. The lights come on normally when I short the alligator clip and the copper plate.
If I do this when the tool is inserted in the router, I see a major current draw in the system( the monitor actually flickers and the breakboard led dims). This tells me that the router is creating a separate ground in the system.
I have the router completely isolated from the cnc frame by using a pvc sleeve in the router mount.  However, the multimeter indicates a resistance of 10k between the router frame and the router body when I have the router plug connected in the outlet, and a resistance of 1k when I pull the plug out.
So my question and puzzle is ..... how is this router making contact with the frame, and if so how do I proceed?
How is the router interfering with the probe circuit?
tony
Title: Re: Odd behavior with probe wiring
Post by: stirling on May 04, 2014, 10:00:52 AM
It's a little confusing from your post exactly how you've wired what to what. For example in your post above you mention probe, plate, tool and clip.
You appear to have your PLATE connected to an input but what is connected to your CLIP.
Also please post the xml file you're using.
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 10:25:56 AM
There are two input connections on the breakout board: a numbered input and a +5volt next to it.  As described in several sites, the "alligator" is connected to the NUmbered input, in my case, #13. The plate is connected to the adjacent 5 volt line.  This is how I have wired my three homing switches, and they've been working well for years.
My assumption, therefore, is that I am simply creating a circuit that "shorts" these two lines.
Again, when I do this without making contact with the router, it behaves as it should.
I have also tried placing a 10k resistor between the numbered line and the 5volt, but it , too, does not work.



tony
Title: Re: Odd behavior with probe wiring
Post by: stirling on May 04, 2014, 10:59:35 AM
OK I remember seeing another post like this a while back. (http://www.machsupport.com/forum/index.php/topic,26294.0.html)

I don't know why people wire them like this - it's a really crap way to do it and MORE than likely to result in the effects you're seeing. Particularly the short which is VERY likely to damage something if it hasn't already.

You'd be FAR better off wiring the plate to your input pin and setting that input pin in Mach to active LOW. Then connect your clip to GROUND and clip it onto your tool. FORGET the 5V supply terminal - you're asking for trouble.

Now the plate will be sitting at the pull-up of the input and connecting it to ground with your clip/tool will signal an active low to Mach. No danger of shorts or anything else. The worst that can happen is you put the plate on a grounded surface and then it'll signal Mach - but that's all - it won't short anything out.
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 11:03:24 AM
I'll give that a try and report back. thanks
tony
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 11:12:55 AM
When the plate is connected to the input line, and the alligator is connected to the "power ground" on the breakout board, the circuit simply does not work, regardless of how I set Mach 3 input states.
tony
Title: Re: Odd behavior with probe wiring
Post by: mbele on May 04, 2014, 11:17:04 AM
C10 inputs are normaly grounded when left in the air, so you have to supply +5V to bring them up or modify BOB so that input is normaly high.
Try doing a test with router unplugged. Try measuring voltage between tool and BOB ground when router is plugged in (AC and DC). That may give you clues what's going on.
I think that all this can be avoided if tool is grounded on BOB side only and pull up resistor is used on input like i described earlier...My Kress is not normaly grounded via AC plug...
I wanted to do similar thing (isolate router from frame) so i could use moving bed/table instead of PCB to close connection... but figured it was asking for trouble :)
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 11:41:52 AM
Between the router casing and the router frame there's .5 volt AC when the router plug is connected. When the router plug is unconnected, the voltage drops to zero.
I switched from a Bausch to the current Hitachi, and I don't remember this being a problem, way back, when I had tried to use a probe. I eventually disconnected the probe due to breaking too many copper pads during a period of intense production, and I didn't have time to truly learn how to use it.

Also, Mach 3 does not find pin 13 during an autoselect routine. It keeps going to 12 for two separate switches. Perhaps the BOB is broken, although when I use the pin as described earlier, it works fine.

So, do we connect the AC ground to the DC power supply ground? I may have done so, but need to check....
tony
Title: Re: Odd behavior with probe wiring
Post by: stirling on May 04, 2014, 12:01:52 PM
When the plate is connected to the input line, and the alligator is connected to the "power ground" on the breakout board, the circuit simply does not work, regardless of how I set Mach 3 input states.
tony

Saying the "the circuit simply does not work" is not the most helpful description of what's happening.

With the input connected to the plate and set in Mach to active LOW and doing NOTHING with the clip - is the input LED in Mach lit or un-lit?
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 04, 2014, 12:54:21 PM
Since the Hitachi routers is the latest addition to my  cnc, the fact that I am reading an AC voltage between the casing and the cnc frame is troubling.
I am reading upwards of 24 volts when the unit is plugged into the socket.
It has a three wire line, and one is grounded. But I don't think there should be voltage floating around the casing.
I purchased as a factory refurbished unit, but this voltage bothers me.
tony
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 05, 2014, 05:09:17 PM
So, I grounded the hitachi router to the machine. I changed the BOB to a new one, fearing that I had damaged a few inputs during my testing with the other board.
Currently, all the input ports are such that if I short an input line to 5+, Mach3 input LED lights up. I've done this test with all inputs and they all behave the same.
Now that the tool bit is grounded to the machine, I need to figure out how to do the following with these pins:
1. Wire only the homing switches
2. wire a probe

I would appreciate some direction. I connected a 10K resistor between  an input line and +5. When I ground the input , however, nothing happensin Mach 3, even when I change the check box to active low.
Do I need to reverse the BOB jumpers so that all the input lines become active low?  If so, how would I then connect the homing switches.
I confess that given the popularity of the cnc4pc, there are things about these boards that are still not explained in a more 1-2-3 fashion..... but perhaps it's me. It's the probe connection that has thrown me into the abyss.
thanks in advance.
tony
Title: Re: Odd behavior with probe wiring
Post by: mbele on May 06, 2014, 01:37:55 AM
Are you sure that jumper exists (my board does not have it) ?
"Active" state is logic state, inputs can have "high" and "low" state, you can set logic state in Mach and tell him how to interpret input state into active state. If you actually do have jumper that can make inputs "high" when left in the air, then you do not need resistor and you do not have to connect +5V to the input since it will be "high" allreaday. If not, try 2.2K resistor betwen input and +5V instead of 10K -  I think you'll have to have one resistor for each input you want to use that way (thats how I have it wired, all my inputs are pulled high, someone correct me if I'm wrong).
Then wire your switches and/or probe so they are "N.O." - normaly open. When contact is closed it should bring 0V line to input pin (bringing it "down" into "low" state). Mach should be configured for that input(s) so that active state is low ("Active low").
Now, I have 0VDC and AC ground on the same potential - my PSU has it internaly shorted, but your PSU most probably may not have it, so you'll have to short it yourself so you bring 0VDC to tool. Since your tool is now grounded (probably via router frame) and ground is shorted to 0VDC, it may introduce noise into system, so you may need to use capacitor (0.1uF) between input line and ground to filter it out (capacitor lets AC pass and blocks DC) - i do not need/use it, and I have only read about it (no expirience there).

BTW. re AC ground and 0VDC, 0VDC is reference potential for signal lines from which DC voltages are measured, and AC ground is used for safety, so that if any current appears on metal parts exposed to touch (where it would be hazardous) it would go to ground through that wire instead through you.

For the conversation sake, what would happen if 24VAC present on router case/tool was sent to ground via capacitor ? Does it depend on the current source/magnitude available on that 24VAC, and if so how can that current magnitude be measured ?

Title: Re: Odd behavior with probe wiring
Post by: greenene on May 06, 2014, 05:14:17 AM
thank you very much for the very clear explanation.  The first board did not have jumpers( I think it was rev 8). The replacement board has jumpers.  The multimeter shows a solid contact between the board ground and the machine frame, and with the router to the frame.
From your explanation, it's clear that my other board was connected so that the input were normally low. Now I will make them high so that the probe plate will be wired to the input and the alligator clip will be wire to the tool, which will bring the  input pin low.
tony
Title: Re: Odd behavior with probe wiring
Post by: mbele on May 06, 2014, 05:29:32 AM
:) I'm glad I was able to help. If your 0VDC (i guess you call it "board ground") is always connected to router frame and the frame is connected to router/tool, you do not need aligator clip since the tool is allready connected to 0VDC. Also, if one jumper changes all of the input pins to be "high" when left in the air, you'll have to apply same logic to your inputs (home/limit switches etc). Good luck!
Mihael
Title: Re: Odd behavior with probe wiring
Post by: stirling on May 06, 2014, 07:33:57 AM
Now I will make them high so that the probe plate will be wired to the input and the alligator clip will be wire to the tool, which will bring the  input pin low.

Which is what I suggested you do back in post #7. Anyway - you got there.
Title: Re: Odd behavior with probe wiring
Post by: greenene on May 06, 2014, 08:30:24 AM
You are correct, Stirling. The reason why I'been sheepish about all of these things is that I had already burned one board, and could not afford to burn a second one without fully understanding the wiring.

So, I have the new board working by having the input lines jumper in a "pull down" mode.  The probe test has a resistor going from +5 to the input line. When this line is grounded, the circuit is active pulled down and triggers an action.

Here's my question:  Does this mean that for the home switches and the E stop I need to have resistors going to the input lines. This is where the cnc4pc documentation is not very clear, at least for me.
I am not willing to test the other input functions without a resistor for fear that I may blow the board.
So, my question:
Do I need to have resistors for all the other switch functions?
thanks for the great help
tony
Title: Re: Odd behavior with probe wiring
Post by: stirling on May 06, 2014, 09:13:34 AM
So, I have the new board working by having the input lines jumper in a "pull down" mode.  The probe test has a resistor going from +5 to the input line. When this line is grounded, the circuit is active pulled down and triggers an action.

Remember I can't see your wiring so you need to be clear in what you say. Step by step...

So, I have the new board working by having the input lines jumper in a "pull down" mode.

This means you have configured the board to select an on-board resistor between the input pin and GROUND. That's what pull-down means - pull the input down to GROUND with a resistor. Now...

The probe test has a resistor going from +5 to the input line.

I don't know what you mean by "probe test" but if you mean the input pin again and you have a resistor between it and 5V then you're pulling the input UP (correctly) as well as DOWN (incorrectly). This is wrong. It may still work depending on the relative values of the resistors but you're making your system un-stable.

When this line is grounded, the circuit is active pulled down and triggers an action.

If by "line" you again mean the input pin, then this is the correct way to do it. HOWEVER - you should NOT have pull-DOWNs selected.