Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Sweep on May 29, 2010, 04:47:09 AM

Title: Wiring of 2 wire proximity switch
Post by: Sweep on May 29, 2010, 04:47:09 AM
I wonder if anyone could offer some suggestions as to the correct wiring of my existing 2 wire proximity switches into Mach3.
My old Denford Triac has three of these switches fitted for the X, Y, and Z homes, and the spindle speed. They are made by Balluff and the model is BES 516-324-E2-N-03. Please see below for data sheet which includes a very simple wiring diagram.
I want to keep the existing proximity switches as they work and to replace them would be quite difficult due to how the X and Y are buried inside the machine, and also because of the needless expense if I replace them.
Speaking to Balluff, however, they say I need to buy there very expensive amplifiers which, at £100+ each, is not going to happen.
Also, the original Denford wiring diagram didn't use seperate amplifiers but just had a section on the motherboard which dealt with this operation.
As far as circuit wiring is concerned I am quite happy to attempt any circuit, however complex, as I am using a PCB printing program and Press 'n' Peel paper.
I have also attached the original Denford wiring diagram which shows these sensors where 'Plug M' connects to them on the machine.

Thanks ...Sweep
Title: Re: Wiring of 2 wire proximity switch
Post by: stirling on May 29, 2010, 11:10:55 AM
Hi Sweep

Did a bit of a look around and it appears your sensors are NAMUR sensors. These are apparantly designed for hazardous environments but if used elsewhere don't require the "strict" interface I'm guessing you've been quoted for.

Here's a link to a general description

http://www.tektron.ie/namur1.htm (http://www.tektron.ie/namur1.htm)

and here's their datasheet

http://www.balluff.com/Balluff/gb/ProductsChannel/Product+Detail/en-gb/ProductDetail.htm?ProductID=BES+516-324-E2-N-03&ProductGroupGuid={80FEAFAC-1F1E-4045-92E1-D28D94DC547B}&DocumentPage=5 (http://www.balluff.com/Balluff/gb/ProductsChannel/Product+Detail/en-gb/ProductDetail.htm?ProductID=BES+516-324-E2-N-03&ProductGroupGuid={80FEAFAC-1F1E-4045-92E1-D28D94DC547B}&DocumentPage=5)

Basically I'm thinking maybe a simple op amp circuit that senses the changing voltage drop accross them as they change resistance.

Cheers

Ian
Title: Re: Wiring of 2 wire proximity switch
Post by: BluePinnacle on May 29, 2010, 02:13:13 PM
These look a great deal like the magnetic proximity switches on my Excel mill. They change resistance based on the proximity of a steel vane. I used a transistor/optoisolator circuit which I'll share when I get home. the optoisolator has a darlington pair output which provides an extremely rapid rise in output current when triggered. this is the setup currently used on my mill, it costs a few punds to make and the PCB is about 1.5" square :) it's a very accurate setup by the way - Well worth keeeping those switches.
Title: Re: Wiring of 2 wire proximity switch
Post by: NosmoKing on May 29, 2010, 02:34:50 PM
You should be able to duplicate the transistor circuit very easily from the print using almost any small signal NPN a couple of resistors and the cap.
Your circuit shows a 9v zener supply for the prox.
Using you print as an example, the prox plus would go to the 9v+ and the - to the circuit input.
You should also be able to use the 2n7000 which is a handy FET interface transistor.
If you use the PC 12v supply, you could go straight into the port with no opto needed, the 2n7000 would be ideal for that.
Nosmo.

Title: Re: Wiring of 2 wire proximity switch
Post by: BluePinnacle on May 29, 2010, 03:01:40 PM
^^ true. I used the optos mainly because i had dozens of them around due to the MOQ i had to put up with ( I used 5 on the rest of the machine). My setup uses a seperate power supply for the 9v circuit. Plus I have a really good system for making PCBs of my own.

my philosophy throughout was to use optos wherever possible, and keep the computer's ports attached to nothing but opto outputs. Maybe over-cautious, but actually no more expensive than the alternatives ;)
Title: Re: Wiring of 2 wire proximity switch
Post by: softselect on May 29, 2010, 05:04:13 PM
I recently done a Danford-Mach upgrade, attaced is the circuit i used to supply an input signal to a 24V BOB input
good luck
Friedrich
Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on May 30, 2010, 08:29:16 AM
Hi All, and thanks for your support on this matter.
Whilst I could take a safe 12v from the PC I am trying to have as few leads as possible running from the PC to my enclosure, basically to make the whole set up look prettier! So far I only have the two 25pin parallel port cables. This approach has caused me problems, however, before as my high parallel pin voltage is around 3.8V which isn't enough to run my MPG which needs the full 5V (tried it but didn't work). I was going to run a USB but I thought it wouldn't look as nice so have decided to use a small DC/DC power converter inside my panel.

As such I would prefer to work with the transformer 12V from the old Denford machine and pick up off that. This, however, I think would require some optoisolation like Mr Bluepinacle suggests.
I would appreciate eveyones comments on the attached circuit which is based around the original Denford circuit posted earlier but with an opto front end. It seems to work fine on my circuit simulator but I have had to replace the proximity switch with a simple toggle switch (SW1) as no standard proxies were available in the program.
A couple of other points:
1) I would like to use the 4N25 6pin opto as i have quite a few of these on stock, and also because I like building all my stuff with seperate 6 pin DIL sockets so in case I mess up they are easier to change or upspec etc. As such if anyone suggests an alternative please try for 6pin.
2) When I run the simulation with the switch already closed I immediately blow the 82R resistor on the 12v side unless I increase the rating to >2W, but when I start the simulation with the switch open then close the switch I can get away with 1/2W with no problem. Why is this???

