Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
Next move will be to connect the inputs to the PCB headers and see if the extra 0.4V of headroom clears the problem. I don't always get spurious trips so this might be enough.
Interesting analysis. Re. the PCB headers, the only caution in a high noise environment is the protection of the '14 inputs to >5V spikes. The IC should have clamp diodes that should work to protect but worth bearing in mind.
I have to admit all my cheap boards have had opto isolated inputs which I think can only help for noise immunity for systems like this.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
I didn't get time to look at the noise today but did manage to trace the input circuit for the cheap BOB. Picture below.
-
The inputs each feed one gate of a 74HC14D hex (that's six in one package) inverting Schmitt trigger. Exactly the technology I would have chosen for such an application myself!
There's a 10K pull-up resistor on the input and a 100pF capacitor to add a (very) little filtering.
Most interestingly, there's also an 1K resistor between the PCB header input and the screw terminals. This means that, when pulled low by an external circuit, using the screw terminals will leave the input to the trigger at about 0.4V higher than using the header connection. Since the low threshold for the trigger can be as low as 0.9V (typical value is around 1.3V with a 5V supply) this makes a big difference to how the circuit will behave, especially if you're not using a mechanical microswitch which provides a solid connection to ground.
-
Having just changed from microswitches to proximity switches with an isolating diode as well it's no wonder I'm having problems. The circuit below shows how I have the sensors wired into the BOB using a 1N4148 diode to isolate the 5V input from the 12V or 24V supply to the sensors.
The saturated output voltage of the sensor when triggered is about 0.3V. Add the usual 0.6V we see across a forward biased diode and that leaves 0.9V. BUT the current flow of about 0.4mA from the 5V supply through the 1K resistor lifts the input to the gate to 1.3V. This is right on the edge of the gate's lower threshold. All 4 sensors worked fine with a 12V supply before I fired up the spindle but very little noise is required to trigger a spurious trip. With a 24V supply the saturated output of the sensors rose less than 0.1V but this is enough not to trigger the inputs at all, even with no spindle noise.
-
Next move will be to connect the inputs to the PCB headers and see if the extra 0.4V of headroom clears the problem. I don't always get spurious trips so this might be enough.
-
I'm going to order a reel of 4-core screened cable from RS anyway, cut the tails off the sensors and wire them back to the connector panel without any other junctions.
-
What the diagram does not show is that I have 1uF capacitors across the screw terminal inputs for additional filtering. This was necessary to avoid spurious trips with the microswitches. These will also need to be moved to the PCB headers.
-
Attachment 27695
Attachment 27692
If it were me I'd be doing the following:
1) Add a decently low (<= 2K2) pullup on the output of the switch to 24V
2) remove the diode
3) Increase R2 to 10K
4) add a 2K7 resistor across the PCB header pins
5) up C1 to at least 10nF
6) remove R3
This should give a decent voltage swing on the switch output and a 0.1....+4.5v ish swing on the input to the 'HC14 with a bit of filtering and a 12dB attenuation of noise on the switch output to boot.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
Nice idea for fixed sensors but I don't think solid core cable will last long in a moving drag chain.
I won't be going through the drag chain. The switches will be fixed to the machine casting so they won't be moving. The little angle plates they will read off will be axis attached. This way the cable won't need to be that flexible.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Voicecoil
If it were me I'd be doing the following:
1) Add a decently low (<= 2K2) pullup on the output of the switch to 24V
2) remove the diode
3) Increase R2 to 10K
4) add a 2K7 resistor across the PCB header pins
5) up C1 to at least 10nF
6) remove R3
This should give a decent voltage swing on the switch output and a 0.1....+4.5v ish swing on the input to the 'HC14 with a bit of filtering and a 12dB attenuation of noise on the switch output to boot.
After I put up the last post I thought for a while and realised that using a diode was the wrong way to do this and that a simple potential divider with the BOB input seeing the open collector of the sensor directly was a far better idea as you suggest. I have a spare sensor and a spare BOB (that's one of the advantages of using a cheapo board instead of a $900 one) so I'll try those component values and check the volts. Thanks for working out the values.
It's tempting to try replacing the surface mount components on the BOB but I think an external bit of Veroboard with all the new bits soldered on will be the best option.
Doddy,
Come to think of it, I've probably got a quad opto-coupler or two in stock though I'll need to print up a surface mount PCB to use one of those. I feel a rummage through my drawers coming on!
1 Attachment(s)
Re: Inductive Limit Switch problem
Does Mach3 disable limits when homing, or is this an option?
I am not able to look at my machine as it is currently on the floor in my office, which I am refurbing.
Attachment 27706
Looking back through threads (to 2016), I sort-of answered this question, but left doubt. I use a NO inductive switch for homing, but a NC microswitch for limits and I just thought that a break in the homing circuit could cause a crash if the limit is deactivated.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
cropwell
Does Mach3 disable limits when homing, or is this an option?
I am not able to look at my machine as it is currently on the floor in my office, which I am refurbing.
Attachment 27706
Wow, using CAD to plan your workshop refurb!
Re: Inductive Limit Switch problem
OK, after serious consideration my priority has to be getting the #$%^*&^%$#@ing machine actually working so I can make some stuff with it. Playing about with circuit ideas is fine, but...
I'm not wasting a long weekend off work waiting for RS to send me some new cable and other components including 2mm pitch plugs for the PCB headers, so I've made a circuit board which connects into the existing screw terminals without the need to remove/replace surface mount components on the BOB itself. I expect it's going to work. If so, it'll do for now and I'll make a more reliable change to the wiring later. This machine is after all just a toy in my shed rather than the heart of a commercial operation.
Watch this space for details if it works!
1 Attachment(s)
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Voicecoil
Wow, using CAD to plan your workshop refurb!
Notice that Mach3 is already loaded :biggrin:
Attachment 27707
Thankfully, I had all the cabinets and worktop (25mm moisture proof MDF, 800mm deep) delivered before lockdown. All the carcases are built and in position. Next job is the worktops, and they are heavy sheets.
Anyway, My question is about homing and limits and I cannot find any reference to the query in the Mach3 reference manuals.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
cropwell
Anyway, My question is about homing and limits and I cannot find any reference to the query in the Mach3 reference manuals.
Mach3 certainly disables limits when homing if you use common home and limit switches. Seems likely that it does the same with separate switches - I'm sure I remember reading this in the manual somewhere but that was a long while ago.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
I have a spare sensor and a spare BOB (that's one of the advantages of using a cheapo board instead of a $900 one) so I'll try those component values and check the volts.
Nope, that's no advantage because if you had a decent board you wouldn't have this problem in first place and this thread wouldn't exist.!! . . . Throw the bag of shite in the Bin and buy a decent board. While you are at it spend a bit more buy one with Ethernet...:joker: