Motion sensing ideas for a CNC touch probe? - Page 1
Forum section: electronics / projects

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 06:54:57 am
content: Touch probes are precision devices used in e.g. CNC controlled mills to precisely locate the edges and corners of a workpiece. They have a probe arm terminated with a known diameter ball, that touches the workpiece and breaks an internal switch to indicate contact. A commercial example can be seen herehttp://www.tormach.com/product_tts_digitizing_probe.html.I am in the process of designing an IR based wireless solution for one, to avoid the need to connect/disconnect a cable for the touch indication. The cable is not really compatible with automatic tool changers and IR and radio based solutions are the norm. Radio will follow, but first i do the IR.My problem is that the LiPo battery in the device has a strictly limited discharge/charge cycle time. Due to safety regulations, the probe must maintain constant connection with the receiver during a positioning run lest the machine get out of control in case of connection issues. This means that the IR transmitters must be active while the probe is in position and stop when contact is detected. It also means that there must be a way to conserve power when the probe is idle. Otherwise the battery will be flat in no time (roughly 1 hour).At this time the controller is an ATTiny25 that can go to a sleep mode whenever the probe is idle. The challenge is in detecting the conditions for idling. A prototype with wire indicator connection exists and there, a simple tilt switch is used. Whenever the probe is on its side or upside down, power is off. This works nicely for everything else except carousel type toolchangers, where it doesn't work at all. The tools are always in the vertical orientation.For the IR option i have now specified a Bosch BMA220 accelerometer. It has easily all the features needed for motion sensing but there are a couple of things.First, the package it comes in is ridiculously small, only 2x2 mm in size with 12 miniscule non-visible contact pads. It can be soldered in an IR oven, but manually positioning that one will be a PITA. So first question is, has anybody encountered a "reasonable" sized accelerometer?The second issue is that while the BMA220 has a simple interface for generic motion sensing, the parameters for the simple interface are not configurable. So i am a bit worried about the motion levels the chip will indicate when in that mode. If anyone has experience i would like to hear about that. The full interface works either by i2c or spi and that is one way of course. However, the ATtiny only has one serial channel that needs to be shared with the programming interface and it could get a bit messy. Not to mention that control software would be orders of magnitude more complex.So the question really is, if anyone has done simple/reliable motion sensing lately? As you see from the above, all i would need is an indication whether there is motion or not, nothing else matters. A toolchanger will cause high accelerations easily detected but a positioning run will be done ultra smoothly with very slow motions, so that part may not be so easily detectable - subject to the sensor of course. But any ideas / experience would be welcome.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: March 11, 2013, 07:27:21 am
content: Maybe you are over thinking this. Does the tool holder carousel have a dedicated position for the touch probe? I am thinking it must, if so make some kind of switch sense or led optical interrupter that enables the probe to detect it is sitting in its holder, in essence making it a dual touch probe. One switch for the actual use, one for docking detect.Hope I haven't misread your requirements and am blowing smokeedit: stupid me I always prefer optical means of detection in machine tools but this is battery powered, no good. However a position limit switch which is normally closed but open when sitting in its holder should work.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 09:15:48 am
content: Sorry, a nice idea, but no cigar.This is not a dedicated one-off but a small scale production item. At least several tens to 100+ units will be manufactured and used in all kinds of machines with and without tool changers. While a carousel changer could conceivably work as you assume, a dual arm belt changer won't. Only the computer knows where tools are positioned, as the dual arm switches tools. This will over time completely mix the tool positions depending on the individual workflows and order of tool usage.The only practical solution is a completely self enclosed one.

author: ConKbot
author_rank: Super Contributor
timestamp: March 11, 2013, 11:25:17 am
content: Probably a bit cost prohibitive to use strain gages, but can you detect it the pull stud getting yanked by the machine to turn on the probe, and the tool getting whacked out of the spindle to shut it off?

author: poorchava
author_rank: Super Contributor
timestamp: March 11, 2013, 12:22:12 pm
content: Hall sensor + magnet on the spindle head. Whenever probe is picked up by the head, it will detect the magnet and return from sleep. But metal shavings could be a pain in the ass with this solution.

