1 Attachment(s)
Re: Inductive Limit Switch problem
Embarrassing but I must own up: I realised during my tests that for all these years I've left the 36V supply for my stepper motors floating. Neither rail was grounded so the whole supply was bouncing up and down by 8 Volts at several KHz. It's a miracle the machine worked at all! Any way that's now fixed and some of the bits from RS have arrived, though not the screened cable for re-wiring the sensors yet.
-
Fortunately I have access to the highly sophisticated electronics test laboratory shown below and have been able to make some very revealing, noise-free measurements on the spare cheap Chinese breakout board. Earlier reported voltage measurements were made in the presence of noise and are not reliable.
-
With an input fed to the board header rather than the screw terminals, a falling voltage must drop below 0.6V to set the output of the board. A rising voltage must go above 1.7V to reset it. This gap is the hysteresis we expect from a Scmitt trigger input chip and provides some noise immunity.
-
When using normally closed (NC) microswitches as sensors the inputs are a good solid short circuit for most of the time and only open briefly during homing. Excellent noise immunity is obtained in this configuration as proved by the fact that my machine has worked reliably for a few years!
-
Using proximity sensors presents a problem, even with opto-isolators or other electronic interfacing, since the saturated collector-emitter voltage at the output of the proximity detector or from an isolator when triggered is about 0.6V. No guarantee of reliable triggering here even without noise. The use of a potential divider circuit as described earlier is an option but I've decided to use a more direct and low-impedance option... reed relays. These will be fed by an NPN emitter-follower transistor which serves to boost the current available from the proximity sensor.
-
Some will scoff no doubt, but it actually makes sense for a few reasons:
I know from past experience that a solid short circuit on the inputs works reliably, even in the presence of high noise.
Low-pass filtering is excellent and requires no additional components.
When wired as I plan to have them, with the 12V from the sensor holding the relay contacts closed as the normal state (this mimics the previously known-good NC microswitches), the circuit is proof against wiring faults as any breaks will trip the limit input.
-
Regarding positional accuracy, a key point of using proximity sensors is improved repeatability over microswitches. The reed relays I'm going to use have a specified response time of 0.5mS. Allowing for, say, 20% variation that gives a repeatability of within of 0.1mS. I can't remember exactly what my second approach speed is set at for homing in LinuxCNC but if it's even as high as 1m/min that equates to a variation of around 2 microns. Which equals nothing.
The 4 relays are $20 the lot from RS, the transistors and a wee bit of veroboard are existing stock worth much less. The whole circuit has been tested on the bench ( I have 2 relays in stock already) and works a treat. So I might just have a fully working machine again well before Mark McGowan let's me back in the pub!
Attachment 27796
Re: Inductive Limit Switch problem
No scoffing from this direction.
I'm somewhat surprised with the Vce(sat) for the opto, but if that's what you've measured then that's what it is. Personally at that stage I'd be using change-over contacts for single-switched inputs and using NC=gnd, NO=5V just to yank that signal line to one rail or the other (nothing left floating).
For the nay-sayers, what Kitwn's post is providing is belted-and-braced robust and deterministic behaviour. There's too many problems in the world to save pennies on uncertainty on our machines.
Perhaps I'm feeling humbled after a day's worth of trying to get my control box switching automatically between two machines... and making some stupid assumptions... right, where's that damned scope gone...
Re: Inductive Limit Switch problem
Not measured on a specific opto, but it is the measured output voltage of the proximity sensor when triggered. Opto outputs will vary depending on device and load current but with only 0.6V to play with I'm not chancing it. I was surprised at the low trigger voltage, but it's what I measured on the board input and the chip spec says it can be as low as 0.7V
-
This is likely to be a problem with any board that only uses 5V logic on it's inputs. I assume the more expensive boards are more sophisticated. They'd better be for the difference in price.
-
I'm happy that the 10K pull-up on the board will work OK with the single pole relays. The relay will isolate the actual board input from any noise on the wiring from the sensors and the overall noise level is going to be significantly reduced by my improvements to the wiring overall.
Re: Inductive Limit Switch problem
I'll stick with my self-centred view of having BoBs and similar with opto-isolated inputs. I've never been a fan of distributing a high speed logic input signal into the big, bad world.
Now... where to buy a replacement for a badly crimped D25-26w IDC cable (Bob2->UC300) that's given me gip for the last day, on Easter Sunday?...
Re: Inductive Limit Switch problem
Throw it in the bin I say..:joker:
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Doddy
I'll stick with my self-centred view of having BoBs and similar with opto-isolated inputs. I've never been a fan of distributing a high speed logic input signal into the big, bad world.
I'm in complete agreement with you on that one, but the logic following it probably needs to be slightly different from the input circuit to my cheapo card. Something with a supply voltage well above 5V would be a good start.
EDIT: Been doing a bit more looking at opto-couplers and there certainly is a big range of options. The Darlington output types have a higher saturated output (up to 1V) compared to the conventional type (as low as 0.1 - 0.2V at low current) so you really must choose your device, but there are devices that would interface successfully to the cheap card. Since this application is at a guaranteed very low frequency I'm happy to let old technology do the job this time.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
JAZZCNC
Throw it in the bin I say..:joker:
I promise I will do exactly that. As soon as I receive your cheque for the $400 AUD or so that I'll need to replace it with something better. Now THAT'S how you give a Yorkshireman a heart attack :hysterical:
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
I promise I will do exactly that. As soon as I receive your cheque for the $400 AUD or so that I'll need to replace it with something better. Now THAT'S how you give a Yorkshireman a heart attack :hysterical:
If you are prepared to use Mach3/4 then I've probably got something I could send your way.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
Kitwn
Not measured on a specific opto, but it is the measured output voltage of the proximity sensor when triggered. Opto outputs will vary depending on device and load current but with only 0.6V to play with I'm not chancing it. I was surprised at the low trigger voltage, but it's what I measured on the board input and the chip spec says it can be as low as 0.7V
-
This is likely to be a problem with any board that only uses 5V logic on it's inputs. I assume the more expensive boards are more sophisticated. They'd better be for the difference in price.
-
I'm happy that the 10K pull-up on the board will work OK with the single pole relays. The relay will isolate the actual board input from any noise on the wiring from the sensors and the overall noise level is going to be significantly reduced by my improvements to the wiring overall.
It's a shame they've used a 74HCT14 for the buffer on your BOB, the old (and now probably uncommon) 40106 hex Schmitt buffer was a better chip for such purposes IMHO, as the threshold voltages are more or less equispaced around 1/2 the supply voltage, something like 2.3V & 2.7V.
Re: Inductive Limit Switch problem
Quote:
Originally Posted by
JAZZCNC
If you are prepared to use Mach3/4 then I've probably got something I could send your way.
PM sent.