PDA

View Full Version : Proximity Sensor Interface for MechMate


Richards
Sat 30 March 2013, 11:37
Several of you have contacted me for information about using an Arduino Uno as a proximity sensor interface. I've designed a "shield", which is a piggy-back-board that connects to an Arduino Uno R3 that will handle four proximity sensors. The board can be used with +12VDC or +24VDC (or similar voltages). It can be used with either NPN (sinking) or PNP (sourcing) proximity sensors. It was designed to use 3-wire sensors, but could (probably) work with 2-wire sensors. (I don't have any 2-wire sensors on hand at the moment for testing.)

Because some of you use proximity sensors to find a "hole" and others use proximity sensors to find a "target bolt", the Arduino can easily be programmed to for use with either.

Basics:
4-sensor inputs
5-outputs (totally controlled by the Arduino)
10- LEDs (totally controlled by the Arduino)
+12VDC or +12VDC power required for sensors
+9VDC "Wall-wart or similar transformer required for Arduino
Size is about 3.9" X 3"
Eagle schematics and board layout files.
Gerber files for fabrication (for those outside of the U.S.A.

Price to be determined based on demand and quantity. Bare boards for about $25. Kits for about $45. Assembled and tested for about $75. Arduino Uno R3 is extra (about $30 on-line in U.S.A.) Programming software for Arduino is OpenSource. Code for basic operation of this shield will be included with boards. Software customization available for those who don't want to trying programming an Arduino (shame on you: Arduino's are easy to program with Linux, Microsoft or Apple computers).

Attached is image of the shield:
(Those familiar with the Arduino Uno R3 will see its pads in the middle portion of the shield.)

David Bryant
Tue 02 April 2013, 20:50
Hi Mike
Good Idea
When you are doing a run please put me down for a kit and an Arduino UNO R3
Thanks
David

sailfl
Wed 03 April 2013, 03:31
Mike,

What is the advantage of using Arduino UNO for the sensors over the conventional way.

David,

Nice to see you posting. Let me know if you are coming back to FL.

Richards
Tue 09 April 2013, 09:39
If you have an input available for each proximity sensor and if that input has the same polarity as the proximity sensor and if that input is interrupt driven so that it responds immediately, you won't need to use a "black box" device to handle your limit switches.

Some people use relays. They work if random delays of 10msecs to 50msecs between the time a sensor tells a coil to activate and the time that the coil actually activates does not bother you. Low cost relays are not necessarily repeatable. You can easily check that for yourself using an oscilloscope. The one place on your machine that you would want repeatability is when you're zeroing the axes.

An Arduino uses a 16mhz clock. The "period" for most instructions is 1/16,000,000 or 0.0000000625 seconds. Typically, most instructions take one clock period to execute. Even if your "handler" routine took 10,000 instructions, the delay would be 0.0000625 seconds.

An Arduino allows you to change the polarity of an input signal in software. It allows you to use boolean logic to AND or to OR signals together so that four axes send only one signal to the control box. It allows you to use NPN and PNP sensors interchangeably. It allows you to sense "holes" or to sense "targets", even if one axis senses "holes" and another senses "targets".

When I first wanted to use microcontrollers, the method used was to buy a very expensive simulator, work on the code until it worked properly and then order a batch of microcontrollers from Intel. Your special run would cost thousands of dollars and if your code was wrong, you had a batch of very expensive reminders to send out with your Christmas Cards. Later on, one-shot microcontrollers became available. With a $1,000 programmer, you could "burn" your code into a chip. If you made a mistake, you lost only about $10 per attempt. Then came microcontrollers with EEPROMS. Using an ultraviolet light source, you could "erase" your program and try a few dozen times before the chip became unusable. Finally FLASH memory started being used and the Ardunio became possible. For $35, almost any computer and a USB cable, you can download your programs into a honest-to-gosh microcontroller.

Not everyone needs the benefits offered by using an Arduino, but when they cost so little and have so many advantages over old-fashioned technology, it might be the time to get on the Internet and see what others are doing with inexpensive microcontrollers.

