. .
Page 1 of 2 12 LastLast

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    These proximity switches come in so many flavours. The switch the OP is using switches to ground and an internal resistor makes no sense; the switch in the previous post switches to the supply rail and maybe an internal resistor is more useful.

    If you use the NC version of the OP's switches, wired as suggested in series with the BOB input, you can connect a number of them to a single input. I have tested four in series, using 24V and a CSMIO, and that seems to work fine. Using the OP's NO switches, you would have to wire them in parallel but you lose the "fail safe" feature of NC switches.
    Last edited by Neale; 13-10-2016 at 08:58 AM. Reason: Corrections

  2. #2
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Current Activity: Viewing 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 2,911. Received thanks 360 times, giving thanks to others 8 times.
    People seem to be over complicating this.
    .
    Given the BOB in question requires switched to 0V to activate the input, all you need to do is wire 24V to BN, 0V to BU, then connect the BK to the BOB input. You may need to also connect the BOB 0V to the sensor, however I'd assume this BOB doesn't have fully isolated inputs, and the 24V and 5V supplies already have their 0V connected at some point.
    .
    An NPN sensor simply switches the output wire to 0V, and should go essentially open circuit when unactivated. You should not need any kind of pull up resistor on the sensor output.
    However as has been mentioned already, the sensor may not switch perfectly to 0V, and may struggle to reliably switch the BOB input. In that case, adding a small relay into the circuit would be needed.
    Alternatively, there's these simple sensors called switches... ;-)
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  3. The Following 2 Users Say Thank You to m_c For This Useful Post:


  4. #3
    NPN and PNP are transistor types. Transistors are like switches, strangely picky switches.

    An NPN switches power to ground. A PNP switches power off the power rail.

    So if you have an NPN output sensor it is going to switch something to ground.

    If you wanted a Voltage, connect a resistor between and NPN output and the Voltage rail.

    More likely you want a current. To avoid interference CNC folk tend to use opto-isolation, the output turns on an LED which shines on a detector, which probably has an NPN output, but someone else can worry about that one.

    The only sensible way to drive an LED is with a resistor off the Voltage rail, through your LED, through the NPN output to ground.

    If it is a silicon transistor you will have a 0.7V drop across it, probably another 1.2V drop across the LED, use whatever is left to calculate the resistor value.

  5. #4
    Quote Originally Posted by m_c View Post
    People seem to be over complicating this.
    .
    Given the BOB in question requires switched to 0V to activate the input, all you need to do is wire 24V to BN, 0V to BU, then connect the BK to the BOB input. You may need to also connect the BOB 0V to the sensor, however I'd assume this BOB doesn't have fully isolated inputs, and the 24V and 5V supplies already have their 0V connected at some point.
    .
    An NPN sensor simply switches the output wire to 0V, and should go essentially open circuit when unactivated. You should not need any kind of pull up resistor on the sensor output.
    However as has been mentioned already, the sensor may not switch perfectly to 0V, and may struggle to reliably switch the BOB input. In that case, adding a small relay into the circuit would be needed.
    Alternatively, there's these simple sensors called switches... ;-)
    Reason why I over-complicated things was that I had assumed that this BOB had opto-isolated inputs (I've been working with a CSMIO card recently which does things that way and I made a false assumption). I have been trying to test my own ZPA5 with Mach3 but after a couple of hours, remembered that the parallel port version of Mach3 doesn't work on 64-bit Windows. However, I did take a look at the card itself and it looks like the inputs go into a set of buffers, no opto-isolation, but with a pull-up resistor. So as m_c accurately says, just take the black wire to the BOB input. Make sure that the 0V of the 24V power supply (blue wire to prox switch) goes to the ground connection on the BOB. In fact, just as in your first diagram but the resistor is redundant. What is probably worth doing is checking that with the prox switch disconnected, just shorting the BOB input pin to ground does register with Mach3 (stick a small screwdriver blade in the two-pin socket next to the screw terminals). If that works and you see the Mach3 diagnostic "LED" go on and off, then you can connect the proper switch and see if that works.

    For those who mentioned the possible 10K resistor in the switch - the BOB appears to have a current-limiting resistor in series with the input to the buffer inverter which also includes clamp diodes to restrict input voltage at the input pin. So the 10K resistor, if it does exist, is just going to act as another pull-up when the switch is open and can be ignored when the switch is closed. If it doesn't exist, it doesn't matter as the BOB has an onboard pull-up anyway.

    See - some of us have been working this evening instead of drinking
    Last edited by Neale; 14-10-2016 at 11:15 PM.

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


  7. #5
    Quote Originally Posted by Neale View Post

    For those who mentioned the possible 10K resistor in the switch - the BOB appears to have a current-limiting resistor in series with the input to the buffer inverter which also includes clamp diodes to restrict input voltage at the input pin. So the 10K resistor, if it does exist, is just going to act as another pull-up when the switch is open and can be ignored when the switch is closed. If it doesn't exist, it doesn't matter as the BOB has an onboard pull-up anyway.
    Don't know the zener voltage (zen, zener, zenest), but here's the essentials of the internal circuit.

    Now I am going to get ANOTHER Brandy !!!!

  8. The Following User Says Thank You to cropwell For This Useful Post:


  9. #6
    Thanks for that, Rob - first time I've seen a representation of the switch internal circuit. I find those little extracts of both input and output circuits very useful in getting an understanding of how things go together, and especially when it comes to working out why something doesn't work! Too much detail for some, perhaps...

    Now I'll have to draw out the combined circuit of four of those (NC versions) strung in series, so that I can use a single input for combined limit switches, just to reassure myself that it should work - even though I've wired it up on the bench and it does seem to.

    Maybe some of us take a more theoretical approach where others just want to know where to stick the black wire

    Just in case the OP is still with us and hasn't given up the will to live - this just confirms that your original wiring should be fine if you take out the resistor.

  10. #7
    Now I'll have to draw out the combined circuit of four of those (NC versions) strung in series, so that I can use a single input for combined limit switches, just to reassure myself that it should work - even though I've wired it up on the bench and it does seem to.
    Not sure but I recon they will be ok for limits but if used as home combined.
    I think there will be an increasing delay put in to the circuit the more you connect.
    ..Clive
    The more you know, The better you know, How little you know

  11. #8
    Couple of points there. Personally (and without looking up switch data sheets to see if they quote switching times) I suspect that compared with typical machine speeds, any delay will be insignificant (*). That's based on gut feel rather than hard data, though. Second point is that I would be more concerned about repeatability than actual switching time. I don't really care if the response time is, say, 100uS as long as it is always 100uS, so that the machine always stops in the same place. Doing a bit of my usual back-of-the-envelope sums, I reckon that at full tilt my ballscrews will be turning at 1000rpm. Say, 17rps. 800u steps per rev, so 13600 steps/sec. That's about 75uS per step. In practice, final homing is done at, say, 10% of that, so as long as the switch responds repeatedly to the nearest 3-400uS, you should be able to stop at the same ustep. Dean's demo of homing repeatability using proximity switches a while back supports this.

    (*) what probably matters more is that you always home at the same speed as I suspect that exact switching points will depend on speed of approach to target but that is something that's under our control. It only matters for homing anyway; don't really care exactly where the machine stops if it hits a limit as long as it stops before something gets broken!

  12. #9
    Quote Originally Posted by Clive S View Post
    I think there will be an increasing delay put in to the circuit the more you connect.
    Apart from the inductive sensing circuit, I see no capacitative or inductive components that will introduce any time elements into the switching circuit. Sorry for the delay in replying

  13. #10
    Quote Originally Posted by Neale View Post
    Thanks for that, Rob - first time I've seen a representation of the switch internal circuit. I find those little extracts of both input and output circuits very useful in getting an understanding of how things go together, and especially when it comes to working out why something doesn't work! Too much detail for some, perhaps...

    Now I'll have to draw out the combined circuit of four of those (NC versions) strung in series, so that I can use a single input for combined limit switches, just to reassure myself that it should work - even though I've wired it up on the bench and it does seem to.

    Maybe some of us take a more theoretical approach where others just want to know where to stick the black wire

    Just in case the OP is still with us and hasn't given up the will to live - this just confirms that your original wiring should be fine if you take out the resistor.
    Hi Neale - I'm still here! Just about. But I must be having a brain fade because when I connect the black wire to pin 10, the blue wire to the pin 10 GND, then run a wire back to the -ve 24v supply it buzzes and does'nt work. I checked the GNDS on the ZP5A-INT board (it has a 5v supply from my Leadshine PS408/5 ), all the gnds are connected by doing a continuity check with the BOB unpowered from the -5v pin. I guess I just need to sleep on this and start again tomorrow. I must be missing something in what you guys have said and suffering from a case of "Goldfish brain"

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Proximity limit switch problems
    By davrich in forum General Electronics
    Replies: 16
    Last Post: 12-03-2018, 01:58 PM
  2. Wiring 3 wire proximity switches in series
    By mikem in forum General Electronics
    Replies: 6
    Last Post: 02-05-2016, 09:33 AM
  3. 3 wire proximity switch help
    By mikem in forum General Electronics
    Replies: 24
    Last Post: 06-10-2015, 03:24 AM
  4. Proximity switch NPN or PNP
    By Matt81 in forum General Electronics
    Replies: 9
    Last Post: 19-04-2014, 11:38 AM
  5. Proximity Wiring Problem
    By Bruce in forum General Electronics
    Replies: 7
    Last Post: 13-01-2014, 07:21 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
  •