. .
  1. #1
    Wal's Avatar
    Lives in Stockport, United Kingdom. Last Activity: 30-03-2023 Has been a member for 9-10 years. Has a total post count of 491. Received thanks 71 times, giving thanks to others 29 times.
    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

    ...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)

    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.

  2. #2
    Any particular reason why you bought the 3 wire NPN switches instead of the 2-wire ones?

  3. See this thread, my post #8

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

    Ask here if you need more info...

  4. #4
    Wal's Avatar
    Lives in Stockport, United Kingdom. Last Activity: 30-03-2023 Has been a member for 9-10 years. Has a total post count of 491. Received thanks 71 times, giving thanks to others 29 times.
    Quote Originally Posted by birchy View Post
    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.
    Last edited by Wal; 01-10-2013 at 10:23 AM.

  5. #5
    Clive S's Avatar
    Lives in Marple Stockport, United Kingdom. Last Activity: 12 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 3,333. Received thanks 618 times, giving thanks to others 78 times. Made a monetary donation to the upkeep of the community. Is a beta tester for Machinists Network features.
    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 ..Clive

  6. The Following User Says Thank You to Clive S For This Useful Post:


  7. #6
    Wal's Avatar
    Lives in Stockport, United Kingdom. Last Activity: 30-03-2023 Has been a member for 9-10 years. Has a total post count of 491. Received thanks 71 times, giving thanks to others 29 times.
    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):

    Attachment 9903

    Along with this:

    Click image for larger version. 

Name:	4N25_Diagram.jpg 
Views:	890 
Size:	10.2 KB 
ID:	10289

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

    I'll be back soon enough, no doubt.

    Wal.

  8. #7
    Wal's Avatar
    Lives in Stockport, United Kingdom. Last Activity: 30-03-2023 Has been a member for 9-10 years. Has a total post count of 491. Received thanks 71 times, giving thanks to others 29 times.
    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:

    Click image for larger version. 

Name:	wiring_diag.gif 
Views:	769 
Size:	6.3 KB 
ID:	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.

    Click image for larger version. 

Name:	01_12v.JPG 
Views:	490 
Size:	262.3 KB 
ID:	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)

    Click image for larger version. 

Name:	02_5v.JPG 
Views:	419 
Size:	257.8 KB 
ID:	10788

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

    Click image for larger version. 

Name:	P1010313.JPG 
Views:	472 
Size:	268.4 KB 
ID:	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.

  9. The Following 2 Users Say Thank You to Wal For This Useful Post:


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Wiring home and limit switches
    By Lee Roberts in forum General Electronics
    Replies: 24
    Last Post: 18-11-2023, 06:14 PM
  2. EMC2 home/limit switches... only acting as limit?
    By vputz in forum LinuxCNC (EMC)
    Replies: 4
    Last Post: 15-10-2014, 09:51 AM
  3. Limit Switches with LED's
    By manofgresley in forum General Electronics
    Replies: 30
    Last Post: 02-01-2013, 03:08 PM
  4. Limit/home switches - how are you mounting 'em?
    By HankMcSpank in forum General Discussion
    Replies: 2
    Last Post: 13-11-2011, 01:42 PM
  5. The best solution for limit / home switches on a mill is .....what ?
    By NICKMODELMAKER in forum Gantry/Router Machines & Building
    Replies: 1
    Last Post: 29-05-2010, 01:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •