MechMate CNC Router Forum

MechMate CNC Router Forum (http://www.mechmate.com/forums/index.php)
-   70. Control Systems (http://www.mechmate.com/forums/forumdisplay.php?f=28)
-   -   Limit Switches - optical / mechanical / proximity (http://www.mechmate.com/forums/showthread.php?t=584)

JamesJ Sun 26 June 2011 06:07

Red, I ended up getting a pcb patterned after the circuit that appears earlier in this thread and I am thrilled with it's performance. I had to change the logic chip in order for it to work on the mechmate but that was a simple substitution. Thanks to Mike and PEU for their work on this!

smreish Sun 26 June 2011 06:15

Red,
Thanks for the note. I hope all the input has helped you understand the proximity switch/sensor needs for your application.

The proximity (act like a switch) but do have there own specific requirements with relation to the MM. On occasion, it takes a few minutes to explain to board manufactures the "not proximity" state the MM is looking for with respect to the rail design.

Good luck on the rest of your build!

...I'm quietly getting ready for my 4th build, so these discussions are prudent!

Best

Red_boards Sun 26 June 2011 07:44

So, if I understand, the preceding 3 posts, I could put a raised piece of steel at each end of the axes instead of the holes and raise the parallelled N/O sensors to be out of range when the machine is within limits, but triggered when the proxy's sense the raised steel at machine limits? Of course this will not detect a derail...

Or I can wire the proxies in series so that the circuit detects a break. If I followed Gerald and others posts earlier in this thread Mach 3 will be smart enough to figure which of the sensors must have triggered based on the direction being moved at the time, even if all axes are wired to one BOB port?
But then I need at least 40vDC for the series circuit?

ekdenton Sun 26 June 2011 22:47

You may be able to make it do what you are saying.....but one important feature of the design (reason it is wired as it is)is that if the gantry jumps the rails the sensors will lose proximity and prevent damage. If you wire it as you are thinking it would work for homing but not an emergency such as a derailment. IMHO but others may correct me if I am wrong :-)

Tonys Mon 11 July 2011 09:36

Are relays needed?
 
I have read and re read this thread but still confused as to whether relays are necessary in the proximity circuits.
Red’s post 294 (including Steve Starlings reply) and Pablo’s posts 274-288 suggests that with the PMDX 125 and 126 Bob Npn and Pnp N/O style sensors can be interfaced directly to the board without additional components. Is this a viable alternative option for the MechMate? Or am I missing something fundamental that requires relays as per Mikes-Sean’s diagrams?

Red_boards Tue 12 July 2011 19:41

Tony,
No need for relays if you run a parallel circuit using N/C switches (i.e. the circuit is closed when the sensor is "seeing" steel, and then open when they reach the holes in the rails). The 12v port on the PMDX125 easily powers the four 10-36v proxies in parallel.

If you have N/O switches and a parallel circuit, then you have to reverse logic so that one of the parallel circuits closes upon error (i.e. have the proxies 'not see" the rail during operation, and put a steel "step" at the end of the rails that triggers the switches to close).

The latter has problems if your gantry jumps a rail because it's not as sensitive to this error situation (but an argument could be made that one of the gantry proxies will "see" steel in a derail situation). I have gone with this setup as an interim measure until I lay my hands on some N/C proxies (because I can't determine whether mine can be made N/C by switching wiring around).

If you have N/O proxies and want to use the holes in rails to trigger an error situation, then you need to wire the switches in series so that the series circuit is broken when one of the proxies sees a hole in the rail (i.e. goes to closed). Assuming your proxies require 10-36v and you have 4 in series, then you are going to have to do something in order to supply sufficient power to them. This is where the relays come in because they can provide the power step up or down together with optical isolation. Optical isolation comes free when you use power off the PMDX125

It took me an age to figure that the proxies can viewed as switches (the 3 wires and internal circuitry made them seem "magic" to me). Once I figured that they were switches it was easy for me to understand what the circuits were doing.

Tonys Thu 14 July 2011 03:52

Red,
Thanks for that explanation. It looks like I can avoid the complications and extra wiring of relays by using N/C switches in parallel wire directly to the PMDX126.
Once again thanks

Red_boards Thu 14 July 2011 18:02

Tonys
Quote:
No need for relays if you run a parallel circuit using N/C switches (i.e. the circuit is closed when the sensor is "seeing" steel, and then open when they reach the holes in the rails). The 12v port on the PMDX125 easily powers the four 10-36v proxies in parallel.
Careful - I didn't think this one through fully! One open switch in an otherwise closed parallel circuit won't signal anything. For a parallel circuit you have to have the circuit open and then a closed switch in part of the circuit will trigger a signal. Apologies. It took lying awake in the middle of the night to see the error.

Tonys Fri 15 July 2011 07:22

Red,
Sorry to cause you sleepless nights! I can now see that a parallel wired N/C circuit would not detect a fault if a proxie is triggered. As I understand it, I can use a N/O circuit with proxies in parallel (as per the PMDX 126-125 diagram), if I provide a metal target to trigger the proxie rather than a hole in the rail. The disadvantage in this system is that it may not detect a derail situation.
In believe you said this is your current set up, and wondered how well you thought it was working? Or have you plans to change it?

Red_boards Sat 16 July 2011 19:14

Tony,
This is my current set up because I had to get home switches working so I could figure out Mach 3 (I'm an absolute newbie to driving a CNC). The system is working. I have all himing and limits connected to a single port on the PMDX125. I can home and have begun to learn how to drive the machine.

If you now re-read Steve Stalling's response to me and look at Sean's circuit everything they said should now make sense.

This discussion seems to require one on the frequency and conditions for derails?

myozman Tue 03 April 2012 17:21

Looking for a little help.

I have proxys 1 for each axis. And I bought the winford relay board Sean talked about in post 49. My problem is I can get each to work independantly, but when I try to wire them parallel, they don't work.

I've been waiting a couple years to use homing and this is driving me crazy.

Any help would be appreciated.

Mike

bradm Tue 03 April 2012 17:25

Are they normally open, or normally closed? If they are normally closed, they won't work in parallel. Can you tell us a little more about the proxys you have?

myozman Tue 03 April 2012 17:56

They are the SI12-C2 NPN NO H

Richards Tue 03 April 2012 18:14

Everything depends on the way that you use sensors. When a Normally Open sensor "senses" metal, it closes and when it "senses a hole in the metal, it opens. So, on the MechMate, we could say that in normal operation, the sensors are in the normally closed state because they all always sense metal until the axis hits the "hole". If the sensors are wired in series, then if ANY ONE of the proximity sensors senses a "hole", it will open the circuit, indicating a fault condition.

Keep in mind that most proximity sensors work at voltages between 10VDC and 24VDC. Each sensor will drop the voltage by 1 or 2 volts, depending on its internal circuitry. Because of that, I would use a 24VDC power supply. (My preferred method is to feed each sensor into a logic board and then use a microcontroller or a logic chip to decode the status of each sensor.)

myozman Tue 03 April 2012 18:45

I think I see the point. The proxys are closed while seeing the rails and go to normally open when they see the holes. So they should be wired in series. I'll give it a try.

myozman Tue 03 April 2012 19:56

Worked like a charm.

Thanks Mike for a thinking answer. Thanks for pointing me.

smreish Tue 03 April 2012 19:58

Mike,
Looks like the team took care of you before i could get here tonight.
Glad to see you have the "logic" correct for the relay assembly.

myozman Tue 03 April 2012 20:09

Sean, I got quick responses. Thanks for jumping in. I just needed to be righted.

The people on this forum have always been great.

andrewuk Sun 29 July 2012 08:40

proximity sensors
 
3 Attachment(s)
Received my proximity sensors yesterday wired them to a 9v battery and they seem to work ok would they be any advantage in using 24volts as i have a 24volt estop relay i might use once i figure the estop out.:confused:

Johannescnc Mon 30 July 2012 02:29

What will you do with your signal voltage? Does it need to be in the 5volt range? For example, say at the computer logic level... :cool:
Not sure how the work, but it appears that the supply voltage is also the reference voltage. So if controlling a 24v relay, it should work great!

Richards Mon 30 July 2012 15:48

The coils on relays require a minimum current to activate the coil. Verify that the proximity sensor can deliver that amount of current.

andrewuk Tue 31 July 2012 03:16

That's a good point I better check

andrewuk Tue 31 July 2012 13:30

Mike i checked the data sheet it doesn't tell me anything is they a way i can check with a multimeter Thanks

Richards Wed 01 August 2012 07:50

With the relay off, measure the resistance of the relay's coil. Divide the voltage by the resistance to find the amps needed to turn on the relay. Example: 24V / 1000 ohms = 0.024 Amps and 0.024 X 1000 = 24 milliamps.

The proximity sensors that I have on hand are all rated to handle at least 100 milliamps, so my proximity sensors can drive most small relays.

If I'm feeling bold, I just try things out. If the relay works, then I usually use my oscilloscope to see how long it takes for the relay to turn on (and to verify that the "turn on" time is consistent). If the relay changes state slowly or if the "turn on" time is erratic, then I know that I either have a malfunctioning relay or that the coil is drawing more current than the sensor can provide.

When I started out using electronics, I didn't realize that there are three parts to most I/O circuits: An input (sensor), an output (relay) and an interface (amplifier or buffer). I thought that I could just hook the input device directly to the output device. Learning about interfacing I/O was costly until I gained some experience.

My preferred way of interfacing proximity sensors is to have them drive an opto-coupler. The load is 10mA or less, the switching time is consistent, and an opto-coupler automatically allows you to convert the voltage from 24V to 5V. The drawback is that, unless you're only using one sensor, you'll have to design a circuit to allow the use of multiple sensors. I use a Arduino Uno ($35.00) to test a design and then I lay out a circuit board, using the same micro-controller chip that is used on the Ardino.

Keep in mind that relays are notorious for creating electro-mechanical noise. That simply means that they create "static". As a relay's contacts change state, they bounce. That bouncing drives computers crazy. (Even if they didn't bounce, charging a coil induces a voltage spike - which you can clearly see with an oscilloscope.) If you look through circuit designs from the 1960s, before transistors and ICs had become affordable and when tubes and relays were commonly used, you'll see "snubber" circuits that were used to reduce the "static".

I don't want you to think that relays won't work. They can work, and they usually do work, if you're careful to match their coil requirements to the output capacity of the sensors.

andrewuk Wed 01 August 2012 12:34

Thanks for taking the time to explain that mike i appreciate it

Richards Tue 18 September 2012 11:34

I've been playing around with a generic schematic for proximity sensors that would allow the use of (mixed) NPN or PNP proximity sensors and would allow you to select N/O or N/C for each sensor. The design uses opto-couplers to separate the 12V or 24V sensor from the 5V computer logic. It also uses an ATtiny85 chip for each sensor. The ATtiny85 microcontroller chip has 5-I/O lines which allows the microcontroller to output a green/red LED to signal the status of each proximity sensor. The schematic was drawn for 5 proximity sensors, although fewer could be used. The devices would be mounted on an Arduino Uno shield and the Arduino would connect to a "break-out-board" through a single I/O line (although multiple I/O lines could be used).

The Arduino would be used to program the ATtiny85 chips, so no expensive programmer would be needed.

Because of differing regulations in various countries worldwide, I could only supply the schematics, the "programming code" and the board layout files. Someone else would have to have the boards made and stuffed (after programming the ATtiny85 chips and the Arduino Uno).

Here in the U.S., an Ardino Uno from Radio Shack costs about $40. The components for the shield cost about $40 from Digi-Key.com. The shield itself (prototype from expressPBC.com), depending on the final size, would cost about $200 for 4 boards and about $25 per board in quantities of 50 or more.

There is no need to have "shields" made. The components could be mounted on a generic "proto board" by following the schematic. (That's how I design all microcontroller projects. I design a preliminary schematic and then refine it after seeing how the design works on a "proto board".)

I've given away most designs in the past, but this design requires more than just a few hours, so I'll have to charge a license/use fee per board. $25 per board seems reasonable to me. If there is enough demand (at least 25 licenses), I'll design the PCB board layout.

Send me a private message if you're interested.

MetalHead Tue 12 November 2013 04:29

Go to Control Systems and look at Limit Switches sticky. Also search on proxy detectors.

hevertg Fri 26 September 2014 23:30

hello friend, sorry to revive the issue, my eyes hurt from reading lol but really do not know what stops the proxy,

off some relays?
contactor disconnects?
off something for the whole system?
it's just an emergency stop? not stop?

can you help me please, today I gave a lot to the head and probe the npn, how they work they do, but really what I want to know is, when it reaches the limit switch that removes power to all stop?

if you reach the limit, you can return to work?

hope I'm clear with my questions, I have no problem reading on, this gives me a lot of knowledge and learning is what I want to help many in the future, because I have 2 years sorry MM, and this forum has a great future and machine ahead, I will be part of that generation, but first I must learn and build my MM well, to begin to have knowledge.

I have 95% of the materials to assemble my MM but I need to know more to make it as a greetings MM lol

KenC Sat 27 September 2014 01:08

Hevert,
You don't need to know how the limit switch works to build a Mechmate :D
All you need are 70% of the material... & 95% is even more then what I have on 2 running Mechmates.....
Just build the damn thing & you will figure out how the limit switch works. :D
BTW, my 2 mechmates runs without limit switches...
BUT I do have a plan to install the limit switches.... when I finally run of of thing to do in my free time that is.. :P

Duds Tue 30 September 2014 07:07

Hevert,

Think of npn and pnp as sourcing or sinking switches.

npn: The active feeds the load first and the switch closes to the ground.
pnp: The active feeds the switch first that closes to the load and goes to ground.

When it comes to controllers the important thing to remember is whether your switching active or ground.


All times are GMT -6. The time now is 21:11.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.