author: robrenz
author_rank: Super Contributor
timestamp: March 11, 2013, 12:38:32 pm
content: Captive plastic plunger that protrudes .5mm out of the taper shank that actuates microswitch in the body of taper shank. Or two isolated gold plunger contacts in the taper that are a closed circuit when seated in the spindle.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 01:01:46 pm
content: Again, good ideas but unfortunately not likely to get anywhere. As i already said, the solution almost has to be self-enclosed for a number of reasons. The reasons have to do with the fact that one cannot presume the machine will be modified in any way to accommodate the probe. I did not explicitly point it out, but the probe will usually (read: always) be permanently fixed in a tool holder specific to the individual target machine. Usually this is one of the several conical taper toolholders, where the probe is fixed from its cylindrical shank using a collet. Thus the probe and toolholder will stay together. Mechanical dimensions of various toolholders vary widely and it is almost guaranteed that no usable (i.e. co-rotating) machine surface is available for a mechanical switch. As to modifying the toolholders - that's a certain non-starter. Those are hardened special steels, machining of which would easily cost the same as the entire probe. Not to mention that in some cases the toolholder is then out of balance. Not a big issue assuming it will be dedicated to the probe but i can imagine how this kind of requirement would be received in general.Another point is that i still need the probe to enter sleep mode even if it is mounted but the machine is shut down. For e.g. lunchtime, during which the battery would easily run down unless power save activates.

author: ConKbot
author_rank: Super Contributor
timestamp: March 11, 2013, 01:10:56 pm
content: Quote from: Kremmen on March 11, 2013, 01:01:46 pmAhh, that makes it more tricky, I was thinking just a dedicated cat/BT40 tool holder where the end uses threads their own draw-stud into the back of the tool.If the machine is supposed to be in constant contact with the device, and the machine is being told "probe is touching something!" when the IR is off, why not have it time out after x minutes of inactivity, acceleration above a threshold will reactivate it (i.e. it being loaded, or maybe the machine rapiding) or a person flicking the probe if its for manual use. If the persons program ignores being told the probe is touching something, and crashes it, sounds like its on the programmer, not the probe vendor.

author: robrenz
author_rank: Super Contributor
timestamp: March 11, 2013, 01:16:02 pm
content: I had assumed this would be an integral shank unit like most probes. I guess you have provisions for making the stylus run true in holder after mounting in a toolholder?

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 01:50:02 pm
content: Quote from: robrenz on March 11, 2013, 01:16:02 pmYes, the shank is integral. The probe will have a cylindrical shank for mounting in a collet. The collet in turn will have the toolholder taper used in the specific target machine. I can't be more specific than that since i don't do the mechanical design. That is handled by professional designers so i assume they know what they are doing. AFAIK, this is the done thing anyway, take a look at the similar Tormach probe i linked in my original post. You won't easily get a more accurate solution than a good quality collet. They are routinely used for attaching precision milling bits to get the accuracy the machine is capable of.

author: robrenz
author_rank: Super Contributor
timestamp: March 11, 2013, 01:55:34 pm
content: I actually meant the probe had its own integral shank like cat 30 or hsk direct, not just cylindrical to go into a collet holder.

author: ecat
author_rank: Frequent Contributor
timestamp: March 11, 2013, 02:12:23 pm
content: I was imagining a ring of optical sensors, 3 or 4 maybe, all receive light when the tool is in use but 1 or more would be in shade when the tool is in the holder?You already have a switch that tells you when the probe is in use, it opens when the probe touches something. Can you not use this with a suitable power off time out and maybe some initial touch off routine for wake up?

author: DenzilPenberthy
author_rank: Frequent Contributor
timestamp: March 11, 2013, 02:21:42 pm
content: If you only want to make tens to low hundreds would it not be cheaper and easier just to negotiate a good volume discount and buy them off the shelf?Disclaimer - I used to work for Renishaw who are leading manufacturers of touch probesUnfortunately this means that although I have loads of great ideas for your problem I can't tell you any of them.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 02:35:49 pm
content: Quote from: robrenz on March 11, 2013, 01:55:34 pmOK got you now. That would make manufacturing the probe significantly harder. Not only are there numerous alternatives but each one is a conical shape, some even multi-angle. Making all of these variations compared to one or two cylindrical diameters... well you can do the math.Quote from: ecat on March 11, 2013, 02:12:23 pmOK but how does that help the probe? A part of the probe is of course the IR receiver that sits somewhere close by and forwards the indication to the cnc program. The probe has a number of IR emitters illuminating the receiver when the probe is active and not touching anything. So when no light is received it is either a touch or the probe is away - yes. But the receiver doesn't do anything to the probe - the probe must go to sleep by itself.QuoteNo since the probe tip is not doing anything at the moment of wake-up. Look at it this way: The probe is loaded from a magazine to the machine spindle. The cnc controller initiates a probing run and at that moment the probe must already be active because if not, it counts as contact right away and the machine won't move. Failure. And the machine operator is exchanging BS with colleagues in the coffee room so there is nobody to flick the probe either. Jokes aside, the work cycles of the cnc mills are often designed by totally different guys than those who actually run the machines. Their work cycles won't accommodate any probe flicking and they should not either. The probe just has to work the same as a wired probe would, i.e. it is ready when it is loaded into the spindle. Period. The only concession is that since it works on a battery, it has to be charged when running low. There is an indicator for that. If you need to do anything, anything at all to the probe manually before it is ready, you completely lose the reason for its existence. Which is full automation of the probing cycle with no human intervention. Failing that, you might as well use the wired probe.Quote from: ConKbot on March 11, 2013, 01:10:56 pmCat, BT, ISO, R, Morse - all common, and preferably uncommon as well, tapers should work. And with a collet attachment they do.QuoteActually, exactly this is Plan A at this time. If you check my original question it was mostly, if anyone has done something similar using components more easily applied than the semi-microscopic Bosch BMA220. I guess there is a mechanical reason why the accelerometers tend to be so miniscule, it is just a bit frustrating that not a single SOIC case or similar is to be found from anyone. In a manual placement/IR solder process i fear for the yield when using this tiny component, and that is the main motivation of my question. Then there are the side issues of ensuring that the sleeping logic works in practice.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 02:36:36 pm
content: Quote from: DenzilPenberthy on March 11, 2013, 02:21:42 pmNot my decision - i just do the electronics. Yes, Renishaw is a familiar brand.