I've mentioned this before on some of my earlier posts, but I don't have great deal of electronics experience so please be gentle with me and explain things in very simple terms.

Thanks again ...Sweep
Title: Re: Wiring of 2 wire proximity switch
Post by: NosmoKing on May 30, 2010, 10:43:57 AM
That does not really make any sense as the max drop across the 82 ohm should be 36ma or .1 watt.
The 82R will dissipate 2 watts if the 9v side of the 82 ohm was grounded unintentionally.
Turning on with the switch closed you should still see 9v at the 560ohm side of the switch, check to see if this is so.
Also now you are using an opto,  you can probably change the R2 resistor to ~700ohm and eliminate the 180, both these were previously base bias for the NPN transistor.
The 180 is shunting the opto.
 
Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on May 30, 2010, 02:01:38 PM
It's just when the program first runs, and only when the switch is closed prior to running. I tried slowing the timing down so 1sec real time = 1us circuit time but it still blows R1(82R) quicker than I can see it. All I see is that the flow of current peaks instantly, as signified by the wires of the circuit lowing brighter, and then pop!
Running with the switch open then closing the switch, it all works fine. I have done the circuit mods as suggested and I get the following readings.
When the switch is open I see 9.1volts after R1(82R) with 27.34mA flowing to the Zenner.
When I close the switch I can see 9.06volts after R1(82R) with 12.62mA flowing to the Zenner and 15.16mA flowing to the switch, 717.44mV and 11.14mA after R2(750R).
Tomorrow I will build it as a prototype and see how it goes.

...Sweep
Title: Re: Wiring of 2 wire proximity switch
Post by: NosmoKing on May 30, 2010, 04:19:46 PM
Maybe check the wiring as the only way to get 2 watts dissipation across the 82ohm is if the 9v end is taken to common.
What supply are you using for the 12vdc?
Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on May 30, 2010, 07:53:23 PM
No, it only blows the resistor on the simulation, I haven't built the prototype yet. I'll see how accurate the sim is tomorrow when I put it together  :-[

...Sweep
Title: Re: Wiring of 2 wire proximity switch
Post by: vandal968 on May 31, 2010, 11:38:52 AM
My Denford Easimill used those weird prox sensors.  I couldn't figure out how to make them work, so I cheated.  I cut out the chunk of the original Denford board that controlled them and wired THAT to my breakout board.  Here is an early picture once I got it working, it's not as ugly now.  The board in the lower right corner is the chunk of original Denford board, the diagonal row of transistors and resistors are what actually control the sensors.

cheers,
c

(http://img214.imageshack.us/img214/7371/dsc00477sp.jpg) (http://img214.imageshack.us/i/dsc00477sp.jpg/)

Uploaded with ImageShack.us (http://imageshack.us)

Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on June 01, 2010, 03:52:23 AM
That's also my last resort Vandal968  :D
I cut mine out a while ago and kept it just in case I couldn't figure out how to do it any other way. If the new board works i'll post a reply on here along with the final draft of the circuit. If not i'll probably be asking you a few more questions!

Thanks ...Sweep

Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on June 01, 2010, 05:26:21 PM
I built the circuit earlier tonight but the 82R resistor got very hot and started to smell like it was losing the will to live.
I had taken the precaution of fitting a 1amp fuse, the smallest rating I had, as I was wiring directly to a spare 6amp/hr 12v battery from an alarm system.
I switched off the supply and checked the fuse which was ok and checked the resistance of the 82R which measuered ok.
I then tried again but the same happened, that is the heat and the smell, so I gave up. Whilst the supply was on I did try to detect the 9V but couldn't get a reading.
So, considering that the simulation highlighted this issue, how does a tiny little resistor hold back the pressure of the battery and, if this is a problem, how do I limit potential high currents that might damage some of my components. Ok, my supply is never likely to have the capacity to deliver current like a battery but i'm still curious about the logic.
This is probably a pretty rudimentary question to all you with electronics experience but I am trying to learn as i'm doing the project.

thanks ...Sweep
Title: Re: Wiring of 2 wire proximity switch
Post by: vandal968 on June 01, 2010, 05:50:24 PM
Sweep,
I don't know if this is related or not, but....  See that blue component above and to the right of the transistors in the picture I posted?  When I first hooked up this circuit, that thing got hot, real hot, singed the pc board hot.  A friend of mine who's an EE took a look and said that he didn't see a need for that component, so I snipped it off and problem solved.  I don't know if that component was related to what you're talking about, but I thought I'd mention it.

cheers,
c
Title: Re: Wiring of 2 wire proximity switch
Post by: NosmoKing on June 01, 2010, 06:43:51 PM
That appears to be a tantalum capacitor, they are very averse to AC or a high DC ripple and over voltage.
Nosmo.
Title: Re: Wiring of 2 wire proximity switch
Post by: Sweep on June 04, 2010, 04:51:12 PM
ok, back to the project...
I think I have figured why I keep blowing the 82R on the simulation when the switch is already closed. Maybe it's because I have the simulation set up with a SPST mechanical switch instead of the correct proximity switch, but what blows the 82R is charging the 10uf capacitor taking the power over the rated spec of the 82R.
Now I can cure the blowin of the 82R by dropping the capacitance of the 10uf down to 1uf but i'm not sure of the effect on the rest of the circuit.

...Sweep