nisma
Thu 11 April 2013, 10:15
What is the difference of the arduino board or using the sensor directly with optocoppler.
Why using a relay if you can use opto or if you have it already, i never understood this.

Richards
Sat 13 April 2013, 13:47
If you have enough inputs in your controller, you can hook the opto-couplers directly to the control box.

If you don't have an input for each proximity sensor on they control box, you'll have to "multiplex" some signals. To properly "multiplex" signals, you use "glue chips" (AND, NAND, OR, NOR, XOR or microcontrollers). The kind of "glue chips" that you'll need depends on your sensors. Some sensors are ON until they see a "hole". Other sensors are OFF until the see a "target". Some people might even have holes and targets on different axes on their machine. Using a microcontrollers means that you don't have to worry about the "logic". You can use software to use either N/O or N/C sensors.

Personally, I don't use relays with computers (except the On/Off Contactor, which is normally configured as a latched relay). Relays cause electrical interference that is hard to eliminate. They are expensive and they are slow to respond. So, I just don't use them.

The biggest expense in getting a custom PCB built is the design time and the cost of prototypes. Once a design proves workable, the actual cost per board is very low.

If all you need is simple logic and a single 7408 "glue chip" can handle your needs, your cost is minimal. If you don't know what you will need next month or next year, then using programmable logic (microcontrollers) gives you a way to change things without having to design a new PCB.

That's the beauty of using an Ardunio. Somebody has already designed the main board. If you're familiar with electronics, you can buy a bare "shield" and build a perfectly workable interface. If you plan ahead, you'll have built your interface to use NPN or PNP sensors and you'll have written your code to handle N/O or N/C signals.

In the past, I often got a phone call from a customer who wanted me to build a process control computer. I would drive or fly to the customer's location, discuss the project with him. He would give me a check for several thousand dollars to get things going, or if the cost seemed too high, he would pay me for my time and expenses and I'd leave. Most projects took at least one week to design, one week to code and one week to "debug". Prototype PCBs cost several hundred dollars to have made. In other words, a "minimal" project could easily cost $5,000 for four prototype PCBs. With an Arduino based system, testing takes a few hours. Prototyping consists of using a "punch board". When the "punch board" is correct, the prototypes will be correct. The same schematics used to design the "punch board" circuit is used for the PCB. Other than moving parts around on the PCB, the layout process takes only an hour or two instead of a week. The design rule checks and electronic rule check assures that if the schematic is correct, the PCB will be correct and that the board will be manufacturable. You send off the "Gerber" files. The PCB manufacturer runs his own design rule check software to verify that he can make the boards. While he's making the boards, you send off an order to Digi-key or Mouser for the parts and watch T.V. or read a book.

If you've followed this, you'll understand that today, for pennies when compared with yesterday's costs, you can have a versatile solution for almost any electrical/computer problem. The Arduino (or PIC or Raspberry or other microcontroller/PC) can make your CNC machine do almost anything that you can dream up.

nisma
Mon 15 April 2013, 04:18
I use inductive home sensors, no glue logic, just all connected to the same input with a pull-up resistor, this type of sensor are OC types. Mybe on other part of world push-pull
types are popular, here in europe i can only find OC types.

KenC
Mon 15 April 2013, 05:48
Using a micro processor (arduino) for limit switch i/o is a "Because I can" scenario. Its not about right or wrong ;)

Richards
Fri 19 April 2013, 13:22
Several of you contacted me with some concerns about programming an Arduino for the proximity sensor boards, I just sent off an order for some boards that can be programmed with an Ardunio, but that will be sent to you pre-programmed - ready to use. They will be ready sometime in May.

The board will require either +12VDC or +24VDC for the proximity sensors, +5VDC for the board, GND. It will allow connection to four proximity sensors. It will send an active LOW signal when any sensor hits its target (hole or bolt head). Only one output is required for all four sensors, but five signals are available, one for each sensor and one that activates when any sensor is active.

Contact me via email, miker@xmission.com. Sorry, but things may be complicated for those outside the United States. I can furnish files so that you can have the boards built locally.

