3D printed internals replacement for PLab-3

35 views
Skip to first unread message

Bryan Mayland

unread,
Oct 26, 2016, 9:28:53 AM10/26/16
to plots-spectrometry
I bought a desktop spectrometry kit from the Public Lab store, I had an issue where the webcam lens aperture appeared to be too high. It looked around 38mm from the base and I was getting 1/4 of the webcam image cut off by the top of the cutout in the DVD holder. I tried moving the camera down into the soft velcro a bit but was still missing a bit of the image and wasn't having very good results. As an owner of a couple 3D printers, I felt I could improve the design a little so I made a little something last night.



The design is customizable for distance from slit to lens, lens height, lens/grating block angle, webcam dimensions, etc. The DVD bit or a commercial "diffraction grating slide" is just laid over the camera and can be secured by taping the sides or double-sided tape. There is a reference mark to align the lens at the proper height, and a cable channel under the block for running the wire out. Printed in cheap $18/kg PLA, the standard 200mm length, 35mm height unit is about 25 grams or roughly 45 cents and takes about 50 minutes to print. The 200mm length version (~210mm overall) should be able to be printed on a standard 200x200mm 3D printer if rotated 45 degrees to fit on the bed. Baffles and slit mounts can be integrated into the same frame although I haven't experimented with this at all. One issue is that the double-sided tape for attaching the webcam doesn't stick as well as it does to the wooden block. I'm not sure how to address this to secure the webcam more rigidly.




Here is a CFL capture from the device: https://spectralworkbench.org/spectrums/89578

A couple general questions I have:
-- When using the 1000 lines/mm diffraction grating, a 640x480 capture from the webcam crops out half the spectrum due to it being off-center. I can move the spectrum up and down by moving the device up and down but left and right do nothing so how would I center the image better? Tilt the webcam left or right a little?
-- In my capture, you can see the green and red are almost clipping and overall there isn't a lot of detail in the capture. Would this be remedied by a smaller slit? Is the image out of focus? I've tried focusing the webcam using a page of text at 200mm but man is it ever hard to focus because the image is blurry while touching the lens due to the whole thing moving so it becomes a series of "better now? or better now?" small adjustments until I give up.
spectrometer.scad

Dave Stoft

unread,
Oct 26, 2016, 2:18:52 PM10/26/16
to plots-spectrometry
Bryan, very clever 3D version! On your questions......

The diffraction formula (simplified and solved for angle) is diffraction_angle = arcsin( wavelength / diffraction_grating_line_spacing ) which you can see will mean that for any given wavelength (like the 546nm Green peak) the diffraction angle (and therefore the mounting angle of the grating) is a function of the line spacing of the grating. So, if the grating angle remains the same (for both gratings) then the position of the spectral image in the camera will shift "sideways" as you observed. The mounting angle for the grating + camera could be changed to accommodate, but remember that higher grating line density (eg. the 1000 lines/mm) may not be an advantage because 1) the camera is only 640 pixels and the spectra only covers about half of that, and 2) higher "line count" of a grating can decrease the wavelength span seen by the camera. That said, the expected numbers can be calculated to see the effects to decide if they meet expectations.

I assuming you are using a "film slit" of the PLab kit; the 0.12mm slit is as small as you'd be effective at using -- and, at about 320pix for a spectrum, the wider slits probably wouldn't have a large impact on resolution. What I noticed is the CFL source is overloading the camera and you are getting heavy clipping. Move the light source further away -- maybe double the distance or more? You might also want to make a "baffle" for the light source (piece of cardboard with a 1/2-in hole to better approximate a "point source"). The slit is being asked to illuminate a small set of diffraction lines and a broad (width) source of light is actually overlapping source light over a range of angles (it's like moving the spectrum analyzer back and forth and expecting the detected light to remain exactly the same. Yes, focus could also be part of the "fuzzy" peaks. If you are able to adjust the focus and observe non-clipped signals, look at the  lower-level "hash" to the "left" (shorter wavelengths) of the red peak -- and try to get those spectral lines to be well-defined. That said, you are ultimately at the mercy of the tiny, wide-angle polycarbonate lens which has a very wide DOF (depth of field) so will never focus very well. Setting the lens to just focus at a room object 6 feet away may do just as well. Finally, spectral stability is also a function of camera mechanical stability -- in this design, with the PLab camera, it is very sensitive to "side-to-side" motion ("angular rocking") as the PLab thin double-stick tape for the back of the camera is just not sufficient -- and makes mechanical motion or stress on the USB cable a big factor in stability.

Hope this helps.
Cheers,
Dave

Liz Barry

unread,
Oct 26, 2016, 4:54:52 PM10/26/16
to plots-spe...@googlegroups.com
Dear Bryan, 
Great to hear from you!

Could you take your excellent email (pictures and all) and post as an upgrade here? (scary long version of that link: https://publiclab.org/post?tags=upgrade:dssk,upgrade:spectrometry,seeks:builds&title=Spec%20Upgrade:%20[new%20name] )

The point of all this is that when you post with all those tags, your upgrade will be listed as an upgrade on the main spectrometry page: https://publiclab.org/wiki/desktop-spectrometry-kit-3-0#Upgrades

Thank you and let me know if you want to get on the phone about how to do this. 

Liz

--

Liz Barry
director of urban environment
@publiclab

--
Post to this group at plots-spectometry@googlegroups.com
 
Public Lab mailing lists (http://publiclab.org/lists) are great for discussion, but to get attribution, open source your work, and make it easy for others to find and cite your contributions, please publish your work at http://publiclab.org
---
You received this message because you are subscribed to the Google Groups "plots-spectrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plots-spectrometry+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages