Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: neuman5022 on August 02, 2011, 03:57:24 AM

Title: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 03:57:24 AM
Hello folks

Need you help again please.

We hooked all up, fired up the PC and HobbyCNC proboard - managed to jog all 3
axes smoothly. Motors are locked and humming, not much heating at all - seems
prefect.

My troubles start with the switches. I know it may be a SW issue but I suspect
some HW issues as well.


Homing switches all work on the diagnostic tab in Mach3 Can see them pop up when
pushing.

When trying to share the home switch of Y axis with the Y--, it pops up a
"limit switch triggered error". I can reset, all looks good but after a second
or so, the limit error message pop up again - without any button being pressed.

When trying to reference Y axis - it behaves as if the switch is not there at
all (jumping from Z to X axis) Further more - when trying to ref Y axis
separately via the diagnostic page - the motor moves slightly and stops.

Then tried to do the limit switches - I get the limit switch triggered error no
matter what I do - high or low active - without any if them pressed.

We checked all the switches wiring - all looks good.

Home switches are hooked to pins 10 (x) 12(y) 13 (z), and the E stop is hooked
on it's NC side to the main power line going to TB6 and the NO side goes into
pin 15. (seems to work OK)

My limit switches are hooked in series to pin 11. All switches grounded to the
same ground.


Any idea where to look ?


Many thanks


Isaac


Title: Re: Switches behave strangely
Post by: Hood on August 02, 2011, 04:17:31 AM
Are your switches normally closed switches? Can you attach your xml as it will let me see how you have things set up and will be easier to find a problem if its in software.
Hood
Title: Re: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 04:53:15 AM
Hi Hood

Thank you for your kind assistance.

All my switches are NC.

Attached is my XML file. This file was downloaded form HobbyCNC files section and was slightly modified to what I think is OK for me (but I am not ruling out any mistakes there)

As this board was built as a kit - I suspect possible soldering issues but I am not ruling out any option at this stage.

Hope you can help

Cheers


Isaac
Title: Re: Switches behave strangely
Post by: Hood on August 02, 2011, 05:07:37 AM
ok that xml only has the home switches set up, can you attach an xml with the limits set up when you are having issues with them.

Reason is I want to see how your switches are hooked up as it kind of sounds like you are sharing the homes for some limits but not the others and you have seperate Limits for the other end of these axis?, is that correct?
Hood
Title: Re: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 05:27:39 AM
Hi Hood

I will do this tomorrow (it's kinda late and cold here  ;) )


This XML shows only the HOME switches since this is the position where I was able to jog the axes and try to home them (X and Z seems to be good)

When I shared the X Home with the X-- limit - all was looking good.  The same goes for the Z Home and Z-- axis.  Only the Y axes is giving me troubles ???


All my limit switches are hooked in serial to pin 11 and aim to work for the X++ Y++ and Z++  (My Z axis is set to 00 at the top of the throw hence Z-- and about -30 mm down = Z++ - hope I did not confuse you because my head is already spinning..)

Tomorrow I will set everything up the way I intend to use it - perhaps you will see some faults there.


Cheers

Isaac


Title: Re: Switches behave strangely
Post by: Hood on August 02, 2011, 06:10:23 AM
Is it mainly the Y Home switch being set up as the Y-- that gives you issues? If so then either a bad swtch or noise issues.
You could try setting some Debounce Interval to confirm, try 2000 at first and then if it helps lower as much as you can.
Best though is to sort the noise issue, if it is that,  rather than mask with Debounce.

Z++ Limit should be the Top of the axis (Zero) and Z-- the lower (-30)
Hood
Title: Re: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 06:54:26 AM
The Y switch is doing this when trying to share the Home with the Y- - limit.  Testing the home switch was OK and it shows OK on the diagnostic page. (led on when pressed)

When trying the limit switches - all of them seems not to function properly since I get the error message. Testing them looks OK but we get this error when no switch is pressed and does not matter if we put high or low active.

We thought about the noise issue - so we have put the switches wires as far as we can from the high current ones. although we did put the switches wires under the PCB to shorten the distance to the connector - but I don't think this is bad idea.... unless it is :-)

I will try to play with it tomorrow See if I can get you some more info.

Many hanks again.

Isaac
Title: Re: Switches behave strangely
Post by: Hood on August 02, 2011, 07:11:34 AM
You wont see the LEDs if its noise as the driver will see things much much faster than the display can change things.
Try some debounce and I think it might help, if it does it proves its noise.
Hood
Title: Re: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 07:48:48 AM
Will do and report

Thanks
Title: Re: Switches behave strangely
Post by: neuman5022 on August 02, 2011, 07:51:06 PM
Hi Hood

Tried the debounce trick - and YES this must be an interference issue. Put initially 2000 as you suggested -had no more issues with the Y axis home even when shared with the Y- -.   (debounce at this point set to 250)

Then hooked all the limit switches - these are notorious :'(   - had to raise the debounce over a 1000 and it still does that once in a while.

You said the debounce trick is not such a good idea - how would you fix the interference on pins 11 and 12 ?

Many thanks

Isaac
Title: Re: Switches behave strangely
Post by: Hood on August 03, 2011, 05:16:44 AM
Shielding and properly grounding the shield is usually good enough, sometimes people will add small capacitors on the inputs, think 0.1uF is the norm.
Hood
Title: Re: Switches behave strangely
Post by: Tweakie.CNC on August 03, 2011, 06:41:34 AM
Isaac,

You would be wise to use twin core shielded cable to connect your switches with the shield connected to GND at the breakout board / controller end only.
The 0.1uF capacitors that Hood mentioned connect between the switch input and GND , again at the breakout board / controller end.

Tweakie.
Title: Re: Switches behave strangely
Post by: neuman5022 on August 03, 2011, 07:59:20 AM
Thanks heaps guys

I will go with the capacitors option for starters - easier then start rewiring all.

Hope this will solve this issue.

Cheers from down under

Isaac
Title: Re: Switches behave strangely
Post by: NosmoKing on August 03, 2011, 11:43:25 AM
http://www.cnczone.com/forums/phase_converters_vfd/133188-limit_switches_tripping_when_using.html
N.
Title: Re: Switches behave strangely
Post by: neuman5022 on August 03, 2011, 08:30:25 PM
Thanks for the info NosmoKing :-)