Price is yet to be determined but will be very similar to the prices listed in the original notification.


(Mike (metalhead) please tell me how much you require per board for using the forum to advertise this product.)

Here's the revised layout of the board.

Richards
Mon 06 May 2013, 09:30
A Proximity Sensor board that connects up to four proximity sensors to a MechMate control box is now available. It uses an ATmega328P microcontroller to logically condition signals from your proximity sensors so that a valid signal is sent to the control box when a sensor detects a "target".

Size: 10cm X 8cm (approx. 4" X 3")

Compatible proximity sensors: NPN or PNP 3-wire or 2-wire N/O sensors available from AutomationDirect.com. (AM1-AN-2A, AM1-AN-2H, AM1-AP-2A, AM1-AH-2H, AM1-A0-2A, AM-A0-2H, APS4-12M-E-D, APS4-12M-E2-D all work well and are low cost. Similar sensors from other vendors should work.)

Input Voltage (from control box): +5VDC, GND, +12VDC (or +24VDC)

Output Signals available to control box: Five, one for each of the four sensors + one "master" that signals if any of the sensors has detected a target.

On board jumpers allow you to select +12V or +24V as the input voltage (must be the same for all sensors) and NPN or PNP as the sensor polarity (may be different for each sensor).

Opto-couplers isolate each sensor from the control box.

Sensing time per detection "loop" is 0.00125 second (800 times per second), which is compatible with the minimum pulse cycle for many proximity sensors.

Indicator LEDs: 4-Green LEDs that are lit when the sensors are NOT detecting a target. 4-Yellow LEDS that are lit when the sensors detect a target. 1-Red LED that is lit when any sensor detects a target.

Screw terminals accept wires/ferrules up to 0.0045" / 1.15mm / 18 gauge.

Two standard configurations available: (1) All sensors normally ON (they see the rail or track and "detect" a hole to signal a limit. (2) All sensors normally OFF (they detect a target such as a bolt head at the axis limit).

Custom configurations available at extra cost allowing you to mix normally ON and normally OFF sensors.

Uses an Ardunio script as the program. Easily programmable with an Arduino Uno R3 via the ISCP port from Windows, Linux or Apple.

Programming code furnished with each proximity board. Custom programming available for non-standard configurations.

PCB is two-sided, with ground plane on the bottom, VCC plane on the top, solder mask + silk screen, ICs are socketed.

Price: $75 + shipping and handling for the first ten orders. $100 + shipping and handling thereafter.

NOTE: Proximity sensors and power supply are NOT furnished.

Contact Mike Richards (miker@xmission.com) with questions or to order.

Richards
Fri 10 May 2013, 08:42
Thanks everyone. Of the ten boards that I made up, seven are sold. I have three left at $75 each.

I wondered whether anyone would actually buy something that has been talked about since 2008, when Gerald started the Limit Switches - optical / mechanical / proximity thread. Finally, after I discovered the Ardinuo and learned that it could be used with a shield and that it could also be used as a low cost programmer when the "target" PCB had ICSP built in, I decided to build a PCB interface that met the basic requirements that were discussed and a board that anyone could easily reprogram with an Arduino Uno R3 if they had a configuration that was different from the "norm". In order to justify making the board, I ran the figures on a spreadsheet which showed that 10 boards at $75 each would pay the direct cost of having that board made. So, I decided that spending $750 would be a good test to see if this forum was just bluster or whether there was a sufficient need that some of you would "put your money where your mouth is".

Thank you! Your participation shows that a "do it yourself" CNC forum has people who do more than talk. Hopefully, others will add other bits and pieces that will make the MechMate even better.

(miker@xmission.com)

swatkins
Fri 10 May 2013, 19:29
Mike please put me down for one and the Ardinuo... I tried sending an email but it bounced... .

Steve

Richards
Sun 12 May 2013, 16:32
Steve, you've got mail.

swatkins
Sun 12 May 2013, 20:11
Where? :)

No PM here and I can't sent email to your host,,, says I am blacklisted... I have taken the blacklist problem up with your host but until they lift the block just PM me here Please.

