Register Help Remember Me? . .

# Thread: DIY Laser levelling using webcam and laser level

1. How satisfying to read a 21st century physicist suggesting the use of a technology which may have been used by the Egyptians when building the pyramids!
You don't have to use the latest technology, just use the appropriate technology. I've just remembered have a Black&Decker laser level somewhere, I must dig it out and see what I can do with it to check the accuracy of my own machine.

Kit

2. Thanks Andy. Yes i know the laser light will travel straight, what I meant was the straightness of the line that is generated by the cylindrical lens that is presumably a function of how accurately machined the lens is? Is testing this what you meant by twist in the horizontal projection? How do you measure this at work, do you use a water level?

Before starting this laser project I did something similar with the image sensor focused on a clear tube that was part of a water level, although I could easily repeatably locate the bottom of the meniscus to around 0.01mm resolution I had a problem getting much measurement accuracy due to the meniscus 'sticking' to the glass tube due to capillary action so gave up.I only used a short u-bend setup, maybe this was the problem and having much more volume of water in the system would overcome this problem.

3. Originally Posted by Kitwn
How satisfying to read a 21st century physicist suggesting the use of a technology which may have been used by the Egyptians when building the pyramids!
Haha. When it works it works... :) I once had a trainee who looked very thoughtful when we showed them this method, and after about thirty seconds, came up with the question: "But how do we know the water is level?"

Originally Posted by devmonkey
Thanks Andy. Yes i know the laser light will travel straight, what I meant was the straightness of the line that is generated by the cylindrical lens that is presumably a function of how accurately machined the lens is? Is testing this what you meant by twist in the horizontal projection? How do you measure this at work, do you use a water level?
Yes, this is what I mean by checking the horizontal by moving left and right. I was covering all bases with the later comment about light travelling in straight lines - you never know who you're talking to... ;)

Measuring absolute level is rarely done at work, because its more important the lasers are planar with one another than they're absolutely level as such, but this is how we do it when needed. The beauty of course is that the accuracy increases with distance, so its best used over distances over a couple of metres.

When we need absolute level in a slightly different situation, we use a large tank of water with a travelling probe. The probe has two wires, one longer than the other, that dip into the water and they measure the resistance between them. The probe moves from air down into water; when the second shorter wire touches the water's surface, the resistance decreases substantially. This is performed at three corners of the tank, from which the angle between the probe's movement mechanism and the water's surface in two directions can be ascertained.

Originally Posted by devmonkey
Before starting this laser project I did something similar with the image sensor focused on a clear tube that was part of a water level, although I could easily repeatably locate the bottom of the meniscus to around 0.01mm resolution I had a problem getting much measurement accuracy due to the meniscus 'sticking' to the glass tube due to capillary action so gave up.I only used a short u-bend setup, maybe this was the problem and having much more volume of water in the system would overcome this problem.
Yep - hence my comment about the 'depth' of the meniscus being the error in the measurement. Try to use reasonably large diameter pipe, and a touch of washing up liquid in the water will reduce the surface tension.

4. Ok so just talking about testing whether the line generator generates a straight line. Although the thing is self levelling it definitely wont be level wrt to earth within the resolution of the sensor and we don't really care about our axis being planar wrt earth, rather to each other.I understand you use the water level to check the work lasers are planar to earth but how do you check the projected lines are straight?

Would you suggest sampling the projected line against an earth reference (using a water level and a microscope) at a number of points then calculating a best fit line. Then take the error between points measured and this best fit line to determine straightness? How straight are the laser line generators your work with?

If I had a long precision edge I could just do the same thing with that, unfortunately I don't...

IDEA (EDIT)
Could be done in two stages with the current setup, first setting a rail to be straight wrt to the laser by sending the beam along the rail then using the now straight rail to check the line laser is straight with the laser positioned orthogonal to the rail.

Cheers.
Last edited by devmonkey; 13-08-2019 at 03:09 PM.

5. Ah, so you're worried about the wobble in the horizontal projection. The thing is, because of the way the laser leaves the slit, it's going to be quite smoothed out.

If you just swoop left to right with the pipe and it stays within the meniscus, you're laughing. A 4m projection distance and a 2mm meniscus means that you'd be within 0.05mm (back of the envelope..), which is on par with a ~£100 precision straight edge. To know if it's better than that, just increase the distance further and further - if you can extend it to 10m you're down to <0.03mm for example.

Sent from my SM-G950F using Tapatalk

