Measuring the flatness of a surface with a laser and a webcam to microns over large surfaces.

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 377

  • @BryanHoward
    @BryanHoward  ปีที่แล้ว +30

    See the update video on this: th-cam.com/video/9_YwvB7W1kM/w-d-xo.html I'm working on the laser side if this workflow by using a hard drive as a spinning reflector.
    Because of how image sensor technology has progressed, we can use that as the basis of a highly accurate measurement device. This tool works by reading the laser sensor’s intensity values on a webcam with its camera lens taken off. An image sensor off a typical $15 webcam is about 3mm wide and has a resolution of FHD (1920x1080). This means that each light sensor is in the range of 1-5 microns in size.
    The camera sensor is mounted at 90 degree angle so the wide direction is vertical. This gives a high coverage to sense the beam and also reduces power source based noise like PWM noise in switching power supplies.
    The laser beam can be a point or a preferred horizontal line (like in a self leveling laser that I am using). We take the mean of each row (ex 1080 pixels wide) reshaping the 2D image into a 1D array. We then take this 1D array and fit a gaussian curve to it to find the center point. Finally converting the pixel position into physical height from calculations based on the physical size of the sensor to its resolution.
    Further improvements reaching sub-pixel noise can be done by multisampling the results, smoothing out the luminosity noise in the 1D array, and removal of outliers by percentage.
    Adjusted sample location is done with linear regression and the deviation is the error from the fitted line.
    Links:
    Software sources files here:
    github.com/bhowiebkr/laser-level-webcam
    Released binaries of the tool here:
    github.com/bhowiebkr/laser-level-webcam/releases
    Original thread by the original creator of this workflow, the java tool and other resources (highly recommended reading)
    www.mycncuk.com/threads/12966-DIY-Laser-levelling-using-webcam-and-laser-level

    • @AccidentalScience
      @AccidentalScience ปีที่แล้ว

      Maybe it's written somewhere in the GitHub repository that I can't read from my mobile so forgive me if my question is redundant, but how does it reduce PWM noise?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +3

      @@AccidentalScience Webcam sensors read from top to bottom row-by-row. If you rotate the sensor on its side, any noise similar to PWM or mains transmission frequency doesn’t shift the luminosity to one side or another. It’ll get averaged out uniformly for that frame.
      This happens when converting the 2d image into the 1d luminosity array in the worker class github.com/bhowiebkr/laser-level-webcam/blob/dedd825f3080401046179c6e5afea68b8ed1395d/laser_level_tool/Workers.py#L132

    • @chargehanger
      @chargehanger ปีที่แล้ว +3

      you should perhaps slightly angle the sensor so to average out and interpolate the dead area etween pixels.

    • @TheStuartstardust
      @TheStuartstardust ปีที่แล้ว

      Instead of grinding to perfection, but just make it good enough - and then could it be shimmed? Or calibrated in sw using this method? I have a China CNC, and would like to get better precision, so this is super interesting! 👍👌Great work and thanks for releasing the info💪🙂

    • @Ritefita
      @Ritefita ปีที่แล้ว

      looks like linear sensor from scaner would work fine

  • @John-ro2yk
    @John-ro2yk ปีที่แล้ว +44

    Conceptually this is a clever idea, but I would suggest a number of things. First, watch a couple of Oxtools videos, one is "how thick is a Sharpie mark (spoiler, about 3 microns), another shows a surface plate being calibrated . You are tossing around microns rather cavalierly. A sheet of notebook paper is about 75 microns thick. There is overspray (or areas where you didn't fully remove the paint) and as you observed, the tube itself is warped transversely. At the very least I would clean off the tube a bit more and carefully clean the surface of the tube and your contact surface of your CMOS sensor. A spec of grit can be 50 microns, if that gets between the steel beam and your test sensor, you are just going to get garbage data.
    Next thing is why are you using a spinning laser? Seriously, use a single dot laser. I would not trust a spinning laser beam to remain stable, you are using something that was designed for mm accuracy, not micron accuracy. You can level your beam by taking a measurement close to the laser and one at the far end and adjust accordingly. In fact level is not really necessary for what you are doing, just that the beam is parallel to your laser beam.
    You are doing optical metrology and it would serve you well to read up a bit more to understand how much of this was done with autocollimators and telescopes. I would strongly suggest you do a sanity check on your readings by testing over a 3-4 inch section and check it against results you get with a decent straight edge and feeler gauges. You can also get a cheap dial indicator and mount it separate from the beam and put the indicator adjacent to the sensor and place a weight on the beam, when the beam deflects you should see it in the movement of the dial needle on the dial indicator, that should roughly correspond to what your sensor tells you. If not, I would examine your set up.
    Finally, I would replace your CMOS base with a budget 1-2-3 block, probably without the holes and also mount you sensor a little bit lower.
    I don't want to sound hyper critical, that is not my intent, in fact what intrigued me is your using a cheap sensor to locate the position of a laser beam, something I have a specific application for, so, thank you for this post and good luck.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +20

      I've seen his videos, there great.
      I haven't finished prepping the gantry and will be doing this off camera. This video was more of here's this idea of measuring, here's the Python tool, the workflow, my findings working with it, etc.
      I've tested this with a red point laser and it works fine. You can't use all the width of the sensor so the noise floor is higher.
      End goal is to use this on a custom made line laser so I can measure 2d points instead of being limited to a 1d line.
      These cheap import laser levels don't have any spinning parts to direct the beam. They use a conical reflector that I show in the video.
      Micron accuracy is achievable and measurable with this setup. While building the tool I was able to get repeatable measurements to around 0.4um with the both the green self leveling laser and the red pointer laser. Red pointer laser blows out the pixel values so it didn't make a good laser source for testing. In a more ideal setup Havering the diode current and voltage controlled is the way to go for controlling intensity on the sensor.
      Leveling the laser or the part to be measured does not need to be done actually. Just eyeballing it to make sure the projected beam is on the sensor at both ends is good. The software corrects for slope using linear regression.
      You don't need a very precise or sharp laser beam. On the sensor. Finding the center of the gaussian distribution of intensity values works very well as long as the laser intensity is not clipping. It can wonder around if it's chipped.
      I've done a bit but by no means an expert. Just a guy in his garage. I primarally write software in the VFX and game industries.
      An autocollimator, which is a great tool, is the wrong tool for this. I'm needing to measure change in height. Not angle. It can be done that way but is not the ideal tool.
      I've checked the setup on an 18" surface plate and it shows that things are working as expected. I don't have a longer flat reference than that so I cant compare it measuring that way against the gantry. Pretty much the whole drive of this was to find a good long way to make a flat reference.
      Unfortunately because the webcam sensor circuit board is so tall, in kinda stuck with it being so offset from the surface. The math works out to be just under 1um of error for a sensor to be 3" off the surface with a slope of 0.005"/1“ I'm fine with this for what I'm using it for, but other people wanting to build such a device may want higher accuracy.
      As mentioned the steel tube is not in any way flat, it dips alot in the middle so I opted to make a flat surface about the same width as the rails. I might change it up in the future if I'm measuring something different. Probably put 3 steel balls bearings on there. I was worried about the pitting in the steel to cause me problems hitting a low spots but the steel tube was in good shape enter taking the paint off.
      But yeah this was like writing a book! Lol I'm still working on the hardware and workflow. Figuring it out as I go. Building a new laser setup that will improve on many things from using the laser level, most importantly the wobble. Even the laser pointer held in a small vice wobbles by a measurable amount on the webcam sensor but the multi sampling and other filtering parts of the software do a good job cleaning up a lot of the noise.

    • @John-ro2yk
      @John-ro2yk ปีที่แล้ว +4

      @@BryanHoward It looks like you considered most of the issues. I didn't realize it was a non-spinning laser even though, you pointed it out in your video. Quarton makes some under $100 line laser's that are fairly nice and you have some options with angles and power, in this case reducing the intensity is probably helpful in preventing oversaturating the pixels. I suspect air currents are some of the cause of instability. Your overall approach is clever and effective, I was just pointing out some of the things that jumped out at me as possible sources of error.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +5

      @@John-ro2yk I’m actually in the middle of trying out a method of making a straight line with a fast spinning motor. See this test: th-cam.com/video/ipAGLxYf2KQ/w-d-xo.html Not 100% sure this will give me the results I'm looking for, but sofar looking promising.
      Using a computer hard drive motor because the runout is low. All things inherent to a motor setup like this like vibration, surface imperfections, even the runout all get averaged and blurred out because it’s in constant motion. A blurry line with no change is what I'm looking for. The gyroscopic effects of the motor spinning also self stabilize it from any wobble effects too. I need to do much more polishing on the motor’s cylinder as you can tell from the reflected light.
      Alignment of the laser to the cylinder is critical but can be done accurately using 3 points on a sufficiently big enough line using the same methods of taking 3 points on a 1d line. Keeping track of the error/offset of the middle point. Those 3 point references can then be used to calibrate the alignment of the laser to the cylinder by adjusting till the arc curve is removed.
      WIth the lowest powered objectives on my microscope 4x and 10x, here is what that reflector surface looks like th-cam.com/video/qUjAVUaILkI/w-d-xo.html at those optics I couldn’t see any machine marks, or any artifacts for that matter. I’m guessing the tip is turned and maybe cut with a diamond tip to get such an optical quality finish. I’m not sure how they make these things so precise. I couldn’t use any higher objective lens due to not being able to illuminate something that close. Even if I could, the DOF would be too great to make sense of things. Using a scanning electron microscope would be a better tool for checking the surface finish of this.
      The laser diode is a whole other story, the emitted raw dot is not a dot at all and more of the shape of a cat's eye iris. This will probably be the source of error on the projected line due to it being magnified more as it goes out.

    • @JohnSheerin
      @JohnSheerin ปีที่แล้ว +4

      @@BryanHoward Fyi, an autocollimator is the standard tool for this. You measure change in angle while stepping the target mirror along the surface you're measuring, then use trig to calculate the profile. The target mirror sits on a base with 3 feet, so you're getting the change in height of one end of the base with each measurement / calculation. It's similar to what you're doing just with an extra step of math. My autocollimator setup has about 0.02 microns of height resolution. I think the downside of using an autocollimator versus what you're doing is that error accumulates with the autocollimator as you move the mirror since each segment of the profile you're measuring is dependent on the previous segment. You can also use a laser interferometer with a dual beam path setup along with the same angle measurement technique to get the profile of a surface. That's possibly cheaper these days if you can't find a cheap used autocollimator. That might all be overkill for what you're doing though.
      Anyway, cool project! Thanks for making a video about it.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +12

      @@JohnSheerin With the autocollimator you basically have to check your measurements twice or more. Compare the profiles and if they don’t line up the data is invalid and you have to start over. The more samples also more acclimated drift. I like this method with the webcam sensor because the samples are direct and are not dependent on previous samples. Also comparatively cheap due to the cost of a quality autocollimator vs a $15 webcam and laser.
      If I ever got an autocollimator to play around with it’d be nice to compare the 2 methods, Having an autocollimator would be a very nice tool to have.

  • @gizmobowen
    @gizmobowen ปีที่แล้ว +59

    Very interesting. I've seen commercial equipment like this but it is prohibitively expensive. If you made a nice 3D printed enclosure for the camera part, with a cover to protect the sensor, you'd have basically the same thing for almost nothing. Thanks for sharing this and also working on the software. Looking forward to seeing how flat you can get it and how the grouting goes.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +20

      Yup, I would have printed some protection but don’t have any black filament on hand. I also need to make a hat for the 360 laser to act like a big barn door and only allow a sliver of a couple degrees of beam to come out. Would make it safer and be around and cut down on reflective noise on the sensor.
      There are lots that can be improved on the laser side. I’ve thought about taking the motor out of a 2.5” hard drive and putting a mirror on a 45 degree angle. Those motors have zero slop in them. Stick that in the line of the beam and you can get a near perfect 360 planer beam. Would be useful for aligning 2d surfaces like 2 Y axes to each other or other things.

    • @eduardodiaz5459
      @eduardodiaz5459 ปีที่แล้ว

      Agree.

    • @daynosdr
      @daynosdr ปีที่แล้ว

      I made one. With some features to remove any rotation of the base as flatness changes. Thinking about the best place to share the cad

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      @@daynosdr grabcad.com/ is a pretty good place for this kinda stuff

  • @chronokoks
    @chronokoks ปีที่แล้ว +3

    This is what everybody in machining from PROs to diy cnc amateurs have been waiting for. Interferometers (Renishaw) with which you can measure all kinds of parameters in machine geometry have been insanely expensive - so are digital or analog precision levels (not talking about typical machinist levels) . I already see tens of ways this can be improved and add things like measuring perpendicularity and etc - or even measuring relative deviations in 2 axes (you can measure if your axis moves in a straight line). Oh my god this is godsend. Share this video guys to everybody you know.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      I think with a split beam reflector there could be some pretty interesting measurement devices made for the cheap. I haven't got one currently but might look at this stuff in the future. Electronics and software is solved thing for many of these applications in DIY instruments. The cost of hardware is also coming down and a lot of these devices can be conceivably made very well in a DIY manner using such things as 3D printers and other DIY friendly manufacturing methods.

  • @repalmore
    @repalmore 2 วันที่ผ่านมา

    This is precisely what I'm needing. I'm not a meteorologist and don't want to spend $1500 for a autocollimator for a one time use. Thank you for sharing. ;o)

  • @sto2779
    @sto2779 ปีที่แล้ว +1

    Would like to mention, everything needs to be in a controlled and known manner for which the part that is being measured. For which the part (linear beam) it sits on needs to be known as flat as possible, else if the part moves in the future, it's flatness would change. This is a great way to measure flatness and scrape it flat without expensive tools. I guess adding some feets that can be adjusted might allow it to hold it's intended flatness. Whatever the part is resting on should be super flat, this is because if it is not, any twist or bow would be applied to the part and after scraping or moving the part it will mess with the results. Thanks for sharing this demonstration and explaining it.

  • @videostarish
    @videostarish ปีที่แล้ว +5

    Maybe instead of a bouncy laser level...use a laser-pointer held securely in a fixture. It won't be 'level', but will be straight. You could just put your sensor at one end, then to the other extreme end, & use a screw adjuster to bring to the same distance off the laser. 🙂

  • @carlemilsson6463
    @carlemilsson6463 ปีที่แล้ว +4

    I have not read all the comments, so maybe my thoughts are already written down. It is an interresting idea, I had a simillar idea a while ago, but sort of the other way around. A flat surface on a machine bed is of course nice. I suppose the beam will be securely mounted on the machine somehow and then it will be bent or distorted in a way or another. And the more you complete the machine, the heavier it will get, with more distortions. So I think it will be better to mount the sensor directly on to the linear carriges at a later stage and then do the neccesary corrections.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah a lot of the stuff is really new to me I don't have any background in lasers or optics. Somebody commented about trying a solid glass rod instead of a mirror. This might have better results. I'm also going to compare just sticking a small mirror on the top of the motor and see how the results compare.

  • @robertfontaine3650
    @robertfontaine3650 3 หลายเดือนก่อน

    I see plenty of criticisms by the pixel peeper but as a tool for showing relative flatness this is awesome. In the environment, with the tools you have, this should allow you to get as flat as practically possible outside of a clean room, temperature controlled etc etc environment.

  • @histufly
    @histufly หลายเดือนก่อน

    I have thought for a long time that this was a way to get flatness. The difference is that you have done it. Looks like it would be good for detecting seismic events.

  • @fredschimmel-k4z
    @fredschimmel-k4z 3 วันที่ผ่านมา

    At first: congratulations for your results without spending much money.
    I agree with previous advises to apply a line laser and mount it rigidly to the beam you want to measure. Create a way to fine-tune the beam parallel to the beam-surface, this prevents the first order linear correction. Further, apply a collimator to cut off light from other sources than just the laser beam that should hit the webcam. In my working period I have been dealing with measuring and manipluation of components with micron precision. In those projects I learned that with such precision, one cannot neglect anything, like in your case the influence of the weight of the webcam plus support and certainly the weight and the drag of the cable of the webcam.
    I just have finished a setup to measure relative displacements by similar components, a simple point laser (< $8.-), a lens (~$15.-), a linear CCD (3648x1pixel, 200x8um pixelsize,

  • @KarlMiller
    @KarlMiller ปีที่แล้ว +3

    Very cool! I can already imagine using this idea for true-ing a cnc frame.
    A couple of ideas:
    * 3d print a mount for the laser on one end of the tube & lock the laser at level so it doesn't keep self-leveling
    * automate the capture bt enclosing the sensor between two small boards for the entire length of the tube, then hook a string to the sensor and pull it with a small stepper or servo for predetermined amounts of distance and then have the software record at each stop.
    Loved the idea of fixing the deformations with screws and cementing in place with the filler. Of course that works better for low spots, unless you pull those spots down from a bottom bolt.

    • @chronokoks
      @chronokoks ปีที่แล้ว +1

      haha automating the process is a bit too much :D your hands won't fall off :D

    • @KarlMiller
      @KarlMiller ปีที่แล้ว

      @@chronokoks the issue I would address is not about the effort, but improving the granularity and determinism of the process.

    • @keithwins
      @keithwins ปีที่แล้ว +1

      @@KarlMiller check out my comment above, some similar ideas. And yes, truing a CNC frame was exactly one of the use cases on my mind.

  • @senorjp21
    @senorjp21 ปีที่แล้ว +4

    That is surprisingly accurate. You could make this wireless and mount it on a toolholder. That way you could measure the flatness of your axes as built and apply corrections to the gcode. 3D printers do "auto levelling" but I think it's actually auto tramming where it measures the print surface and then compensates for error in the flatness of the bed by adjusting the z height. A sloppy build could be compensated to the accuracy of your measuring system.

    • @JackieBright
      @JackieBright ปีที่แล้ว +1

      I'd bet you could mount a raspberry pi zero in the same footprint as the camera and then use a tiny OLED and a few buttons to make it a standalone unit, could even have it serve the whole gui as a webpage for more detail

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      I've thought about this early on in the making of the tool. Thinking about automating parts of the process into linuxCNC.
      You couldn't really on the z axis to place the sensor onto the surface but could make it spring loaded so it's pressed down. Similar to how you would do it when attaching a pen to a CNC and have consistent down force.
      Sending the whole sensor feed wireless is problematic. Using a raspberry Pi to process some of the data like turning the 2d image into the 1d luminosity array would significantly reduced the bandwidth where wireless would be feasible for real-time stream. The sensor image feed is no longer needed but could be sent in a highly compressed form and wouldn't compromise the data.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      I haven't tested it but the whole tool might run without much performance issues on a pi4 an long as PySide6 including the media modules are compatible with it. The tool is an Python so someone will probably try it.

  • @kwaaaa
    @kwaaaa ปีที่แล้ว +1

    Wow, learn something new from smart people everyday. Another item mentally cataloged for a future project. Thanks for sharing!

  • @bridgetshepherd5202
    @bridgetshepherd5202 ปีที่แล้ว +24

    Very cool! Do you think you can increase the precision by tilting the sensor at an angle, so that the same number of pixels covers a smaller distance? 60 degrees off vertical could hypothetically cut your step length in half, at the cost of half your range.
    Maybe also try passing the beam through a slit to clean it up a bit.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +13

      I've been working on a new laser setup and shining it through two razor blades to clean it up after it comes out of the diode. Lowering the height of the sensor closer to the surface helps with the minute error due to slope.

    • @bridgetshepherd5202
      @bridgetshepherd5202 ปีที่แล้ว +11

      @@BryanHoward oh, I meant you could tilt the sensor *intentionally* to get better resolution. If the same 3um covers two pixels instead of one, you could get more precise measurements.
      Also it just occurred to me, if you put the sensor on three points instead if a block, you could possibly avoid the work of flattening the bottom surface.

    • @larrybud
      @larrybud ปีที่แล้ว +7

      I was about to say the opposite! I think the beam would refract in the protective glass over the sensor if at an angle.

  • @dw0r
    @dw0r ปีที่แล้ว

    I have a laser pointer mounted on my QCTP right now because I was musing on how to measure my way deflection. I'm really glad I found your video, you've got most the leg work done already!

  • @Bob_Adkins
    @Bob_Adkins ปีที่แล้ว

    Very inventive and smart use of cheap technology! Measuring flatness from a non-flat surface must take a lot of patience and throw a lot of doubt on the whole process at times! The moving metal base alone probably causes a lot of repeatability error and tail-chasing!

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Well the trouble of going to this is because I found cutting metal on the CNC machine and you want things to fit, will, metal isn't going to bend like wood will to make it fit.

  • @RogerBarraud
    @RogerBarraud ปีที่แล้ว +1

    Congrats on your nice new seismometer ;-)

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      With the self-leveling laser works pretty damn good at that. Could be the basis of a home alarm system too as it detects anybody moving in the house.

  • @JM-iq8qc
    @JM-iq8qc ปีที่แล้ว +4

    I would love to see a collaboration with you, ROBRENZ, and/or Oxtools. There is a common thread of clever and knowledgeable problem solving amongst the three of you. I would suspect that combining the particular specialties of each would result in some very interesting results. Perhaps there is a combination of economical components that could result in metrology devices for diverse applications far exceeding current options. There is definitely a niche for the gap in options between expensive professional equipment and hobby level equipment.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Those guys certainly have an edge on me when it comes to machining capabilities and I've learned a ton by watching their videos. There is a lot these types of problems that can be solved by hijacking hardware and electronics and hooking them up to a computer.

  • @paulfblackburn
    @paulfblackburn ปีที่แล้ว +1

    Silly question and it may have been covered, if you tilted the sensor ( not the base because that should be flat) and measured the detection across the vertically tilted pixel set you would get a scale where you can verify in a different way, would you lose your mean but you may be able to get a more refined value, you would have to calibrate but would be interesting. Great solution

  • @richardjones38
    @richardjones38 ปีที่แล้ว +6

    Interesting technique and clever software. I definitely think you're right to consider how planar the laser light really is or isn't with cheap lasers. I used a (very cheap) line laser a few years ago, and discovered it's last 'plane' was not planar, but conical, by quite a bit! Over short distances it wasn't very noticeable for what I was doing, but where the beam shot past what I was doing onto the wall about 8m away, the line was noticeably curved. Obviously at first I assumed it must be the wall which isn't flat. However, a bit of experimenting later (aligning it with a steel beam in the all which i could look along and see it was pretty straight) showed that the laser 'plane' wasn't anywhere near planar. Over about 10m, the smallest misalignment I could get the 'plane' to align with the beam was something like 100mm! Then turning the laser upside down, the closest I could get was about 100mm out in the opposite direction. It was a 'line lens' type rather than a rotary laser level.
    Could the red laser being less successful be due to the camera sensors being twice as sensitive to greens as reds, rather then infra red? If I remember right, don't webcam CCD's have twice as many green sensors as red or blue, to simulate the way our our eyes detect colour?
    It'll be interesting to see how it does or doesn't retain the shape once filled with grout. When measuring to microns, and filling the gap between the tubes with something heavy, the weight of the infill and how the tube is supported while it cures is bound to change the shape.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      All very good points. I wouldn't trust the import laser levels to produce a sufficiently flat line in order to do two dimensional point measurements. I'm so far limiting the setup just to be a one-dimensional straight line by having the axes to be measured to be in line with the laser so I'm just using the laser as you would a point laser.
      Working on a new laser emitter with some big changes to improve the line. I think I found a reliable way of making a very straight line with these cheap diode lasers.
      With a setup I should be able to do two-dimensional point measurements on a surface and get reliable results back.
      For the gantry I'm expecting it to move around a bunch when all the grout is filled into it. Gravity will have an effect and also curing will probably change it in some way while it dries. I'll go back over a second time and probably use epoxy replication method to make the final surface for the rails.

    • @richardjones38
      @richardjones38 ปีที่แล้ว

      @@BryanHoward I searched for a sensibly priced proper optical rod lens to split the beam into an actual plane, rather than the wavy plastic line lens in my cheap diode lasers, but didn't find one. They were always insanely expensive. I bought a small helium neon laser which came up on eBay, hoping it's beam would be rounder than diode lasers, to use if I found a rod lens, but without knowing what its output power was. I only turned it on once, firing it out of the window in the middle of the night at a distant hill (probably not the best idea) to see how far the beam went. It was many times brighter than my cheap 3mW diode laser so I sold it on. Reluctantly because I'd wanted a laser as a kid, before diode lasers cost next to nothing, and having a 'proper' laser seemed cool. But ultimately it was dangerous, and of no use.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      @@richardjones38 Even this extracted green laser is ridiculously bright as a single beam. I have it current and voltage controlled so it’s just over the minimum power limit before it shuts off. I’m going to shoot the beam through 2 razors a couple inches away from the laser diode. It should cleanup and give me an initial clean line dot to work from.
      I don’t know much about lasers and haven't worked with them, their types, but it seems like the cheap laser diodes are getting more powerful these days. I’m seeing laser cutters commonly having 20w laser diodes in them now.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      @@richardjones38 I’ve seen that very video and find it quite comical. I bet most of these consumer grade devices coming from china are using higher than rated class lasers. From the customer’s perspective in reviews, they’ll be quick to comment that this laser has a much brighter beam than the dewalt one. In reality it’s because the chinese one is largely unregulated while the dewalt ones are.
      The cheap laser cutter cnc’s that are out there all come with these “protective eyewear”. Some aren’t even the same color of glasses for the given wavelength. I’ve flashed myself the odd time with auto darkening TIG welding hoods and it hits you in your sole it’s so bright. I couldn’t imagine what a focused beam from a laser cutter would feel like.

    • @richardjones38
      @richardjones38 ปีที่แล้ว +1

      @@BryanHoward It's not directly relevant to your laser measuring, but have you seen the video on laser microjet cutting, on a channel called ESSEL Engineering? The video is rather annoying as it's part in English, part in Hindi, but the technique is so clever. It uses a microscopic jet of water as a wave guide / 'fibre optic' to effectively keep the cutting laser beam focused over 100mm, and apparently achieve a kerf width of 20-80Nm. Apparently it's been around since the '90's, but I'd never heard of it before.

  • @ashort01
    @ashort01 ปีที่แล้ว +10

    Looks interesting. I noted that you touched the metal plates of the sensor each time which could transfer enough heat into them to introduce some error into your measurements. Perhaps some kind of 3d printed handle or enclosure or similar you can use to hold it instead?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +12

      It would for sure. Temperature is playing a big factor in getting down to 1um. Everything has to be running warmed up for a while and the environment can’t be changing temps. I find it pretty cool that this setup of the absolute cheapest repurposed things can measure to a resolution that the temperature becomes one of the main sources of error.
      After making the video, even though I let the webcam sensor warm up for a good while, I didn’t think about the temperature inside of the garage. It's winter and the garage is insulated but cold. I didn’t have the heater on, but just by being in the garage for an hour I would have been warming up everything. Next time I run this when I fix the laser wobble, I’ll warm up the garage for an hour so the measurements don’t keep on drifting by ~1um/second

  • @andybrice2711
    @andybrice2711 ปีที่แล้ว +2

    I just bought a "Huepar" laser level from Amazon. I can't speak to the long-term durability yet. But the design of the tool is really impressive. Chinese manufacturers don't seem to skimp on features.

  • @AccidentalScience
    @AccidentalScience ปีที่แล้ว +1

    This is really interesting. I had a similar idea but thought the laser would have had a too coarse beam so I skipped to give it a try. Your test proof that it could be accurate indeed. Great job.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      Yeah as long as all the beam lands on the sensor, the center of it can be calculated to a high degree of accuracy.

    • @AccidentalScience
      @AccidentalScience ปีที่แล้ว

      @@BryanHoward that would have been greatly helpful in checking the ways of my diy lathe. I regret not having tried it.
      I think you would need some sort of collimator though, it would prevent the possibility of orthogonal errors. As it is now there's nothing that discriminates on reading a tilt in place of a variation in height. With a collimator, or better an auto-collimator in this case, the tilt is excluded allowing the measurement of the variation in height only ...I think.

  • @mrrberger
    @mrrberger ปีที่แล้ว

    A readout on the sensor module would for most be the practical position. Reading data is knowledge but doing something with it is progress. Most times people are checking for planar correctness, they're adjusting at the point of reading.

  • @EnricoGolfettoMasella
    @EnricoGolfettoMasella ปีที่แล้ว +1

    Ohh, genius stuff! It got me an idea to solve a similar levelling problem I’m having! Thank you so much for sharing it! 🙏🏼

  • @jcco1973
    @jcco1973 8 หลายเดือนก่อน

    First thing I think about... If we talking about um mesurements - I'm afraid we can get distortion even from the camera's cable that stuked on 6:15, pulled the plastic printed flange of the cam and bend itself making the cam to bow to the laser. I think (not sure, just thinking...) may be mount bracket sould be more rigid. I'm not try to getting bored 🙂
    You made cool video (and tool), I'm just going to face with the same task and your solution is inspiring. I believe it will very helpful! Thank you!

  • @AndyRRR0791
    @AndyRRR0791 ปีที่แล้ว +3

    Interesting idea. I think maybe a laser pointer might be a better line source. Is the warmup thermal distortion of the laser level casing? Your concrete fill will also distort your tube so you might want to revisit this exercise when you've got a more-or-less completed beam.

  • @benargee
    @benargee ปีที่แล้ว +1

    Very good. To mitigate laser vibration you could try mounting the laser to a heavy item to give it more inertia. Might then put that on a damping material so that vibration can transmit to it.

    • @geekoid183
      @geekoid183 8 หลายเดือนก่อน

      That's a great suggestion.

  • @robertlitman2661
    @robertlitman2661 ปีที่แล้ว +1

    What you're doing to find the center of the laser beam to a much finer degree of sensitivity than just looking at the full beam is how LIGO works. Well done!
    Two tips. Lasers disperse over distance. Having your laser at one end of the beam will give you a much wider laser beam at one end than the other. You would be better off having your laser offset from the middle of the beam. Also, rather than grinding your sensor base flat, it would be better if it made contact at three points. I would drill three dimples and glue on three ball bearings.

    • @chronokoks
      @chronokoks ปีที่แล้ว

      even when the beam gets wider the software can still find the peak intensity spot so in theory you didn't loose that much accuracy.

  • @RoboCNCnl
    @RoboCNCnl 10 หลายเดือนก่อน +1

    Really awesome stuff !

  • @justtesting555
    @justtesting555 ปีที่แล้ว +2

    Very cool. You could use a green laser line module. They draw a laser Line with lenses and won’t suffer the wiggle your spinning laser has. It also has adjustments in the lens to make the laser beam smaller or wider widths.

    • @JMMC1005
      @JMMC1005 ปีที่แล้ว +2

      There is no guarantee that the laser line lens is accurate, however. Though this might not matter too much unless you're measuring a 2D plane.
      Note that the wobbling is due to the laser using a pendulum system to obtain a level line, and not due to something spinning. These laser levels generally use a lens or conical mirror to generate the line.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      These 360 degree lasers actually produced the line by reflecting it off a conical mirror pointing at it. I looked at one I took off the laser level under the microscope and they are very well made. Optical quality, no machine masks. I presume most of the inaccuracies of these laser levels are because of the laser diode itself. The dot coming out of the diode is usually an oval for the shape of a cat's eye Iris in the case of the one I took off. Here's a video of what it looks like th-cam.com/video/qUjAVUaILkI/w-d-xo.html

  • @nodriveknowitall702
    @nodriveknowitall702 ปีที่แล้ว

    This is awesome. There are lots of things addressed in the comments as well. What does it matter that it's not an autocollimator? It could be made to serve as one with a little work and a few more dollars.
    Seeems like one could cobble something together with some mirrors and a precision ground level vial and end up with something that could rival a very costly, high resolution level as well.

  • @ryanmcintosh6714
    @ryanmcintosh6714 ปีที่แล้ว

    Better watch out for those C'n'Ds, bud. Big LASER alignment might come gunning for you!
    Personally, I really appreciate that you posted this because I was just looking at a +$50k laser alignment rig for a charity that is producing memorials for vets and I was just floored by how opaque the science was on what made these rigs so expensive. I was told all sorts of ramble about proprietary filters and collimation - it looks like what you're doing here could be expanded on very easily with:
    a) a diffraction grating and
    b) two emitters making up a primitive comb filter
    to get nearly the same repeatability as the best offerings of commercial vendors.
    Of course, you don't know if your laser level is out of calibration but that's trivial to verify with a 100ft garden hose.
    Orientation of your detector to emitter is the biggest problem you will have in measuring flatness. I am working on ToF with improvements via diffraction gratings and interferometer and I never thought of using a web cam!

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      The orientation of the laser to the sensor doesn't really matter because I'm using linear regression to correct all that. You never want to try and align everything cuz you'll never be able to get it that accurate even with proper master precision level and surface plate.
      What the software does with regression is to fit a line through all the points and it gives you the error value which ends up being the offset from that virtual line. It's hard to describe in words far easier to understand with an image from Google showing what linear regression does.
      I'm currently working on a version using a second webcam. What the second webcam does is allow me to get local slope which the tool does not count for. If you're doing fine measurements already the slope only counts for like 1% or about less than one micron but it's good to cover every source of error.
      A professional version of this tool would cost a lot just because there's not a lot of demand for the stuff.

    • @ryanmcintosh6714
      @ryanmcintosh6714 ปีที่แล้ว

      @@BryanHoward By second webcam, do you mean one detector at either end and the emitter(s) (I presume it's using a spinning mirror?) in the middle? That's a pretty good idea. Then it doesn't matter what their absolute height is - just relative, which is easy enough to measure by putting them next to each other. Elegant - I like it. Do you plan on putting anything on GIT hub? It seems straightforward enough using Matplotlib or whathaveyou. Always nice too see someone else's implementation, though!
      There is a surprising amount of demand for this type of thing in industrial belt and shaft alignment. Some work on a chassis (commercial units typically use a precision roller chain for clamping) and some filtering to reduce dispersion noise and you may have a good product on your hands. Most customers of laser alignment gear just rent it and don't need anywhere near the precision - they'd be fine with a go/no-go and an o'clock to hit whatever they're aligning with a pipe wrench ;-)

  • @pieterveenders9793
    @pieterveenders9793 10 หลายเดือนก่อน

    Seeing as lasers can measure distances at micrometer accuracy as well if used correctly (if I remember you need a pulsed laser for it), you could even automate the process by mounting the laser on one lineair rail carriage, and the webcame with its sensor on the other carriage mounted to the same rail. All you need to do is tweak some lines of code so that it does both distance measurement and flatness measurement and plots both values to Excel, then plot that to a graph with distance on the X axis and deviation from flatness on the Y axis!

  • @Keechization
    @Keechization ปีที่แล้ว

    i think this is an amazing tool. my approach for getting the rail straight however would focus a lot more on the assembled, final rail than the naked girder without the linear rail installed and torqued; get your girder preformed within +-25um (one thousandth), then get yourself some half-thou shim stock and a pair of scissors and get your linear rails on there. torque the thing down, get your numbers, cut your shim, reinstall, re-check. not sure how the epoxy setup is going to be worth the trouble when you can bolt down solid over brass or stainless.

  • @aware2action
    @aware2action ปีที่แล้ว

    Measuring flatness to micron level using inexpensive methods is very interesting❤ 👍. I also think the techniques could be useful in the production of holograms, that need absolutely zero vibrations along with precise alignment of laser paths before creation of the intereference pattern. Just some 💭

  • @brothertyler
    @brothertyler ปีที่แล้ว

    Nice I have a newborn as well and it's a deal alright. God bless and keep having them.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      My second one. I wish they gave me an instruction manual the first time around.

  • @fe6646
    @fe6646 ปีที่แล้ว +1

    Brilliant. You have to make a video of the python coding and GUI.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I might do some stuff with python and Qt. This tool has pretty good documentation doc strings and all. Comments throughout the stuff that is less clear.
      See also my simple note editor too on GitHub. It's pyside6 with custom widgets to make a node editor.

  • @repalmore
    @repalmore 2 วันที่ผ่านมา

    I don't know if this would help the laser stability but maybe a piece of foam and some pavers. The foam would isolate the pavers from where it is "mounted" and the pavers would give mass to set the laser on. Maybe it would help?

  • @sparkyy0007
    @sparkyy0007 ปีที่แล้ว

    If your displays not clipping when your heart beats in linear mode, it's just not sensitive enough....lol
    If you havn't already, check out the flatness setups the guys use lapping granite ref surfaces using percision retroreflectors.
    Awesome job dude !

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Lol I swear when I was testing the tool in the house on a wood table I'm convinced it was picking up my heartbeat as I was on the couch.
      As a side use using a laser level in one corner of the room and having the webcam sensor and the other corner. Makes a very good burglar detector. It'll pick up any movement in a house.

  • @seanmcdonald656
    @seanmcdonald656 ปีที่แล้ว +1

    Fantastic video. Thank you for sharing this great new tool

  • @sivik_777
    @sivik_777 ปีที่แล้ว

    Надо опору не плоскую использовать, а два ролика как в измерительных уровнях. Вообще идея отличная

  • @capcloud
    @capcloud ปีที่แล้ว +1

    This is beautiful, thanks for sharing.

  • @teropiispala2576
    @teropiispala2576 ปีที่แล้ว +1

    Interesting setup. I was once thinking to make one but didn’t, because I thought it’s not going to be accurate enough. I’d need to take absolute measurements from my lathe, which is pretty difficult other ways.
    Now when someone else have made the job, I’ll try.
    I was worried there would be some systematic error because the beam is spreading and all rays are not coaxial in cheap lasers.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      The beam spreads out a little bit but that doesn’t matter because fitting the gaussian distribution finds the center regardless how wide it becomes.
      The laser side still needs work. When I get around to it, I’ll try this out with a powell lens as a line generator. The sensor size works great. I have some ideas on measuring the localized slope which might add a small bit of error if your surface is out by a lot (the closer the slope is to zero the less it matters)
      For the precision of measuring I need for my gantry, the laser level works totally fine. Even the wobble which accounts to most of the issues due to it moving +-10um up and down on the sensor gets reduced by a significant amount after multisampling.
      On a lathe, I’d look into directly working with a powell lens and no self leveling on the laser. This should greatly improve the laser side of things.

  • @robertfontaine3650
    @robertfontaine3650 3 หลายเดือนก่อน

    awesome. laser level and webcam... Yes.

  • @sourabhkumawat4863
    @sourabhkumawat4863 ปีที่แล้ว +1

    Damnnn....you blew my mind like a volcano

  • @BuildItAnyway
    @BuildItAnyway ปีที่แล้ว

    Simple but effective technique, I like it!

  • @lohikarhu734
    @lohikarhu734 ปีที่แล้ว +1

    something...is bugging me about this setup...I worked on some quite precise stuff about 30 years ago...with cameras, sub-pixel software, et al...my head's a bit fuzzy today, will try to think about this a bit more...great basic plan!

  • @giles5966
    @giles5966 ปีที่แล้ว

    Excuse me if this is just stupid: If the laser level autolevel is on, I would suggest locking it. Some of that noise may be the autolevel feedback and one ought to be able to autolevel it in situ and then lock it. Even if it's bumped a bit when doing that well you'll have a linear error in your data, that's way better than noise. It did seem apparent that the laser line was jittering so when that's sorted it'll be quite good.

  • @ianloy1854
    @ianloy1854 ปีที่แล้ว

    Awesome what your doing - and the info on what came before.
    FYI Windows reports V0.3.2.exe has a virus detected.....

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I changed the releases page with more info. It's a false positive and I'm going to remove the pre compiled binaries on future releases due to there being no way to fix the false positive virus detection. I would suggest you run it as Python instead.

  • @larrybud
    @larrybud ปีที่แล้ว

    A button on the laser to trigger a sample would be useful. Beep before/after the sample is taken so you can do this "remotely". Then add a battery and some wifi and it's completely wireless.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      There's a lot of data to transfer wirelessly. An alternative method if you want to do is a wireless setup such as that you split up part of the code so you convert the Raw sensor feed to the luminosity array on a raspberry Pi on the sensor. That way you're greatly reducing the amount of bandwidth you need and wireless becomes very viable. The sensor feed can also then be highly compressed and sent as well that way you don't need to worry about sending the Raw feed and having it slow down the sub sampling.

    • @larrybud
      @larrybud ปีที่แล้ว

      @@BryanHoward Why so much data? What kind of sampling rate are you running?
      Wireless webcams run all the time without bandwidth issues, so I'm not sure why this would be any different.. In addition, if you had it so it only transmits when triggered, it wouldn't have to be continuous.
      Cool idea!

  • @markrumrey790
    @markrumrey790 ปีที่แล้ว

    Your laser more than likely is not level with your part, setting Z=1 and adjusting Z=21 both to zero you would then have your laser leveled to the specimen and be able to determine the variance in your part over its full length; also connecting your laser physically to your part would remove your vibration. Also when we use our Faro Laser we use and spherical end-effector set into a magnetic cup to remove variances in the surface, the magnetic cups were placed at each sample point and not removed or moved until sampling was completed. we also used an off-specimen reference cup that would provide a reference point to calibrate all of the other data points and allow for dimensional accuracy. Granted we are inspecting the Aero profile of a 56.9-meter wind blade but the methodology is basically the same. Great project good luck!

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Thanks for the info I'll read up onto the stuff. A lot of this with the optics and lasers is very new to me and I have no idea how it's used in a professional environment.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      I'd love to find a good resource that breaks down a lot of optical and laser-based instruments in layman's terms. I think a lot of stuff out there can be easily DIYed now thanks to 3D printers, cheap laser cutters, accessible CNC machines I can cut metal and the abundance of cheap components online.

    • @markrumrey790
      @markrumrey790 ปีที่แล้ว

      @@BryanHoward The Faro optical laser systems work a bit differently as they reflect a beam from a prismatic SMR unit back to the transmitting station measuring the travel time and angle of reflection to an accuracy of 0.000278 degrees and ours is accurate to around .1mm at 180 feet 0.015mm at 6 feet. your method is a very clever idea as long as you can reference your laser base plane to all of your data points. That's why I suggested setting up two base points near and far on your specimen and using that as your laser reference plane to ensure that your data points can give you useful information. I've been in quality control for close to 40 years and have had to qualify these systems for some of the major players in the wind turbine industry, and I'd have to say that your innovative use of a webcam sensor is extremely clever and I would be interested to see how your project comes out

    • @chronokoks
      @chronokoks ปีที่แล้ว

      @@markrumrey790 I'm very confused by the wording in your reply. What do you mean by leveling the specimen to laser to get "the variance"? He already uses linear regression to figure out the "variance" across all length. What do you mean by "end-effector" - term normally use mostly in robotics?? The spheres at which laser from a tracker is aimed are called retro-reflectors, SMR or etc - not end-effectors. Also which FARO product uses TOF? I thought FARO mostly went with phase-shift detection. I'm super confused. I worked with Leica and Creaform products so I'm not new to the inspection world and i'm still confused so please correct me.

    • @markrumrey790
      @markrumrey790 ปีที่แล้ว

      @@chronokoks
      Nothing to correct; when we have to perform a scan of a 186-foot-long wind blade we have to reference data points that are not associated with the part that we are scanning. There are two reasons for this, first, we need stationary reference points so that the tracker if needing to be moved can reference these points, second these reference points provide a stable reference location so that our Metrology Software can build the blade and compare it to the Catia model that our customers provide. long story short that's just the way we do it. You are in a great field that has unbelievable potential in a very broad range of industries and I hope that helps clear up any confusion I may have added to Bryans's project.

  • @jamesmanoni
    @jamesmanoni ปีที่แล้ว

    Temperature is a huge factor in testing for straightness; I spent ages scraping in an old lathe with the aid of a optical autocollimator and over the period of a warm day the bed would go concave 30um then 30-40um convex! Eventually I gave up. Also the material will flex a huge amount just by removing a small amount of material. I think you should modify the bottom of your webcam fixture so it is sitting on 3 points, will eliminate some error.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Yeah I'm finding temperature to be a huge factor even thought about putting a heating element on the sensor side just to get it warmed up so ambient temperatures don't have much of an effect on it. I'll probably do that when I make an all-metal version. I'll be adding three points, also plan on doing a two sensor setup which will calculate the slope as well. Similar to an autocollimator.

  • @sdfglkjhdfkjdhldskfj
    @sdfglkjhdfkjdhldskfj ปีที่แล้ว

    So if you automated this, you could use it to adjust the height of a cutter and produce a super-flat beam.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      In theory yes but I don’t think it’d be practical. At least not on a machine like mine. My machine doesn’t have the mass and temperature control to be able to hit these dimensions consistently.

  • @jt6802
    @jt6802 ปีที่แล้ว

    To maintain the position of the block you could use a jig that would drop into the rail screw holes. 3d jig that goes around your block and into the two pins would improve the repeatability.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I actually need to put bolts and all those holes so I can push the little spots up so I'll be measuring between holes.

    • @jt6802
      @jt6802 ปีที่แล้ว

      @@BryanHoward Set scews below the surface may be more convenient? (won't get in the way of putting a level or straight edge) Or simply design the jig to fit around heads. Any jig should help your repeatability and simplify measurements. Have you considered how you will achieve straightness? There are several videos of using screws pressing against a small rod to dial in rail straightness using screw pressure against the rod.
      I'm in the middle of a router build with some similarities. (using cast iron table tops set into precision grout) I hope to be doing final grinds on the sides this week and pouring next week. I have had some problems with the sides (three cut cut up tables bolted and epoxied together) I temporarily mounted some 45mm rails so I can grind the 1500mm rail surfaces of each side on a small mill. After that, I will place the ground surfaces on a big surface plate for the upside down pour and hope the cure doesn't change the rail surfaces. You might want to consider something similar. Temporarily mount your rails to side of the beam and attach a grinder to your beam to grind in place. If you don't have a flat surface for your rails (lengthwise and side to side) you aren't going to get rigidity an micron resolution.

  • @der.Schtefan
    @der.Schtefan ปีที่แล้ว +1

    This reminds me of Rick & Morty. Were you able to go back go normal level, after experiencing "true level"?

  • @Chris-oj7ro
    @Chris-oj7ro ปีที่แล้ว +1

    You're a pretty smart dude!

  • @CHIPLOAD
    @CHIPLOAD ปีที่แล้ว +7

    This is absolutely brilliant! I was looking for a solution like that while building my CNC machine but haven't gotten far. I will definately try this method on the next build. Thanks!

    • @TheDIMONART
      @TheDIMONART ปีที่แล้ว

      At least, you have a perfect surface!! Great lathe, by the way))

  • @eduardodiaz5459
    @eduardodiaz5459 ปีที่แล้ว

    As the man that predicted Elon Musk B-).
    I can tell you that your work has a lot of aplication (and a great business potential) in construction of houses and buildings.
    The cost of current tools to make a plane floor (any size) are quite prohibitive. You could make some cheap tools to do the job (those tools that use the civil engineers) but now affordable for everyone.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Yeah I think a lot of specialized expensive tools can be reverse engineered with the ability of all the modern DIY friendly tools that are out there. 3D printers, laser cutters, CNC machines, and the abundance of cheap components found online.
      It's understandable that a lot of these instruments are prohibitively expensive due to the limited mainstream applications of them but I think as time goes on people are starting to need such devices for everyday use as technology advances.

  • @jp8479
    @jp8479 ปีที่แล้ว +1

    I was wondering the other day why is it that nobody had created a little cube sensor that you move around and place on the 4 corners of a table surface, and with the use of any self-level laser, it can help you level the surface with really good accuracy. No different that the grading lasers used in heavy construction where they bip when in line whit the laser, but more compact. This thought came as I wanted two level two table coplanar to each other.
    and now I come across this video which I may want to try. I guess I need to figure out basic Python skill to be able to run your program first. Thanks for sharing

    • @chronokoks
      @chronokoks ปีที่แล้ว

      there are binaries available :)

  • @excitedbox5705
    @excitedbox5705 ปีที่แล้ว

    If you take a laser pointer and put it on a longer sled and put the webcam far away you can increase your accuracy to sub atomic levels. Just like a rifle when you move a tiny bit your target point moves a much larger amount. This means if the sled is tilted the point on the webcam the laser hits will be higher the further away it is. This method measures the height difference between the front and back of the sled though instead of measuring the absolute height of the sled. It can still be used to measure the flatness of a surface though.

    • @car9167
      @car9167 ปีที่แล้ว

      Not sure if that works. He should have zeroed the leftmost and rightmost end to the same level with the laser and then measure the points in between. If the laser is far away the light will diverge and not focus that well. Laser far away will not help here. It would help if he's using angles and a laser at a distance with a certain angle gives you a larger distance from a zero

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Having anything level is not required. The laser line blurring out over distance is also not an issue because we're taking the gaussian distribution and finding the center point of it.

  • @lucascostanzo8368
    @lucascostanzo8368 8 หลายเดือนก่อน

    Very interesting, actually Hamar lasers works like that, thuogh very expensive, I'l sujest to lock the self leveling and work out the slope removal with the software

  • @zombieregime
    @zombieregime ปีที่แล้ว

    Instead of a floating laser shining onto I assume a spinning mirror, try a stationary laser shining through a wine glass stem. You dont want anything not locked down, even that laser gimbal. At least stuff some paper towel in it to keep that mechanism from swinging around( I do this with a red laser stud finder when I need a line that isnt horizontal). But this is cool! Im gonna have to dig out one of my old webcam guts and try this!

  • @jimsvideos7201
    @jimsvideos7201 18 วันที่ผ่านมา

    Brilliant.

  • @huaweiphone4357
    @huaweiphone4357 11 หลายเดือนก่อน

    Interesting method, thanks for sharing!

  • @1kreature
    @1kreature ปีที่แล้ว

    This is just lovely, but I wonder if you could have just used a point laser or a pointlaser with a line-lens on it to widen out the beam for the cmos sensor a bit. That way the shakiness would be much less and it would cost $1.

  • @Luke-Barrett
    @Luke-Barrett ปีที่แล้ว

    This is cool! I don't even have a need for this but now I am think maybe I should.

  • @stefanguiton
    @stefanguiton หลายเดือนก่อน

    Excellent

  • @lawmate
    @lawmate ปีที่แล้ว

    Awesome job. I think you'll have a job using your screw method to aim for flatness as the screws will not move each spot independently. Each screw will have an effect on the whole piece. Maybe better to leave it in a relaxed state and scrape/abrade each spot on it's own. Once you've got a good average flatness, you can also use the linear rail to spot for contact. Good surface contact helps rigidity.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Very likely and also filling in with grout is probably going to move things around as well as it solidifies. For doing the ground all I really care about is getting the really large deformations out of the beam. After the grout I'll do epoxy replication transfer method and then test and verify the flatness and scrape if necessary. If I can get 10 to 20 microns of flatness I'll be happy. No way I'll be able to get down to want to microns.
      Mostly pushing the resolution and accuracy of the system is for benefit of others that I want to try it. Currently right now I have no need to measure anything down to these levels but it's entirely doable with this method.

  • @terencem9962
    @terencem9962 ปีที่แล้ว

    Wow, Bryan, just came across this and had to subscribe. Thanks for the video and the files - I am definitely going to give it a try in the near future.
    Thanks for sharing

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      I'm trying out a new idea for an improved laser line emitter that should in theory make a better line. I'll make an update on this once it's further along.

    • @terencem9962
      @terencem9962 ปีที่แล้ว

      @@BryanHoward Awesome!

  • @keronGR
    @keronGR ปีที่แล้ว

    There is a similar build, which u are surely aware of. His channel is named quadzuka and he uses a fishing line and a cheap usb microscope. I have managed to achieve flatness with max deviation of 0.12mm on steel frame cnc with cheap chinese rails, which are bent from factory.... Anyway, will try ur method as well and give a review on my thoughts. Well done so far, because ur method is quicker than aligning fishing line and webcam....

    • @keronGR
      @keronGR ปีที่แล้ว +1

      This is the link. He uses the method for rail straightness, I invert the camera and use it for rail flatness
      th-cam.com/video/us2mTcvHHOw/w-d-xo.html

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Looks good yeah some other people have used a stretched metal wire.

    • @keronGR
      @keronGR ปีที่แล้ว

      ​@@BryanHoward same thing. So, for your method I need a cheap laser level and a webcam? I have purchased the cheap chinesium USB microscope; won't do the same work as webcam???

    • @chronokoks
      @chronokoks ปีที่แล้ว

      Linear rails are always a bit bent. They "unbend" themselves when you mount them to a flat surface and you put also put pressure on them perpendiculary against a milled edge :)))

    • @keronGR
      @keronGR ปีที่แล้ว +1

      @@chronokoks no shit sherlock, we know that. Not anyone can spend 200+ EUR to get a milled edge. This solution achieves flatness measurement everywhere

  • @MetalWorkerTools
    @MetalWorkerTools ปีที่แล้ว

    Great Idea and well explained, I really like it.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Thank you very much!

  • @seabreezecoffeeroasters7994
    @seabreezecoffeeroasters7994 ปีที่แล้ว +2

    Might be a good option to use something like a 123 block as your frame to more rigidly bolt the sensor too and remove any wobble and flex introduced in the 3D print from cable drag. I have a longer term project for my third CNC 🤦‍♂to make a 1/2 sheet one and the plan was to base it on 100mm heavy wall steel. I am still mulling welding a thicker base for the rails to the Upper side then milling it flat, either way this will help out. Great Project 👍

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      The 3d printed plastic part doesn’t deform enough to have any realistic effect on the measurements. When you do the math for a slope of 0.005"/1" with a sensor 3” tall you get less than a micron of change. Due to the infill on the 3d printed plastic mount, it’s insulated well from thermal expansion having much of an effect when I touch it. I have not measured all this but I’m suspecting touching the metal block would have more thermal expansion affecting it due to its heat conductivity. I’ve found the webcam sensor drifts about 20um until it’s fully warmed up.
      All of this becomes more of a factor the smaller measurement you are going for. In my case hitting 10-20um is good enough for me because I don't see how I'll ever get the gantry adjusted down to 1um.

  • @kentswan3230
    @kentswan3230 ปีที่แล้ว

    Also you can use the same setup by using endpoint to either measure the pitch of the beam or adjust the beam to level by shimming or a fine thread machinist jack

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah that works pretty good for finding the slope. I used some metal shims on one end so I could get the projected laser on the sensor at both ends.
      I’ve got a good master precision level that I’ve used to get parts of the machine in the same plane (like the 2 Y rails). If someone wanted to use the laser as a precise level in the same way there’d be a number of changes necessary. The laser beam will need to be static and not auto leveling (best to make a dedicated laser source without any moving parts). Some 3 point leg adjustment screws to adjust how level the laser beam is. The laser would have to be resting on a surface plate that has been calibrated with a master precision level. Then finally measuring some sample points with the webcam sensor on another flat reference surface from varying distances to calculate the theoretical fitted line and adjust the laser angle till the regression line in software is zero.
      Then you’ll know that the beam coming out is perfectly flat and you can use it to measure how level something is. In probably 90% of the time it’d just be easier to use the master precision level in the first place but I guess if you had a situation where you needed to check how level something 50ft-100ft long in a lab environment is, This would work well because it wouldn’t be susceptible to localized displacement of the surface that would be throwing the results off. Instead you could get the average slope from end-to-end.

    • @kentswan3230
      @kentswan3230 ปีที่แล้ว

      @@BryanHoward Since you don't have a surface plate and IF your machine master level is both long enough and has a verifiably flat base then a trick I've seen is using the level's base as a blued reference surface. Your laser measuring system will tell you where the high spots are and a blued base will mark those spots for scraping. Just an Idea.

  • @theGraphicAutist
    @theGraphicAutist 7 หลายเดือนก่อน

    this is brilliant! you have won my sub and a thumbs up! what an awesome idea! I'm also making a CNC and was using green laser level and thought about something like this but would NEVER be able to actually implement! Good stuff. Would u be willing to share your program?

    • @BryanHoward
      @BryanHoward  7 หลายเดือนก่อน

      I have the code on github. See the description.

    • @theGraphicAutist
      @theGraphicAutist 7 หลายเดือนก่อน

      @@BryanHoward Ya I quickly realized that after I commented! like seconds after. those levels have vertical perpendicular lines too. How awesome would it be to have a system that almost automatically trues up all your axis' with either just shims or some kind of adjustments b4 tightening down?

  • @alexandern8hgeg5e9
    @alexandern8hgeg5e9 5 หลายเดือนก่อน

    2:00 Maybe you can add a telescope in reverse or so to get even higher resolution.
    But be careful lenses and lasers can be dangerous to the eyes.

  • @davidgleatham9966
    @davidgleatham9966 ปีที่แล้ว

    Nice work. fun to see how sensitive. wonder if a simple lazar pencil could work. let the beam shine through a slit in a card beyond and level the beam on the wall - cutting out the bounce may be the hard part.

  • @paulwojcik1856
    @paulwojcik1856 ปีที่แล้ว

    I think 'accuracy' is being used instead of 'resolution' here for the sensor. Also, repeatability is an issue as even if the sensor is that accurate the temperature drift in various components will potentially cause a deviation beyond micron accuracy (I suspect, no evidence, just an educated guess) and the transmission of the laser beam is probably not consistent (dust particles in the air could cause it to deviate by more than a micron) not to mention parallax errors that could be introduced by the sensor being different degrees of vertical at different measurement points. BUT NONE OF THAT MATTERS and is blah blah blah talk because for a home made CNC this is still a fantastic idea and is way more accurate than the method I used for my CNC (and mine works for anything I need!) I think I am going to try this idea out to see how bad mine actually is 🙂

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah there's certainly a lot that can be improved on the setup for lab use. It goes well beyond what I need it for. Two things that would reduce the noise is have complete control of any vibration. Even a point laser directed right at the sensor held in a small vice picks up vibrations from inside the house and I think when it was wobbling like it was that might have been the next door house. The cheap webcam sensor I'm using very likely is transmitting compressed mjpg instead of raw. So you'll get artifacts due to compression. It appears to be what I noticed but it's really hard to tell.
      The whole setup can be scaled up with much better quality electronics but for what you get with cheapest of components it works surprisingly well.

  • @seanbosse
    @seanbosse ปีที่แล้ว +1

    Very clever! I love this. It's probably already been discussed, but would it make any sense to use a laser pointer placed on a dampened pad? That could give you both X axis and rotational position (Z-axis?) simultaneously.

  • @Sydney268
    @Sydney268 ปีที่แล้ว +1

    You need to run the webcam down the gantry on a reference edge since the transverse flatness is so crap. I wouldn't worry too much about thermal influences - measuring flatness is the easy part, making it flat is the hard part, should be able to get better than 25 microns after many many hours tho :)

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah I might have to do that in the end. I prefer to measure just the center of the rail, that way I don't change the geometry of the Gantry much and have to go into the z head assembly and modify bolt holes and such. I thought about putting a steel cylinder on the bottom of the webcam sensor and that way just measuring directly to the center of the valley on the steel tube profile. I think I'll try that and see how it goes. If it doesn't work out, it shouldn't be too hard to start over and fill in the full width with epoxy and make a fully flat surface in both directions.

    • @Sydney268
      @Sydney268 ปีที่แล้ว

      @@BryanHoward Should be good for aligning the linear rail the other way too, when you bolt it down.

  • @misamokuzelpizu
    @misamokuzelpizu ปีที่แล้ว

    wow thanks i will use this for my cnc build

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah best time to use it. Even though there's more technical challenges using a set of such as this, it's far cheaper than the large surface plate or a long reference surface.

  • @randomrouting
    @randomrouting ปีที่แล้ว

    Way cool! Thanks for sharing.

  • @mogilogi1956
    @mogilogi1956 ปีที่แล้ว +2

    Thank you for sharing, something I couldn't get. How are you making sure that the gantry is leveled witht the ground and the laser is the same and the camera is exactly 90degree on its mount and the mount is as flat as It can get.
    To my understanding if any of this factors off it will effect the measurement because there is no flat known surface that is being measured against.
    Or I got it all wrong?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +2

      With this method there are no assumptions that the laser or the surface being measured is level. We instead use linear regression which will fit a line to the points and return an error value which is the offset from that fitted line. It ends up being a clever and simple solution to that very problem.
      Seeing it visually might make better sense:
      data-science-blog.com/wp-content/uploads/2022/05/linear-regression-error-term.png
      The exact location in the code that does this is located here: github.com/bhowiebkr/laser-level-webcam/blob/003e17f78e2e9459275e03ede66185cf40a678a6/laser_level_tool/utils.py#L80-L98
      Because the slope is constantly changing and averaging out with every new sample, we have to loop over all the samples to recalculate the regression line and the error/offset every time a new sample is added.

  • @felixdostie9024
    @felixdostie9024 ปีที่แล้ว

    Woaw thank you for sharing!

  • @nh18343
    @nh18343 ปีที่แล้ว

    DIY Laser Interferometry! Fantastic job!

    • @gorak9000
      @gorak9000 ปีที่แล้ว +1

      There's no interferometry here anywhere. It's just measuring the peak laser brightness directly on the webcam sensor and looking at which pixel the peak brightness is at

  • @thanhnhanhuynhnguyen3652
    @thanhnhanhuynhnguyen3652 6 หลายเดือนก่อน

    Will try to incorporate this and carbon steel scraping (my axis is too long for the surface plate). Will report the result

  • @bluegizmo1983
    @bluegizmo1983 ปีที่แล้ว +1

    That's super cool! Serious question though: since your measuring on the micron level, would plastic deformation and creep effect the measurements over time due to the 3d printed plastic mount your using for the Webcam sensor?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      The 3d printed plastic part should work well with thermal expansion when touching it. Better to pick it up from there and not the metal base. I’ve got the white part made in PETG. PLA might be better because it is more rigid than PETG. I’m not sure about the thermal expansion of both though. The main thing is to keep everything at the same temperature once it’s all warmed up including the room at a constant temp. This becomes more of a factor depending on
      Key factors to get good results is to not have any vibration on the laser. Using a green point laser clamped in a small vice should help greatly with vibrations. After that keep on taking measurements of the same point till you find the the center point stops drifting in one direction or another.

  • @DFPercush
    @DFPercush ปีที่แล้ว +1

    Does the power cord throw it off at all? It looks kind of heavy compared to the webcam. If you support the weight of it or make it go out the back instead of off the side, does that affect the reading at all?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I'm probably going to go back again and check that area closely cuz it's really suspect why it's so low compared to the rest of the beam. It's at the end of the rail so maybe I bent it when I was messing around with the servos.

  • @wez50
    @wez50 ปีที่แล้ว

    This is great. I’ve been wanting to look at 2D PSD sensors for years but the cost is so high!
    This sounds like a great option…
    But I would need around 12mm x 12mm of sensor area. I wonder if a camera exists with that size. Great video! Thanks!

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      DSLR cameras have big sensors. The full frame ones are 35mm on the diagonal. These cameras new cost a small fortune but you can find used ones that are 5-10 years old for next to nothing. The only thing you gotta watch out for is if they are cropping onto the centre of the sensor when recording video vs using the full sensor frame.
      Another option is to look at shutterless cameras. Taking the lens off should expose the sensor and you would not need to have to disassemble it destroying the camera. Must of them have a video feed out.

    • @wez50
      @wez50 ปีที่แล้ว

      @@BryanHoward thanks for the pointers! I will research and see what I can pick up.

  • @MikeyAntonakakis
    @MikeyAntonakakis ปีที่แล้ว +1

    Super cool and clever! A couple ideas:
    -sample only a band of pixel in the center, should clean up the peaks even more
    -looked like maybe the sensor was clipping when it was closer to the laser?
    -since you're only doing a 1D line measurement, could you use just a laser pointer? I suppose it would be a bit of a pain to get the horizontal alignment, but maybe not too terrible?
    -wonder if there's some kind of diverging lens you could put in front of the sensor that can spread the beam vertically to improve the resolution... (not that this particular gantry needs that kind of resolution)
    -it would make things much more complicated, but to adapt this idea to a finer resolution between sampling locations: a 3-footed base with a telescoping single-point mount for the sensor could give a whole lot more practical sampling for cases where more localized flatness is more important?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      Yeah the clipping becomes an issue if it's large enough. If it's small then smoothing the array of data helps around at the peak getting the algorithm to find the center of the gaussian distribution a better time.
      Using a laser pointer also works, no you don't get to use all of the width of the sensor because you need to keep the dot from clipping off the sensor. You effectively have less data to average but it still works decently well. When I did this method I mostly used the line level like a laser pointer but just wide enough so the line goes off the sides. Blocking the beam from close to the laser emitter also helps get everything collinear.
      The original Java tool had a few options on what part of the data set it's trying to find a maximum of the peak. When I have some time I'm going to go through all the other options and also see what is also available in scipy to do the same thing. It's possible some of the noise can be cleaned up this way.
      The size of the laser beam on the sensor in ratio to the size of the sensor needs to be balanced for the maximum in minimum deviation you want the tool to find. A lens making the beam larger should get you more accuracy due to the fact you just using more pixels on the sensor. On an extreme setup you can use a full frame 35 mm sensor and expand the beam up to 80 or so percent of the size of the sensor if you know you're going to have very small deviations on what you're measuring but want to be extremely accurate.

  • @andytroo
    @andytroo ปีที่แล้ว +1

    could you mount a simple single lense in front of the sensor to reduce the vertical space you are looking at, but enlarge the beam to give a better estimation of the center of the beam? - the trick only works because you have a laser coming in, and you are not trying to form a full image.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      On the next iteration of the laser I'm going to make a small slit using two razor blades welded to a stainless steel nut. This should clean up the laser diodes beam pretty good.

  • @seebuch93
    @seebuch93 ปีที่แล้ว

    gotta build a simple mag lev table for the laser to rest on to reduce the vibration from the house. youll still get vibration from the sensor on the work material but it might help a lil bit maybe?

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I’ve got a pretty cool improvement on the laser side of this setup that should fix a lot of the issues when using an off the shelf laser line generator.

  • @1moregarden
    @1moregarden ปีที่แล้ว +1

    Fantastic idea and implementation. Which low-cost webcam(s) do you use for your 'sensor' ? Thanks for the inspiration and code work.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      I've got a DIY method that seems to be working out still everything from scratch need a laser diode. So far it doesn't suffer from any problems of wobble or artifacts from the reflector. I'll make a video about it in the next week or so. I would hold out till then.

    • @1moregarden
      @1moregarden ปีที่แล้ว

      Thanks Bryan. Yes, I think a separate laser diode...perhaps with the 'line' output and a stable power supply may be ideal for the source. Looking forward to the next video !

  • @JamesChurchill
    @JamesChurchill ปีที่แล้ว +1

    Surely a fixed laser line would be better than the autolevelling one, which is just bouncing all over the place.

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      The laser level was just the most ideal laser I have on hand for this. The green beam gets picked up on the sensor well without blowing out the whites like the red pointer laser does.
      I’m in the middle of extracting one of the laser modules to build a better dedicated laser source. If I can find a curved mirror (like ones found in a laser printer) I’ll use that to replace the conical mirror. Other than that, a heavy metal base on 3 points to adjust the angle of the beam and I think a setup like that would be ideal.
      In theory your noise level would be lower if you could project a perfectly flat beam onto the sensor as you're using more of the horizontal pixels to average out any noise artifacts. The point beam works but you gotta be very careful to keep the dot in the middle of the sensor and you don’t have much width with the webcam sensor being rotated 90 degrees.

  • @davidaustin967
    @davidaustin967 ปีที่แล้ว

    Really interesting method. It’s great to see these ideas shared. Thanks. Will you adapt this idea when you are looking to get the beams level with each other

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว +1

      On the next laser setup I'm doing I should have the beam straightness solved. Then sampling 2D points is possible and I could then use it as an actual levels or at least a relative level of getting for instance to Y axis rails planner to each other.

  • @HouseboatRenovations
    @HouseboatRenovations ปีที่แล้ว

    Just keep in mind the aluminum bracket will change (bend) based on ambient temperature

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah absolutely, I also don't think aluminum is the way to go just because it all oxides quick. Maybe one of the stainless steel spacer rings for the platters would be better.

  • @deluksic
    @deluksic ปีที่แล้ว +1

    Did you do any image unwarping? Seems like the camera output has some pincushion warp applied. This could introduce bias towards the edges and screw up averaging across rows. Another thing to test for could be the effect of the bayer sensor layout. Maybe aggregating channels separately would be interesting to see if there is a shift between the images in red green or blue. Really cool idea!

    • @BryanHoward
      @BryanHoward  ปีที่แล้ว

      Yeah there's clearly something going on with that I noticed it right away when I was first testing with the lens removed. I think it might be due to the physical shape of the individual pixel sensors picking up the laser from the sides.
      When I'm done with figuring out the laser line I'll go back to the webcam sensor and see if I can improve things. Maybe restricting the laser line down I'll pick tube so the individual pixel sensors don't see any light coming in from the sides.
      It's a really strange phenomenon because it looks like something you would come across with an optical lens.

    • @deluksic
      @deluksic ปีที่แล้ว +1

      @@BryanHoward I think camera manufacturers “undo” lens warping in software because webcams are simple single lens devices usually, with bad distortion.

  • @adrian2911
    @adrian2911 ปีที่แล้ว

    This is what 3d printers need to read the flatness of the print bed for auto compensation

  • @BretBowlby
    @BretBowlby ปีที่แล้ว +1

    Does the laser pose a risk to the sensor if left in place for too long? I do know with some camera sensors I've worked with, when subjected to a standard laser pointer; the sensor will end up with burned out spots.

    • @Pidrittel
      @Pidrittel ปีที่แล้ว +1

      The total power of such Lasers is 5-15mW, but they get distributed in all directions. The power that reaches the sensor with such a line laser is thus much lower than 1mW, and even this power is distributed over the whole size of the sensor.
      A laser pointer on the other hand can easily focus the whole 1mW on a very small spot on such a sensor. So the local power density is way lanrger than with a line laser.