Richards
Mon 13 May 2013, 08:16
Sorry about the email problem. I've sent you a second PM. Call me at 801 712-1210 if the email problems continue. I've reserved a board for you.

Richards
Sun 26 May 2013, 11:46
Thanks everyone!

The first batch of boards has been sold, some to MechMate builders and some to builders/modifiers of other machines. Back in 2008, when a discussion of attaching proximity sensors to a control box first started, I wondered whether a small group of users would generate enough sales to pay for the direct costs involved to build customized electronics for parts of their project. Your interest and support made this little excursion possible.

The one thing I learned from offering this board is that most of you are uncomfortable using an Arduino or other microcontroller "building block". You prefer having a "plug and play" device. Even after I re-programmed the device so that all you needed to do was tell me which of five possible "modes" you would be using, most of you had reservations about doing that. That kind of feedback is invaluable to someone like me who often makes assumptions based on too limited data.

The next board (not necessarily a proximity interface) that I design for the MechMate users will incorporate your suggestions. That board will be re-programmable for use by the more adventurous, but it will have some way that the average user will be able to select one of the possible configurations without needing me to send another microcontroller chip or without re-programming the existing chip themselves.

With that being said, I would still encourage every builder to buy an Arduino or other microcontroller that is designed to allow the non-programmer to easily add custom controls to a machine. Spending $50 for the Arduino and electronic parts might be the best money you ever spend. You'll see how easy it is to add the "bells and whistles" that make your machine do things that you've only dreamed of doing.

This little project was made possible because a customer needed an inexpensive way to monitor CPU temperatures in his computer room. He needed a device where the operator could enter "setpoints" for each computer, where the operator could see the current temperature, and where the device would shut down the machine if the temperature rose above the "hot" threshold. He had had several machines "fry" when fans stopped working and no one was around to hear the alarm go off. I bought several Arduinos (Uno, Mega, and Micro) to test various theories. It soon became clear that building a custom board using the ATmega328 chip (native to the Arduino Uno R3) was the least expensive solution. That project introduced me to Arduino "sketches", to Eagle's schematic and board layout software, to Fritzing software, and to off-shore PCB manufacturing. Talk about symbiosis!

After sending that temperature sensor project out for board manufacture, I decided to design the proximity board. It looked like it would fit on the 10cm X 8cm format available without using surface-mount components and it looked like it would solve most of the problems listed in the proximity board thread that started in 2008. I had to leave off a "selector" circuit that would allow the user to select a "mode" because I ran out of input pins. There were five "mode" possible, but only one unused pin on the 28-pin version of the ATmega328P chip. Without sacrificing needed circuits, I decided that either the user would have to tell me which of the five "modes" he wanted to use, or he could program the board himself with the software that I furnished with each board. Of course, the "mode" issue was the issue that concerned most of the potential users.

I ordered some samples of the surface-mount version of the ATmega328. That version has two more pins, which means that I would have the ability to let the user select the "mode". I also ordered a few 805 size resistors, L.E.D.s and capacitors. If you've seen those small components you'll know just how my tired eyes felt when I knew that I would have to use a microscope to place the components. I also have reservations about using surface-mount components in an industrial machine. The through-hole devices add a great deal of resistance to vibration that is sometimes an issue. Properly placed and properly soldered surface-mount components seem to be just as resistant to vibration, but "prototype" boards that have hand-placed surface-mount components and hand-soldered surface-mount components have had a lot of bad press. Hiring a company to assemble and solder fewer than 100 boards per batch costs almost as much as having 100 boards manufactured, so surface-mount and the user selectable "mode" option is something that will require further research.

So, now you've been exposed to more than most of you ever wanted to know about process control board design and manufacture. The beauty of a forum is that some of us get to ramble on about things that only a few find interesting; but, your private emails tell me that a few of you get just as much fun out of the electronic design as I do.

