Hey, I make confocal, whitelight interferometers and microscopes for a living. Here is a few insights to improve your results. 1) Your setup is non-rigid, which means there will be vibrational motion and modes oscillation between sample and microscope. Fix this by adding a heavy base and using steel instead of aluminum. 2) Laser Diodes suffer from Speckle noise, which is up to 15% of intensity. Switch instead to a LED based emitter. 3) Dont leave cables hanging, air drafts might push and move source or detector. Make sure they are fixed. 4) Using thick half mirrors is not recommended, as they create ghosting. That happens when double reflections overlap with slight change in angle. Cheap option is film beam splitter or cube beam splitter. 5)In Confocal, we dont move the stage to scan. Instead, we use DLP (mirror arrays) or liquid crystal to raster the image, pixel by pixel at a fixed height, then move along Z, until we find the peak for all points. Otherwise, its a cool prototype V1. good job.
Awesome, thanks for the tips! Really appreciate it! And doh, didn't even think about the detector moving but that seems very obvious in retrospect. Interesting about DLP, I assumed commercial systems used a galvo system to raster the laser around. Very cool, thanks for sharing!
❤ Thanks! Don't tell anyone but I only release videos because I like color grading footage and pretending I'm Michael Bay. All the science junk is an elaborate cover story 😇
Since you're here, and your most recent video is weeks old and has tens of thousands of comments :P @Stuff Made Here: Idea for you: A holster for cops that when the firearm is drawn it automatically calls for backup and EMS. Beau of the Fifth Column did a 9 minute video showing some of the benefits of it. Either try to make one yourself, or help put out the message that this would be good for cops and the people they point firearms at.
I'd love to have confocal laser microscope but I need it so little that I cannot justify even the cost of DIY project to get one. Just like I would want to have accurate spectrophotometer, too.
Very cool. In the 1990s I worked with a startup developing a commercial confocal laser review station in the semiconductor industry. We scanned the laser in x-y and had a piezo stage for the z-axis. It also required a proprietary frame grabber board that was synced to the laser scanner and z-stage. My work was on the microcontrollers, so I only knew the general optics design. We experienced what we called the pit-particle issue where what we knew to be a solid above the surface (a sub micron calibrated latex sphere) could sometimes show up in the 3D image as a hole.That seems similar to what you were sing on the one image. Our optics engineering team spent a lot of time resolving that, but I don’t recall how they attacked it. Great video. Thanks.
That seems like a problem that could be "solved" (mitigated maybe) by analyzing the curve. If the peak is out of reach there should be a steady climb before, which should be detectable with a proper numerical analysis. Then I would replace this value with a max value. It would at least make it obvious in the image where the 'z cropping' happens, instead of random valleys.
If I may suggest - please consider putting the transimpedance amplifier _very_ close to the photodiode, preferably mount the diode directly piggybacked on the opamp IC (directly soldered, no sockets) onto the DIP8 of the opamp. The capacitance of the long coax between the PD and the TIA limits the bandwidth, in your current setup.
Cheers for the tips! This project really taught me that my EE skills are terrible and I need to spend some time learning the fundamentals. Just barely got the amp working and it really is awful in every way :) Will keep that in mind for the next one, I forsee myself needing a decent photodiode amplifier in the future :)
If you're still working on this, consider replacing your photodiode and aperture with a linear CCD array. You can use the reflected beam width as feedback for the next Z position to find the focal height in 2-3 iterations instead of scanning.
What's this, I see laser but nothing getting burnt, evaporated or even slightly charred? 🤨 JK that's really cool and I am looking forward to that thing back there in the summer!
I think one of the reasons why you're getting artifacts is because of how metals reflect light : it's mostly specular reflection(it's directional, in your case parasitic) and not diffusive (unidirectional, what you're detecting). metal oxides, however, tend to build up in tiny crevices of metal surfaces and they are dielectrics, so they create tiny diffusive areas in otherwise specular metal which might look like noisy height changes.
This is a bugaboo when working on PCB's under a microscope generally. They are SHINY, and what you see is not a nice illuminated surface but a reflection of the light source. That's why we use ring lights to work on PCBs, at least that eliminates reflections from the surface plane, although not from solder fillets.
I think you are right about reflections. And to add something else. I think some reflections are courses by lights other than the laser. Like the image with the "EC". The left, white part of the image could have a lot of room light. Then the lights were turned of for a little while. And then a small light in the room is turned on what causes the reflections on top of the characters. But I could be wrong because the scans took multiple days and then I would expect to see more day night effects.
@@Daniel-zw6gz What type of temperature fluctuation is seen in this workspace over 24 hours? The PCB has many components, each with a different CTE. Also conformal coatings can confuse the sense of sharp focus.
I was thinking about reflectivity, too, after a recent experience trying to use photographs to create 3D models using Meshroom. Reflections make it basically impossible for the algorithms to figure out what's going on in the images. Anything reflective has to be dusted with a matte powder to get it to work.
Agreed! Would be a _ton_ faster and probably more precise too. Lesson learned I suppose :) There's a followup technique (chromatic confocal) which I might explore, and will definitely explore alternative motion options. The OpenFlexure stage was super convenient but I didn't realize the movement speed itself would end up being the limiting factor.
really awesome project! i think you should use kinda white matte spray paint to get rid of scanning artifacts. i've build ultrasonic "scanner" to make an image using standard arduino us-sensor and had a lot of time to figure out what do i see on my result images )
That is what I am using and you can scan thousands of points per second. I only have dvd lasers on hand but you get better resolution with a BluRay laser. You also get the entire optical unit and sensor as 1 piece and only need to build the stage. There is also a chip inside the drive that contains 7 op amps / comparators to control the voice coils and time the readings.
You could try to have the beamsplitter at the Brewster angle of you laser source and mirror material, could avoid the laser dump, when the optical path is geometrically redesigned.
@@BreakingTaps There are two more reasons for the poor SNR: (1) the laser beam is highly aberrated due to poor alignment quality, and (2) some reflected light will be fed into the laser cavity, which actually affects the output beam intensity. The reflected beam is definitely something you want to avoid.
If the laser is polarized, it might be an option to filter the returning light in that direction to exclude specular reflection from those shiny surfaces. That reduces the return signal very much, but scans for scattering and the surface geometry matters much less, which may otherwise deflect a focused beam in a different direction. It has the same effect as coating the surface matte.
Really cool project! Another way to do this is by using a standard cd or dvd laser head. You cannot scan very large areas, but with very high resolution.
Thanks, and cheers for stopping by! Will take a closer look at those DVD units, are there open source designs/plans/software to control them? I'm not sure I have the skills to hack one myself :)
@@BreakingTaps I think that styropyro has some tutorials on youtube, and they mostly revolve around an lm317 regulator. Also I had an idea for the optimisation which might be interesting: set a grid over the area you're scanning, and go to each point sequentially and move the z axis to find the height of the point. After the first scan look for areas where there is a large change in height and then go back to get more resolution in those areas. This should result in being able to start with a coarser grid which should make the scan a bit faster, although fine detail may be lost in some areas. This was really cool and I don't need a confocal microscope but now I'd really like to try at some point
@@BreakingTaps They are actually not that difficult to control. But, one potential problem is that you need a special 2x2 photodiode to focus properly. Let me try to explain: imagine a 2x2 grid of photodiodes, with them being oriented at 45 degrees. The optics in there are special so that if you are too far away, the beam becomes elliptical from top to bottom, so the top and bottom photodiodes get more light than the left and right one, but if you're too too far away, the left and right ones get more light than the top and bottom ones. And if you're perfectly in focus, the laser for forms a perfect circle and all photodiodes get the same amount of light. I know Hamamatsu offers photodiodes that can be used for that, but they'd probably cost you a kidney, and the chip that's currently in there doesn't expose the focus data to you. If you want pictures for what I'm talking about, wikipedia has images in the article about the CD player. But driving the coils themselves is relatively easy, their movement is proportional to the voltage across them. Actually, a laser unit should be a pretty good confocal stage if I'm not completely mistaken, since you have the exact same thing happening that's happening here, and it's all one unit.
@@BreakingTaps dude there are absolutely tons of wonderfully documented open source projects utilizing the high end opto-mechanics in a standard DVD/Blu-ray optical pickup. a bit of googling, there are a few things on hackaday and elsewhere. Really incredible documented projects out there. One of my favorites will show up in Google image results… You will see a nice looking finished product with all of the circuitboards in a purple color. They got some really good results with that, and I think A set a fresh eyes like yours could really push the project further. Billions of dollars of R&D have gone into developing the optical pickups in some of the higher end units. They absolutely engineered those things to within an inch of their life 😂 I’ve got dozens of them, so if you need some parts just let me know and I’ll ship you a box no charge. Also have a bunch of really high-end hamamatsu optical sensors and components from a bunch of equipment I’ve repaired or salvaged. So I may just have something you need. I’ll gladly chip in and help however I can
After watching this video, I thought this was going to be one of those huge million plus channels that I just hadn't heard of yet. That you only have 25k subs is outrageous to me. Everything here is on par with the best of the best UA-cam has to offer.
Hey, awesome video! I see there already was some comments about reflective surfaces here - and that is indeed the probable cause for the inverted shield structure. When the beam hits the slightly higher point of the shields edge it is scattered into the room and not back into the lense making the signal weaker. This would explain the smaller values in some of the curves peaks too. Alexander Sannikov mentioned in their comment that the metal oxides being diffuseve cause noise in the signal. Indeed if the samples were to be prepared beforehand (like they do for electron microscopes) to be compleately matt with a coating of a white matt substance the laser would behave more uniformly along the entire surface.
Fascinating. Great job and good explanation of the optical path. I wonder if it would be faster to run the scan like an atomic force microscope, riding the surface by tracking the amplitude of the photodiode. Move a step in x, then move the z up or down to maximize the amplitude, repeat. Advance y each time you hit the end of x. The assumption is the surface is often flat, or at least has a gentle slope, so instead of scanning the whole z stack for an x,y point, just search around the last height (z) each time you move to a neighboring point.
I would think you could then attempt to recognise the trend from previous points in the direction you're currently moving and predict which way you need to scan in z.
Great video, 20 minutes fly by, just the right level of detail. From my experience stacking microscope shots and focus failures, it will be that 'specular highlights' (very shiny surfaces) break your algorithm. You'll be assuming that the thing you are scanning has unchanging topology (which is true), but accidentally assuming that when you move the microscope stage that the pattern of light reflected would not change (untrue), because unless the surface is perfectly matte, the 'brightness' does not 1:1 correlate with 'in focus', it also correlates with 'shiny thing pointing at lucky angle to send light back to sender'. Imagine you were scanning a microscopic disco ball, if you strapped a torch to just above a camera lens and moved it closer and further, you'd see that different panels would suddenly become very bright, and others very dark. It confuses normal cameras with their contrast based focus detection (and even sometimes phase detection). If you want to test what I'm talking about, scan some glitter or a retroreflective tape. I would spray the item to be scanned with a misting of 'airplane glue' smelling hairspray in the giant cans from 50cm away. It will 'matte' your surfaces sufficiently. If it kills the retroreflection of tape, it will be scannable by your algorithm.
Jesus christ! this is a 2Msub channel level production quality! how you manage! I mean, i loved all your videos but you really outdid yourself with this one!
Cool project. Try to modulate ur laser beam with chopper or so and demodulate ur photodiode signal at the same frequency. This will remove much of noise.
Good point! I was about to suggest some physical wavelength filtering as well, just to remove signals from ambient light, but some decent modulation will remove a lot of the ambient (DC in any case)
This is really well done! I watched an OpenFlexure video and this was suggested. Really shows that a lot of time went into the project and into the presentation. Wishing you the best of success.
Very cool, i worked on a similar project a few years back using DVD optical pickup heads and its internal optical path, which is indeed a confocal arrangement with an electromagnetic vertical adjustment which provides a high degree of precision.. my failure was in the X-Y stage.. might have to revisit with openflexure but it was something that worked as an arduino shield.
Awesome stuff! I'm amazed that the data collection was actually limiting - I probably would have gone with a different xyz stage and scanned voxels one by one and been way too slow. the continuous scan seemed to be enabled by the latency of the stage so that's pretty awesome! I'm also glad you called out the big cylinder of conflat flanges in the background cause I was getting really curious...
Thanks! Hehehe, I'm pretty excited to start working on the chamber, think I have all the necessary components... just need to wait for my garage to warm up a bit (we just got more snow! argh!) and machine a few different adapters. Soon!
This was a great video. I've found having a fiberoptic cable act as the pin hole to be a good solution. Also adding 2 scanning mirror to traverse the XY plane reduces the need to rely on mechanical movement. A photo-multiplier-tube is a great way to increase the electrons per photon ratio. Also using a quarter wave plate and a polarization beam splitter lets you keep more of the precious photons going to the source.
Interesting, I had thought about using a fiber but wasn't sure if that was correct or not. Does it have to be a single mode fiber, or would larger multi-mode fibers work too? I guess larger would be fine, since I'm already using a multi-mode laser and I should care one way or another anyway. Might give that a shot! Good idea about quarter wave and polarizing beam splitter! Looks like I need to grab a few more optical components to have on hand for the next project :) my box of optics is slowly growing haha
@@BreakingTaps - MMF is more forgiving because it's 50µm vs SMF being 10µm. Either is a PITA for alignment / focusing. I think going w/ some wave plates and polarizing beam splitter would be more useful to keep those precious photons going to the meter. Good luck!
The quarter wave plate and polarizing beamsplitter also reduces optical feedback into the laser diode. Optical feedback into a laser diode can cause a lot of noise. Using single mode fiber gives a smaller effective pinhole and a diverging beam that can then be well collimated with a single achromatic lens, which would remove the need for the input lens in your beam expander. I have just butt coupled a telecom patch cable, with a 9 micron diameter core, to a high power LED and imaged the output onto a cheap security camera and have to turn down the current to the LED to not saturate the pixels on the camera. If you need more power into the fiber, you can buy a "visual fault locator Fiber optic cable tester" which couples mW of light into the core of a single mode optical fiber with no alignment. These are available on Amazon for under $20. You could also use a fiber-optic circulator or a 3dB fiber optic coupler to replace the beamsplitter, which would remove all need to align pinholes to precise locations.
@@bretcannon3826 That Y coupler is a brilliant idea. The optics would be one focus lens to bring the fibre end to a parallel beam for the microscope optic. a fibre coupled laser and detector would complete the capture system.
12:15 you can possibly increase the scanning speed dramatically by making a feedback system, like autofocus, which tracks the surface or, equivalently, the height at which the intensity is maximum, which is the maximum of the curve so when x-y changes, you need only change the z enough to stay at the maximum
Great idea. And if you can implement it with phase detection similar to SLR cameras, you don't need to even guess which way you need to move to get into focus. The end result would be pretty much like optical LP needle. That said, laser scanner LP players do exist. Maybe one could take some ideas about those. I think the tech is old enough that the patents have already expired but are publicly available.
I dont know if it was already mentioned in the comments, but. I have some experience in 3d scanning, basically extracting height information from a series of images, and the general recommendation for an object not to bee too white, or too black in albedo and what is sometimes more important not to be too shiny. From your samples you can clearely see that varnished surface of a PCB net you the worst result, and edges of the shiny metallic coin tricked sensor into wrong depth, even though the xy shape was correct. Try taking pictures of embossed areas of paper money and see if it will make a real difference. Amazing video though!
Congrats on making a convocal! I build microscopes for biological research in my phd for living. Some tips: it seems there are is lot of aberration in the spot at the pinhole, resulting in bad contrast. Use a mirror (in focus) and try tilting and moving the second lens to get a bettet spot. You probably want a kinematic mount for that lens to make the alignment easier.
The curved surface at the top of the shield is probably scattering light like a convex mirror. If you had a matte textured object you might get better results.
YOU GIVE ME HOPE. I'm in awe of this video. My intellect is only barely sufficient to grasp what the components do. It's true that I feel bitter in myself for not being smart enough to do something like this. But I am profoundly happy that you are. It gives me hope for humanity's future that there are people as brilliant as you in the world. It really does. I wish you all the very best
I was about to comment on your complaints about the slowness of the system given the insane amount of points that you have on the z-scans (eg. 13:10), but then I heard the explanation at 21:01... Anyway, it seems that you have quite a lot of resolution, a quick and easy way of trading it for a bit more speed or range would be adjusting the gearing of the steppers. Also those 250 ms of "network response time" are weird and likely worth profiling.
Sounds like something Hank Green (SciShow, Crash Course, Journey to the Microcosmos, etc etc etc) could be interested in... but no idea how to get his attention.
Love the project! Miss doing this stuff. Man if it takes a week to image a surface you wonder how much temperature change over that time frame would impact the sample. Its a small area you're sampling but the whole object would chmage temp. For efficiency buildings can drop temp overnight. You're measuring such small features I wonder if it might be enough to cause some of those anomalies in the data plots. It's always a challenge coming up with the right algorithms to filter the way you want but not kill good data or pick the wrong point.
Wow only just saw this video. For faster scanning you could use an x-y galvo stage and f-theta lens like used in a laser marker or SLM 3D printer, that way you can raster scan an area with a fixed subject vs. having to move the subject around. You could effectively steer your beam around as fast as you could read the photodiode and your reading electronics would become the main bottleneck.
Two thoughts: 1. How about using a nozzle as a pinhole. 0.1mm nozzles are pretty cheap, and you could always drill out the back if you need more room for the beam to expand. They come with a convenient screw thread for mounting and fine adjustment along the beam path! 2. RobRenz has a video on an autocollimator mirror system with some interesting differential screws for the precise positioning of mirrors. Been trying to figure out if it is possible to make a 3D printed laser autocollimator...
Really cool work. Couple of questions/comments. Did you calibrate your sensor data with a dark measurement? What's the spot size achieved? We have built a confocal microscope at our lab. we do line scans to get faster results (easy if you know the acceleration and speed of the stage). Limiting factor is of course how fast you sample the data. We limit 'stop and measure' at each point to situations where we need more precise measurement or small area scans. We also have a dynamic profile measurement mode where we can measure periodically moving samples. Also I see that you have a structuring laser. You could make custom precise pinholes using black hard paper. You could over complicate your optics to get a smaller spot size. Or use white light as your source which result in different focal point for each wavelength and use a spectrometer to get the profile.
Wow this is the best channel! BT, great stuff as always! If it doesn't mess with your workflow too much you should consider discussing the upcoming projects at the end of your videos. Also, I'm sure you run into a ton of problems trying to get these types of amazing things working, you should consider asking for help (suggestions and ideas) in the comments. It would help with the UA-cam algorithm, it would get people emotionally invested and it would help you make more videos. Apart from the obvious, I think one of the biggest reasons that AVE and Applied Science have been so successful is that they spend a lot of time fostering genuine discord in the comments. Great videos!
That's a good idea, just might start doing that! One thing that makes me hesitant is that I'm never _quite_ sure what projects will end up working out. E.g. I have a few being worked on right now, but it's pretty common for a project to hit a roadblock and pause indefinitely (the confocal was nearly at that point, before I had some ideas to fix the problems). I'd be potentially worried about sharing projects that will never get turned into a video due to circumstances. Think that would be a problem? I don't want to mislead viewers, but maybe I'm just overthinking things here? :) But that's a good point regarding help - lots of smart people watch these videos and might be able to help me unstick the problem projects, so from that perspective it makes a lot of sense to share a little more proactively. Was just chatting with someone who wanted to see some videos about my failed projects, maybe I can do a somewhat recurring video about work-in-progress and failed projects, see if folks have ideas. In any case, cheers! Appreciate the feedback! Will think over the best way to do that.
I would suggest trying something call white light confocal instead of intensity only pinhole confocal, but you need a spectrometer which can also be quite easily made as theres little need for narrow FWHM, a commercial version will be chrocodile from precitec, it gives depth info and you only need to scan in XY, plus with different chromatic abberation lens, you can get different scan range, something like 100um to few mm dynamic range
Hehe, on the todo list actually! I discovered the Nanovea version of the same thing (I think they call it "chromatic confocal" instead, just to be confusing i guess) while working on this project, but was too invested in the regular confocal to quit at that point. I agree, it looks great! Should be so much faster, and it's such a clever mechanism using/abusing chromatic aberration. I think the optics should be pretty straightforward, right? Just a bunch of regular lenses stacked up to increase the chromatic aberration at each lens?
@@BreakingTaps yes, the optics are very straight forward, calibration is a bit tricky, but doable in a home shop i think, we bodged together a chrocodile taped to a benchtop cnc router and did some mapping that way, it worked alright as at high speed weight will average out imperfections, didnt even need filtering. one thing chrocodile can do is 4KHz readout, with a tiny DSP, i will think with a FPGA demo board it will be equally good.
Nice project. Very good details on what this microscope is and how it works, very good. About the optimization "issue" you commented, I see it as a simple thing to run an arduino (or any other microcontroller) driving the steppers directly and sampling the data. I am not sure how much ADC resolution is required to get nice data, but many uC have 10~12bit ADCs and sample at > 20kS/s, which is way over the stepper frequency. A simple loop will take stepper to "home" and do step; take sample; print sample; next. repeat. You do not need to "verify" the position, just let the actuator (stepper) do it job. There is for sure a time need for the the actuator to stop moving (settle position), but that can be measured by looking at the samples, and dynamically determine how long to wait for. Also running the scan at constant speed, will help to vibration and "inertia problems", ie accelerations. I am not familiar at all with the OpenFlexure device, so maybe I do not see how it would not work like I described.
Very impressive Mr. Breaking Taps! I hope you continue to refine this. One thought that occurred (and I have no idea if this effect is as I imagine it, nor if it can be utilised) is that the laser diode emits photons in a random direction which you carefully collimate and truncate to a circle through the "hole" before the 2 way half silvered mirror. What if you allowed the random photons to bathe the sample and put that camera back in place of the photodiode with a fine grid of holes rather than a single hole. Would that create a 2D image of the sample at a particular height and then use the z axis on the openflexure platform to scan through the heights creating a series of 2D images that you can then analyse and assemble into a 3D data set?
This is a really good observation! I had a segment in the video about this topic but it got cut due to video length. What you propose is very similar to what real, commercial confocals do. They use a spinning disk filled with pinholes in a spiral pattern, and use a camera sensor instead of a photodiode. This lets an array of pinholes "expose" the sample in parallel at that Z-height, and then the the array of pinhole spots are analyzed on the sensor individually. If you search for "spinning disk confocal" or "Nipkow disk" you'll see how it works. So yeah, you're intuition is spot on :)
Staggeringly awesome project and video dude! My area of expertise is mechanical engineering/robotics/machining but I have been trying to learn more about optics, ever since learning about how autocollimators can measure the flatness of surface plates. My one comment/question is this: Do you think the results could be improved if you did your best to isolate the microscope from any vibrations? I remember you saying you 'tried not to bump it', which I assume means it was sitting on a bench or other casual surface. I may be off base, but at those resolutions, the machine might be vibrating at amplitudes small enough as to be imperceptible to the human eye, but still affect the measurements. Even something as small as an air conditioner running in the next room, you walking past the machine, or even sound waves could possibly affect the actual position of the x/y/z delta stage relative to the laser. Maybe something worth trying would be mounting the machine on something with a lot of mass, and wrapping any non-essential surface with electrical tape, along with securing any loose wires? Aluminum has high stiffness and low mass, and therefore transmits vibrations dangerously well, and your entire gantry/laser assembly appears to be one big cantilevered beam, which might be causing it to behave like a tuning fork. I spent 3 years helping design a robotic medical device that used low intensity vibrations applied to the ulna (forearm) then analyzing the tissue's response to infer the mechanical properties of someone's bone strength for the purpose of osteoporosis study. We used a piezoelectric sensor to gather data on how the bone reacted to the vibrations, then reverse engineered the mechanical properties of the bone using statistical analysis and lots of complicated math. So I have spent far too many hours looking at frequency response function plots trying to figure out where sources of unwanted vibration came from haha. Again, awesome project, and thanks for putting together this vid! Huge respect!
I really can't stand how at such exhuming scientific and video quality you only have 25k subscribers. Luckily you have already managed to capture the attention of major scientific channels.
I think the biggest issue is the range of reflectivity. I had this issue with 3d scanning using photogrammetry. Your photos will be greatly affected anywhere there is solder on that PCB, or other curved highly reflective areas. It might be worth trying to air brush a flat color on everything to make the reflective properties uniform, which should normalize your readings and greatly increase the resolution and accuracy of your photos. If air brushing adds too much material to the sample, there might be some gaseous coating options like 2D boron nitride that would only add 1 atom to the height. Good work though. Your channel will do great :)
Cool project. One of the reasons confocal can be so good for biology is that it uses fluorescence, so you get isotopic emission from each point with little effect like absorption or reflection differences. Would be interesting to see if you could coat your samples in a fluorescent dye and add an emission filter if it would significantly improve the quality.
What if find particularily enjoyable about this video is that due to the relative simplicity of the optical setup it works really well as an explanation of how a confocal system functions. What you have built here is essentially a physical version of a diagram one might find in a textbook. The pinhole demonstration, for example, is really cool, since it's not something that you can show on a commercial confocal microscope, and the custom optical table-based setups are usually a bit too complex to serve well as illustrations for those who are not already familliar with the lightpath. I might actually start showing this to my students, the whole video is remarkably well made.
Thanks for the kind words! Really appreciate it, especially from someone that actually knows the subject matter and knows what they are talking about! I'm definitely an optics beginner so it's encouraging to hear there weren't too many mistakes made :)
funny video ! It reminded me one of my internship : I had to build an interferometer to mesure optical elements with 10 nm accuracy for the Z dimension. But instead of laser I used a white light source. Thanks for the video, it brought back some great memories :)
Amazing work. I think there's a lot more you could do on the optimization side - like setting the z scan range based on the height of adjacent points (although if you're post-processessing the data, you'd have switch to doing some of that in real[-ish] time). I think this would particularly help in things like the screw threads (unless you're physically limited in range by something else). Would it be possible to trade off precision for sample volume? (sounds like it would at least require re-gearing the stage motors)
Great project, going to try to repeat it myself) One question, why scanning the whole Z axis? When you have height-to-intencity curve (which is looking somewhat parabolish), just a single measurement makes you to choose a height from one of the two points on that curve. So you could make another measurement in any other point to distinguish them. Moreover this method should work even when your scanning range does not cover all the heights of a specimen, you can calculate the height out of the range.
You could also get a really quick profile using a camera in reflected brightfield. Image a focus series in Z, and then do an Extended Depth of Focus in FIJI (ImageJ). This will return a height map identical to the one you are getting with the confocal. Spiral scanning and photomultiplier tubes will also greatly increase your speed. Finally, a Teensy running in DMA mode can do dual channel ADC at 1.1 MHz per channel which can then be dumped from RAM to an SD card for rapid storage and later processing.
Man! your videos are awesome. We get months worth of education in science and technology in every one of them. Your detailed way of explaining is incredible. Thanks
Have you thought about using some sort of descent/optimization method to increase the overall scan rate? I.e. quickly sweep through the max extent, find the most promising sub-region, then sweep that region, iterating until you reach some confidence value? Thus you are landing a higher density of voxel captures in the region of interest. Local maxima are a PITA but if you get clever with filter/wavelet/kernel methods you can usually detect global vs local maxima. You can also possibly use wavelet denoising or lowpass filtering and get the gradient and actually use that like a servo to drive the Z to the focal distance, and stop once your delta is small enough. Fitting a parabolic curve might also work. What I would want to try: 1) sweep the whole Z in one direction (z+) to find the rough global max. 2) Skip to just before the global max and scan (z-) until you are definitely trending away from focus 3) sweep (z+) back over the max 4) repeat with smaller sweeps each stage until convergence
@ 17:39, your issue is with the zener diodes encased in glass, the solder joint is fairly clear but the round glass is scattering the light and there goes the resolution
Would something along the lines of modulating the laser diode supply with a 1kHz signal and then bandpass filtering the signal from the photodiode for 1kHz help with environmental noise/whatever? I'm just throwing this out there in case someone who knows more about the subject can comment on it, I just remember seeing this method of reducing 1/f noise during some rf labs at uni.
@@BreakingTaps You could get very high noise suppression with a synchronous or coherent FFT. Especially if the laser modulator DAC and the photodiode ADC are on the same crystal clock (IE the same soundcard), so are in perfect sync.
@@BreakingTaps Thinking about this more, this would only suppress noise caused by the laser or photodiode. Obscuration from reflections in the optical assembly would still be present, although captured with greater fidelity. In this case if the reflections are repeatable they could be calibrated out (subtracted from the dataset if they are known well enough), and the pilot tone and coherent FFT would still help with this. Perhaps the calibration could be done with a suitably dark calibration target. I would have fun playing with this, I don't know about you.
@@BreakingTaps If you could replicate a set-up like this, it would probably reduce noise by a fair bit. I'm not sure how you could do it without this expensive equipment though. ua-cam.com/video/rzzliN_vTKs/v-deo.html
Modulation and synchronous detection will suppress 1/f noise in the detection electronics and things like room light leaking to the detector. I believe that bigger noise reduction would come from better detecter front end electronics. A good reference is Phil C.D. Hobbs' book "Building Electro-Optical Systems" and especially chapter 18 on detector front ends.
Punching my ticket, this channel is gonna be in the hundreds of thousands some day. Damn good explanation and camera work, + the start skit. Maybe even pushing a million like TOT...
My guess is that for some images the normal of the surface matters very much (e.g. the screw). Thus you don't get the light back as it's reflected in a different direction
Yeah I think you're probably right, between being highly reflective and also at a very bad angle, probably very little light probably made it to the sensor.
first thing that comes to mind is reflectivity would greatly affect the results and create ALLOT of noise.. because after all, your relying on the reflection of the laser to plot the data.. so if the surface of what your measuring has a higher reflection than that of other points, then it will throw it off, because your measuring the reflection at a specific Z point, as opposed to the actual surface height. this is why electron microscopes work so well, because an electron cares less about reflectivity of light upon the surface that its measuring.
Dunno if you know about this but it looks like you used a high-Z scope probe cable for connecting the photodiode to the TIA - probe cables are lossy by design and have a few hundred Ohms of resistance per meter, which might be part of your "speed woes"
Just out of curiosity - if you're at maximum motor speed for your scan... can you still increase the sampling rate of your diode? 🤔 If so maybe a setup with two rotating mirrors would be interesting: you could move the scan beam out, say 5mm and rotate it in a circle above the surface. This would reduce your scan time significantly, since you only need to move only 5 mm in x/y to scan 10 mm and you can scan multiple pixels in depth at the same time :)
What a great video! I would be interested to see if you could improve on the amount of time it takes to scan by implementing a gradient ascent technique to try to move the stage closer to the focal point without scanning the entire range. You could also use the surrounding pixels to try to determine a good Z starting point for the gradient ascent at the current pixel. Not sure what kind of effect this would have on processing time though.
In a previous life, I learned a lot about CT scanners. The basics are simple: take a big hubless wheel. Put an X-ray source on the wheel, pointed at the centre of rotation. Put a detector on the other side of the wheel. spin the wheel, gather signal strength data, do *LOTS* of computation, get a detailed image, called a slice. Throw in a motorized bed to move the patient in and out of the machine, and you can scan a volume by gathering *many* slices. OK, so at some point, Toshiba had a bright idea: they used an X-ray source that produced a line of light, not a point, and opposite it, they put a line of sensors. That way, they got multiple slices in a single pass. By about a decade ago, they had such density that they could image an entire human heart in a single rotation, and since they were doing about 3RPM IIRC, that meant that they could make CT scan videos of a heart as it pumped! Anyhow, it seems to me that you could do the same: miniaturise the laser+sensor system and put more in side by side. I haven't looked into the optics of it, but if you could use a bar diode and a linear ccd, you might be able build a system that can scan the entire Y-axis at once. A 64hour scan would come down to 8 hours. I also wonder if there are better scanning patterns. eg: diagonals. Start at [MaxX, Miny,MaxZ] and command a move to [MinX,MinY,minZ], then move to [MinX,MinY,MinZ+1], then scan to [MaxX-1,MinY,MaxZ], etc.
I have a personal ambition to build an STM. I will consider myself successful when I can see atomic dislocations in a metallic crystal. So far I have designs but no working prototypes. Just an occasional image before a tip crash. I have no real need for one of these but my purpose of designing one is one of learning. At the same time, I end up creating supporting hardware that has other uses. Videos like this one are inspirational. I work in the semiconductor industry and need to worry about particle contamination at the sub-micron level. The difference between what I do at home and at work is about 4 orders of magnitude in cost.
You may be able to build a small piezo stack for ultrafine travel. Combined with linear encoders, you'd have the ability to move within your typical tolerance to sub-micron. (i.e. stepper moves to position, encoder receives a call to provide the precise position value, and a differential voltage is applied across the piezo stack to provide movement offset) The traditional large assemblies wouldn't be needed for this sort of payload, might be able to DIY something up with a few piezo crystal stacks. Edit: Just checked a local supplier, they're $77 for a stroke length of 17.4 microns, dynamic load force 200N rated.
Do you plan to do some more science with this setup in the future? Some thoughts: I can think of three main causes of error in your measurements, 1) specular / non-matte surfaces might be reflecting light in a very position-dependent way, so that might throw off some of the scans. Usually when they want to make a 3D scan of a big, reflective object, they paint it with an anti-reflective coating so light spreads in a diffuse manner and surface brightness only depends on angle to the light source + shadows. 2) piggybacking on that, curved and slanted objects may cause error because, things "on axis / in reticle" would look dimmer than they are IF the light is reflecting away from the scope instead of diffusely, and things "away from axis" would look brighter because they might have shiny spots on them. 3) have you tried using multiple wavelengths or a white light source? It might reduce the effect of diffraction/interference, though you'd have to deal with chromatic aberration then. Also, it's interesting how the traces of a pcb look sharper (more step-like) under an optical microscope - could this be related to multiple wavelengths?
Possibly, definitely going to take a break from it for a while though. These are good tips, saving for future iterations! Speaking of chromatic aberration, there's a variant called chromatic confocal which I'd like to try. It uses/abuses chromatic aberration to detect Z-height in a single pass (no scanning in Z). Using an optical stack that purposefully introduces chromatic aberration, different colors are stretched and focused to very different z-heights, and then you use a spectrometer to read which color is highest intensity. Looks fun, and should be faster / more precise (z resolution depends on how much you aberrate it, and on spectrometer resolution)
We're still under 100 comments and I'm subscribed to a chunk of the commenters that left them lol. I feel like I'm with my people here (not for long of course, remember us when you get that gold button!) Amazing job with the intro by the way. Probably obvious but still needs said. Guess I can unpause and watch the rest now haha.
I wonder if increased rigidity would reduce the input noise? Also cleaning up that terror of an amplifier would definitely help. Getting a decent ADC board with a low noise amplifier and taking multiple samples and averaging them would cut out a ton of noise. If you're feeling crazy ambitious you could try to use a real time digital filter on the incoming data to filter noise out while constantly moving the motion platform in multiple dimensions to track the curve. But the vibrations from the motors would probably be an issue in that case. Anyway fantastic video, I would love to see more! The more I think about it the more it really just seems like an FPGA problem. Now I want to design a scanning laser microscope control board...
Have you tried pointing the laser at the photo receptor for the expected duration of a scan? That’ll quantify the noise that’s outside of the microscope stage.
Since the system determines depth based on intensity, maybe build a closed loop controller for the laser diode to ensure stability? Also get a bigger laser!
I feel like a faster way to scan this would be to use a PID to try and keep focus by affecting the Z height of the stage. You could start by moving to (0,0) and finding the optimal z height with the highest signal intensity, and then begin a slow raster scan of the subject. Provided the x-y movement was slow enough that the PID had ample time to try and keep the focus optimal, you could just directly save your Z height as the output, essentially eliminating a whole dimension from your problem
Did you rotate the laser axially to get the maximum light through put? The polarization (orientation) of the laser beam will affect the transmission and reflection through your beam splitters and other optics. Great project. Looking forward to future improvement videos. Alternatively, you can find an old metallurgical microscope (inverted) and 3d print an adapter to the illumination input. I simply 3d printed a laser holder that allowed me to shining a laser pointer directly into the illumination optics entrance and down on the sample. Then to get the beam illuminated area to be smaller I put a piece of double sided copper tape and poked a needle sized hole right in the center. I was able to get less than 100um beam size. I'm sure it could be improved too.
It'd be cool to do this with multiple wavelengths. IR vs. visible topologies for example. Another thing worth looking at might be to use a mild diffuser and concentric photodiodes instead of a single diode or a camera. Because those contours are slopey and fairly linear, you could get instantaneous readings (if I understand the principle at work here lol) and if you set up the diode array intelligently, you possibly reduce the problem with finding the wrong maximum. Another option is reducing the number of measurements with active scanning by processing the samples in real time; if you combine this with the multi-diode thing, maybe the differences between the diodes can get you closer faster. Of course, I get that there's a lot more mechanical complexity involved when you have four or more pinholes, and need chambers for those holes.
If you use a ccd sensor without the pinhole, you could scan for the smallest radius, so intensity doesn't matter. that way you can scan both reflectivity and height at the same time, instead of trying to correlate both
I wouldn't mind seeing you improving upon this. I was able to find a height map of the obverse of a Lincoln cent elsewhere online, and that was an amazing help in creating a model of the bust. If there were some way to get scans of any coin like that, it'd be absolutely amazing.
Regarding optimization -- instead of scanning the entire Z-Plane of each pixel, have you considered using a b-tree search? (like consider how you search a dictionary for a word, you open it up in the middle decide if your word is before or after that point, and then throw away the bad half and repeat. Each probing throw away half the search area.)
I've worked with confocals, and the easiest way to get the pin hole and X/Y/Z stage is to use an optical fibre for the pinhole then move the fibre tip. Also we used photomultiplier tubes which give you much better sensitivity.
Ah, that's clever! I assume you have to use a single mode fiber, or would a larger multi-mode work? That would certainly cut down on the complexity of the optics and alignment!
this reminds me of how old drum scanners worked, but i cant help but feel there is a better way of measuring depth (and over a much larger area simultaneously) while using a camera sensor and detecting image sharpness.
Very cool! My knowledge of optical scanning goes no further than end user where I push button and machine goes brrt, so it's great to see the community come together with advice. I'm very excited to see an upgraded model!
This is amazing! It's fantastic that you can achieve this level of detail using 3d printed components. The explanation was very useful and covers a topic which isn't well covered elsewhere. Thank you.
I did! Unfortunately ended up cutting those from the video, due to some technical issues and because the video was running quite long. Here's the "E Pluribus" section of the penny, visualized in VolView: imgur.com/a/jwwH17y and here is an alternate version of z-maxima where it takes the top 50 points around each maxima: imgur.com/a/YXoShko. And here is the other section of the penny: imgur.com/a/MgIjihB Definitely interesting to look at, and helped debug some issues but made seeing the surface harder.
I was wondering this: u can split the reflected beam into two and then pass it through two different lenses such that one beam's focal point is slightly further than the focal point of the other one (~difference of .25 mm maybe), so as the specimen's surface height changes one beam will come into focus and the other one will go out of focus, you can measure the difference of light coming into two photodiodes for each beam and infer the surface height from which beam is brighter by how much. this technique will eliminate the need to move your specimen in the Z direction thereby improving speed and accuracy of imaging. lets assume the max height of your specimen is 1mm and minimum height is 0.5 mm from the base. that means the distance in the focal point of the two beams have to be 0.5mm. when portion under scan reaches the max height of 1mm one beam will be at perfect focus thereby giving max intensity of photodiode signal and when the surface reaches the minimum height the other beam gives the strongest signal. and all other heights will produce some combination of strength signal in between.
Perhaps the SMD resistors weren't reading as well because the reflections in the solder were more specular and not consistently normal to the lens. I imagine highly reflective surfaces in general would be tricky to capture. Would there be a way to diffuse the light reflecting back? Maybe a thin coating?
Really interesting; for pinhole making, you might try an acupuncture needle - sharp and round - works well, and of course various gauges are available.
I don't know your parameters so I'm not sure if that makes sense, but assuming the motors work consistently, why not just do long, uninterrupted scans of the whole working area? Then you can maybe limit the amount of data sent by quantizing to smaller values and storing it as a grid of numbers. That way you can send a command of "scan the whole field from x,y to x',y' at height z, at speed k, measuring every 1s" and get a matrix of values back. Do that a few times at different z's and you get a 3d image almost for free. By tweaking the values you get better speed or better resolution in any axis. After all you're not really measuring the size of features, just the shape.
This project sounds like a perfect candidate for a somewhat beefy microcontroller. Something like an STM32H series. Integrating the amplifier, stepper drivers, and laser driver onto a single board with an MCU would reduce the noise issues as well as latency. This isn't that different from a 3D printer so one might even be able to use Marlin or Klipper firmware to run it. I don't know offhand if either of them would be able to output the intensity data in an easily digested format but I suspect they could.
I have suspicions as to why the top of the shield did not scan properly. I have had huge issues with this scanning shiny objects. Because of the Fresnel effect, the more oblique you get to a surface or edge, you can get a double reading, because all objects become a mirror at the right angle. (The mirage effect). So I often try to scan expensive cars that the owners will not let you use dulling spray on, so i get very similar artifacts. When I scan tiny objects, I have tried dulling spray, but the paint dots are too large, so I started to make my own using pigment that I grind very finely, and spray with a pasche AB turbo airbrush. The spray is so fine, you are able to keep the fidelity of a tiny object and get the dulling you need to cancel the Fresnel effect. I hope that actually helps you. You are a very smart guy and I feel pompous telling you what to do differently. Good luck.. This was an incredibly interesting video to me.
I had a similar issue with scan time on an IR camera I built, based on a single-point IR detector and a couple of silicon mirrors, also driven by stepper motors. In the end, I got it to a) scan the scene at very low resolution and then b) automatically pick points of interest (essentially, hot bits) and go back and scan around them at higher res.
Re: optimization, do you always scan Z in the same direction, or do you do top-bottom, bottom-top, top-bottom, etc? Could save you some travel time, maybe nearly 50%.
Nice. Seems like it didn't like highly reflective surfaces like the screw and pcb with solder. Great project. The open flexure had come a long way since I first checked it out.
Hey, I make confocal, whitelight interferometers and microscopes for a living. Here is a few insights to improve your results.
1) Your setup is non-rigid, which means there will be vibrational motion and modes oscillation between sample and microscope.
Fix this by adding a heavy base and using steel instead of aluminum.
2) Laser Diodes suffer from Speckle noise, which is up to 15% of intensity. Switch instead to a LED based emitter.
3) Dont leave cables hanging, air drafts might push and move source or detector. Make sure they are fixed.
4) Using thick half mirrors is not recommended, as they create ghosting. That happens when double reflections overlap with slight change in angle. Cheap option is film beam splitter or cube beam splitter.
5)In Confocal, we dont move the stage to scan. Instead, we use DLP (mirror arrays) or liquid crystal to raster the image, pixel by pixel at a fixed height, then move along Z, until we find the peak for all points.
Otherwise, its a cool prototype V1. good job.
Awesome, thanks for the tips! Really appreciate it! And doh, didn't even think about the detector moving but that seems very obvious in retrospect. Interesting about DLP, I assumed commercial systems used a galvo system to raster the laser around. Very cool, thanks for sharing!
Dude your videos look soooo good. Also, sweet microscope :)
*Videos shot with a confocal laser microscope*
❤ Thanks! Don't tell anyone but I only release videos because I like color grading footage and pretending I'm Michael Bay. All the science junk is an elaborate cover story 😇
@@BreakingTaps where's the explosions then? bay movies are 50% explosions minimum!
@Herr Gerd Soon™ hahaha
Since you're here, and your most recent video is weeks old and has tens of thousands of comments :P
@Stuff Made Here: Idea for you: A holster for cops that when the firearm is drawn it automatically calls for backup and EMS. Beau of the Fifth Column did a 9 minute video showing some of the benefits of it.
Either try to make one yourself, or help put out the message that this would be good for cops and the people they point firearms at.
I have absolutely zero need for a "confocal laser microscope" but your channel is so incredibly well done I can't help but watch.
I'd love to have confocal laser microscope but I need it so little that I cannot justify even the cost of DIY project to get one. Just like I would want to have accurate spectrophotometer, too.
I've never heard of one but now I need one
It's one of those impulse buys frfr
Very cool. In the 1990s I worked with a startup developing a commercial confocal laser review station in the semiconductor industry. We scanned the laser in x-y and had a piezo stage for the z-axis. It also required a proprietary frame grabber board that was synced to the laser scanner and z-stage. My work was on the microcontrollers, so I only knew the general optics design. We experienced what we called the pit-particle issue where what we knew to be a solid above the surface (a sub micron calibrated latex sphere) could sometimes show up in the 3D image as a hole.That seems similar to what you were sing on the one image. Our optics engineering team spent a lot of time resolving that, but I don’t recall how they attacked it. Great video. Thanks.
That seems like a problem that could be "solved" (mitigated maybe) by analyzing the curve. If the peak is out of reach there should be a steady climb before, which should be detectable with a proper numerical analysis. Then I would replace this value with a max value. It would at least make it obvious in the image where the 'z cropping' happens, instead of random valleys.
If I may suggest - please consider putting the transimpedance amplifier _very_ close to the photodiode, preferably mount the diode directly piggybacked on the opamp IC (directly soldered, no sockets) onto the DIP8 of the opamp. The capacitance of the long coax between the PD and the TIA limits the bandwidth, in your current setup.
Yep. And also using a smaller diode will give better speed (thx lower capacitance) and lower noise.
Cheers for the tips! This project really taught me that my EE skills are terrible and I need to spend some time learning the fundamentals. Just barely got the amp working and it really is awful in every way :) Will keep that in mind for the next one, I forsee myself needing a decent photodiode amplifier in the future :)
If you're still working on this, consider replacing your photodiode and aperture with a linear CCD array. You can use the reflected beam width as feedback for the next Z position to find the focal height in 2-3 iterations instead of scanning.
What's this, I see laser but nothing getting burnt, evaporated or even slightly charred? 🤨
JK that's really cool and I am looking forward to that thing back there in the summer!
Nice to see you here. Guten Tag!
okay, break time's over. Go work on OSMU some more.
Just _really tiny_ charring on the sample 😉
So fun to always see my most loved youtubers on the same channels I subscribed to 😄😄😄
Well we all like Science 😄
why are you browsing UA-cam videos? Don't you have a CNC mill to be recording for us?
I think one of the reasons why you're getting artifacts is because of how metals reflect light : it's mostly specular reflection(it's directional, in your case parasitic) and not diffusive (unidirectional, what you're detecting). metal oxides, however, tend to build up in tiny crevices of metal surfaces and they are dielectrics, so they create tiny diffusive areas in otherwise specular metal which might look like noisy height changes.
This is a bugaboo when working on PCB's under a microscope generally. They are SHINY, and what you see is not a nice illuminated surface but a reflection of the light source. That's why we use ring lights to work on PCBs, at least that eliminates reflections from the surface plane, although not from solder fillets.
I think you are right about reflections. And to add something else. I think some reflections are courses by lights other than the laser. Like the image with the "EC". The left, white part of the image could have a lot of room light. Then the lights were turned of for a little while. And then a small light in the room is turned on what causes the reflections on top of the characters.
But I could be wrong because the scans took multiple days and then I would expect to see more day night effects.
@@Daniel-zw6gz What type of temperature fluctuation is seen in this workspace over 24 hours? The PCB has many components, each with a different CTE. Also conformal coatings can confuse the sense of sharp focus.
Egads! Sorry, this is not where I should have put the question!
I was thinking about reflectivity, too, after a recent experience trying to use photographs to create 3D models using Meshroom. Reflections make it basically impossible for the algorithms to figure out what's going on in the images. Anything reflective has to be dusted with a matte powder to get it to work.
For small movements like, that, maybe a voice-coil based actuator would probably be better - could you maybe adapt a CD/DVD optical block?
Piezo will also be nice, voice coil need some clever close loop thing which piezo you can almost get away with complete open loop
Agreed! Would be a _ton_ faster and probably more precise too. Lesson learned I suppose :) There's a followup technique (chromatic confocal) which I might explore, and will definitely explore alternative motion options. The OpenFlexure stage was super convenient but I didn't realize the movement speed itself would end up being the limiting factor.
maybe heads drive from hdd drive could be better?
really awesome project!
i think you should use kinda white matte spray paint to get rid of scanning artifacts.
i've build ultrasonic "scanner" to make an image using standard arduino us-sensor and had a lot of time to figure out what do i see on my result images )
That is what I am using and you can scan thousands of points per second. I only have dvd lasers on hand but you get better resolution with a BluRay laser. You also get the entire optical unit and sensor as 1 piece and only need to build the stage. There is also a chip inside the drive that contains 7 op amps / comparators to control the voice coils and time the readings.
You could try to have the beamsplitter at the Brewster angle of you laser source and mirror material, could avoid the laser dump, when the optical path is geometrically redesigned.
Woah! That's new to me, just did some reading. Very cool! I had no idea polarized light had that property.
@@BreakingTaps brewster's angle is the kind of thing when you see it happen, the coffee goes out your nose
even if you're not drinking coffee
@@GeorgeTsiros This comment caused coffee to come out my nose. And judging by my neighbor's shouts, I know from where the coffee was teleported.
@@BreakingTaps There are two more reasons for the poor SNR: (1) the laser beam is highly aberrated due to poor alignment quality, and (2) some reflected light will be fed into the laser cavity, which actually affects the output beam intensity. The reflected beam is definitely something you want to avoid.
If the laser is polarized, it might be an option to filter the returning light in that direction to exclude specular reflection from those shiny surfaces. That reduces the return signal very much, but scans for scattering and the surface geometry matters much less, which may otherwise deflect a focused beam in a different direction. It has the same effect as coating the surface matte.
Really cool project! Another way to do this is by using a standard cd or dvd laser head. You cannot scan very large areas, but with very high resolution.
Thanks, and cheers for stopping by! Will take a closer look at those DVD units, are there open source designs/plans/software to control them? I'm not sure I have the skills to hack one myself :)
@@BreakingTaps I think that styropyro has some tutorials on youtube, and they mostly revolve around an lm317 regulator. Also I had an idea for the optimisation which might be interesting: set a grid over the area you're scanning, and go to each point sequentially and move the z axis to find the height of the point. After the first scan look for areas where there is a large change in height and then go back to get more resolution in those areas. This should result in being able to start with a coarser grid which should make the scan a bit faster, although fine detail may be lost in some areas. This was really cool and I don't need a confocal microscope but now I'd really like to try at some point
@@BreakingTaps They are actually not that difficult to control. But, one potential problem is that you need a special 2x2 photodiode to focus properly.
Let me try to explain: imagine a 2x2 grid of photodiodes, with them being oriented at 45 degrees. The optics in there are special so that if you are too far away, the beam becomes elliptical from top to bottom, so the top and bottom photodiodes get more light than the left and right one, but if you're too too far away, the left and right ones get more light than the top and bottom ones. And if you're perfectly in focus, the laser for forms a perfect circle and all photodiodes get the same amount of light. I know Hamamatsu offers photodiodes that can be used for that, but they'd probably cost you a kidney, and the chip that's currently in there doesn't expose the focus data to you. If you want pictures for what I'm talking about, wikipedia has images in the article about the CD player.
But driving the coils themselves is relatively easy, their movement is proportional to the voltage across them.
Actually, a laser unit should be a pretty good confocal stage if I'm not completely mistaken, since you have the exact same thing happening that's happening here, and it's all one unit.
@@BreakingTaps dude there are absolutely tons of wonderfully documented open source projects utilizing the high end opto-mechanics in a standard DVD/Blu-ray optical pickup.
a bit of googling, there are a few things on hackaday and elsewhere. Really incredible documented projects out there.
One of my favorites will show up in Google image results… You will see a nice looking finished product with all of the circuitboards in a purple color. They got some really good results with that, and I think A set a fresh eyes like yours could really push the project further.
Billions of dollars of R&D have gone into developing the optical pickups in some of the higher end units. They absolutely engineered those things to within an inch of their life 😂
I’ve got dozens of them, so if you need some parts just let me know and I’ll ship you a box no charge. Also have a bunch of really high-end hamamatsu optical sensors and components from a bunch of equipment I’ve repaired or salvaged. So I may just have something you need. I’ll gladly chip in and help however I can
After watching this video, I thought this was going to be one of those huge million plus channels that I just hadn't heard of yet. That you only have 25k subs is outrageous to me. Everything here is on par with the best of the best UA-cam has to offer.
I need (want) one!
Awesome work, man!
Dude your video quality and experimental setups keep on getting better! Awesome stuff, keep it up!
Thanks! Really appreciate it :)
Hey, awesome video! I see there already was some comments about reflective surfaces here - and that is indeed the probable cause for the inverted shield structure. When the beam hits the slightly higher point of the shields edge it is scattered into the room and not back into the lense making the signal weaker. This would explain the smaller values in some of the curves peaks too. Alexander Sannikov mentioned in their comment that the metal oxides being diffuseve cause noise in the signal. Indeed if the samples were to be prepared beforehand (like they do for electron microscopes) to be compleately matt with a coating of a white matt substance the laser would behave more uniformly along the entire surface.
Fascinating. Great job and good explanation of the optical path. I wonder if it would be faster to run the scan like an atomic force microscope, riding the surface by tracking the amplitude of the photodiode. Move a step in x, then move the z up or down to maximize the amplitude, repeat. Advance y each time you hit the end of x. The assumption is the surface is often flat, or at least has a gentle slope, so instead of scanning the whole z stack for an x,y point, just search around the last height (z) each time you move to a neighboring point.
I would think you could then attempt to recognise the trend from previous points in the direction you're currently moving and predict which way you need to scan in z.
Great video, 20 minutes fly by, just the right level of detail. From my experience stacking microscope shots and focus failures, it will be that 'specular highlights' (very shiny surfaces) break your algorithm. You'll be assuming that the thing you are scanning has unchanging topology (which is true), but accidentally assuming that when you move the microscope stage that the pattern of light reflected would not change (untrue), because unless the surface is perfectly matte, the 'brightness' does not 1:1 correlate with 'in focus', it also correlates with 'shiny thing pointing at lucky angle to send light back to sender'. Imagine you were scanning a microscopic disco ball, if you strapped a torch to just above a camera lens and moved it closer and further, you'd see that different panels would suddenly become very bright, and others very dark. It confuses normal cameras with their contrast based focus detection (and even sometimes phase detection). If you want to test what I'm talking about, scan some glitter or a retroreflective tape.
I would spray the item to be scanned with a misting of 'airplane glue' smelling hairspray in the giant cans from 50cm away. It will 'matte' your surfaces sufficiently. If it kills the retroreflection of tape, it will be scannable by your algorithm.
Jesus christ! this is a 2Msub channel level production quality! how you manage!
I mean, i loved all your videos but you really outdid yourself with this one!
Cool project. Try to modulate ur laser beam with chopper or so and demodulate ur photodiode signal at the same frequency. This will remove much of noise.
Good point! I was about to suggest some physical wavelength filtering as well, just to remove signals from ambient light, but some decent modulation will remove a lot of the ambient (DC in any case)
It's just a matter of time until this channel explodes. Keep on!
This is really well done! I watched an OpenFlexure video and this was suggested. Really shows that a lot of time went into the project and into the presentation. Wishing you the best of success.
Thanks Kent! Good to see you, hope things are well!
Very cool, i worked on a similar project a few years back using DVD optical pickup heads and its internal optical path, which is indeed a confocal arrangement with an electromagnetic vertical adjustment which provides a high degree of precision.. my failure was in the X-Y stage.. might have to revisit with openflexure but it was something that worked as an arduino shield.
This channel just keeps getting better!
Awesome stuff! I'm amazed that the data collection was actually limiting - I probably would have gone with a different xyz stage and scanned voxels one by one and been way too slow. the continuous scan seemed to be enabled by the latency of the stage so that's pretty awesome! I'm also glad you called out the big cylinder of conflat flanges in the background cause I was getting really curious...
Thanks! Hehehe, I'm pretty excited to start working on the chamber, think I have all the necessary components... just need to wait for my garage to warm up a bit (we just got more snow! argh!) and machine a few different adapters. Soon!
I'm only slightly surprised to see you here
This was a great video. I've found having a fiberoptic cable act as the pin hole to be a good solution. Also adding 2 scanning mirror to traverse the XY plane reduces the need to rely on mechanical movement. A photo-multiplier-tube is a great way to increase the electrons per photon ratio. Also using a quarter wave plate and a polarization beam splitter lets you keep more of the precious photons going to the source.
Interesting, I had thought about using a fiber but wasn't sure if that was correct or not. Does it have to be a single mode fiber, or would larger multi-mode fibers work too? I guess larger would be fine, since I'm already using a multi-mode laser and I should care one way or another anyway. Might give that a shot!
Good idea about quarter wave and polarizing beam splitter! Looks like I need to grab a few more optical components to have on hand for the next project :) my box of optics is slowly growing haha
@@BreakingTaps - MMF is more forgiving because it's 50µm vs SMF being 10µm. Either is a PITA for alignment / focusing. I think going w/ some wave plates and polarizing beam splitter would be more useful to keep those precious photons going to the meter. Good luck!
The quarter wave plate and polarizing beamsplitter also reduces optical feedback into the laser diode. Optical feedback into a laser diode can cause a lot of noise.
Using single mode fiber gives a smaller effective pinhole and a diverging beam that can then be well collimated with a single achromatic lens, which would remove the need for the input lens in your beam expander. I have just butt coupled a telecom patch cable, with a 9 micron diameter core, to a high power LED and imaged the output onto a cheap security camera and have to turn down the current to the LED to not saturate the pixels on the camera. If you need more power into the fiber, you can buy a "visual fault locator Fiber optic cable tester" which couples mW of light into the core of a single mode optical fiber with no alignment. These are available on Amazon for under $20.
You could also use a fiber-optic circulator or a 3dB fiber optic coupler to replace the beamsplitter, which would remove all need to align pinholes to precise locations.
@@bretcannon3826 That Y coupler is a brilliant idea. The optics would be one focus lens to bring the fibre end to a parallel beam for the microscope optic. a fibre coupled laser and detector would complete the capture system.
12:15 you can possibly increase the scanning speed dramatically by making a feedback system, like autofocus, which tracks the surface or, equivalently, the height at which the intensity is maximum, which is the maximum of the curve so when x-y changes, you need only change the z enough to stay at the maximum
Great idea. And if you can implement it with phase detection similar to SLR cameras, you don't need to even guess which way you need to move to get into focus. The end result would be pretty much like optical LP needle.
That said, laser scanner LP players do exist. Maybe one could take some ideas about those. I think the tech is old enough that the patents have already expired but are publicly available.
You've come such a long way in your video production. Hilarious intro and great quality, plus intriguing topics!
That project deserves a subscription right out of the box ! Thanks for producing such an interesting content.
I dont know if it was already mentioned in the comments, but. I have some experience in 3d scanning, basically extracting height information from a series of images, and the general recommendation for an object not to bee too white, or too black in albedo and what is sometimes more important not to be too shiny. From your samples you can clearely see that varnished surface of a PCB net you the worst result, and edges of the shiny metallic coin tricked sensor into wrong depth, even though the xy shape was correct. Try taking pictures of embossed areas of paper money and see if it will make a real difference. Amazing video though!
Congrats on making a convocal! I build microscopes for biological research in my phd for living. Some tips: it seems there are is lot of aberration in the spot at the pinhole, resulting in bad contrast. Use a mirror (in focus) and try tilting and moving the second lens to get a bettet spot. You probably want a kinematic mount for that lens to make the alignment easier.
This man is absolutely incredible. I wish I was able to retain and use learned information as well as he does. He just is a wealth of knowledge.
You retain information by using it. Memorization is a myth and not real learning.
The curved surface at the top of the shield is probably scattering light like a convex mirror. If you had a matte textured object you might get better results.
YOU GIVE ME HOPE.
I'm in awe of this video. My intellect is only barely sufficient to grasp what the components do.
It's true that I feel bitter in myself for not being smart enough to do something like this. But I am profoundly happy that you are. It gives me hope for humanity's future that there are people as brilliant as you in the world. It really does. I wish you all the very best
I was about to comment on your complaints about the slowness of the system given the insane amount of points that you have on the z-scans (eg. 13:10), but then I heard the explanation at 21:01...
Anyway, it seems that you have quite a lot of resolution, a quick and easy way of trading it for a bit more speed or range would be adjusting the gearing of the steppers.
Also those 250 ms of "network response time" are weird and likely worth profiling.
There should be a tech/science youtuber collab, you'd fit in nicely!
Sounds like something Hank Green (SciShow, Crash Course, Journey to the Microcosmos, etc etc etc) could be interested in... but no idea how to get his attention.
Love the project! Miss doing this stuff. Man if it takes a week to image a surface you wonder how much temperature change over that time frame would impact the sample. Its a small area you're sampling but the whole object would chmage temp. For efficiency buildings can drop temp overnight. You're measuring such small features I wonder if it might be enough to cause some of those anomalies in the data plots. It's always a challenge coming up with the right algorithms to filter the way you want but not kill good data or pick the wrong point.
Wow only just saw this video. For faster scanning you could use an x-y galvo stage and f-theta lens like used in a laser marker or SLM 3D printer, that way you can raster scan an area with a fixed subject vs. having to move the subject around. You could effectively steer your beam around as fast as you could read the photodiode and your reading electronics would become the main bottleneck.
Two thoughts: 1. How about using a nozzle as a pinhole. 0.1mm nozzles are pretty cheap, and you could always drill out the back if you need more room for the beam to expand. They come with a convenient screw thread for mounting and fine adjustment along the beam path! 2. RobRenz has a video on an autocollimator mirror system with some interesting differential screws for the precise positioning of mirrors. Been trying to figure out if it is possible to make a 3D printed laser autocollimator...
Really cool work. Couple of questions/comments.
Did you calibrate your sensor data with a dark measurement?
What's the spot size achieved?
We have built a confocal microscope at our lab. we do line scans to get faster results (easy if you know the acceleration and speed of the stage). Limiting factor is of course how fast you sample the data. We limit 'stop and measure' at each point to situations where we need more precise measurement or small area scans. We also have a dynamic profile measurement mode where we can measure periodically moving samples.
Also I see that you have a structuring laser. You could make custom precise pinholes using black hard paper.
You could over complicate your optics to get a smaller spot size. Or use white light as your source which result in different focal point for each wavelength and use a spectrometer to get the profile.
Wow this is the best channel! BT, great stuff as always! If it doesn't mess with your workflow too much you should consider discussing the upcoming projects at the end of your videos. Also, I'm sure you run into a ton of problems trying to get these types of amazing things working, you should consider asking for help (suggestions and ideas) in the comments. It would help with the UA-cam algorithm, it would get people emotionally invested and it would help you make more videos. Apart from the obvious, I think one of the biggest reasons that AVE and Applied Science have been so successful is that they spend a lot of time fostering genuine discord in the comments. Great videos!
That's a good idea, just might start doing that! One thing that makes me hesitant is that I'm never _quite_ sure what projects will end up working out. E.g. I have a few being worked on right now, but it's pretty common for a project to hit a roadblock and pause indefinitely (the confocal was nearly at that point, before I had some ideas to fix the problems). I'd be potentially worried about sharing projects that will never get turned into a video due to circumstances. Think that would be a problem? I don't want to mislead viewers, but maybe I'm just overthinking things here? :)
But that's a good point regarding help - lots of smart people watch these videos and might be able to help me unstick the problem projects, so from that perspective it makes a lot of sense to share a little more proactively. Was just chatting with someone who wanted to see some videos about my failed projects, maybe I can do a somewhat recurring video about work-in-progress and failed projects, see if folks have ideas.
In any case, cheers! Appreciate the feedback! Will think over the best way to do that.
I would suggest trying something call white light confocal instead of intensity only pinhole confocal, but you need a spectrometer which can also be quite easily made as theres little need for narrow FWHM, a commercial version will be chrocodile from precitec, it gives depth info and you only need to scan in XY, plus with different chromatic abberation lens, you can get different scan range, something like 100um to few mm dynamic range
Hehe, on the todo list actually! I discovered the Nanovea version of the same thing (I think they call it "chromatic confocal" instead, just to be confusing i guess) while working on this project, but was too invested in the regular confocal to quit at that point. I agree, it looks great! Should be so much faster, and it's such a clever mechanism using/abusing chromatic aberration. I think the optics should be pretty straightforward, right? Just a bunch of regular lenses stacked up to increase the chromatic aberration at each lens?
@@BreakingTaps yes, the optics are very straight forward, calibration is a bit tricky, but doable in a home shop i think, we bodged together a chrocodile taped to a benchtop cnc router and did some mapping that way, it worked alright as at high speed weight will average out imperfections, didnt even need filtering. one thing chrocodile can do is 4KHz readout, with a tiny DSP, i will think with a FPGA demo board it will be equally good.
Nice project. Very good details on what this microscope is and how it works, very good.
About the optimization "issue" you commented, I see it as a simple thing to run an arduino (or any other microcontroller) driving the steppers directly and sampling the data. I am not sure how much ADC resolution is required to get nice data, but many uC have 10~12bit ADCs and sample at > 20kS/s, which is way over the stepper frequency. A simple loop will take stepper to "home" and do step; take sample; print sample; next. repeat. You do not need to "verify" the position, just let the actuator (stepper) do it job. There is for sure a time need for the the actuator to stop moving (settle position), but that can be measured by looking at the samples, and dynamically determine how long to wait for. Also running the scan at constant speed, will help to vibration and "inertia problems", ie accelerations.
I am not familiar at all with the OpenFlexure device, so maybe I do not see how it would not work like I described.
Very impressive Mr. Breaking Taps! I hope you continue to refine this. One thought that occurred (and I have no idea if this effect is as I imagine it, nor if it can be utilised) is that the laser diode emits photons in a random direction which you carefully collimate and truncate to a circle through the "hole" before the 2 way half silvered mirror. What if you allowed the random photons to bathe the sample and put that camera back in place of the photodiode with a fine grid of holes rather than a single hole. Would that create a 2D image of the sample at a particular height and then use the z axis on the openflexure platform to scan through the heights creating a series of 2D images that you can then analyse and assemble into a 3D data set?
This is a really good observation! I had a segment in the video about this topic but it got cut due to video length. What you propose is very similar to what real, commercial confocals do. They use a spinning disk filled with pinholes in a spiral pattern, and use a camera sensor instead of a photodiode. This lets an array of pinholes "expose" the sample in parallel at that Z-height, and then the the array of pinhole spots are analyzed on the sensor individually. If you search for "spinning disk confocal" or "Nipkow disk" you'll see how it works. So yeah, you're intuition is spot on :)
Staggeringly awesome project and video dude! My area of expertise is mechanical engineering/robotics/machining but I have been trying to learn more about optics, ever since learning about how autocollimators can measure the flatness of surface plates.
My one comment/question is this: Do you think the results could be improved if you did your best to isolate the microscope from any vibrations? I remember you saying you 'tried not to bump it', which I assume means it was sitting on a bench or other casual surface. I may be off base, but at those resolutions, the machine might be vibrating at amplitudes small enough as to be imperceptible to the human eye, but still affect the measurements. Even something as small as an air conditioner running in the next room, you walking past the machine, or even sound waves could possibly affect the actual position of the x/y/z delta stage relative to the laser. Maybe something worth trying would be mounting the machine on something with a lot of mass, and wrapping any non-essential surface with electrical tape, along with securing any loose wires? Aluminum has high stiffness and low mass, and therefore transmits vibrations dangerously well, and your entire gantry/laser assembly appears to be one big cantilevered beam, which might be causing it to behave like a tuning fork.
I spent 3 years helping design a robotic medical device that used low intensity vibrations applied to the ulna (forearm) then analyzing the tissue's response to infer the mechanical properties of someone's bone strength for the purpose of osteoporosis study. We used a piezoelectric sensor to gather data on how the bone reacted to the vibrations, then reverse engineered the mechanical properties of the bone using statistical analysis and lots of complicated math. So I have spent far too many hours looking at frequency response function plots trying to figure out where sources of unwanted vibration came from haha.
Again, awesome project, and thanks for putting together this vid! Huge respect!
Yeah, I very much wonder about the effect of vibrations on his results.
I really can't stand how at such exhuming scientific and video quality you only have 25k subscribers. Luckily you have already managed to capture the attention of major scientific channels.
I think the biggest issue is the range of reflectivity. I had this issue with 3d scanning using photogrammetry. Your photos will be greatly affected anywhere there is solder on that PCB, or other curved highly reflective areas. It might be worth trying to air brush a flat color on everything to make the reflective properties uniform, which should normalize your readings and greatly increase the resolution and accuracy of your photos. If air brushing adds too much material to the sample, there might be some gaseous coating options like 2D boron nitride that would only add 1 atom to the height. Good work though. Your channel will do great :)
Holy cow. Hidden gem of a channel. Proud to say I was here before he hits 10 million subs!
Cool project. One of the reasons confocal can be so good for biology is that it uses fluorescence, so you get isotopic emission from each point with little effect like absorption or reflection differences. Would be interesting to see if you could coat your samples in a fluorescent dye and add an emission filter if it would significantly improve the quality.
What if find particularily enjoyable about this video is that due to the relative simplicity of the optical setup it works really well as an explanation of how a confocal system functions. What you have built here is essentially a physical version of a diagram one might find in a textbook. The pinhole demonstration, for example, is really cool, since it's not something that you can show on a commercial confocal microscope, and the custom optical table-based setups are usually a bit too complex to serve well as illustrations for those who are not already familliar with the lightpath.
I might actually start showing this to my students, the whole video is remarkably well made.
Thanks for the kind words! Really appreciate it, especially from someone that actually knows the subject matter and knows what they are talking about! I'm definitely an optics beginner so it's encouraging to hear there weren't too many mistakes made :)
funny video ! It reminded me one of my internship : I had to build an interferometer to mesure optical elements with 10 nm accuracy for the Z dimension. But instead of laser I used a white light source.
Thanks for the video, it brought back some great memories :)
Amazing work. I think there's a lot more you could do on the optimization side - like setting the z scan range based on the height of adjacent points (although if you're post-processessing the data, you'd have switch to doing some of that in real[-ish] time). I think this would particularly help in things like the screw threads (unless you're physically limited in range by something else).
Would it be possible to trade off precision for sample volume? (sounds like it would at least require re-gearing the stage motors)
Your channel is *insanely* underrated. This is sooo cool.
Wow!
Really interesting project. Hope to see more of this soon. Thank you for sharing!
This is really impressive! It's great to see people really pushing the limits of DIY science.
Great project, going to try to repeat it myself) One question, why scanning the whole Z axis? When you have height-to-intencity curve (which is looking somewhat parabolish), just a single measurement makes you to choose a height from one of the two points on that curve. So you could make another measurement in any other point to distinguish them. Moreover this method should work even when your scanning range does not cover all the heights of a specimen, you can calculate the height out of the range.
You could also get a really quick profile using a camera in reflected brightfield. Image a focus series in Z, and then do an Extended Depth of Focus in FIJI (ImageJ). This will return a height map identical to the one you are getting with the confocal. Spiral scanning and photomultiplier tubes will also greatly increase your speed. Finally, a Teensy running in DMA mode can do dual channel ADC at 1.1 MHz per channel which can then be dumped from RAM to an SD card for rapid storage and later processing.
Man! your videos are awesome. We get months worth of education in science and technology in every one of them. Your detailed way of explaining is incredible. Thanks
Have you thought about using some sort of descent/optimization method to increase the overall scan rate? I.e. quickly sweep through the max extent, find the most promising sub-region, then sweep that region, iterating until you reach some confidence value? Thus you are landing a higher density of voxel captures in the region of interest.
Local maxima are a PITA but if you get clever with filter/wavelet/kernel methods you can usually detect global vs local maxima. You can also possibly use wavelet denoising or lowpass filtering and get the gradient and actually use that like a servo to drive the Z to the focal distance, and stop once your delta is small enough. Fitting a parabolic curve might also work.
What I would want to try: 1) sweep the whole Z in one direction (z+) to find the rough global max. 2) Skip to just before the global max and scan (z-) until you are definitely trending away from focus 3) sweep (z+) back over the max 4) repeat with smaller sweeps each stage until convergence
@ 17:39, your issue is with the zener diodes encased in glass, the solder joint is fairly clear but the round glass is scattering the light and there goes the resolution
Umm could you do this with the openflexure block stage, it's movements are much more precise
Probably! Much smaller range of motion if I remember correctly, but would definitely provide more accurate steps!
Would something along the lines of modulating the laser diode supply with a 1kHz signal and then bandpass filtering the signal from the photodiode for 1kHz help with environmental noise/whatever? I'm just throwing this out there in case someone who knows more about the subject can comment on it, I just remember seeing this method of reducing 1/f noise during some rf labs at uni.
Oh, interesting! Would love to hear what other folks have to say, this is well above my pay grade in terms of EE. :)
@@BreakingTaps You could get very high noise suppression with a synchronous or coherent FFT. Especially if the laser modulator DAC and the photodiode ADC are on the same crystal clock (IE the same soundcard), so are in perfect sync.
@@BreakingTaps Thinking about this more, this would only suppress noise caused by the laser or photodiode. Obscuration from reflections in the optical assembly would still be present, although captured with greater fidelity. In this case if the reflections are repeatable they could be calibrated out (subtracted from the dataset if they are known well enough), and the pilot tone and coherent FFT would still help with this. Perhaps the calibration could be done with a suitably dark calibration target. I would have fun playing with this, I don't know about you.
@@BreakingTaps If you could replicate a set-up like this, it would probably reduce noise by a fair bit. I'm not sure how you could do it without this expensive equipment though. ua-cam.com/video/rzzliN_vTKs/v-deo.html
Modulation and synchronous detection will suppress 1/f noise in the detection electronics and things like room light leaking to the detector. I believe that bigger noise reduction would come from better detecter front end electronics. A good reference is Phil C.D. Hobbs' book "Building Electro-Optical Systems" and especially chapter 18 on detector front ends.
Punching my ticket, this channel is gonna be in the hundreds of thousands some day. Damn good explanation and camera work, + the start skit. Maybe even pushing a million like TOT...
My guess is that for some images the normal of the surface matters very much (e.g. the screw). Thus you don't get the light back as it's reflected in a different direction
Yeah I think you're probably right, between being highly reflective and also at a very bad angle, probably very little light probably made it to the sensor.
first thing that comes to mind is reflectivity would greatly affect the results and create ALLOT of noise.. because after all, your relying on the reflection of the laser to plot the data.. so if the surface of what your measuring has a higher reflection than that of other points, then it will throw it off, because your measuring the reflection at a specific Z point, as opposed to the actual surface height. this is why electron microscopes work so well, because an electron cares less about reflectivity of light upon the surface that its measuring.
Dunno if you know about this but it looks like you used a high-Z scope probe cable for connecting the photodiode to the TIA - probe cables are lossy by design and have a few hundred Ohms of resistance per meter, which might be part of your "speed woes"
Just out of curiosity - if you're at maximum motor speed for your scan... can you still increase the sampling rate of your diode? 🤔
If so maybe a setup with two rotating mirrors would be interesting: you could move the scan beam out, say 5mm and rotate it in a circle above the surface.
This would reduce your scan time significantly, since you only need to move only 5 mm in x/y to scan 10 mm and you can scan multiple pixels in depth at the same time :)
What a great video! I would be interested to see if you could improve on the amount of time it takes to scan by implementing a gradient ascent technique to try to move the stage closer to the focal point without scanning the entire range. You could also use the surrounding pixels to try to determine a good Z starting point for the gradient ascent at the current pixel. Not sure what kind of effect this would have on processing time though.
In a previous life, I learned a lot about CT scanners. The basics are simple: take a big hubless wheel. Put an X-ray source on the wheel, pointed at the centre of rotation. Put a detector on the other side of the wheel. spin the wheel, gather signal strength data, do *LOTS* of computation, get a detailed image, called a slice. Throw in a motorized bed to move the patient in and out of the machine, and you can scan a volume by gathering *many* slices.
OK, so at some point, Toshiba had a bright idea: they used an X-ray source that produced a line of light, not a point, and opposite it, they put a line of sensors. That way, they got multiple slices in a single pass. By about a decade ago, they had such density that they could image an entire human heart in a single rotation, and since they were doing about 3RPM IIRC, that meant that they could make CT scan videos of a heart as it pumped!
Anyhow, it seems to me that you could do the same: miniaturise the laser+sensor system and put more in side by side. I haven't looked into the optics of it, but if you could use a bar diode and a linear ccd, you might be able build a system that can scan the entire Y-axis at once. A 64hour scan would come down to 8 hours.
I also wonder if there are better scanning patterns. eg: diagonals. Start at [MaxX, Miny,MaxZ] and command a move to [MinX,MinY,minZ], then move to [MinX,MinY,MinZ+1], then scan to [MaxX-1,MinY,MaxZ], etc.
I have a personal ambition to build an STM. I will consider myself successful when I can see atomic dislocations in a metallic crystal. So far I have designs but no working prototypes. Just an occasional image before a tip crash. I have no real need for one of these but my purpose of designing one is one of learning. At the same time, I end up creating supporting hardware that has other uses. Videos like this one are inspirational. I work in the semiconductor industry and need to worry about particle contamination at the sub-micron level. The difference between what I do at home and at work is about 4 orders of magnitude in cost.
You may be able to build a small piezo stack for ultrafine travel. Combined with linear encoders, you'd have the ability to move within your typical tolerance to sub-micron. (i.e. stepper moves to position, encoder receives a call to provide the precise position value, and a differential voltage is applied across the piezo stack to provide movement offset) The traditional large assemblies wouldn't be needed for this sort of payload, might be able to DIY something up with a few piezo crystal stacks.
Edit: Just checked a local supplier, they're $77 for a stroke length of 17.4 microns, dynamic load force 200N rated.
Do you plan to do some more science with this setup in the future? Some thoughts: I can think of three main causes of error in your measurements, 1) specular / non-matte surfaces might be reflecting light in a very position-dependent way, so that might throw off some of the scans. Usually when they want to make a 3D scan of a big, reflective object, they paint it with an anti-reflective coating so light spreads in a diffuse manner and surface brightness only depends on angle to the light source + shadows. 2) piggybacking on that, curved and slanted objects may cause error because, things "on axis / in reticle" would look dimmer than they are IF the light is reflecting away from the scope instead of diffusely, and things "away from axis" would look brighter because they might have shiny spots on them. 3) have you tried using multiple wavelengths or a white light source? It might reduce the effect of diffraction/interference, though you'd have to deal with chromatic aberration then. Also, it's interesting how the traces of a pcb look sharper (more step-like) under an optical microscope - could this be related to multiple wavelengths?
Possibly, definitely going to take a break from it for a while though. These are good tips, saving for future iterations! Speaking of chromatic aberration, there's a variant called chromatic confocal which I'd like to try. It uses/abuses chromatic aberration to detect Z-height in a single pass (no scanning in Z). Using an optical stack that purposefully introduces chromatic aberration, different colors are stretched and focused to very different z-heights, and then you use a spectrometer to read which color is highest intensity. Looks fun, and should be faster / more precise (z resolution depends on how much you aberrate it, and on spectrometer resolution)
We're still under 100 comments and I'm subscribed to a chunk of the commenters that left them lol. I feel like I'm with my people here (not for long of course, remember us when you get that gold button!)
Amazing job with the intro by the way. Probably obvious but still needs said. Guess I can unpause and watch the rest now haha.
I wonder if increased rigidity would reduce the input noise? Also cleaning up that terror of an amplifier would definitely help. Getting a decent ADC board with a low noise amplifier and taking multiple samples and averaging them would cut out a ton of noise. If you're feeling crazy ambitious you could try to use a real time digital filter on the incoming data to filter noise out while constantly moving the motion platform in multiple dimensions to track the curve. But the vibrations from the motors would probably be an issue in that case. Anyway fantastic video, I would love to see more! The more I think about it the more it really just seems like an FPGA problem. Now I want to design a scanning laser microscope control board...
Have you tried pointing the laser at the photo receptor for the expected duration of a scan? That’ll quantify the noise that’s outside of the microscope stage.
Since the system determines depth based on intensity, maybe build a closed loop controller for the laser diode to ensure stability? Also get a bigger laser!
2 minutes in, this is what it's all about on so many levels. So impressed already!
I feel like a faster way to scan this would be to use a PID to try and keep focus by affecting the Z height of the stage. You could start by moving to (0,0) and finding the optimal z height with the highest signal intensity, and then begin a slow raster scan of the subject. Provided the x-y movement was slow enough that the PID had ample time to try and keep the focus optimal, you could just directly save your Z height as the output, essentially eliminating a whole dimension from your problem
Did you rotate the laser axially to get the maximum light through put? The polarization (orientation) of the laser beam will affect the transmission and reflection through your beam splitters and other optics. Great project. Looking forward to future improvement videos.
Alternatively, you can find an old metallurgical microscope (inverted) and 3d print an adapter to the illumination input. I simply 3d printed a laser holder that allowed me to shining a laser pointer directly into the illumination optics entrance and down on the sample. Then to get the beam illuminated area to be smaller I put a piece of double sided copper tape and poked a needle sized hole right in the center. I was able to get less than 100um beam size. I'm sure it could be improved too.
I love the way you explain! Thank you for shining the light of knowledge all over like that.
I audibly shouted "SIIIIICK" when you showed the topological renderings. Instant subscription.
It'd be cool to do this with multiple wavelengths. IR vs. visible topologies for example. Another thing worth looking at might be to use a mild diffuser and concentric photodiodes instead of a single diode or a camera. Because those contours are slopey and fairly linear, you could get instantaneous readings (if I understand the principle at work here lol) and if you set up the diode array intelligently, you possibly reduce the problem with finding the wrong maximum.
Another option is reducing the number of measurements with active scanning by processing the samples in real time; if you combine this with the multi-diode thing, maybe the differences between the diodes can get you closer faster.
Of course, I get that there's a lot more mechanical complexity involved when you have four or more pinholes, and need chambers for those holes.
If you use a ccd sensor without the pinhole, you could scan for the smallest radius, so intensity doesn't matter. that way you can scan both reflectivity and height at the same time, instead of trying to correlate both
I wouldn't mind seeing you improving upon this. I was able to find a height map of the obverse of a Lincoln cent elsewhere online, and that was an amazing help in creating a model of the bust. If there were some way to get scans of any coin like that, it'd be absolutely amazing.
Regarding optimization -- instead of scanning the entire Z-Plane of each pixel, have you considered using a b-tree search? (like consider how you search a dictionary for a word, you open it up in the middle decide if your word is before or after that point, and then throw away the bad half and repeat. Each probing throw away half the search area.)
I've worked with confocals, and the easiest way to get the pin hole and X/Y/Z stage is to use an optical fibre for the pinhole then move the fibre tip. Also we used photomultiplier tubes which give you much better sensitivity.
Ah, that's clever! I assume you have to use a single mode fiber, or would a larger multi-mode work? That would certainly cut down on the complexity of the optics and alignment!
this reminds me of how old drum scanners worked, but i cant help but feel there is a better way of measuring depth (and over a much larger area simultaneously) while using a camera sensor and detecting image sharpness.
Very cool! My knowledge of optical scanning goes no further than end user where I push button and machine goes brrt, so it's great to see the community come together with advice.
I'm very excited to see an upgraded model!
This is amazing! It's fantastic that you can achieve this level of detail using 3d printed components. The explanation was very useful and covers a topic which isn't well covered elsewhere. Thank you.
Really interesting! Did you try to process the complete 3D volume in ImageJ (or Fiji) instead of generating the 2D image of Z-profile maxima?
I did! Unfortunately ended up cutting those from the video, due to some technical issues and because the video was running quite long. Here's the "E Pluribus" section of the penny, visualized in VolView: imgur.com/a/jwwH17y and here is an alternate version of z-maxima where it takes the top 50 points around each maxima: imgur.com/a/YXoShko. And here is the other section of the penny: imgur.com/a/MgIjihB
Definitely interesting to look at, and helped debug some issues but made seeing the surface harder.
I was wondering this: u can split the reflected beam into two and then pass it through two different lenses such that one beam's focal point is slightly further than the focal point of the other one (~difference of .25 mm maybe), so as the specimen's surface height changes one beam will come into focus and the other one will go out of focus, you can measure the difference of light coming into two photodiodes for each beam and infer the surface height from which beam is brighter by how much. this technique will eliminate the need to move your specimen in the Z direction thereby improving speed and accuracy of imaging.
lets assume the max height of your specimen is 1mm and minimum height is 0.5 mm from the base. that means the distance in the focal point of the two beams have to be 0.5mm. when portion under scan reaches the max height of 1mm one beam will be at perfect focus thereby giving max intensity of photodiode signal and when the surface reaches the minimum height the other beam gives the strongest signal. and all other heights will produce some combination of strength signal in between.
Perhaps the SMD resistors weren't reading as well because the reflections in the solder were more specular and not consistently normal to the lens. I imagine highly reflective surfaces in general would be tricky to capture. Would there be a way to diffuse the light reflecting back? Maybe a thin coating?
Really interesting; for pinhole making, you might try an acupuncture needle - sharp and round - works well, and of course various gauges are available.
I don't know your parameters so I'm not sure if that makes sense, but assuming the motors work consistently, why not just do long, uninterrupted scans of the whole working area? Then you can maybe limit the amount of data sent by quantizing to smaller values and storing it as a grid of numbers. That way you can send a command of "scan the whole field from x,y to x',y' at height z, at speed k, measuring every 1s" and get a matrix of values back. Do that a few times at different z's and you get a 3d image almost for free. By tweaking the values you get better speed or better resolution in any axis. After all you're not really measuring the size of features, just the shape.
This project sounds like a perfect candidate for a somewhat beefy microcontroller. Something like an STM32H series. Integrating the amplifier, stepper drivers, and laser driver onto a single board with an MCU would reduce the noise issues as well as latency.
This isn't that different from a 3D printer so one might even be able to use Marlin or Klipper firmware to run it. I don't know offhand if either of them would be able to output the intensity data in an easily digested format but I suspect they could.
Agreed! I really need to learn me some better EE skills so I could integrate this stuff a bit better than breadboarding :)
Dude the cinematography in this is NUTS
I have suspicions as to why the top of the shield did not scan properly. I have had huge issues with this scanning shiny objects. Because of the Fresnel effect, the more oblique you get to a surface or edge, you can get a double reading, because all objects become a mirror at the right angle. (The mirage effect). So I often try to scan expensive cars that the owners will not let you use dulling spray on, so i get very similar artifacts. When I scan tiny objects, I have tried dulling spray, but the paint dots are too large, so I started to make my own using pigment that I grind very finely, and spray with a pasche AB turbo airbrush. The spray is so fine, you are able to keep the fidelity of a tiny object and get the dulling you need to cancel the Fresnel effect. I hope that actually helps you. You are a very smart guy and I feel pompous telling you what to do differently. Good luck.. This was an incredibly interesting video to me.
I had a similar issue with scan time on an IR camera I built, based on a single-point IR detector and a couple of silicon mirrors, also driven by stepper motors. In the end, I got it to a) scan the scene at very low resolution and then b) automatically pick points of interest (essentially, hot bits) and go back and scan around them at higher res.
The correct term is "debossed".
deboss: the design is recessed into the surface.
emboss: the design is raised from the surface.
Re: optimization, do you always scan Z in the same direction, or do you do top-bottom, bottom-top, top-bottom, etc? Could save you some travel time, maybe nearly 50%.
Nice. Seems like it didn't like highly reflective surfaces like the screw and pcb with solder. Great project. The open flexure had come a long way since I first checked it out.