author: fcb
author_rank: Super Contributor
timestamp: March 11, 2013, 02:51:58 pm
content: Renishaw OMP40/2 is triggered by the receiver unit transmitting a 'wake-up' code to the probe (an M code relay in the VMC triggers it).No LIPO's though, it uses Lithium Thionyl type disposable cells and gives about 4-6 months life normally.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 02:53:32 pm
content: Quote from: ConKbot on March 11, 2013, 11:25:17 amGot you now - better late than neverIf doable, that would take care of the initial loading/unloading. However, it still leaves unanswered the scenario where the probe stays in the spindle a long time but with only occasional movement. I have no clear requirement how the probe should handle the case where probing is resumed after a lengthy pause - whether the machine continues directly in probing mode because that would present a problem: The probe won't wake up before motion, and there won't be motion because the probe already indicates "contact" i.e. no IR received in probing mode. Hmm.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 02:58:50 pm
content: Quote from: fcb on March 11, 2013, 02:51:58 pmYep, thought about that already. It is a plan worth considering, although the complexity goes up because of the 2 way communication that is needed. But at this time it seems to be the solution to all the issues i have found with other methods, and it is good to know that it is actually used in practice (i haven't really done a proper "competitor" study for this one). Now if i only manage to squeeze everything into the volume available... And sell the idea of course %-B

author: ecat
author_rank: Frequent Contributor
timestamp: March 11, 2013, 03:24:57 pm
content: Quote from: Kremmen on March 11, 2013, 02:35:49 pmI should have been more clear, the sensors were to be part of the probe so it knows if it is in darkness or light. You have IR transmitters on the probe anyway so the idea could extend to proximity detection.Quote from: Kremmen on March 11, 2013, 02:35:49 pmNo. Not a manual flick, lol. A small routine run after the tool select and before the probe routine. The bad, it adds a couple of seconds to the job. The good, it gives your fail safe mechanism a positive known good starting point.

author: fcb
author_rank: Super Contributor
timestamp: March 11, 2013, 05:20:42 pm
content: It's always a good idea to find out how others have solved the same problem before reinventing the wheel...You should study the OMP series manuals - Renishaw are one of our Great British success stories and a very friendly bunch to boot. In practice my OMP40/2 has performed flawlessly (less than can be said about the VMC it's attached to...).

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 06:46:08 pm
content: Quote from: fcb on March 11, 2013, 05:20:42 pmRenishaw have a functionally very polished product family and top of the line quality wise. The method of operation is not a great mystery however, most interesting would be to know how exactly they achieve the long battery life. But the optical data transmission is no big deal in the sense that data over IR is not exactly news. An implementation needs to be prototyped sure, but it is not really a question whether it can be made to work or not. Other than that it is a question of coming up with the most economical functional solution. It could be a 3 € accelerometer provided it can be made to work reliably. If not we try something else.

author: ptricks
author_rank: Frequent Contributor
timestamp: March 11, 2013, 08:37:24 pm
content: Have you considered inertia based sensors that are designed to detect movement but not measure it ?Most of the accelerometers sold are designed for getting a lot of detail back about position, speed, etc, and that sounds like overkill for what you are describing.I am thinking more along the lines of the original motion detectors , a tiny spring connected to a short wire that has a weight on one end, whenever motion occurs the weighted end lags behind, causing the bending of the spring which bridges a metal contact on the side. These can be VERY sensitive. There is one that was made to go into a missile guidance system that could detect a person breathing on the surface of the box containing the sensor. They are easy to interface as well since you are just using it like a switch. Sizes are available all the way down to 5mm x 1mm.

