DIY Smartphone Spectrometer part 1

calendar_today Mar 20, 2020 • person Chinna Devarapu

What is a spectrometer

Many of us might have witnessed a beautiful rainbow during a rainy day. Rainbow is basically a spectra of light. Rainbow is formed when sunlight is dispersed into several colours by rain drops. If we can make an instrument that can do the same job as the rain drops do i.e. disperse light into its constituent colours, that instrument will be called a (optical) spectrometer. Spectrometer is also called a spectrophotometer, spectrograph or spectroscope**.**

Usually a prism or a grating is employed in spectrometers to disperse light. The other essential components of a spectrometer are a slit and a spectral recording medium to store the spectra for analysis. Of course scientific spectrometers consist of more than these bare minimum components. Spectrometers are used in many applications, including environmental, medical, bio, chemical and gems analysis. Several types of spectrometers have been developed for various applications. Here, we discuss spectrometers that work in the visible spectral region, i.e the spectra what we can see with our eyes.

Figure 1: a) Rainbow (spectra) formed by rain drops (PC: wikipedia) b) A simple schematic of spectrometer with most essential components indicated. (P.C AglsAgent et al. )

Why smartphones are interesting for spectroscopy

As mentioned earlier, a bare spectrometer requires a slit, light dispersing element, spectral recording medium. In scientific spectrometers, the light recording medium is usually a special camera with very cool features such as high resolution, low-noise and high quantum efficiency. Apparently, cameras in smartphones are used for recording the spectra. These days cameras in spectrometers are ever evolving with 100’s of megapixels and have quantum efficiencies rivaling the performance of high-end scientific cameras. Therefore, smartphone cameras can be exploited to turn a smartphone into a spectrometer.

Another great feature of smartphones is the touch screen that can act as a great user interface for a spectrometer by providing instant access to recorded spectra. Smartphones also provide connectivity options such as Bluetooth, WiFi, Mobile network for transfer of recorded spectra. Therefore, smartphone cameras are highly attractive to be used in research.

How to turn a smartphone into a spectrometer

Since one of the three components of a spectrometer, i.e. spectra recording medium is provided by smartphone, one needs to add just a slit and a light dispersing element to turn a smartphone into a spectrometer. There are many smart people and research groups that are trying to add these basic optical systems to a smartphone, primarily by using the emerging digital fabrication tools such as 3D printing, laser cutting or paper cutting.

I have been following this smartphone spectroscopy field for a very long time. I am inspired by the available smartphone spectrometer designs. I would like to make spectrometer designs that are simple, low-cost, DIY friendly, or designs that can be made with off-the-shelf components and require fewer 3D printed parts.

I hope such smartphone spectrometers will be useful for many applications such as point of care diagnosis, analysis of biomedical fluids, chemical analysis in research labs and as a great teaching tool for school children.

Smartphone spectrometers that inspired me

Figure 2: Various smartphone spectrometer designs a) Public lab’s paper craft spectrometer b) Spectrometer made using the lens from google cardboard project c) Spectrometer with fiber integration d) Commercially available smartphone spectrometer.

I am inspired mainly by 4 designs which I show in Fig 2. The very first one (Fig 2. a) is from Public lab’s DIY spectrometer. Several models of excellent spectrometers were demonstrated by the members of this awesome community. Out of their many designs, my personal favourite is the Papercraft spectrometer which is an evolved version of their Foldable Spectrometry Starter Kit [1]. These designs are easy to be made using just a few components i.e. a thick paper sheet, a grating made from a DVD disk. Their software is mainly web based (it can be installed on Windows and Linux, but not easy). I used the software sparsely but I am not a huge fan of it.

I made this spectrometer using a cardboard sheet and a fragment of a DVD. The initial spectra recorded from light emitting sources such as CFL lamps and Tungsten bulbs are fun. But the above designs don’t have provision for absorption and fluorescence spectra as they simply don’t have sample holders and light sources.

My second favourite (Fig. 2b) is the one made by researchers from Universidad Privada Boliviana. The impressive thing about this spectrometer is the smartphone app they developed. Although I never built their version of the spectrometer, I used their app extensively. I really like their app which was developed using OpenCV. I wish they also open sourced their source files of the app. The highlight about their hardware set-up is that they used commercially available lenses originally intended to be used for google cardboard projects.

My third favourite (Fig. 2c) is the one that employs an exotic fresnel lens fabricated using photolithography. So I am not going to make this version of spectrometer, but I like their application to use the spectrometer as a fiber probe. Most of the published literature on smartphone spectrometer has

Finally, the one I like is a commercially available GoSpectro. Their design looks very simple and their suggested application i.e color measurements of lights seems where first deployment of smartphone spectrometers makes sense. But the cost of the spectrometer ($450) doesn’t make sense given the hardware cost of the device is a few dollars. Moreover their spectrometer design works with only a few smartphones .

