Hello Guest it is March 28, 2024, 07:10:41 AM

Author Topic: Switches behave strangely  (Read 7846 times)

0 Members and 1 Guest are viewing this topic.

Switches behave strangely
« 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


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Switches behave strangely
« Reply #1 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
Re: Switches behave strangely
« Reply #2 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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Switches behave strangely
« Reply #3 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
Re: Switches behave strangely
« Reply #4 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


Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Switches behave strangely
« Reply #5 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
Re: Switches behave strangely
« Reply #6 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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Switches behave strangely
« Reply #7 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
Re: Switches behave strangely
« Reply #8 on: August 02, 2011, 07:48:48 AM »
Will do and report

Thanks
Re: Switches behave strangely
« Reply #9 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