domino11
Sun 26 May 2013, 19:56
Mike,
I do some of this type of work as well. At work we do custom military sonar systems, and over the years I have done quite a few board layouts and designs. We have gone to mostly surface mount, and you are right, when manufactured properly surface mount is superior. You really have to know your stuff to do a good job hand soldering sm components. The other reason we have moved to mostly surface mount these days is that a lot of the newer components are only available in sm. So if you want to use that new low noise preamp chip, you have to go surface mount.

darren salyer
Mon 27 May 2013, 07:07
You guys know how to make me feel dumber than a box of rocks.:o
Interesting discussion. Thanks for sharing.

Fox
Tue 28 May 2013, 12:59
Hey Mike,

I might be interested in your second generation board for some tinkering.
Let me know the what/if how much when you are gearing up again.

Richards
Wed 29 May 2013, 07:25
Fox,

I've got four more boards coming in today or tomorrow. Two of the boards were needed to finish off the first batch, but two boards from the batch will be available for $100 each plus shipping. (Small batch prototype service costs more than larger batch prototypes, but I get the boards back in two or three days instead of nearly a month.)

Send me an email if you're interested.
miker@xmission.com

KenC
Thu 30 May 2013, 01:39
Why don't you carve your prototype with your router?

Richards
Fri 31 May 2013, 11:02
Ken,

Etching my own boards was something that I did back in the 1970's before schematic capture and board layout software was available. I spent many evenings stinking up our kitchen with foul smelling chemicals, trying to make "inexpensive" printed circuit boards. Except for the most simple designs, making those boards was an exercise in futility.

The prototype boards that I design now have 0.01" traces, two or four layers, silk-screen and solder-masks on both the top and bottom. (High volume designs that some of my acquaintences have designed often use 0.006" traces and have as many as 16 layers.) The manufacturer checks each board for electrical conductivity errors. The ECR and DRC routines check the schematic against the board or errors and the board against the manufacturer's limitations to verify that the board can be made.

In short, these little 8cm X 10cm proximity boards would need to be about four times larger if I used a CNC router. They would not have silk-screening nor would they have solder-masks. In other words, they would not be professional quality.

My rough prototyping is done using a the white protoboards available from RadioShack. I can "stick" solid core wires into the grids where I have inserted the other components. On a new design, that is the first "sanity" check that I run to verify that the schematic design is correct.

The board manufacturer uses CNC machines to drill the holes and to route the board's outline. depending on the design, the diameter of the holes is 0.020" inches or even smaller. That's more than 6X smaller in diameter than a 1/8th inch router bit. It's not uncommon for those machines to cost hundreds of thousands of dollars and it's not uncommon for the company to have dozens of machines.

hennie
Fri 31 May 2013, 23:51
Mike, From your experiance what and where is the basic readings or info that can introduce one to arduno.( Arduno for dummies)

KenC
Sat 01 June 2013, 04:19
Agree that silk screening makes the PCB a professional look. but IMHO that's only cosmetic...

