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)

Richards Mon 30 July 2012 16: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 04:16

That's a good point I better check

andrewuk Tue 31 July 2012 14: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 08: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 13:34

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

Richards Tue 18 September 2012 12: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 05:29

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

hevertg Sat 27 September 2014 00: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 02: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 08: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.

bradm Tue 30 September 2014 08:42

Hevert-

There are usually two separate systems that can stop or pause the machine.

The first one is the E-Stop circuit. Generally, this is a contactor which is held in by an unbroken loop of normally closed switches. The switches include the various E-Stop buttons, and sometimes a safety interlock on the electric box. The E-Stop is designed so that it always definitely cuts power and stops the motion of the machine. This is an uncontrolled stop - the position of the machine is unknown after this event. Using a loop of normally closed switches ensures that if any one switch opens, the stop signal occurs. Generally the computer is notified after this event occurs by some form of fault input, but is not involved in the shutdown itself.

The second system is just an input pin (or pins) to the controlling computer. This can include proximity sensors or limit switches, and pause buttons. The software on the computer reads this input, and takes the appropriate action - usually bringing the motion to a controlled pause.

A proximity sensor or limit switch at the end of an axis can also be used for as a home switch. These are often wired in the second system as an input to the computer, which then uses them for both home and limit.

Because the computer can know which axis is in motion, it is possible to wire more than one sensor or switch to an input and still have a combined homing and limit sensor system.

So, hitting a limit switch does not remove all power - it tells the computer to execute a stop. If you haven't hit a hard limit or other problem, then you can potentially resume.

Hitting the E-stop does remove all power, and you cannot resume.

The discussion of relays for the proximity sensors or limit switches is about how best to interface multiple sensors to the computer's input pins. The sensors and switches work better at higher voltages (12v or 24v) than the computer's inputs (5v or 3.3v), and there are several different approaches to combining switches, adjusting the voltages, and avoiding overloading the computer's inputs.

KenC Wed 01 October 2014 04:07

I got pissed off with the limited I/O points & low field voltage on parallel port.
Now playing with MESA 5i25 FPGA card with a 7i76 daughter board. Apart from all the required points for 5 axis stepper, VFD pwm points, it still has 12 output & 36 input with a choice of field voltage of 5 to 32V.

Kornerking Sun 24 January 2016 15:18

Quote:
Originally Posted by KenC View Post
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
So you are saying stop procrastinating and trying to understand this stuff and just get on with it?

Sounds good to me.

Hey, Darren Sayler was just a lower level finisher and managed to build one.

darren salyer Sun 24 January 2016 16:32

Go easy on me Pete.....I think proxys are a good idea. Order now so that stuff is in when you need it. Get a laser crosshair ordered too. Mine took 6 weeks from China.


All times are GMT -6. The time now is 06:52.

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