Precise Z positioning of camera by using spot laser
thingiverse
The Video Camera plugin in Mach3 is a highly powerful tool that enables precise positioning of the tool over specific locations with incredible speed. By accurately measuring the distance between the camera's crosshairs and the spindle centre, we can effortlessly switch between these positions using simple scripts attached to the project. Since the camera is firmly fixed to the CNC spindle head, utilizing an objective lens with a long focal length allows for decent image magnification from distances of 100-200mm to the object. This results in precise positioning of the head, better than 0.025 over specific detail features, finding the centre of holes, edges, and more. In short, it's extremely useful for anyone who uses CNC - attached are the camera scripts and Mach3 screen. There is one major issue with the camera: achieving exact perpendicularity to the surface can be a real challenge. By moving the camera up or down on the Z-axis, the image crosshairs can shift, compromising positioning precision. After some trial and error, I managed to achieve good vertical alignment, but it's a slow process. In the end, I discovered an elegant solution to this problem: if a laser is mounted at a 45-degree angle to the camera (about 70-100mm away) and its spot hits the centre of the crosshair when focused on the surface, we can guarantee constant camera distance to the surface and less concern for perpendicularity. Check out the attached picture describing how this method works and a short video showing the laser and camera in action: https://www.youtube.com/watch?v=50kZa79QLbA Using the laser also offers another benefit - precise measurement of distances in the Z-direction, around 0.05-0.1mm. If we focus the camera/laser on one surface and set this Z level to zero, moving it to a new position (focusing the laser spot) allows us to see the new Z level. The design of the laser mount enables tilting in two directions to place the spot exactly under the camera crosshair or slightly off to avoid covering both lines. Check out the video showing how laser tilting works: https://www.youtube.com/watch?v=vujrtNEpsyM Once the laser spot is in position, we can secure it with screws. For the camera, I use a Microsoft LifeCam Cinema with a replaced objective. This particular camera is well-suited for embedding into designs due to its cylindrical shape: https://www.amazon.com/Microsoft-LifeCam-Cinema-720p-Webcam/dp/B009CPC6QA I used a 30mm megapixel objective (with infrared filter) from Vision-Dimension: https://www.vision-dimension.com/en/lenses/mini-lenses-s-mount/megapixel-mini-lenses/35mm-5mp-megapixel-board-lens-irc-bl-5m3525mp12irc/397 A lens holder was also required: https://www.vision-dimension.com/en/lenses/lens-accessories/lensholder/objektivhalterung-lensholder-m12x0-5-18/388 Removing the LifeCam lenses can be seen in this video: https://www.youtube.com/watch?v=oBrsLO9uH0c Adding the lens holder requires some extra skills but is not overly difficult. The laser module I used came from TME (LC-LMD-650-05-01-A): http://www.tme.eu/en/details/lc-lmd-650-05-01-a/laser-modules/laser-components/ I added a 220 Ohm resistor in series to keep the current at 13-15mA from 5V, increasing laser life and reducing brightness. By adjusting the lens, we can set the focus for a small laser spot when the camera is focused on the surface and positioned in the crosshair.
With this file you will be able to print Precise Z positioning of camera by using spot laser with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Precise Z positioning of camera by using spot laser.