For [Jay] and [Ricardo]’s final project for [Dr. Bruce Land]’s ECE4760 course at Cornell, they tackled a problem that is the bane of all machinists. Their project finds the XY zero of a part in a CNC machine using computer vision, vastly reducing the time it take to set up a workpiece and giving us yet another reason to water down the phrase ‘Internet of Things’ by calling this the Internet of CNC Machines.
For the hardware, [Jay] and [Ricardo] used a PIC32 to interface with an Arducam module, a WiFi module, and an inductive sensor for measuring the distance to the workpiece. All of this was brought together on a PCB specifically designed to be single-sided (smart!), and tucked away in an enclosure that can be easily attached to the spindle of a CNC mill. This contraption looks down on a workpiece and uses OpenCV to find the center of a hole in a fixture. When the center is found, the mill is zeroed on its XY axis.
The software is a bit simpler than a device that has OpenCV processing running on a microcontroller. Detecting the center of the bore, for instance, happens on a laptop running a few Python scripts. The mill attachment communicates with the laptop over WiFi, and sends a few images of the downward-facing camera over to the laptop. From there, the laptop detects the center of the bore in the fixture plate and generates some G-code to send over to the mill.
While the device works remarkably well, and is able to center the mill fairly quickly and without a lot of user intervention, there were a few problems. The camera is not perfectly aligned with the axis of the spindle, making the math harder than it should be. Also, the enclosure isn’t rated for being an environment where coolant is sprayed everywhere. Those are small quibbles, and these problems could be fixed simply by designing and printing another enclosure. The device works, though, and really cuts down on the time it takes to zero out a mill.
You can check out the video description of the build below.
Not going to replace a renishaw probe any time soon. And I can indicate a bore with a DTI with greater accuracy probably just as fast.
This is kind of one of those solutions looking for a problem.
this would be great for the same kind of people that retrofit old comets with a centroid controller. its close enough.
That are saying .050, thats not good enough for welding. There are several people making renishaw style probes but a lot cheaper which will be way more accurate than this thing.
I didn’t catch if that was inches or mm. .050 mm or 50 microns is very usable in the makerspace world. (0.002″ roughly) The big question is the update rate. The slower the rate the slower you have to go to get good resolution.
50 microns is a typical target. 0.050″ is not super useful.
I can’t help but think about the lander that smacked into Mars because of an inch/metric thing.
There are lots of factors in using a camera to find the center or edges of objects. One simple trick is to simply rotate the spindle 90 degrees and take 4 pictures. That will allow you to find the center pixel. If it were me I would take do the prior step, and then move to the center location and test it again. This is basically calibrating the sensor geometry. Depending on the geometry of the piece and lots of other things, you can use this technique to position to 50 millionths of an inch or better (~1 micron) — or good enough for a mill/lathe with accuracy/percision in the 0.0001″ range. Yep. half a tenth. It is all simple geometry and photogrametry. If you have a suitable machine, then you can automate the calibration step programtically and find the center pixel each time. The advantage of that is that you do not have to worry about thermal expansion or someone smacking the camera throwing it into the tool chest and mucking up the calibration.
One of the things I was thinking of doing with this to extend the idea is to take a couple of pictures moving in a box or triangle and use photogametry techniques to estimate the distance of the sensor to the camera to set the focal plane. Then the edges are in sharp focus. I like this idea. Unfortunately I am VERY busy with other things. If someone is in the DC area and want to play at MakerTech Tuesday on this, let me know.
totally agree. Even an old mechanical edge finder would be faster than that. :)
Indeed. A coaxial indicator is actually significantly faster. I can find center of a bore with a coaxial in about 20 seconds. You have to understand , these kids havent made in to the real world yet to find out that there are already solutions to this problem , and have been for some time. Just like a lot of these projects i see by young people , they just havent the experience/exposure to realize their efforts are somewhat pointless, as there is very often already a GOOD solution to the problem.
I used to have a Blake Co-Ax and never used it, virtually brand new when I sold it. I just use an interapid on a indicol holder.
Though for CNC there could be a point.. like if it could do the zeroing completely autonomously, with a tool swapper compatible camera attachment.
What does this have to do with internet of things (or more accurately, internet of s**t) though? WiFi does not necessarily equal internet. The sooner everyone stops plugging IoT as being some kind of revolution, the better.
But on the subject at hand, I have to agree with previous comments. While a nice notion, the accuracies they are quoting are frankly an insult to the machinery they are using.
That’s not to say I wouldn’t like to see this improved, though. Machine vision is being used to set jigging to some pretty impressive tolerances in industrial applications.
Haven’t you read this and responded on the internet? It is IoT, alright. Geez :)
Hey look, another guy who doesn’t get it and thinks IoT = my toaster on the internet. If you haven’t seen the revolution already, you’re in the wrong industry. … Or actually not in industry in general. .. Or commercial … are you an insurance salesman?
Why don’t you explain instead of being ascetic? I don’t feel any IoT here either and your post hasn’t helped or convinced me at all
*sarcastic
Thanks auto correct
I’m an electronic engineer and I do understand what IoT is, it just irritates me how much crap is flooding onto the consumer market and all you see these days is garbage being touted as IoT devices. Yes, including things like toasters, refrigerators, lightbulbs, etc, for which an internet connection really offers no utility and is actually ridiculous.
Since the advent of devices like the ESP8266, it’s now more like “Oh, look how cheap that is. I’ll buy some.” shortly followed by “Right, what shall I connect to the internet today?” rather than starting with a problem and recognising it might be solved by implementing an internet connected device.
Obviously it has its place and I have no doubt that there are some IoT devices that are making a difference , but now marketing idiots have found out about “IoT” and “cloud” and want everything they advertise to be part of it.
I’m not disputing that there are applications where data centralisation is of value or where remote monitoring is making a big difference in industry, but we’ve been doing that for years and didn’t feel the need to slap a snazzy IoT badge on it.
Having said all of this, I do get a good laugh out of reading about people who have converted their homes to a “smart home” only to be unable to turn their lights on because a server somewhere is undergoing maintenance.
Anyway, as for my original point, this is not an IoT device. It has a WiFi connection such that it can be controlled via a laptop over a LAN.
My original post wasn’t to denigrate the project itself, more taking a pop at the way the author of the article couldn’t resist getting “Internet of Things” in there somewhere. I’d wager that the guys doing the project never even labelled it as such.
Like the project, but reality is, in the real environment, this is a waste of time. If a machine has a probe, done. If not, edge finder, done.
With the right software, this makes it much easier for beginners. It’s actually pretty common on high-end machines for education.
We are working on something very similar for the Smoothie project ! Looking for OpenCV devs for hire btw :) Really glad to see more people are working on this. Ours uses a fisheye webcam in combination with either an XYZ probe, or a USB microscope.
The way I was thinking, overhead camera to image the part and let the operator pick a hole location, then the machine uses a mechanical probe to find the hole center, part edge, etc. Just use the camera to get the machine close and find the real value with the probe.
Yep that’s the plan : https://docs.google.com/document/d/1ROWwAvJW4f1_YKNhCDLrORkYXcnY9js6hxUhz4zJjho/edit?usp=sharing
We recently added a microscope as an alternative to the mechanical probe ( can be accurate enough for some hobby applications )
Is that .050 mil or inch? Has anyone thought of using thermal imagery? It may give a clearer picture for the PC. As far as adjusting for actual axis that should be given on each cnc. If the cameras are mounted in the cnc and that is measured prior to inserting in machine then zero for that tool should be easy to find. The above comments regarding accuracy are correct and not good enough for most applications but this is the start and I would assume it can only get better from here.
so the laptop detects the center, for that it’s very lame
Reading the text, I thought this thing found the centre of a solid or partly machined mass.
Watching the vidio, twice, the point of the thing was lost on me, other than to point ot the difficulties in finding the centre of a hole if you never seen a milling machine before.
050! 50 thou? The thickness of a hacksaw blade and a spark plug gap added together?
Reading the comments my fears are confirmed…..tutor “go make something electronic the involves the internet and a 3Dprinter and hopefully has a use” student,….. “how about this, it has an inaccuracy of 050″ and fits a mill wih an accuracy 0001″ can we mak a video? ” tutor… ” yes and here’s a piece of paper that documents your waste of 3 months in college”
Oh and how exactly is this a hack?
Or did I miss something?
what i find most frustrating about hackaday is the fact that for so many projects people assume no further progress will ever be made, sure this is useless as is, but if we are looking a few years down the line with cheap 8k cameras and it might become very useful.
with inaccuracies above 1mm it is effectively useless, but if they down the line made something far more precise it could allow real time feedback and error correction, even collision avoidance and sanity checking becomes a lot easier.
EXACTLY
And while you will wait for your megabuck 8k camera with the matching image capture and processing hw to become available while costing as much or more than your milling machine, machinists will be happily doing this using cheap probes which are pretty much standard accessories for most mills since ages.
This is a solution looking for a problem and throwing more money and more expensive equipment at it will *not* fix that.
Also, as pointed out by others already, only an idiot that has never seen a milling machine to actually operate could put a camera in the workspace – cutting oil and sharp hot metal bits are typically flying everywhere. Your shiny new 8k camera would be ruined after few pieces. Even small toy mills cutting only wood and plastic produce enough aggressive dust to scratch the lenses. And a removable camera would not achieve the accuracy, making it pointless.
First, you don’t need a 8k cam. A low cost webcam and a mechanism to switch between normal and microscope lens would do the trick here and be extremely cheap.
Also, no the camera won’t receive any oil or metal : it’s an ATC, it’ll be safely in the tool magazine when not in use.
Saying “machinists have been doing this for ages” is the same is the same as being in 1991 ( or whenever ) dissing email because it costs more to send than snailmail … you are completely missing the point.
This has a lot of potential, and can be developed into something faster, and more useful, than classic centering tools/probes. For example on large format routers this can be used to autodetect where the part is in the work area. It can be used to detect fixtures. It can 3D scan parts. You could even go one step further and get the CAM software to use those results, displaying what’s in your work area while you are setting up CAM … That and other features could give you a *much* better user experience when using CNC mills … ( reducing the number of operations a user has to do, and making those left easier )
You missed the part where the student paid thousands of dollars for the honor of completing this learning experience.
On the other hand, I’m trying to contact them right now to offer them a job doing something very similar, so maybe not such a waste.
Waste of 3 months? You mean other than going through the learning process of having a problem and solving a problem. What, all student projects now need to be super accurate and solve world hunger? Get a grip on yourself man.
Could be useful if it combined machine vision with lasers, to vastly improve the accuracy? Basically a total station plus machine vision. And was open source. And not a five figure and up price tag. And was easy to use without technical training. And was standardized to a degree.
Example of a commercially available product would be http://apisensor.com/products/3d-laser-tracker-systems/i-360/.
Why laser? They will automagically improves precision?
No, precision comes from resolution and telecentric optics. Both cost more than good old touch probe.
True, but a touch probe requires more advanced knowledge to use correctly. At least in theory.
And you think that keeping those lasers and optics in alignment is easier? Or that it will never require a touch up? If you can’t use a probe, you shouldn’t have anything to do with a milling machine – doing a bit of basic vector math for the setup is part of basic skills that *every* machinist or CNC operator is taught.
it is almost never what you should be able to do but what is worth doing, considering that when you work for someone in a machine shop the two most expensive resources is the time of both the machine and operator.
saving time is money earned in that context, which is why all productive shops have several insert holders with the commonly used bits already installed instead of just a single holder with all the bits available, if this down the line saves a minute here and there it could very well be worth it.
This is a great start. I’m looking forward to updates and improvements.
Using a Renishaw probe is definitely not the bane of my existence. Make a copy of one. .050 I can do by eye
Prototype early and often right? Something I need to try and remember when I have an idea.
Holy crap… those whining about the accuracy miss the point of the exercise, which was for a class! This kids were learning, solving a problem, and moving on. This is not a project who’s goal is to give great accuracy, it’s a way for the kids to learn how to solve such a project down the line, or any project. Sheesh.
That would be an acceptable argument for a high school project or someone doing just for fun. Not an university course at Cornell where the students are future engineers that will be solving real world problems somewhere in a factory few years down the line. One would expect that the objective is to not only solve the problem but to solve it in an actually usable and useful way – which typically requires learning how the task is normally done and *then* improving upon that solution. Which obviously didn’t happen here.
Oh my god give me a break. What did you do for your engineering education that was so novel and useful? They don’t work on this one class full time. Frankly it’s very creative to come up with a solution that is at least somewhat useful in such a short period of time.
I think this is a great project! Sure, it’s a prototype, but they can improve accuracy with better algorithms and scripts, and automate the process in the same way turning was automated. I want one right now!
To all you worthless idiots out there complaining about a wasted college degree, solving your problems was not the point of this exercise. These projects are among the most valuable experiences you get in a degree, a practical problem you can sink your teeth into. OMG two college undergrads couldn’t fix something that the industry with it’s collective $billions haven’t fixed either. Shocking!
I’m not one for the SJW type but these guys need defending so on behalf of undergrads everywhere, go screw yourself.
One of the several interesting uses I can see for this, as an extension to finding bore centers, would be finding feature sets. Sure we can use our co-ax to find the center of a single round hole, but how about finding the center of a square, or something with keyways? On my circuit board mill, the software allows me to indicate in two holes on the board, and then it recalibrates the gcode around those two points, so I don’t have to precisely align the circuit board, just two holes. We usually leave the mill vise parallel to the ways, but with something like this we wouldn’t have to indicate the jaw to make sure it was still parallel: indicate in two holes, and the software does the interpolation. Likewise, one of the frustrating things for me is trying to find a good reference point on a rough casting. Well, this thing could find the centers of several rough holes and be ready to clean them up as my initial references. (and I personally loathe trying to determine bolt locations on non-rectilinear patterns, whereas this thing is ready to do that for me.)
The problem as I see it with this device is that it assumes perpendicularity of the spindle axis to the top of the workpiece (and that the hole is perpendicular to the workpiece). When indicating in a hole, it is best to always take indicator readings at two different depths. This verifies that the hole is indeed parallel to the spindle axis, and not canted.