Auto Focus

243 views
Skip to first unread message

Shane Middleton

unread,
Oct 14, 2015, 8:43:31 AM10/14/15
to Opensource Laser
I have seen others strategies to manually set the focal length.  A shim piece or the rater elegant intersecting laser dots that give a visible focal point and reference point. Both excellent solutions, simple and low cost. But both are manual and only work for purely flat objects.


How are they doing it in in commercial systems?  assume a touch probe could be used for a 1 off z height adjustment.  Anybody tried this?

Looking online I seem to find 2 solutions. 

A focus laser / LED and camera vision to track the focus laser. Anyone seen an open implementation of that? 

Or these seem to be ultrasonic sensors at reasonable price (of course no documentation on shopping sites) 

jegb

unread,
Oct 15, 2015, 6:00:42 AM10/15/15
to Opensource Laser
one way could be using the auto bed levelling from Marlin but modified using a pinger ultrasonic sensor, see more here http://forum.arduino.cc/index.php?topic=243076.0

ajf

unread,
Oct 15, 2015, 5:57:03 PM10/15/15
to Opensource Laser
John built a probing head a while back and is currently refining it for release.

As I mentioned in the glowforge thread, I'm quite interested in implementing a vision & adaptive/dynamic focus add-on.  Planning to meet with an acquaintance who is a DSP ninja and, quite a CNCer, next week.  Given what I've seen him do at some hackathons, he should be able to knock out a really sophisticated vision system in a few days. Also investigating doing a manufactured autofocus head, perhaps with articulation around X & Y...

From what I have seen, most commercial/industrial solutions are vision based and use a two camera system like glowforge.

regards,
aj

Shane Middleton

unread,
Oct 19, 2015, 9:24:30 AM10/19/15
to Opensource Laser
Saw Johns head on the thread, its certainly worth investigating although he didn't post many details beyond the mechanical arrangement. I am assuming he is moving the focal lens on the servo attached piece and trusting the light is collaminated enough (a reasonable assumption given the short throws of the beam in a K40 and general level of imprecision in the standard optics to warrant more precision) . 

The high end laser heads seem to have at least 2 lenses; a condensing lens in the upper piece provide collamation  of light and keep the beam centered on the a lower section focusing lens to concentrate light at the cut.  Having the light collaminated ensures the lower focusing lens only has a fixed z height to track and not a more complex Z height to table and "U height" to upper lens. 

Any optics experts that can advise?  what the pros & costs and a suitable condenser lens for IR laser to try and refine the design so we would only need to track a z height from focus the lens to cut surface.  

I think for active tracking of the cut height, ultrasonic height sensor still makes sense.  Visible and IR trackers seem to be unreliable for active tracking as the laser cutting is going to generate smoke / sparks  that obscure it. 



Jason Barnett

unread,
Nov 11, 2015, 3:48:40 PM11/11/15
to Opensource Laser
Hack-a-day had an interesting story on using a Nintendo Wii controller for auto Z adjustment that seems quite promising. 

Jason Barnett

unread,
Nov 11, 2015, 3:50:51 PM11/11/15
to Opensource Laser
oops, that should be "Dangerous Prototypes" not Hack-a-day...

ajf

unread,
Nov 12, 2015, 6:01:57 PM11/12/15
to Opensource Laser
Interesting.  Wonder if removing the IR filter from an ordinary USB cam or NoIR rPi would work...


On Wednesday, November 11, 2015 at 12:48:40 PM UTC-8, Jason Barnett wrote:

Jason Barnett

unread,
Nov 13, 2015, 12:01:46 AM11/13/15
to Opensource Laser
Theoretically, it would be possible, but would require more software to process the image. According to the link below, the Wii camera outputs the x y  coordinates of the 4 brightest IR objects in its field of view.

ajf

unread,
Nov 13, 2015, 1:45:46 AM11/13/15
to Opensource Laser
Yes, but reading more about the hack and just from a practical standpoint, I don't think the Wii controller is feasible.  When I met with my DSP expert friend, we briefly discussed determining the focus of the beam visually with the head mounted camera, the question was simply if off-the-shelf sensors would be able to see 10600nm. I suppose that's been answered!  From a software perspective, locating the reflected dot and measuring its diameter is actually pretty trivial from my understanding.

At any rate, I've reached out to the author of the hack to see if he'll join us here and add to the discussion.

regards,
aj

Martin Raynsford