It may sound silly but I need to clarify one thing:

My Hobby CNC BOB came with an American mains plug. Since I did not wish to have any issues - I hooked this plug and using it with an international adaptor.

My dumb question: Where (if at all) does the American plug take it's ground from ? Is it possible I have no ground on the socket ? If this is true - where does the BOB take it's ground from ?

Does the Parallel port of the PC transfer ground somehow ?

Cheers

Isaac
Title: Re: Switches behave strangely
Post by: NosmoKing on August 04, 2011, 09:32:02 AM
The US and generally other countries Australia included,  use a similar system, for ground you require a 3 conductor supply, Live, neutral and ground.
Although the Earth ground and neutral are made common at the service entrance (power panel), they must remain separate throughout.
IOW you cannot use the ground in place of a neutral conductor, or vise-versa..
A normal tower or desk top PC has a 3 conductor supply and the ground is connected to the case, the power supply DC starts out essentially isolated, but the low voltage DC common is then connected  to earth ground through the MB screws to the case.
So the parallel port 5v common will also be at earth ground.
One problem that often causes confusion is that the term Ground that used to refer strictly to Earth ground and has also now become the term for P.S. common, and a P.S. common may or may not be connected to earth ground!!! ::)
N.
 


 
Title: Re: Switches behave strangely
Post by: neuman5022 on August 04, 2011, 06:56:01 PM
Thanks for that.

So I understand I have ground to my system (I am using a desktop) and the interference I get is probably form the motors/power etc.

Will install the capacitors and see how it goes.

Cheers


Isaac
Title: Re: Switches behave strangely
Post by: neuman5022 on August 08, 2011, 05:40:07 AM
Hello again guys

Time to report:

Today I installed 0.047 uF ceramic disk capacitors on each of the switches pins - and it looks like it works ! :-)

Had a minor issue with the shared homing switches - when trying to home - the limit part of the switch was triggered- not allowing me to reference.

Since I tried this with the debounce interval at zero - I have tried some settings and I have found out that 200 on the debounce is holding perfectly - I can now home/ref and I did not get any interference at all.

Thanks heaps for your support and wisdom guys - it is very much appreciated.

Isaac
Title: Re: Switches behave strangely
Post by: Chieffy on August 08, 2011, 04:39:10 PM
Good day:

I am new to CNC and Mach3 and am also having issues with the switches.  I have hooked up all my switches and when i ask the machine to home itself the z switch turns system off , it does not back off the switch as do the y and x axis home switches.  I have made sure that the z switch is found as a home switch only and even played with resetting the home zero after backing it of .25".

The funny part is it worked once. When I first set up all my switches and axis were all over the place I pressed  home and all homed nicely. Z than y and finally x. The problem is it has never worked since.

As z is the first axis that homes it stays on off and I have to manually back it off and hit reset. Than it just homes z again etc.

Any help would be greatly appreciated.

Chieffy
Title: Re: Switches behave strangely
Post by: Hood on August 08, 2011, 05:01:21 PM
Can you attach your xml as it will let me see if there are conflicts or issues with your setup.
Hood
Title: Re: Switches behave strangely
Post by: neuman5022 on August 09, 2011, 03:25:49 AM
Hi Chieffy

I agree with Hood - try to give us more details - when you say "turns the system off" - what do you mean by that ? You should get a message at the bottom that says the reason it stopped (I.E limit switch triggered - or something else) This can give us an idea where to look for.

It may be interference. homing max and mins, units too small or too big etc....


Cheers


Isaac