author: chickenHeadKnob
author_rank: Super Contributor
timestamp: March 11, 2013, 09:16:35 pm
content: Now that I better understand your full requirements I can not see any way to make a self contained or one way communicating probe work safely. It needs two way comms. for closed loop verification to the machine controller that it is active and sensing, otherwise how does the controller detect silent failure? Isn't that a show stopper? Every time the battery fails silently the machine will crash the probe. The only other method I can see is that the probe can detect a special and safe wake up and calibrate movement and then handshake to the controller, but that doesn't help your lunch time problem. There seems to be a good reason the renishaw probes communicate both ways.

author: fcb
author_rank: Super Contributor
timestamp: March 11, 2013, 10:03:49 pm
content: OK, the battery life is no mystery. For the sake of clarity: PROBE=thing in spindle, HEAD=thing mounted on internal wall of machine tool.Assumptions (simplified for maths)Max probe deflection before damage: 5mm in any direction, maximum probing cycle feedrate 50mm/sec.PROBE hardwareAt least three low-cost ($0.2) IR receiver photodiodes, spaced at 120degrees around probe bodyAt least three high-power IR emitter LED's, spaced like aboveA number of status LED'sBatteryMicrocontroller (PIC/MSP430/whatever)PROBE rules (simplified)1. sleep (and wake at ~1 second intervals)2. when woken, check IR for "activate" message3a. when "activated" flash status message of tip over IR at 0.1second intervals3b. when "touching" flash status message of tip over IR immediately.3c. when "not touching" flash status message of tip over IR immediately.HEAD hardwareIR receiverIR transmitterStatus LED's for trouble-shootingPowered by machine tool.Input: from PROBINGCYCLE driven M code relayOutput: PROBEOK contact closureOutput: PROBETOUCH contact closureHEAD rules (simplified)1. Look for M code relay closure to trigger probing cycle, wake PROBE.2. If PROBE not woken in 3 seconds, light fault LED.3. If no PROBE message received within 0.1seconds open PROBEOK contacts.4. Upon "touching" message set PROBETOUCH contacts5. Upon "not touching" message clear PROBETOUCH contactsBasically the thing to make sure of is that the machine responds to an ERROR before the probe can be over-deflected, sort of like a dead-mans-pedal on a train. The faster your probing feed-rate the faster your 'watchdog' messages have to be sent, and the more battery you'll use during probing.

author: Kremmen
author_rank: Super Contributor
timestamp: March 11, 2013, 10:35:31 pm
content: Quote from: ptricks on March 11, 2013, 08:37:24 pmThe simple mode of the BMA220 that i have as the prime candidate has exactly this simple mode available. It reports "any motion" using a single interrupt line. So far so good, but since in this mode there is no communication with the chip, you have to do with the default configuration. One of my worries is that said configuration is not detailed in any document i am able to find. So i cannot estimate the motion needed to trigger the thing. The chip is actually quite cheap so it would be attractive, but i will settle for a mechanical equivalent if one of suitable sensitivity can be found. Grossly oversensitive is not good either because then it will give false triggers too often.Do you have a specific component in mind and where could one get those?Quote from: chickenHeadKnob on March 11, 2013, 09:16:35 pmYes 2 way comms makes life significantly easier. However probing can be done without, it just has to operate fail safe (this is what the wired ones do). The simplest way of working, although wasteful of battery, is for the probe to send a signal continuously (corresponding to the case where the wired contact is closed). The machine will not move unless it detects the signal and when touching, the signal is cut (contact opens), causing the machine to stop as well. Dead battery == open contact == no motion. Combining this and power saving is where the headache startsThe smarter way of course is for the probe to actually tell what it is doing and there 2 way comms is the way to go.Quote from: fcb on March 11, 2013, 10:03:49 pmSure, it is more obvious now when the way the probe operates is taken into account. In this scenario the power consuming phases are far better optimized than what is possible using the blind motion based strategy.My current design is very much like the probe you describe, though without the return data channel from the head. That is replaced by the motion sensor. The probe rules can still be used even if no return channel is available, although the probe needs to activate without an explicit command to do so. The BMA motion sensor has the ability to wake itself periodically and then wake up the processor if motion is detected. So in that sense it partly corresponds to the optical method.The 2 level signaling i didn't come to think of, but now it is obviously the way to reduce power consumption during the active probing phase. Thanks for pointing that one out. Now if i only get approval for doing the M code thing for explicit activation my worries are basically over.Thanks everyone, this has been a very useful discussion even if not all suggestions are entirely practical in my case. Still, most if not all of those too have helped to clarify the issue and my thinking. Sofor your time and effort.

author: smashedProton
author_rank: Frequent Contributor
timestamp: March 11, 2013, 10:56:04 pm
content: I could just be blowing smoke up your ass, but I think that i have an idea for how you can power the thing. Steel is more or less permeable, so you could have a second device to wirelessly charge the device using the spindle and chuck as a core. Worth a thought.