unread,
Nov 13, 2015, 3:19:57 AM11/13/15
to Opensource Laser
Hello.
I think it's probably best to be detecting a different point rather than the laser dot. Once there is a hole in the material the dot is no longer visible. If you could detect the red dot accurately that would be a good thing to check otherwise you're probably better off heading to the other end of the spectrum, installing a UV laser and detecting that dot for continuous adjustment.

william hare

unread,
Nov 13, 2015, 10:12:41 AM11/13/15
to Opensource Laser
What about a Xbox 360 Kinect?

Mount the kinect above the work, it plots the height of the entire surface to be cut/engraved. The software uses the kinect data to move the bed accordingly.

Martin Raynsford

unread,
Nov 13, 2015, 10:47:38 AM11/13/15
to Opensource Laser
The kinect projects a series of IR dots out into the world and uses that to detect the shapes of objects. It's probably overkill because we don't need a full 3D projection, also the IR is probably going to be effected by the cutting.
I'm beginning to think that a side mounted laser module isn't going to cut it either. I think it probably needs a half silver mirror and a laser diode pointing down the cutting path. If the sensing dot is left of the actual cut as it goes over a drop the head will refocus before it actually needs to and any autofocusing will just make it blurry.

ajf

unread,
Nov 13, 2015, 3:45:05 PM11/13/15
to Opensource Laser
From what I've seen of Glowforge, they are getting material thickness by reading QR codes or via user input and using that for single-shot autofocus.  They only seem to use active autofocus for engraving and then only on predefined 3D surfaces (MacBook, iPhone, etc...) they pull from a database.  It doesn't look like they are actually actively scanning/autofocusing with head mounted camera.  Their use of the head mounted camera seems to be primarily for doing a more refined scan of designs drawn on the stock.

Asa DeBuck

unread,
Nov 13, 2015, 8:52:29 PM11/13/15
to Opensource Laser
The Connect is a pretty cheap way to go it's easier hands on it. I have a laser coming in next couple months so I can least see if the connect gets overwhelmed by CO2 laser.

Asa DeBuck

unread,
Nov 13, 2015, 8:54:07 PM11/13/15
to Opensource Laser
Sory about the incorrect Kinect spelling.

jegb

unread,
Dec 4, 2015, 2:55:52 AM12/4/15
to Opensource Laser
Back in the day I removed the IR filter of a webcam (PS2), not hard to do, but...

if you guys take a look at visicam this is the solution that could work best (combining the workflow of both visicut). The only big trouble I see is the speed, may take about 30seconds to do a pass to align and register & compensate. Web cam branch here.

Still waiting for camera M12 adapter and lens, and my laser still has all the guts work in progress, perhaps by March I will be there.

enrique

m keyno

unread,
Mar 28, 2016, 3:34:11 PM3/28/16
to Opensource Laser
hi guys , why don’t use such ready-to-use module such as this link and this link and add the sensor like this,I thinks , it is not  best to waste time on hardware whereas variety of tools available in market
I follow up and review couple of  open-source firmware   what if  can automatically control the height of tools such as laser head and plasma. 
I review couple of  firmware’s  in Github which are originality design for 3D printer device and not for cutting machine such as laser & plasma CNC  , most of those presume base on readiness of cutting tools whereas in actual industrial CNC each tools initialize and check during the machining

I build the 100 watt laser CNC with modified Marlin firmware  by TurnkeyTyranny on RAMP1.4 which is linked wirelessly by Bluetooth to RepetierHost, it was good step to start but the original code suffer from minor defect and unfortunately code not maintained anymore, but some cool guys such as HakanBastedt  & Wurstnase merge TurnkeyTyranny code in new update Marlin firmware for Due, But still auto focus leaser head or torch high controller feature not implemented

Right now Manually  Control the laser head height is possible with function such as action_laser_focus_custom() and I think ,in two ways we can control the  tools heights  during printing our cutting

One with help  of separate modules and one is totally implemented  in firmware

In the first method (hard way) we could use the Arduino module to command the z axis whenever new bias with per set  g-code height come out, and when adjustment performed active the readiness pin  which is controlled by g-code M266 command before each  cutting   

In the second way we could use the function such as laser_set_focus(currentZ) in loop function , in this case we need use I2C to request the height from sensor module   

unfortunately I'm novice in programming but I hope with help of cool guys in Github , finally make the reliable and standard  firmware for cutting machine like laser & plasma CNC

also I hope have your comments on this idea


Reply all
Reply to author
Forward
0 new messages