6. Originally Posted by AndyUK
Ah, so you're worried about the wobble in the horizontal projection. The thing is, because of the way the laser leaves the slit, it's going to be quite smoothed out.

If you just swoop left to right with the pipe and it stays within the meniscus, you're laughing. A 4m projection distance and a 2mm meniscus means that you'd be within 0.05mm (back of the envelope..), which is on par with a ~£100 precision straight edge. To know if it's better than that, just increase the distance further and further - if you can extend it to 10m you're down to <0.03mm for example.

Sent from my SM-G950F using Tapatalk
Thanks for persevering with me Andy. This is what I mean imagine the laser line generator is aimed at a wall and we are looking at that wall:

So given we know that the 'self levelling' laser is going not going to be perfectly level to earth, we want to check the error between the generated line (red) and a true straight line (blue) to determine how straight our generated line is.

These lasers generate lines by firing through a cylinder of glass mounted vertically in front of it, when the light leaves the curved surface it refracts in one dimension causing it to fan out, therefore projecting a horizontal line. The glass cylinder cannot be perfect so there must be some imperfection in this projection. Any idea how much before I bother trying to measure it?

Or am I missing some fundamental understanding and that the physics implies the line generated will always be perfectly straight?
Last edited by devmonkey; 13-08-2019 at 04:14 PM.

7. The more I think about it, the harder it becomes! I'm not sure there is a good way to measure it without a precision straight edge as reference.

Essentially, I don't think it's worth worrying about - I say this because of how that lens is working - if the laser was a single point source then each bit along the horizontal line comes from a different part of the lens, and you'd be right to worry about lens defects causing wobble - but the laser isn't a point source, it has some width. This means that the contribution to any position along the horizontal is an average of a few positions on the lens, so any minor defects are smoothed out. Furthermore, the signal you detect is an average of the laser speckle, which is interference at the detector from a lot of different path lengths.

Not convinced? Okay, what happens if you move the laser slightly and repeat the measurement? If there isn't any systematic variation in the laser, you should get the same result. So my advice is average a few measurements with your system after moving the laser a few times; the standard deviation will be a combination of all your errors, including the wobble in the profile.

Sent from my SM-G950F using Tapatalk

8. ### The Following User Says Thank You to AndyUK For This Useful Post:

9. Thanks Andy.

I guess if the lens was canted slightly so the beam was not hitting the cylindrical face at the lens normal you would get a bowed line, but this should be easy to spot and also probably not hugely important for aligning two rails in a plane if you positioned the laser inline with the mid point of the rails.

I will start building a proper mount for the sensor and share the software incase anyone else wants to experiment.

10. ### The Following User Says Thank You to devmonkey For This Useful Post:

11. Hi All

As some of you may know I am interested in using a stretched very fine .008" piano wire to determine straightness using a microscope.

I posted my thoughts through this post here on this site. http://www.mycncuk.com/threads/12534...-and-reference

Subsequent to those posts I found an excellent thesis written by Boris Borisov

"New optical sensing system applied to taut wire based straightness
measurement". Doctoral thesis, University of Huddersfield.

http://eprints.hud.ac.uk/id/eprint/2...inalthesis.pdf

I was quite surprised that the accuracy of high end industrial lasers was inferior to the optically sensed stretched wire method he developed over longer distances >2m. See the graph on page 28 of the thesis.

Even more surprising was the simple sensor he used, Omron EE-SX1096 and EE-SH3 photomicrosensors Cost about 2 dollars on ebay!

This is definitely something I want to try. The levels of accuracy he has achieved are outstanding; a few um.

Regards
John

12. ### The Following User Says Thank You to John McNamara For This Useful Post:

13. Originally Posted by John McNamara
Hi All

As some of you may know I am interested in using a stretched very fine .008" piano wire to determine straightness using a microscope.
I want to try this too John.

As for the sensors, certainly the one i'm using, the resolution is simply amazing. This sensor that came from a £7 webcam from amazon has an active area ~2mm wide, this is 640 pixels, so ~3um pixel spacing. You can quite easily with the averaging achieve sub pixel accuracy. That thesis is excellent, looks like he averaged a few thousand frames.

I've decided to use this new sensor as it is easier to mount and seems to behave exactly the same with the laser as the one I was previously testing.

It is out of one of these:
https://www.amazon.co.uk/gp/product/B01L1XAQAS/

Page 2 of 32 First 123412 ... Last

There are currently 3 users browsing this thread. (0 members and 3 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•