What features I want in my spectrometer design

  1. Plug and Play Modules: I would like to develop different smartphone spectrometer modules for different applications. All these modules will be built on top of a simple base design. Changing between different modules of the spectrometer should be plug and play.
  2. Integrated light source: I don’t want to use the inbuilt LED of the smartphone. Instead, I developed a small external LED light. This helps to have a consistent light source across all smartphones. It doesn’t drain the smartphone’s battery. Using a smartphone’s flash for recording the spectra is not very convenient, at least in my experience.
  3. Rechargeable battery for the LED: It helps to have a compact rechargeable battery that makes it easy to use the spectrometer, without worrying about replacing batteries.
  4. Dispersing element: I used an off-the-shelf jewelry spectrometer that has a grating, slit, lens all in one package. So it is easy to replicate by others without worrying about the optical alignment, awkward slit width problems. Also, this design helps to keep the spectrometer straight against the camera, that way it is convenient to use, also looks neat.
  5. Software: I am developing a software that will make use of OpenCV and other machine learning techniques.
  6. Fewer parts: My design should require fewer 3D printed parts. For example, the simplest module requires only a single 3D print attachment and the more complex module requires only 3 parts and none of them require any extra processing such as gluing.

My early prototypes of smartphone spectrometer

Figure 3: Left: Early prototype of my smartphone spectrometer. Right: Spectra recorder using the app from Universidad Privada Boliviana.

My very first prototype of smartphone attachment is based on Jeweler’s spectrometer tube that is of the size of 15cms. The attachment used to feel very heavy (~100 to 150gms). Handling this spectrometer doesn’t feel really convenient. The prototypes are shown in Fig 3.

Then, I found a smaller Jewelry spectrometer that is really 1/3rd of the size of the original spectrometer tube. It simplified my design of the spectrometer as shown in Fig. 4. I struggled a lot to make the rechargeable LED light for this spectrometer. At the beginning, it seemed easy, but I had to make several prints to make it right. Software proved to not be a nice experience. The existing apps are neither open source nor easy to use. I might be missing a good app or such an app never existed I might be missing a good app or such an app never existed (Let me know in the comments, if you know any good one). In part 2 of this post, I will share more details with pics of the new build, instructions and a few measurements.

Figure 4: Top Left: 3D printed parts for the smartphone spectrometer before the assembly. Coin is there to show how small the spectrometer attachment is. Right: Assembled spectrometer with Jeweler’s spectrometer tube inside the 3D printed attachment. Bottom Left: Completed assembly with sample holder and cuvette in place.

References

  1. https://publiclab.org/wiki/foldable-spec
  2. http://www.gaudi.ch/GaudiLabs/?page_id=825
  3. https://publiclab.org/wiki/oil-testing-kit
  4. https://www.thingiverse.com/thing:125428
  5. https://www.goyalab.com/product/hand-spectrometro-gospectro/
  6. https://www.nature.com/articles/s41598-017-12482-5?utm_source=other_website&utm_medium=display&utm_content=leaderboard&utm_campaign=JRCN_2_LW_X-moldailyfeed
  7. https://www.spiedigitallibrary.org/conference-proceedings-of-spie/10657/1065702/Smartphone-spectroscopy-for-mobile-health-diagnostics-with-laboratory-equivalent-capabilities/10.1117/12.2303609.short?SSO=1
  8. https://www.researchgate.net/publication/274964166_Combined_dual_absorption_and_fluorescence_smartphone_spectrometers/figures?lo=1
  9. https://www.upb.edu/en/contenido/spectrometry-software-for-android
  10. https://pubs.rsc.org/en/content/articlelanding/2016/lc/c5lc01226k#!divAbstract
  11. https://www.youtube.com/watch?v=BTN00-6Lh5Q
  12. https://www.consumerphysics.com/order-scio/?mnsid=mrmobile
  13. http://lightingpassporttestdom.weebly.com/contact.html
  14. https://www.intechopen.com/online-first/from-sophisticated-analysis-to-colorimetric-determination-smartphone-spectrometers-and-colorimetry/
  15. https://link.springer.com/chapter/10.1007/978-3-030-02095-8_4
  16. https://www.laserfocusworld.com/test-measurement/spectroscopy/article/16571436/wave-illumination-handheld-spectrometer-offers-3-nm-fwhm-optical-resolution
  17. https://www.shapeways.com/product/Z6HDKHSTL/coffee-spectrometer-housing?li=productGroup&optionId=11925870
  18. Rateni, G., Dario, P., & Cavallo, F. (2017). Smartphone-based food diagnostic technologies: A review. Sensors (Switzerland), 17(6). https://doi.org/10.3390/s17061453
  19. https://www.researchgate.net/publication/274964166_Combined_dual_absorption_and_fluorescence_smartphone_spectrometers
  20. https://phys.org/news/2015-07-smartphone-day-youre-pregnant.html
  21. https://www.sciencedirect.com/science/article/pii/S0003267019311729
  22. https://www.spiedigitallibrary.org/journals/journal-of-biomedical-optics/volume-23/issue-04/047003/Real-time-biodetection-using-a-smartphone-based-dual-color-surface/10.1117/1.JBO.23.4.047003.full