September 19th, 2024

Show HN: CNC Microscopy for Fun

The CNC microscope project aims to image larger objects with enhanced detail, addressing stability issues, automating image capture with Python, and exploring autofocus and focus stacking for future improvements.

Read original articleLink Icon
AppreciationCuriosityEnthusiasm
Show HN: CNC Microscopy for Fun

The project involves building a CNC microscope using off-the-shelf components to image larger objects like leaves and CD-ROMs, revealing details invisible to the naked eye. The initial setup faced challenges with stability, leading to a switch from plasticine to neoprene tape for securing the microscope. The assembly included attaching an AmScope imaging sensor and a light source, with various adjustments made to optimize focus and illumination. The project detailed the costs of components, including a CNC machine and microscope parts, totaling approximately £719. Initial imaging tests were conducted, revealing issues with sharpness and illumination, prompting further adjustments. A Python script was developed to automate image capture and stitching, utilizing techniques like mean square error to assess image stability. The project also explored autofocus methods and image stitching using software like Hugin and Fiji. Future plans include testing a kinematic table for improved movement and exploring focus stacking techniques. The project highlights both DIY and commercial microscope solutions, showcasing the potential for accessible microscopy.

- The CNC microscope project aims to image larger objects with enhanced detail.

- Initial stability issues were resolved by using neoprene tape instead of plasticine.

- A Python script was created for automated image capture and stitching.

- The project emphasizes the importance of autofocus and image quality assessment.

- Future improvements may include testing new movement techniques and focus stacking.

AI: What people are saying
The comments on the CNC microscope project reflect a variety of perspectives and experiences related to microscopy and automation.
  • Several commenters share their own projects involving microscopes and CNC systems, highlighting challenges and solutions in achieving precision.
  • There is interest in using the microscope for imaging unconventional objects, such as CDs and vinyl records, with suggestions for potential applications.
  • Discussions include technical aspects like autofocus, focus stacking, and the importance of stability in imaging.
  • Some comments touch on the legal and ethical implications of imaging copyrighted materials.
  • Overall, the community expresses enthusiasm for innovation in microscopy and automation technologies.
Link Icon 11 comments
By @2four2 - 26 days
This is basically how an optical CMM (OMM) works. There are tricks to determining and calibrating out alignment issues and determining snapshot viability, and you're touching on both of them. Very well done!
By @molticrystal - 26 days
So you wanted to take pictures of cdroms with a microscope, going on a decent detour and the other way you can make a microscope from a disc player which is a really cool project [0]

[0] "Hacking CD/DVD/Blu-ray for Biosensing" https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6066758/

By @contingencies - 26 days
I am also just about to attach my microscope to a CNC system, but not for taking pictures of two dimensional manufactured objects but rather for Z-stacking use in biological light microscopy. Probably some horizontal stitching too.

The prompt was that someone gave me a broken project which they had never finished (small-scale benchtop CNC system which is highly rigid and heavy but had no wiring, an ancient power supply and a busted spindle motor). I considered finishing the project but the overall size was too small to be very useful for any CNC work I would want (we used to have a large scale commercial 4-axis!). Therefore I am retrofitting a new control system [acquired], rationalizing the power supply [done], and clamping on a USB industrial camera based microscope [clamp acquired, intermediate mounting plate TBD].

On my current microscope mount it's really annoying to zoom a little, take a shot, zoom a little, take a shot since there's a high chance of bumping the sample or some slight vibration affecting a shot, and it's very hard to move a tiny amount due to high-friction macro adjustment interface. I was part-way through designing a fix, with some axis modifications for a motor mount, but then realised it would be easier to just redesign the mount from scratch rather than retrofit a one-off modification. Before allocating time to get that done, the CNC fell in to my lap.

By @uSoldering - 26 days
If you photograph and stitch a panorama of a CD at a resolution with the data visible and distribute it under your copyright, is it piracy?
By @flimsypremise - 26 days
I'm currently doing something similar to build a photographic film scanner. I will say that I've found that moving the optics is generally much more error and vibration prone than moving the target. I'm actually using a 2 axis microscope stage as the basis for my scanner, ironically enough, and CNC spindle z-axis for focus.
By @dekhn - 26 days
I started with this but ended up designing my own system around a vertical 4040 aluminum extrusion post and various 3d-printed components including an XY stage (often costs $10K or more) and a Z stage (for focus). It was quite challenging to get everything to line up in a single optical axis and keep the dust out but the results have been quite good- I wrote my own software after trying to get micromanager to work, and can do large acquisitions (25x75mm, AKA a single microscope slide) as well as real-time object-detector based tracking.

It's remarkably hard to equal or best a $150 scope from Amscope in terms of optical quality, it's automating their stages that is tricky.

By @Animats - 26 days
Nice. Try to image a vinyl record. Maybe someone can write something to play such images. The Library of Congress has such a system, called IRENE, but it was very expensive.[1] This might be a low-cost approach.

[1] https://en.wikipedia.org/wiki/IRENE_(technology)

By @alnwlsn - 26 days
Would be really cool to read a whole CD this way. Actually, that wouldn't sound any different. You could read an LP though.
By @joshu - 26 days
greaseweazle for CDs
By @ElCapitanMarkla - 26 days
Getting that Z Axis perfectly level across the run is going to be fun at this scale.