Hello Guest it is July 11, 2020, 03:41:47 PM

Author Topic: Bouncing Limit Switches??!!! please help me regain my sanity!  (Read 8016 times)

0 Members and 1 Guest are viewing this topic.

Bouncing Limit Switches??!!! please help me regain my sanity!
« on: August 25, 2012, 08:07:39 AM »
Dear All

I have recently bought a ZP5A-INT Breakout board from Zapp and running Mach3Version3.043.062 on an XP desktop machine.

The motors work perfectly and very pleased however I added limit switches and having some problems. I set the inputs on the settings to pin11 and 12 as per the instructions, however they seem to bounce around switching on randomly. I checked the switches and they are fine, wired up NO so therefore set Mach3 up to register LOW active.

A funny thing happens when I touch the contacts with bare hands, the inputs seem to bounce on the diagnostics page.

Does anyone have any idea what I am doing wrong?

Am I missing something.

Any help would be much appreciated.

Benjamin

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #1 on: August 25, 2012, 08:23:06 AM »
First thing to say is you are much better to connect the switches normally closed, that way if a wire breaks the limit will be triggered and you can sort it. If wired normally open and a wire breaks the first you will know of it is when your axis crashes into the end and you may do damage.

Now to your problem, it sounds like you have noise issues. Have you gotthe limit wiring shielded and the shield properly grounded?
Hood
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #2 on: August 25, 2012, 08:29:03 AM »
Thanks for getting back to me Hood

I will change the connections to NC, good advice.

On the noise, the board is powered by USB, I did wonder if I should use a dedicated 5V PSU instead. The wires are not shielded, I can try and grab some shielded wire from maplins and test this.

The other weird thing is that the switches do not always trigger when you close them and if they do they sometime bring on the other axis (only have X & Y on this machine).

Benjamin

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #3 on: August 25, 2012, 08:57:10 AM »
If you attach your xml I will have a look at the config to see if there is anything in it that could cause your last problem.
Hood
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #4 on: August 25, 2012, 09:01:13 AM »
Great, thanks Hood. I'll be back in front of the machine on tuesday morning. I'll send the XML first thing.

I'm sure it's something simple i'm missing!

Benjamin
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #5 on: August 28, 2012, 04:37:30 AM »
Here is my XML file

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #6 on: August 28, 2012, 05:50:33 AM »
xml looks very basic and no apparent config issues so I am thinking it has to be noise related or possibly a bad breakout board. Just looked at Zap and they look like Chinese boards so quality is probably not the best.
Hood
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #7 on: August 28, 2012, 06:19:22 AM »
Thanks for looking.


I'll have a poke around the board and see if I can figure anything out. As I understand it the limits are normally pin 11 and 12? and they are normally pulled up to 5v? Could I hack the board a little to get the pins reading correctly?

Benjamin

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #8 on: August 28, 2012, 07:06:58 AM »
You should be able to connect the limits to any free input and just tell Mach what the port and pin is.
I did notice you had the Dir for the two axis as 14 and 16. Normally axis are the low numbers but I presumed the board said to use them?
There may be differences on certain inputs or they could all be the same.
Hood

Offline Fastest1

*
  •  927 927
  • Houston, TX
    • View Profile
Re: Bouncing Limit Switches??!!! please help me regain my sanity!
« Reply #9 on: August 31, 2012, 09:46:15 AM »
Do you have a star point or star ground? I fought noise issues in my limit switches for a long time until I connected the VE- (in my case off of the cap of my power supply to the star point also along with the earth ground). Prior to that single connection, I had tried everything, capacitors, resistors connecting the shields at one and or both ends or none at all. Nothing helped until that wire was connected. Now that that wire is connected, the shields dont seem to matter ( I do have them connected to the star point only, but I tested them without just out of curiousity). I have laid the limit wires close to stepper and power wires while running code, no errors. I am running a debounce of 100. I could probably go less but that should stop any stray signals. Btw I never could see the triggering on the diagnostics page unless I was statically testing the switch circuits.
« Last Edit: August 31, 2012, 09:48:08 AM by Fastest1 »
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)