586,655 active members*
3,394 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > Need help with a current detection circuit
Page 2 of 2 12
Results 21 to 40 of 40
  1. #21
    Join Date
    Jul 2008
    Posts
    411
    Matt,

    I hear what Al and Mike say...its your call... however...

    I think there is some confusion about the device... the part # you quoted 83/2022X isn't a part number but a certificate of conformity, there are many P&F parts that meet that (now outdated) certification. The SJ3,5SN is a slotted inductive part not a barrel part, see here, so clearly thats not your part.

    The nearest part to yours in the P+F catalog meeting that spec and being an M5 threaded barrel (3/16") is the NJ0,8-5GM-N, which is an 0.8mm proximity device which, given its purpose, makes a lot of sense. P&F do not do a 2-wire high-current part in the 5mm barrel, you need to go to an 8mm or 10mm barrel for that.

    You will see from that attached datasheet that this is a NAMUR device, meeting DIN 60947 which is a low voltage interface spec for intrinsically safe equipment (i.e. equipment likely to be used in an explosive atmosphere). That requires a maximum of 8v supply, 1 - 3mA switching and a maximum short circuit current of 8mA... thats where the 1k Ri spec comes from - its the internal impedance of the external amplifier.

    To me all the evidence says this switch requires an external amp...
    Attached Files Attached Files
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  2. #22
    Join Date
    Sep 2010
    Posts
    1765
    Sounds like your detective work on his device has confirmed it is one needing the external circuitry!

  3. #23
    Join Date
    Dec 2003
    Posts
    24223
    Quote Originally Posted by irving2008 View Post
    To me all the evidence says this switch requires an external amp...
    Right there, NAMUR rated devices usually do. :devious:
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  4. #24
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by mike_Kilroy View Post
    Sounds like your detective work on his device has confirmed it is one needing the external circuitry!
    Quote Originally Posted by Al_The_Man View Post
    Right there, NAMUR rated devices usually do. :devious:
    Al.
    Thanks guys, while I understood your points about the 2-wire high-current versions, the fact Matt said it was 3/16" dia bugged me... I've never seen a 2-wire high current one that small...

    I could still be wrong, but I'm convinced this a low-current one. It would be typical of a German firm to put the electronics all centrally and use the lowest-spec device on the actual machine.

    I'm still not entirely happy with the schmitt trigger circuit, its a tad close on tolerances. Here's a alternative, based on a quad op-amp.
    Attached Thumbnails Attached Thumbnails proximity2.gif  
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  5. #25
    Join Date
    May 2008
    Posts
    152
    I sure do appreciate all of the help here guys. I can't thank you enough.

    Irving, that attached PDF is my exact sensor. Foolishly, I didn't recognize it as a part number. NJ0,8-5GM-N.

    One reason they may have used these tiny sensors is that I have 5 of them in an end cover for the trunion table and there is not a whole lot of space. (BTW, my holiday project of getting the 4th and 5th axiis going came to life last night... albiet without limit switches. It was a thrill to see everything tilting and turning.)

    That being said, it looks like I can get away with either 5 or 24v since I have them already in my system. I'll make a lunk-head comment here and say that if I go with 24v operating voltage, that I'll have larger voltage changes when the switch detects its target. Any benefit to that?

    As Kilroy said, I may have toasted one of my switches when I had it shorted out, though it was still switching state. I'll try it again once I get my delivery of resistors, but I'd guess it's still ok. All of the radio-shack's have closed up around here, so it'll be a few days for an ebay load.

    I'll take a look at the op amp circuit and try to figure out what it's all about.

    Thanks again for all of the help.

  6. #26
    Join Date
    Dec 2003
    Posts
    24223
    24vdc is pretty much a control voltage 'standard'.
    It takes it out of the low noise prone 5v level and is still under the hazardous voltage range.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  7. #27
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by MattTheNoob View Post
    I sure do appreciate all of the help here guys. I can't thank you enough.
    You're welcome, always glad to help...

    Quote Originally Posted by MattTheNoob View Post
    Irving, that attached PDF is my exact sensor. Foolishly, I didn't recognize it as a part number. NJ0,8-5GM-N.
    bingo!

    Quote Originally Posted by MattTheNoob View Post
    That being said, it looks like I can get away with either 5 or 24v since I have them already in my system. I'll make a lunk-head comment here and say that if I go with 24v operating voltage, that I'll have larger voltage changes when the switch detects its target. Any benefit to that?
    since the proximity switch is current actuated the voltage to the switch itself is irrelevant. Those switches will operate from a 24v supply but the current switching is still 1 - 3mA. The reason why current switching is used is it allows a long wire run and good noise immunity, the amplifiers can be mounted a long way away (out of the hazard area). Magnetic and impulse interference induces voltages in the wire but these are cancelled out (twisted pair wiring is best), the current remains constant. If you have 24v you could run them from that, the voltage across the 1k sense resistor will still be 1 - 3v. Obviously the power to the schmitt or opamp still needs to be around 5v if its feeding a breakout board. You never did explain why a relay was needed - if you say what the overall requirement is there maybe simplifications to be made. As Al points out, 24v is common for mechanical switching to avoid interference as those are voltage-based signals but as i said it makes no difference here.

    Quote Originally Posted by MattTheNoob View Post
    I'll take a look at the op amp circuit and try to figure out what it's all about.
    Sure, even if you don't use it, it would be educational for you. BTW, there is a mistake... the 33k resistors should be 180k (I did the math wrong). Can you explain what the change will do and what effect it would have on the limit switching?
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  8. #28
    Join Date
    Oct 2007
    Posts
    269
    I have used the P&F (and other brands) two wire prox switches. If you test it with the lowest voltage first and work your way up, you should be OK as I have experimented like this previously. Note: the switches are offered normally closed, and normally open. Have a small relay with coil matching the test voltage, say 5vdc. 5vdc+ to the brown wire, blue wire to one coil wire, the other coil wire to 5vdc-. Test switch with metal. If no action, reverse the blue and brown. Still nothing up the voltage to 12vdc. Make sure the coil on the small load relay matches the test voltage. I usually stop at 120vac, though. Worst case is they still don't work, just like before you started. When I tested a good switch, this method has worked for me. Good luck :drowning:

    Jim

  9. #29
    Join Date
    May 2008
    Posts
    152
    I was hoping to get it figured out before passing out tonight, but I'm going to have to pick it up in the morning. I did manager to fill up two pages of scribbles.

    I think the 3k3 and 2k2 resistors give us 2V at the 10K resistor. I'm thinking that even through the 10k resistor, the prox will send either 5 or 7 volts to the -side of the op amp (because wikipedia tells me that the op amp has almost no load), but that can't be right because the most we're going to get out of our op amp for feedback is 5v, and that's before the voltage dividing resistors.

    I'll take another shot at it in the morning.

    Thanks again for the help!

  10. #30
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by MattTheNoob View Post
    I was hoping to get it figured out before passing out tonight, but I'm going to have to pick it up in the morning. I did manager to fill up two pages of scribbles.

    I think the 3k3 and 2k2 resistors give us 2V at the 10K resistor.
    Correct...

    Quote Originally Posted by MattTheNoob View Post
    I'm thinking that even through the 10k resistor, the prox will send either 5 or 7 volts to the -side of the op amp (because wikipedia tells me that the op amp has almost no load),
    The current through through the prox is either <1mA or >=3mA. Therefore the voltage across Rx1 is either <1v or >=3v. You are right that there is almost no current flow through Rx3 so the voltage on the -input of the op-amp matches that on the hot end of Rx1,

    Quote Originally Posted by MattTheNoob View Post
    but that can't be right because the most we're going to get out of our op amp for feedback is 5v, and that's before the voltage dividing resistors.
    The output of the op-amp is either close to 0v or about 0.5v below the supply rail, i.e. ~4.5v. So the +input to the op-amp is determined by those voltages and the ratio of Rx4 to Rx2 relative to 2v. I'll leave you to work that out.

    The output of the op-amp is high when the -input is at a lower voltage than the +input. So consider the state where the -input is <1v and work out where everything else is. Then consider what happens as the voltage tracks up to 3v...

    Quote Originally Posted by MattTheNoob View Post
    I'll take another shot at it in the morning.

    Thanks again for the help!
    Keep going!
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  11. #31
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by cheetahcnc View Post
    I have used the P&F (and other brands) two wire prox switches. If you test it with the lowest voltage first and work your way up, you should be OK as I have experimented like this previously. Note: the switches are offered normally closed, and normally open. Have a small relay with coil matching the test voltage, say 5vdc. 5vdc+ to the brown wire, blue wire to one coil wire, the other coil wire to 5vdc-. Test switch with metal. If no action, reverse the blue and brown. Still nothing up the voltage to 12vdc. Make sure the coil on the small load relay matches the test voltage. I usually stop at 120vac, though. Worst case is they still don't work, just like before you started. When I tested a good switch, this method has worked for me. Good luck :drowning:

    Jim
    JIm, yes, but were they the larger 2-wire internally amplified ones or the NAMUR spec'd ones..?
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  12. #32
    Join Date
    Oct 2007
    Posts
    269
    Quote Originally Posted by irving2008 View Post
    JIm, yes, but were they the larger 2-wire internally amplified ones or the NAMUR spec'd ones..?
    I use this test on ones that I'm unable to track down, with no info at all to work with.

    Jim

  13. #33
    Join Date
    May 2008
    Posts
    152
    HA! You nudged me just enough. My mistake was at the voltage around the 1k resistor. So, the voltage at the 10k resistor and thus the +input of the op amp will be either 1 or 3 volts depending on the switch status.

    With tha op amp output at 0v, I get 1.94v on V+, and 3v on V-, keeping the amp pegged at 0v.

    When the prox goes low we get 1v on V-, which starts the op amp ramping up until the voltage at V+ gets to 2.15v.

    I don't know if I got it right, but I feel like I'm at least close! I love learning new stuff.

    Now, to answer your earlier quiz question, what would the original 33k resistors do? The voltage at V- would have to drop below 0.46v for the op amp to ramp up, and would stay up until v- rose above 2.69v.

    How'd I do?!?! This is the most fun I've had in a while!

    Now the 10k resistor between the prox and V-... how does that get sized? What would happen if I didn't know to put that there?

  14. #34
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by cheetahcnc View Post
    I use this test on ones that I'm unable to track down, with no info at all to work with.

    Jim
    OK, then the vast majority are going to be the 'normal' ones and maybe 95/100 you'll get a useful answer... I'm pretty sure NAMUR spec'd devices will seem to be faulty under that test due to their restricted current handling, though I'm guessing a very sensitive relay with a pull in current <20mA might work - a NAMUR device might just pass 20mA on a 24v supply, tho the spec only requires max current flow under fault (short) conditions at 8v must be < 8mA.
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  15. #35
    Join Date
    Oct 2007
    Posts
    269
    The easy ones don't often make it here to CNCZone, we get the tough ones.

    Jim

  16. #36
    Join Date
    Jul 2008
    Posts
    411
    Quote Originally Posted by MattTheNoob View Post
    HA! You nudged me just enough. My mistake was at the voltage around the 1k resistor. So, the voltage at the 10k resistor and thus the +input of the op amp will be either 1 or 3 volts depending on the switch status.

    With tha op amp output at 0v, I get 1.94v on V+, and 3v on V-, keeping the amp pegged at 0v.

    When the prox goes low we get 1v on V-, which starts the op amp ramping up until the voltage at V+ gets to 2.15v.

    I don't know if I got it right, but I feel like I'm at least close! I love learning new stuff.

    Now, to answer your earlier quiz question, what would the original 33k resistors do? The voltage at V- would have to drop below 0.46v for the op amp to ramp up, and would stay up until v- rose above 2.69v.

    How'd I do?!?! This is the most fun I've had in a while!

    Now the 10k resistor between the prox and V-... how does that get sized? What would happen if I didn't know to put that there?
    You've pretty much got it. I haven't fully checked your math but the numbers look reasonable. So when the opamp output is at 0v the v+ is at 1.95v. This assumes the prox (and therefore v-) is above 1.95v, lets say its at 3v. now as the metal approaches the prox the voltage at v- starts to fall but the opamp stays at 0v until the voltage gets to 1.95v at which point the opamp output starts to move towards 4.5v and the v+ input towards ~2.15v. Because v+ is now moving further above v- the opamp switchover from 0 to 4.5v is accelerated so its less a ramp, more a step, certanly a lot faster than the change brought about by the metal approaching. At this point moving the metal away again a small amount isnt going to make the opamp switch because now the voltage has to rise again, not to 1.95v but to 2.15v. This is the whole point of a schmitt trigger, it provides hysteresis, converting a slow change to a fast change without any dithering back and forth. Now the amount of hysteresis is important. Too much and there will be a large 'dead band' of movement where no change is detected. Too little and the change over won't be clean and repeatable, there will be more dither. The size of the feedback resistor controls the 'dead band'... the bigger it is the smaller the dead band. With 33k the dead band is very large, as you calculated; the mechanical effect being to potentially make accurate home positioning more difficult... indeed you might need to experiment with the value of the feedback resistor to suit your specific needs, but 180k is a good starting point. You could of course make this a 250k variable resistor in series with, say, a 56k resistor and have some adjustment.

    The 10k input resistors could be any convenient value. They only serve to buffer the voltage divider from the op-amp input on the v+ side, so a matching one is used on the v- side to maintain the balance. The main factor in choosing these resistors is the input bias current in the opamp, which, in this case, is 100nA. A resistor is chosen that gives minimal voltage drop at that current, in this case 0.01v, compared to the likely bias voltage (nominally 2v here, so <1% error) and can still give a reasonable voltage divider for the feedback circuit. Too small a value would affect the 2v bias voltage more and would mean that multiple op-amps would affect each other slightly if they shared the divider (but that can be addressed in other ways, can you suggest three obvious ones?). Too large an input resistor would mean the feedback resistor could be very large for a small hysteresis and then operation could become more susceptible to environmental conditions (noise, damp, etc.).

    Anecdotally, "if in doubt start with 10k and see if it works" is a rule of thumb that seems oft followed in circuit design. I know from my manufacturing days in the aerospace industry that 10k resistors were ordered in noticably higher quantities than any other value and my then colleagues ascribed that 'rule of thumb' as the reason and, over 100s of projects, we never identified anything better.
    If you're in Europe why not come and visit the UK CNC Community at http://www.mycncuk.com

  17. #37
    Join Date
    Mar 2006
    Posts
    202
    Namur/intrinsically safe proxes are interesting devices. Normally they are used with external amps, often with adjustable switch points. We use them on one of our products in an unexpected way: we use them as analog displacement sensors. (We use Turck sensors, see description here, page L48 in particular, and I've seen P&F sensors on a competitor's machine.)

    If you measure carefully, you should be able to detect the analog character of them. Our electrical setup puts the sensor in series with two 56k ohm resistors, +12VDC to 56k to sensor brown, sensor blue to 56k to -12VDC. This results in a voltage across the sensor that varies as metal moves towards or away from the sensor face. We low pass filter the signal and tweak the balance and range to get a 0-5 volt signal, suitable for converting to digital.

    A 3/16 diameter sensor will have a pretty small sensing range. We use 18mm sensors to get a measuring range of about 2 to 6 mm. Your little sensors might measure in the range of 1/32 to 1/16 inch, as a rough guess. In the past, I've checked sensor linearity by mounting a test sensor in the vice in a (manual) mill with the sensor face close to metal in the spindle (ie, a drill chuck), applied power (to the sensor, not the spindle ;-) as described above and recorded voltage compared to table movement. The Turcks we use gave remarkable linear results - 2 point calibrations were plenty. They're also fast - a few kHz measurement rate was easy.

  18. #38
    Join Date
    May 2008
    Posts
    152
    Cool!

    I've just gotten my baggies of resistors and IC's, so I'm ready to start making smoke! I'll be sure to post some updates.

  19. #39
    Join Date
    May 2008
    Posts
    152
    Well, I've got it working!

    On a side note, I moved to 5V instead of 8v. I changed a few resistors and applied the learnings from Mr. Irving. I did this because I have a handful of 5v relays that I wanted to use.

    Thanks again for the help and the education!

  20. #40
    Join Date
    May 2008
    Posts
    152

Page 2 of 2 12

Similar Threads

  1. Low Current interface, High Current Motor?
    By Clackvalve in forum CNC Machine Related Electronics
    Replies: 15
    Last Post: 05-13-2010, 06:42 PM
  2. Current limit circuit help
    By fahque99 in forum CNC Machine Related Electronics
    Replies: 16
    Last Post: 01-24-2010, 07:44 AM
  3. I found the contradiction of the PWM method constant current circuit.
    By apollonono in forum Stepper Motors / Drives
    Replies: 1
    Last Post: 05-03-2009, 06:45 AM
  4. Simple Current Limiting Chopper Circuit???
    By fairorgan in forum Stepper Motors / Drives
    Replies: 1
    Last Post: 01-20-2007, 06:06 PM
  5. need high current regulator circuit
    By tekno in forum CNC Machine Related Electronics
    Replies: 38
    Last Post: 05-23-2006, 02:00 AM

Posting Permissions

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