MechMate CNC Router Forum

Go Back   MechMate CNC Router Forum > Electrical & Electronic > 70. Control Systems
Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #31  
Old Thu 30 November 2006, 22:13
Gerald_D
Just call me:
 
Mike, that sounds very interesting, and if I wasn't buried in mechanicals right now I might have pursued that. Out of curiosity, would such a circuit/logic be deemed "failsafe" against loose connections, power spikes, etc.?
Reply With Quote
  #32  
Old Fri 01 December 2006, 08:30
Mike Richards
Just call me:
 
Gerald, it all depends on how it is built. But, yes, it could easily be built to be failsafe. If done properly, all of the sensors would be opto-isolated from the controller, so there would be no direct transmission of electrical noise into the controller. A fail-safe timer on the microcontroller automatically resets the circuit if there is no pulse for a few milliseconds. To make it as failsafe as possible, I would probably add an inverter (7404 chip or equiv.) to the controller's input lines so that if there was no signal present on the 7404, it would act as if the E-stop was pushed and the prox. sensors were active. Loose connections would be exactly the same as they are in any other project. However, with a micro-controller, it is simple to use circuits that are 'ANDed'. By doing that, an open connection, whether it is the switch or a broken wire, would activate the E-stop or limit switch imputs.

One big benefit to such a unit is that you would normally have a 'heart-beat' LED programmed to pulse so that just by looking at the box, you'd know that the microcontroller was working. In addition, with these simple circuits, you would have an LED for each mechanical device you're monitoring. Thus, if you had a loose wire on the X-axis proximity switch, the X-axis LED would be on - even if the X-axis proximity switch's built-in LED was not on. It helps with trouble-shooting.

To me, the most important feature would be that the 30 to 50 foot long cables that we all have looped around our machines would be totally isolated from the control circuitry. All of the electrical noise that is now invited into the controller box would be kept outside the box.
Reply With Quote
  #33  
Old Thu 15 March 2007, 11:27
Gerald_D
Just call me:
 
If the following Comepi EM1G12Z limit switches were available around the world, they would be ideal for the MechMate project:




Very solid, well sealed, compact, easy fixing. 50x30x16mm is [2x1.25x.625"]

Catalogue

Do you guys know of similar sized switches in other parts of the world?
Reply With Quote
  #34  
Old Thu 15 March 2007, 11:45
Gerald_D
Just call me:
 
McMaster-Carr 7628K74, Telemecanique XCM N21F0L1 interchangeable with Comepi EM1G12Z
Honeywell CE series
Square D 9007MS

But the prices are around $70 - 100 each! Ouch!
Reply With Quote
  #35  
Old Fri 16 March 2007, 09:15
Normand Blais
Just call me:
 
It would be great to have a switch work for the z drive, especialy for stopping it from going in the table. Most of the time it is my mistake. I am thinking a two part switch on 2 magnets with 1/8spacing between ,you set the cutter to the table top stick the switch . So if the z go lower than 1/8 under the tabletop it would stop. It could be use at any level. Normand
Reply With Quote
  #36  
Old Sun 20 May 2007, 16:07
J.R. Hatcher
Just call me: J.R. #4
 
Wilmington, North Carolina
United States of America
Send a message via Skype™ to J.R. Hatcher
my experience is with a cnc lathe, please bear this in mind. i have 2 switches, 1 on X, and 1 on Z they serve as limit in both directions and home, they are on the moving parts of the lathe. Mach 3 handles this very well. what is the downside of this setup on a cnc router? it is so simple to wire, so few parts. all i can see is the + side. J.R.
Reply With Quote
  #37  
Old Sun 20 May 2007, 22:55
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
JR, single-switch-per-axis should work on a router as well. The difference between a router and a lathe is that, for a router, the limit switch must stop a much faster and heavier gantry when things go wrong. In other words, a router's switch must allow for a lot of over-travel, in addition to being sensitive enough for homing.
Reply With Quote
  #38  
Old Thu 07 June 2007, 19:27
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
Regarding NPN or PNP proximity switches:

I just read my post about NPN and PNP proximity switches and realized that, as usual, I made things overly complicated. An NPN device is normally used to SINK current and a PNP device is normally used to SOURCE current. The PMDX-122 breakout board expects devices connected to its input signals to SINK current, so an NPN proximity switch would work. HOWEVER, the proximity swithces that I listed require 12V to 24V to operate properly. So, you may need additional circuitry to use those particular proximity switches. (I use a TIL-111 type opto-coupler to isolate the proximity switches and to easy connection to 5V TTL circuits.)
Reply With Quote
  #39  
Old Fri 08 June 2007, 10:02
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Looking at the pics of JR's stop-blocks with proxy switch holes, I have a nasty feeling that proxy switches are going to be more trouble than what they are worth. Sure, they are extremely reliable and dust-proof, and have no moving parts - but they cannot be wired in series and need a supply voltage foreign to everything else in the system (12-24VDC).

I feel that I have to put a note on the drawings saying that those brackets and rails have provisions for mounting 12mm proximity switches, but that I don't have a firm suggestion of how to wire them .

In fact, I don't have a firm suggestion for any form of limit or home switches (since we have never used any) and my initial leaning towards proxies was because it was popular ShopBot practice. The more I think about it, the less I like proxies in the KISS approach to the MechMate.

Mechanical, snap-action, limit switches have been doing this type of job for years, and quite succesfully under even harsher conditions. I am going to put some more effort into defining the switches and I would suggest you guys hold back on making those brackets for the proxy switches. Sorry for the change in course

OMRON D2VW-01L2-2M, stocked by Mouser, (generic equivalents by many others) is what I am looking at now. $6.38 each, minimum 2 required for X and Y, max 5 needed (2:X, 1:Y, 1:Z, 1:Spare). Or you can start with nil required - they are not essential/critical.

Reply With Quote
  #40  
Old Fri 08 June 2007, 12:46
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
Drawing M1 18 000 A refers.

Suggest that the stop-blocks be drilled and tapped at A and B to carry a slotted adapter plate to carry the switch:

Clipboard01.gif

I will try to make some drawings soon, but rest in peace that your stop-blocks are not obsolete yet
Reply With Quote
  #41  
Old Sat 09 June 2007, 06:39
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
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.
Reply With Quote
  #42  
Old Sat 09 June 2007, 07:57
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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 )
Reply With Quote
  #43  
Old Sat 09 June 2007, 14:06
Richards
Just call me: Mike
 
South Jordan, UT
United States of America
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.
Reply With Quote
  #44  
Old Sun 10 June 2007, 04:26
Alan_c
Just call me: Alan (#11)
 
Cape Town (Western Cape)
South Africa
Send a message via Skype™ to Alan_c
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)
Reply With Quote
  #45  
Old Thu 21 June 2007, 01:07
Gerald D
Just call me: Gerald (retired)
 
Cape Town
South Africa
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
Reply With Quote
Reply

Register Options Profile Last 1 | 3 | 7 Days Search Today's Posts Mark Forums Read

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 17:13.


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