PDA

View Full Version : 24v Limit/Home switches. How to..?



Wal
01-10-2013, 12:25 AM
So I've been thinking about how to wire up my limit/home switches. I'm using these:

1PXS Inductive Proximity Switch 5mm Detection NPN | eBay (http://www.ebay.com/itm/1pxs-Inductive-Proximity-Switch-5mm-detection-NPN-/360634059115?ssPageName=ADME:X:AAQ:US:1123)

...and to avoid noise issues I'm hoping to run them off a 24v power supply that I'll commandeer from an old external HD or some such. Obviously, I'm unable to go straight into my BOB with 24v and I understand that somehow I need to have the 24v side of the limit circuit activate my auxiliary 5v circuit (via an optocoupler or a relay) which signals the BOB.

Well, that's one way - being an electronics buffoon, that might not make any sense to you guys who know what you're talking about - the closest description I can find of what it is I want to achieve is the following (quoted from the CNC Cookbook pages (http://www.cnccookbook.com/CCCNCNoise.html))


Sometimes you can use a Zener diode to run a higher voltage and convert it back to 5V for your breakout board. Run a 24V circuit and have the switch ground that. Then use a resistor in series something like 1K to the digital input, with a 5V1 zenner diode across the input and ground. (Bar of diode to input). The Zener diode will clamp the digital voltage at 5volts.

There are also opto-isolators that allow differential voltages so you could have +5V to your breakout (actually may as well go to the parallel if you are using an opto-isolator--don't need 2 of them!) and 24V to your switch circuits.

But (rather embarrassingly) even that makes little sense to me...

I've spoken to a few folks about how best to do this and I'm led to believe that it's relatively straightforward, the trouble is I can't find any resources out there that give clear instructions - heh, even the 4/5 people that I've asked about this seem to approach it in slightly different ways and probably need a bit more info off me to give me better answers.

So, any instructions (theoretical or detailed) / diagrams / parts lists that anyone can point me towards?

Thanks for your help!

Wal.

birchy
01-10-2013, 01:46 AM
Any particular reason why you bought the 3 wire NPN switches instead of the 2-wire ones?

irving2008
01-10-2013, 05:22 AM
See this thread, my post #8

http://www.mycncuk.com/forums/showthread.php?t=6485

Ask here if you need more info...

Wal
01-10-2013, 10:21 AM
Any particular reason why you bought the 3 wire NPN switches instead of the 2-wire ones?

Birchy - Errm. Yep. A thorough lack of understanding would probably be the main one... I'm right in thinking that a 3 wired switch can be used NC and NO and the only detrimental effect in my application is it being a bit untidy..?

Irving - Sorry mate, you're speaking to an electronics Dunce - I sat there looking at those circuit diagrams and all that happened is that I began to sweat... There's zilcho documentation with my BOB so I'm not entirely sure which of the diagrams applies to me. I know that it (my BOB) does feature optocouplers, but have read that they're best ignored (very slow apparently). Dunno where that leaves me. Let's say I do eventually find BOB documentation - are you just using a resistor to limit the voltage going into the BOB.

Any chance of a layman's explanation of the theory of how this is achieved..?

Wal.

Yes, I know I should have payed more attention in physics.

Clive S
01-10-2013, 10:28 AM
Wal I believe that your switches have a 10k inside them already and if I am not mistaken there is a 330r on the bob I am sure Irving will come along and draw you a diagram:applause: ..Clive

Wal
01-10-2013, 09:21 PM
Right, I think I'm beginning to see a bit through the fog of stupidity (thankfully not the magic smoke...)

This (thanks go to lateAtNight):

9903

Along with this:

10289

...have made things a bit clearer..!

I'll be back soon enough, no doubt.

Wal.

Wal
17-11-2013, 05:52 PM
Apologies for resurrecting an old topic, but hopefully this extra info will help someone who isn't getting their head around running the proximity switches at a higher voltage and still being able to pass a signal back to the BOB at 5v.

Firstly, a huge thanks to Clive S who has explained (again and again with a great deal of patience) how this works. I'm kinda getting it now... It's something to do with dividing potential and works because there is already a resistor present in the switch (10K).

So to re-cap the details:

I'm using an NPN Inductive Proximity Switch part number: IQ11-D1NA05
The power supply for this switch will be an old 12VDC supply I have lying around from an old hard-drive (NOT 24V as in the subject)
My BOB is one of those Wantai BOBs that comes free when you buy the DQ860MA drivers

The first thing to say is that the stuff above is all well and good but, as Clive pointed out, for my purposes probably over-complicating the issue. If the currents that we're dealing with here were more substantial, then I have it on good authority that this method wouldn't work as matters become more complicated due to things like inductance/capacitance etc...

Right, here's a diagram of how I'm connecting everything together:

10786

And some photos of how it looks on my newly bought breadboard...

Here's a reading of the voltage where it comes into the circuit - 12VDC as expected.

10789

Here's the HIGH 5.72V reading taken from the BLACK wire whilst the switch isn't sensing anything. (The probe that you can't see is connected to GND)

10788

And here's the LOW 0.69V reading taken whilst the switch is sensing - in this case a bottle-top.

10787

I hope this makes things a bit clearer for those of you who are in the same boat as me (S.S. Clueless..)

IMPORTANT: Obviously, I'm a novice - barely even that - and have been guided by an expert - with that in mind, please exercise caution and get advice off someone who knows what they're doing before using any of the above information in your application.