By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Machine alignment using low cost electronics

All Topics | Latest Posts

Search for:  in Thread Title in  
John McNamara24/08/2019 10:24:42
avatar
1377 forum posts
133 photos

Hi All

I stumbled upon the following post on another UK forum.

"DIY laser leveling using webcam and laser level."
Link:

The poster provided a link to the software source code on Github
It creates a Gaussion graph of position, I tested the software using a crude test setup.

I obtained repeatable accuracy of 0.039mm (.0004" and I am sure that can be improved with a better setup....... remarkable.

Regards
John

Andrew Johnston24/08/2019 11:06:32
avatar
7061 forum posts
719 photos

There seems to be a rather large error in metric to imperial translation!

Andrew

Clive Foster24/08/2019 12:05:21
3630 forum posts
128 photos

That sort of technique can be made to work but there are many traps for the unwary. Was involved on and off with pixel based position measurement systems for most of may working life as a scientist / R&D engineer for MoD. Usually as the guy doing the grunt lab work to prove why a bright idea didn't work as it should.

Bottom line is that it starts getting very tricky once you go below pixel size. Remembering that the nominal pixel size is the spacing not the actual image sensor. Also remembering that simple gaussian plots to determine the beam centre hide a lot of assumptions concerning pixel sensitivity variations, beam quality and even diffraction effects in the sensor structure. A colour sensor will completely crap things up.

Probably reliable to a thou or three with care and thought but below that you are in for serious work. I tend to agree with the rule that once you go below a thou things get serious. Fast. I've no doubt that it can be done if you throw the processing power of modern desktop / laptop or even smart phone computers at it. But its very easy to be blinded by the data deluge and loose sight of the fundamental physics. Back in the day we never had the luxury of so much computer power so had to think very carefully about the physics.

Correct approach is to micro-scan the beam image over the sensor so everything can be properly defined. Beam needs to be at least 10 pixels wide. Shed loads of data but at least you know what you are dealing with.

In general interferometer methods are much easier as fringes are robust over small errors and easily observed by cameras. Just needs a good way of converting displacement to tilt.

Back in the day when I had to align off axis paraboloids I would set up a small He-Ne gas laser on each axis and zero out the fringes produced by back reflection on the front mirrors on both lasers. Thats four sets of fringes bought coincident at both ends. But I really, really needed a foot diameter diffraction limited beam!

Clive

Edited By Clive Foster on 24/08/2019 12:06:20

John McNamara24/08/2019 12:55:12
avatar
1377 forum posts
133 photos

Hi Andrew

I meant to say this as posted at the other place

"Now for the exciting part; Hidden at the bottom of the Gaussian graph there is a tiny numeric value, It followed my indicator movement when I moved the slide. very roughly a value of 1 to 4 on the graph value to 1 to 4 ticks on the 0.01mm indicator. I assume this correlation may not have been planned however with the particular camera I used it was very convenient.

I ran the test several times and it was repeatable.
0.01mm is equal to .00039" (about 4 tenths)
A very good result from a crude setup."

There is an error in the scaled value that needs to be explained. The dial indicator readings and the values on the screen correlated and were repeatable.

Hi Clive

Yes there is more work to do on this project, For a start I want to use the sensor to work with backlit .008" stretched wire without a laser and no lens, just the shadowed area of the wire on the sensor. I am working on something I intend to show at the MSMEE Exhibition in Melbourne in 5 weeks.

You are right using a modern PC enables number crunching speed unobtainable not that many years ago, T 640x480 webcam came from the junk bin. Now 1080p camera modules are dirt cheap some under 20 dollars

The colour image is converted to grey-scale by the software. 

I will keep working on this project.

Regards
John

Edited By John McNamara on 24/08/2019 12:59:40

Edited By John McNamara on 24/08/2019 13:06:43

Michael Gilligan24/08/2019 15:15:33
avatar
23121 forum posts
1360 photos
Posted by John McNamara on 24/08/2019 12:55:12:

[ ... ]

The colour image is converted to grey-scale by the software.

I will keep working on this project.

Regards
John

.

Very interesting project, John

You might see some useful improvement if you use a camera with an actual monochrome sensor.

MichaelG.

Frances IoM24/08/2019 16:36:03
1395 forum posts
30 photos
if the light source is a monochromatic laser isn't he effectively using a monochrome system - admittedly non-laser light = noise and no doubt he would get better sensitivity and resolution as well as avoiding problems with the colour separation mechanism of the camera sensor
Michael Gilligan24/08/2019 16:56:08
avatar
23121 forum posts
1360 photos
Posted by Frances IoM on 24/08/2019 16:36:03:
if the light source is a monochromatic laser isn't he effectively using a monochrome system - admittedly non-laser light = noise and no doubt he would get better sensitivity and resolution as well as avoiding problems with the colour separation mechanism of the camera sensor

.

Yes, Frances ... that was my point

A monochrome sensor has one pixel per pixel [if you see what I mean]

A typical colour sensor [Bayer pattern] has four sub-pixels per pixel.

Gotta believe that the monochrome sensor will give crisper resolution.

MichaelG.

.

For those unfamiliar with the Bayer pattern ...

This is why (Red + Green + Blue) = 4

https://en.m.wikipedia.org/wiki/Bayer_filter

Edited By Michael Gilligan on 24/08/2019 16:59:19

Michael Gilligan24/08/2019 18:18:47
avatar
23121 forum posts
1360 photos

John,

Skipping back to post #19 of that thread ...

Many thanks for the link to Oleg Borisov's thesis

MichaelG.

Neil Wyatt24/08/2019 18:55:13
avatar
19226 forum posts
749 photos
86 articles

Anyone who has seen my posts on autoguiding a telescope won't be surprised!

Neil

John McNamara27/08/2019 01:28:53
avatar
1377 forum posts
133 photos

Hi All

I Bumped this post because there are some worth wile changes.
**LINK**

There is an executable version available, A Jar file so you will need the current version of Java installed.
If you have a webcam preferably one with a lead attached not the one in your laptop although it will work. it is all you need to experiment.
**LINK**

Regards
John

PS:
The program code for the latest version has also been updated on Github for those that can program.

Edited By John McNamara on 27/08/2019 01:32:56

Michael Gilligan27/08/2019 07:35:10
avatar
23121 forum posts
1360 photos

Thanks, John ... Much appreciated

MichaelG.

Michael Gilligan27/08/2019 09:04:04
avatar
23121 forum posts
1360 photos

Good News, John

I downloaded the [zip file] executable to my MacBook Pro ... and was initially concerned to see 'laser.bat'

Fortunately however, the Mac seems able to launch the JAR file directly.

... All looking very impressive so far.

MichaelG.

Michael Gilligan27/08/2019 21:50:22
avatar
23121 forum posts
1360 photos
Posted by John McNamara on 27/08/2019 01:28:53:

Hi All

I Bumped this post because ...

.

I have sent you a PM, John

MichaelG.

John McNamara28/08/2019 03:58:52
avatar
1377 forum posts
133 photos

Thanks Michael I responded with an email.

John McNamara01/09/2019 11:05:11
avatar
1377 forum posts
133 photos

Hi All

I Just uploaded some further results from my experiments here: **LINK**

I am rather pleased with the results and there are further improvements possible.

Regards
John.

Michael Gilligan06/09/2019 12:22:50
avatar
23121 forum posts
1360 photos

John,

I have sent another P.M.

[not specific to this discussion]

MichaelG.

John McNamara06/09/2019 16:25:03
avatar
1377 forum posts
133 photos

Hi Michael
I sent you a Gmail and a PM

John McNamara22/09/2019 08:28:16
avatar
1377 forum posts
133 photos

Hi All

I ran further tests with a new webcam, outstanding results!

This project keeps getting better.

See the end of this post here.

**LINK**

Regards
John

Michael Gilligan22/09/2019 08:52:58
avatar
23121 forum posts
1360 photos
Posted by John McNamara on 22/09/2019 08:28:16:


I ran further tests with a new webcam, outstanding results!

.

That's great news, John ... Keep up the good work

This looks like being a very effective spin-off from consumer technology !!

MichaelG.

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate