![]() |
Mechanical switches would work perfectly, without modification, as limit switches; but, you would need additional electronic circuitry if you used them as homing switches. The problem is caused by the fact that a mechanical switch 'bounces', sometimes hundreds of times, every time it changes position. If you enjoy reading a twenty-six page paper that explains almost everything you ever wanted to know about why mechanical switches bounce and how to fix the problem, you'll want to visit this web site:
http://www.ganssle.com/debouncing.pdf The author, Jack G. Ganssle, seems to have a good understanding about the subject. (Truthfully, I've only read parts of the document when I was searching for a Set/Reset circuit - so that I wouldn't have to draw one up. You'll find the S/R circuit on page 12 of the document. For those who like an easy read in both theory and practical application, Ganssle's document is a pleasurable read.) Without restating what the document says, those of us who have been fighting the 'bounce' wars in our process control computer designs for years, know that the standard PC computer that we use to control a CNC just can't monitor mechanical components very well. Some idiot at IBM decided to save a few pennies per computer by making the hardware interrupt circuit virtually useless. Normally, in the process control computer world, an interrupt is a significant event; it means that something needs our attention Right Now. It also means that every time that event occurs, the computer has to know about the event - even if other events happen just before or just after the main event. In effect, a good process control computer latches each event so that the event doesn't 'go away' on its own. Because the event is latched, the computer will know that the event happened. (If multiple events happen at about the same time, it is the job of the computer designer and the computer programmer to prioritize the various events so that the most important event is examined first and the least important event is examined last - in the case of multiple events. As an example, those familiar with asynchronous serial data transmission would understand that a character coming into the computer is more important than a character going out of the computer. A serial input buffer usually has room for only one character, so if that character is not 'fetched' from the buffer before the next character arrives, it is lost forever. On the other hand, a transmit buffer can be filled with a character at leisure. The important fact is that two interrupts can take place in this kind of serial transmission. One interrupt occurs whenever the serial receive buffer gets a character. Another interrupt occurs whenever the serial transmit buffer has finished sending a character. The receive interrupt has higher priority than the transmit interrupt.) What does all of this have to do with 'homing' switches? We want a homing switch to be both reliable and repeatable. Ideally, we want know the 'home' position within +/- one stepper step. With bouncing switches, the point in time that the computer finally realizes that the 'homing event' occurred would be erratic and home would not be home. |
That is exactly why Art Fenerty has settings for "Input Debounce Interval" and "Index Debounce" on the Config > Logic.... screen. (The default setting works fine for us)
Mike, given your experience with ShopBot's z-zero plate, can you explain why a cutter hitting dirty alu does actually make a successful home switch for the z-axis? Good clean switch contacts rated for 10 000 000 cycles should be better, no? (did you notice that I picked the 1 Amp, gold contact version over the 5 Amp, silver contact version? In this country we have faith in gold :)) |
Gerald,
It's all related to speed. A computer can only respond to an event in a finite amount of time. Given that the CNC will move a certain distance during that finite amount of time, the maximum error that can be expected is the distance that the axis moves before being detected during that time period. A limit switch, by definition, is designed to stop the machine. So, if a limit switch is detected, the machine must stop and the axes must be re-zeroed before production is re-started. A home switch must detect the 'home' position for the machine. The debounce interval may or may not work, depending on factors outside of our control. Lets say that the debounce interval is 50mS (I used 50mS as a defacto standard in process control work with little switches that had little mass), that means that, at the very best, every 50mS the computer could detect a home switch. So, the question becomes: How far will the machine move during 50mS? That is the variation that the homing routine can't work around. In the case of the Shopbot and the Zzero plate, the program makes two passes to determine the height of the Z-axis. The first pass is at relatively high speed and is used to roughly set the height to an approximate zero position. The second pass is at a fairly low speed and is used to set the z-axis height as closely as possible. On my machine, the Zzero plate and program get me to within 1/32th of an inch. If I want to get closer than that, I use the Zzero routine to start and then use feeler gauges to get closer. On the other hand, my factory proximity switches hold position within 0.005", or about 2X the resolution of the Zzero plate/program. |
Limit switching would usually happen at work speed (whatever that might be) and will result in a fast approach onto the contact area. If a ramped and extended contact area is used, there should be enough time for the computer to catch up and realise that the limit has been reached. i.e. it will negate the bounce which I assume gets worse as the speed increases.
When homing however, the ramp is approaced at a much slower speed and therefore should be proportionately more accurate - less bounce. On both of my Big Iron machines this system of roller end plunger micro switches and ramped contact areas (adjustable of course) works sufficiently well to be extremely accurate (for woodwork anyway) |
Posted by Mariss on a discussion re noisy switches on the Mach Yahoo forum:
Re: Noise sensitivity?? It's a good idea to use gold contacts when switching less than 10mA. Gold doesn't oxidize so the contacts always work. Never use more than a few milliamps on gold contact switches. Much more than that and the electrical energy will vaporize the gold plating. All other switch contact metals develop some oxide on the contact surfaces. These switches depend on enough electrical energy being present to blast this oxide layer off. The required amount of energy is present when the contact current exceeds 10mA. One way to use non-gold contact switches reliably at low currents is to place a capacitor across the contacts. The cap will deliver enough pulse current to clean the contacts on every switch clousure. This energy is stored in the cap while the switch is open. A .1uF cap at 5VDC will store 1.25 uJ of energy, more than enough to clean any contact. The noise filtering will probably be welcome as well. Mariss |
| All times are GMT -6. The time now is 18:42. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.