. .

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hi,

    Update 26/8/2019
    Software to experiment with can be downloaded from here:
    https://github.com/betzuka/laserleve...r.zip?raw=true
    Unzip and run (double click) the laser.bat file. You need to have java installed on your system.

    The source code is available on github:
    https://github.com/betzuka/laserlevel


    I'm a long time follower of this group but this is my first post. I built a 1500x1500 steel and aluminium and servo driven gantry machine about 10 years ago. This machine has been badly rusted during a house rebuild (was stored in a tent!) and long story short I'm about to build a new one, that will be a separate thread.

    The focus (no pun intended) of this thread is to explore using a very cheap webcam (~£15) and a laser level to achieve both accurate planar and line (straight) alignment.

    I've been playing with some projects using cheap webcams for various measuring tools and other things they weren't designed for. In thinking of how to perform the various levelling operations my new machine build will need I looked at the laser line level and detector I used during my house build. This is a dewalt model (line generator lens, not rotary), works great for tiling and putting up shelves/lights and for building straight walls, however with the matching dewalt detector in high sensitivity mode it only resolves down to 0.5mm at best.

    Anyway I figured a webcam and a bit of custom software could do better. I put together a very crude test using a usb webcam (actually a microscope but that isn't relevant). The webcam is placed in a box to shield it from stray light and a small window is cut in the end of the box. The window is 'glazed' with a bit of white paper to act as a screen. The webcam is focused on this screen.

    The laser line is then fired at the screen. I wrote a quick and dirty program to grab the webcam frames and perform some image processing. In short this takes the sum of brightness across each row of the frame to plot the natural gaussian of the laser beam then uses some clever maths (not mine) to fit this gaussian. The mean of the gaussian is the centre of the beam with respect to the cmos sensor.

    With the laser a few meters away (all though distance doesn't matter within reason) the tool can resolve height variations down to ~0.01mm (a piece of copy paper that is 0.08mm thick resolves to a height change of ~12 pixels of the cmos sensor). This could be increased by increasing the magnification of the sensor, currently I have it set quite low and this setup is extremely crude thrown together in a few minutes.

    Anyway I thought I post some pics of the setup here to see if you guys thought it has any legs. It could be extended to read horizontal variations using the laser in vertical mode which could be used to lay rails straight for example. If I progress this the next step will be to build a solid metal housing for the image sensor (discarding the body of the webcam) then it can be clamped to things like hiwin carriages. I would then extend the software to take multiple samples say along each X axis and display the error from the plane so that this can be corrected. First use will be to get the table i'm going to weld the frame on into plane.

    Cheers, Joe


    Click image for larger version. 

Name:	laser_level.png 
Views:	1213 
Size:	359.1 KB 
ID:	26192
    Click image for larger version. 

Name:	IMG_20190811_230006.jpg 
Views:	1336 
Size:	299.6 KB 
ID:	26193
    Click image for larger version. 

Name:	IMG_20190811_225913.jpg 
Views:	1311 
Size:	220.7 KB 
ID:	26194
    Click image for larger version. 

Name:	IMG_20190811_225938.jpg 
Views:	1411 
Size:	261.4 KB 
ID:	26195
    Last edited by devmonkey; 26-08-2019 at 03:53 PM.

  2. The Following 2 Users Say Thank You to devmonkey For This Useful Post:


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. WANTED: K40 laser
    By dfox1787 in forum Items Wanted
    Replies: 0
    Last Post: 23-10-2018, 08:34 PM
  2. Newbie - Help With Laser Cutting Speed And Power - 60W Laser
    By nickpscott in forum Laser Machines & Building
    Replies: 2
    Last Post: 11-11-2015, 10:07 PM
  3. FOR SALE: K40 laser not working (laser fires)
    By calida in forum Items For Sale
    Replies: 0
    Last Post: 31-03-2015, 08:45 PM
  4. WANTED: GCc Laser Pro or Epilog Laser Cutter Machine
    By Brownhills school in forum Items Wanted
    Replies: 1
    Last Post: 10-05-2012, 04:30 PM
  5. help with cnc laser
    By swinds in forum Laser Machines & Building
    Replies: 11
    Last Post: 09-01-2012, 10:15 PM

Bookmarks

Posting Permissions

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