I carved PCBs for my Arduino projects & seldom do I make the tracks as thin as 0.01", usually 0.1" is plenty width & I usually end up with 1mm ( ~0.04") track as I see no advantage to make them any more fragile especially when thru-hole components are in use. hence usually a single 1mm end mill will do all the holes & track cutting. anyway, 80mm x 150mm is plenty space for a single sided PCB for most of my project thus far... the usual limiting factor for most of my PCBs are the screw terminals, they really can get any smaller than they already are ... Not to mention, I'm lousy solder, 0.01" trackes freaks me out...

KenC
Sat 01 June 2013, 04:24
Hennie, Getting Started with Arduino (http://www.amazon.com/gp/product/1449309879/ref=as_li_ss_tl?ie=UTF8&tag=ardubook-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1449309879)

Richards
Sat 01 June 2013, 14:22
Hennie,

The book that KenC recommended is excellent. I usually give that book out when someone wants a quick overview. The first resource that I rely on is www.arduino.cc. Be sure that you really explore that site. Follow the blue hyperlinks (bold, blue words) in the text. There is much more there than most people are aware of. Visit YouTube and do a search for Arduino tutorials. Element 14 is an excellent source of tutorials. Visit www.sparkfun.com and www.adafruit.com and read their tutorials, their forum and their catalog.

If you're comfortable reading schematics, download Eagle (free or low cost depending on your use of that product). The Arduino boards were developed using Eagle. You can actually use those Eagle files to have boards made (OpenSource).

The Arduino is available world-wide. You'll find distributors and retail outlets on the arduino.cc website.

Alan_c
Sun 02 June 2013, 02:16
Hennie, I have ordered from these guys before: http://www.hobbytronics.co.za/c/457/arduino price was good and shipping was quick.

Gerald D
Sun 02 June 2013, 08:08
Alan, Sean has a big stock of prox switches that he may have forgotten about - bought for 4 or 5 tables and never installed.

Richards
Mon 03 June 2013, 23:14
Here's a board that will never be made. It's an "updated" proximity sensor board with two ATmega328 processors connected via I2C. It is also mostly "surface mount", which is the main reason that it will never be made. Surface mount technology allowed me to shrink things so that two processors would fit. There is plenty of room to add another connector so that a second board could be attached that could buffer signals to an auxiliary display/alarm.

The only reason that I'm showing this board is to help those who are a little timid about diving into the microcontroller world to take the plunge. You can do amazing things with these little chips. Because many devices in the process control world are slow (when compared to the speed of a microprocessor), using some form of distributed computing lets the system give each device sufficient time to input or output its signals. Linking processors together using various industry standard protocols can enable 127 or more processors to divide and conquer the problem.

This board could easily be made, but until there is a demand for at least 100 boards, it would not be practical. Even making just a few boards would require having a solder stencil made (plastic or stainless steel), buying a dedicated oven that would only be used for melting solder, and more dexterity than I have to manually place the parts. I had to see how difficult it would be to lay out the parts. Even though nothing has been optimized, the process is not any more difficult than laying out a through-hole board.

Richards
Tue 04 June 2013, 20:39
It's rewarding when a lot of you send me direct email, asking about the Arduino and how to use it. One of the questions often asked was how to program a microcontroller so that it can be used in a breadboard (before a board has been designed with the ICSP connector).

The simplest way is to just connect four wires directly from the Arduino to the breadboard, MISO, MOSI, SCLK and Reset (pin 10). I've done that hundreds of times. It works just fine and costs nothing. When I got really really tired of wiring and unwiring the protoboard from the arduino, I built a small board that has two ZIF sockets. One of the sockets is pre-configured for the ATmega328 chip. The other socket is configurable with wire-wrap (which I use) or female jumper wires (which most people use). I use that 2nd socket for the ATtiny85 chip. It can easily be reconfigured for other Atmel chips.

Often, when I'm playing with a prototype design, I'll try dozens of program variations before I'm satisfied that everything is working the way that I expect it to work. Having ZIF sockets means that I can program the chips without worrying about physical stress to the chip. An On/Off switch (with an indicator LED) reminds me to turn off the power before inserting or removing the chip.

Here's a cell-phone photo of an Arduino and the programming interface that I use. (Remember, you don't need a special board. A standard protboard/breadboard will work fine to get your started.)

MetalHead
Wed 05 June 2013, 16:37
I would like to see some shots and comments on this getting integrated into our MM platform. I know some have bought this, so don't be shy !!! :D

How it gets wired in and configured in Mach would be cool to capture in this thread.

Richards
Thu 06 June 2013, 08:39
Here's the way that I tested the proximity board with the PMDX-122 breakout board and Mach3:

1. The screenshot of the PMDX-122 manual shows which pins are available for inputs from the proximity board.

2. The screenshot of the schematic shows the output signal pins on the proximity board.

3. The screenshot of the Arduino sketch file shows that output # 5 is normally used as a "combined" signal output.

4. The screenshot of Mach3's configuration screen shows one way to configure a single input to act as the limit sensor input for all active axes.

5. The diagnostic screenshot of a non-active sensor shows that the input is not seeing a proximity limit condition.

6. The diagnostic screenshot of an active sensor shows that the input is seeing a proximity limit condition. (Note the message by the RESET button shows that an emergency stop has taken place.)

Just connect PMDX-122 J5-GND proximity board TB-4-3 (GND) and PMDX-122 J5-Pin 11 to proximity board TB-4-2 (combined sensor output) and you're good to go. (The full schematic shows that TB-4-2 is connected to the ATmega328 Pin 2 (PD0) which is the Arduino Pin 0. The sketch assigns Pin 0 to be the combined signal pin. That pin is normally HIGH until any one of the sensors goes active, then that pin is LOW.

Richards
Thu 06 June 2013, 09:15
I should point out that the PMDX-122 has four input pins available. If you're not using those pins for anything else, you could connect each axis from the proximity board to an input pin on the PMDX-122. The proximity board outputs a signal from each axis and a combined signal from all axes.

On my Shopbot PRT-Alpha, I just used one input to the controller card for all proximity sensors. My zeroing routine moved one axis at a time, so when a proximity sensor went "active", the program automatically knew which axis was "zeroed". When I was cutting, if any sensor went "active", the machine immediately shut down.

Richards
Thu 06 June 2013, 15:23
Thoughts come, but not all at once.

What problem are we trying to solve with proximity sensors? Don't we want to know when a limit has been reached and then stop the machine from going past that limit? Isn't that the basic premise?

How do we do that?

That depends. Gerald's idea was that a sensor should we "fail safe". That means that if the sensor fails, the system should detect that failure. If the sensor was defective, the system should detect that failure. If the machine was already in an "unsafe" condition, the system should detect that condition. It also means that if a limit had been reached, that the limit should be detected.

He had a good idea.

The system used by Shopbot only detected if the limit had been reached and it depended on the unproven fact that the sensor would always be working. Those of us who used Shopbots would normally check the sensors everyday before moving an axis by placing a piece of metal close enough to the sensor to see if the sensor was working.

Gerald's solution did not require anyone to do anything. Those using his system knew that if the sensor did not sense a metal "rail" or other stationary piece of metal, that the system would do an emergency stop and not allow the axis to be moved. His system also detects those times when the gantry lifts enough that the sensor no longer "saw" the rail. Only when the sensor "sees" a hole in the metal would the sensor activate.

It's a good system. It is as foolproof as any low cost system can be. It doesn't require sophisticated electronics to make it work.

The only flaw in that system is that either you have to have one dedicated input for each sensor, or you have to have some kind of external electronic circuitry to handle multiple sensors. It's the old "AND" vs "OR" logic problem.

Some people have used relays. Relays are dependable. Relays are relatively cheap to buy. But, relays are slow. A relay takes from 10mS to 30mS to activate. That's not very long, but if your axis is at "end of travel", that may be long enough to cause damage. On the other hand, solid state electronics can work much faster. A typical proximity sensor can see up to 1,000 transitions per second. That's pretty fast. An axis doesn't move very far in 1/1000th of a second. Being able to read a sensor faster than that doesn't serve any purpose. The "signal" will be lost between "loops". Reading the signal ten times slower or thirty times slower can be a problem, depending on how fast the axis is traveling and how sturdy your machine has been built.

The answer to the problem is using a non-relay solution that works at about the same speed as the sensors and gives the reliability of relays. That's what my board does. That's what other boards may do. (Sorry, but I haven't done any kind of Google search to see who else makes a low-cost proximity board.)

Making a "home-made" CNC machine has a lot of tradeoffs. Cost is always important. Safety should never be compromised. Whether you decide to use limit sensors or not is something that each builder will have to decide. Whether you decide to use a N/C system (Gerald's) or a N/O system (Shopbot's) is up to you. Whether you decide to use relays or solid-state electronics is also up to you. You are the designer. How your machine runs and what it can do is totally up to you.

Because there is not a list of "options" that you can order from a single supplier, your choice is more difficult than going to McDonalds and ordering a lunch, but those who understand what they are building and those who do the math to see what happens if something goes wrong are most likely going to try to find a solution that keeps the improbable from happening.

That "attitude" applies to all aspects of building the machine, not just to the limit sensors. You can cut costs to the bone or you can build a safe machine. How much you cut and where you cut is entirely up to you.