Spectrometer Using Arduino




About: I am a student majoring in nuclear power, quantum energy engineering, particle beam engineering in Japan.

The light we observe, for example the sun's light, consists of light of various wavelengths. Also, substances have the property of absorbing light of a specific wavelength. So, if you observe the spectra of distant star's light on earth, you can see which wavelengths are absorbed, so you can see the components of the interstellar gas between the star and the earth.

This time I used a mini light bulb instead of the sun, a chemical liquid instead of the interstellar gas, and a photodiode instead of the earth observer.

This is my first Arduino project.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Overview and Materials

The light emitted from the light source first passes through the slit, after which it is spectrally separated by the grating element, then it passes through the chemical liquid and enters the photodetector. The grating rotates little by little by the servo motor. We will tag the rotation angle of the grating and the output of the photodiode and save each time. Arduino will control the servo motor and save the data.

Collimating lenses necessary to produce parallel light are taken out from Junk's DVD player. I used a shaving blade for the slit.I used a piece of DVD for grating. Since parallel grooves are ideal, use the part that is as close to the circumference as possible.To lower the gear ratio, insert the TAMIYA pulley unit between the servo motor and the grating. The chemical solution is injected into the cell for visible light analysis. Place the spectrometer in a plastic container and place all the optical systems on the aluminum plate.

Step 2: Photodetector Circuit

Connect the photodiode to the integrating circuit and average the output with Arduino. The integration time depends on the light intensity of the light source. This time it was set to 20 s. The parts used are as follows.

  • NJL7502L(photodiode)
  • 74HC4066N(Analog Switch)
  • TLC272AIP(OP Amp)
  • 10kohm*3
  • 100ohm*1
  • 0.01uF film condenser
  • 0.1uF film condenser

Step 3: Assembly

Assemble each part and place the optical system on the aluminum plate. All the parts to be used are painted on matte black. Carefully adjust the optical axis so that the light from the light source is firmly incident on the photodetector.

Step 4: Calibration and Measurement

First we will get water data. Analyze the chemical liquid data as a ratio with the strength of water. Wavelength calibration was done using three different wavelength LEDs. Chemical liquid is colored with Ph indicator. I used HCl, C6H4(COOK)(COOH),H3PO4,Laundry detergent.

Since the absorption line peculiar to the equipment was observed, it was smoothed after removing it. Understanding the principle of the spectroscope and assembling the equipment has become a very learning experience. It can be applied to measurement of wavelength spectrum of full-color LED, etc.

Thank You.

Optics Contest

Participated in the
Optics Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    9 Discussions


    8 months ago

    I'm trying to measure percentage of chemical components of soil so can you please guide me through your project?
    How do you get absorbance?
    I know the beer Lambert law but how do you get coefficient of absorptivity? What is the maximum distance can I keep between transmitter and photo diode?


    9 months ago

    Great project!
    Can you explain more in calibration and measurement ?!


    11 months ago on Step 4

    Thanks for that. I will probably be building something along these lines in the future, and your design is a very good starting point.

    Alex in NZ

    11 months ago

    This looks like it was a pretty challenging project. Congratulations on bringing together so many different skills to produce the end result. Thank you for sharing this :-)

    1 reply

    11 months ago

    Great project. Could you also share/upload the gnuplot script for the charts? Thank you!

    1 reply

    Reply 11 months ago

    I don't remember details. But may be I typed
    \set datafile separator ","
    \plot 'data.csv' using 1:2
    or something like this.


    11 months ago

    Good work, I would recommend that you use a better photo diode though. Something like the jelly bean bpw34 will give you much better results

    1 reply

    Reply 11 months ago

    I confirmed the datasheet of bpm 34, it certainly looks good. I just used it because it was in my stock. Thank you for advising me!