Skip to main content
  • Technical note
  • Open access
  • Published:

Arduino-based wireless spectrometer: a practical application

Abstract

We provide a technical report on designing an Arduino-based wireless spectrometer using an old spectrometer. The designed spectrometer is environmentally friendly and cost-effective and can be used in physical and analytical laboratories. The Arduino-based wireless spectrometer enables students to understand the fundamental theory of spectroscopy and wireless communication among instruments. The rotating motions of the mirror and grating turret inside the spectrometer are controlled by a pre-written source code based on the Arduino program. This procedure can give an insight into spectroscopic analysis and telecommunication skills using computer-based software. Using our customized spectrometer, we measure Raman spectra from a silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G, which serve as representative Raman probe molecules. From our results, we conclude that our approach provides intuitions for wide applications of Arduino-based chemical instruments.

Graphical Abstract

Introduction

Technological advancement in spectroscopic instruments has led to a new opportunity to unravel the unknown chemical reaction mechanisms (Choi et al. 2016b, 2019). To monitor transient species in chemical reactions using spectroscopic analysis, it is necessary to improve spectral resolution to separate overlap peaks originating from different molecules (Choi et al. 2016a). In this regard, a highly efficient spectroscopic instrument has attracted attention for spectroscopic and microscopic analyses. However, in achieving high-resolution spectroscopic analysis, the bulkiness of the spectrometer and the wire of power supply limits its operation in a laboratory environment. Wireless communications among each instrument are required for the optimized and convenient experimental environment.

In addition, with the developments in spectroscopic analysis, the old spectrometer has become nearly obsolete because of its low sensitivity and hard operation. Using such unused spectrometers to improve students' understanding of the fundamental operation of a spectrometer can be beneficial to both education and recycling older instruments. Recent approaches have attempted to design and build cost-effective and educational spectrometers (Mundy and Potgieter 2020; Kubínová and Šlégr 2015; Emmanuel et al. 2021). Previous reports have demonstrated spectrometers based on low-cost and homemade electronics using Arduino (Poh et al. 2021; Laganovska et al. 2020). Arduino is a hardware and software open-source electronic platform. It has shown versatile applications and can be used to build a wireless environment (Choi et al. 2022; Biswas et al. 2021; Das et al. 2016). Thus, we proposed an Arduino-based wireless spectrometer that is cost-effective and can be employed for telecommunication, using an unused spectrometer.

This paper discusses a spectrometer incorporated with Arduino and the Bluetooth technology to implement a wireless environment. A code-based platform can control the stepper motors for the rotating mirror unit and grating component in the spectrometer, which are the most important components in a spectrometer. From our spectrometer, we are able to measure the Raman spectra of representative Raman probe molecules, such as silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G. We expect that this project will provide undergraduate students with various opportunities to study advanced physical and analytical chemistry, such as basic spectroscopic analysis, building a code, and working in a wireless environment. In addition, this device will be a cost-effective and eco-friendly instrument.

Experimental section

Components and specifications

A Bluetooth receiver (Bluetooth CSR 4.0 Dongle) was plugged into a computer to communicate between a Raman spectrometer (MS 5004i; NT-MDT) and the computer. The Raman spectrometer was disassembled in a micro-Raman microscope setup. The signal accepter (HC-06 Bluetooth module), motor driver (NTRexLAB, MW-VSTB24D2S-v2), and stepper motor (BERGER LAHR, RDM 253/50) inside the spectrometer were connected to the main controller (Arduino Uno R3 microprocessor). The pin mapping and wire connections are presented in Fig. 1 and Additional file 1: Table S1. For applying the voltage, a 9 V battery and a 12 V power supply (TWINTEX, TP-1303) were connected to the Arduino Uno and stepper motors, respectively. Before the spectrometer operation, the main code was uploaded via a USB cable.

Fig. 1
figure 1

a Overall Arduino configuration chart using Fritzing software version 0.9.3b. b Overall connection photograph for controlling the stepper motor with Arduino Bluetooth

Code for the operating device

The code was written using Arduino IDE software 1.8.4. The code for operating the stepper motor is based on the < PWM.h > library. The full code is available in Additional file 1: Section B.

Connection between Arduino Uno and HC-06

Figure 1A shows the wiring diagram for Arduino Uno, Bluetooth module (HC-06), stepper motor drivers, and stepper motors inside the spectrometer. The detailed pin mapping is described in Additional file 1: Table S1.

Results and discussion

Bluetooth communication using a smartphone

To check Bluetooth communication between HC-06 and a smartphone that includes the Bluetooth receiver, we downloaded the ‘BlueTooth Serial Controller’ Android app from Google Play Store and ran on an Android smartphone (Samsung Galaxy S20 + 5G, SM-G986N). ‘SoftwareSerial.h’ in the basic library for Bluetooth communication in Sketch was uploaded to the Arduino Uno board and the serial monitor. To connect the stepper motor (RDM253/50) with the stepper motor driver (MW-VSTB24D2S-v2), we extended the wire of the stepper motor to the outside and determined the digital pin map using a digital multimeter. Before the Bluetooth communication, the spectrometer was paired with the smartphone. When we inputted the command to rotate each stepper motor, it showed that each stepper motor is gently rotated in a clockwise and counterclockwise direction (see the video clip for Additional file 2). Therefore, we were able to successfully control the rotational motion of each stepper motor via Bluetooth.

Bluetooth communication using a USB dongle

For wirelessly controlling the spectrometer, we uploaded the main code to the Arduino Uno with the USB cable. The transmit data (TXD) and the receive data (RXD) of HC-06 should be uploaded without connecting to the Uno Digital pins 0 and 1 to avoid an upload error. When controlling the two stepper motors individually, we have to determine the optimized duty cycle and frequency using pulse width modulation (PWM) to gently rotate each stepper motor. Actual operation transmits a signal to the Arduino Uno through the Bluetooth module, and the signal is transmitted to the motor driver to operate the stepper motor. The operation code inputted to the library header file “#include < PWM.h > ”, which is used for controlling the PWM of the stepper motor at the beginning of the source.

Additionally, a motor corresponding to the mirror and the Arduino Uno pin used for the rotation direction and speed control of the motor corresponding to the turret were inputted into an output connector of the motor driver, and a command for the speed value and operation of each motor was inputted into a ‘void setup’. The details of motion controlling command are provided in Table 1.

Table 1 Command for the motion control of the stepper motor

Figure 1b shows the experimental setup image of a wirelessly controlled spectrometer. When we control the mirror unit, we input the commands for clockwise rotation, stopping, and counterclockwise rotation of mirror unit (Table 1). Figure 2 shows the before and after rotations of the mirror (upper panel) and grating turret (lower panel) (see Additional file 1: Section B and Additional file 2 for further details). On the basis of these movements, we can conclude that the spectrometer is controlled by Bluetooth communication.

Fig. 2
figure 2

Rotating motion of the a mirror and b grating turret

Spectral measurement using spectrometer

Using the proposed spectrometer, we set up a customized Raman system. Figure 3a shows the experimental setup of the customized Raman spectrometer. We measured Raman spectra from the representative Raman probe, such as silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G. Figure 3b displays the measured Raman spectra of each molecule. The Raman spectra are clearly shown as the representative data. The major peak of Raman spectrum from silicon wafer can be assigned as 519 cm−1. In addition, Raman spectra from 4-nitrobenzenethiol and rhodamine 6G also show their characteristic peaks using our experimental setup. The detailed peak assignment is described in Additional file 1: Table S2. This implies that the proposed instrument can be used as the spectrometer with high spectral resolution.

Fig. 3
figure 3

a Experimental setup for Raman measurement of probe molecules. b Representative Raman spectra of each molecules, such as silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G

Conclusion

In summary, we have provided a wireless spectrometer system using Arduino-based Bluetooth communication with open-source software and hardware. We can control the stepper motor inside the spectrometer based on the wireless communication between the computer and the spectrometer. Our results showed that controlling and fabricating the Arduino-based spectrometer provide an opportunity for students to develop their instrumentation and spectroscopic knowledge and skills. This research will provide an opportunity to recycle unused instruments and help impart knowledge of spectrometers to undergraduate students.

Availability of data and materials

The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

  • Biswas PC, Rani S, Hossain MA, Islam MR, Canning J. Recent developments in smartphone spectrometer sample analysis. IEEE J Sel Top Quantum Electron. 2021;27(6):1–12.

    Article  Google Scholar 

  • Choi H-K, Lee KS, Shin H-H, Kim ZH. Identification of the first elementary step in the photocatalytic reduction of nitrobenzenethiols on a metallic surface. J Phys Chem Lett. 2016a;7(20):4099–104.

    Article  CAS  PubMed  Google Scholar 

  • Choi H-K, Park W-H, Park C-G, Shin H-H, Lee KS, Kim ZH. Metal-catalyzed chemical reaction of single molecules directly probed by vibrational spectroscopy. J Am Chem Soc. 2016b;138(13):4673–84.

    Article  CAS  PubMed  Google Scholar 

  • Choi H-K, Lee KS, Shin H-H, Koo J-J, Yeon GJ, Kim ZH. Single-molecule surface-enhanced raman scattering as a probe of single-molecule surface reactions: promises and current challenges. Acc Chem Res. 2019;52(11):3008–17.

    Article  CAS  PubMed  Google Scholar 

  • Choi H, Soeriawidjaja BF, Lee SH, Kwak M. A convenient platform for real-time non-contact thermal measurement and processing. Bull Korean Chem Soc. 2022;43(6):854–8.

    Article  CAS  Google Scholar 

  • Das AJ, Wahi A, Kothari I, Raskar R. Ultra-portable, wireless smartphone spectrometer for rapid, non-destructive testing of fruit ripeness. Sci Rep. 2016;6(1):32504.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  • Emmanuel N, Nair RB, Abraham B, Yoosaf K. Fabricating a low-cost raman spectrometer to introduce students to spectroscopy basics and applied instrument design. J Chem Educ. 2021;98(6):2109–16.

    Article  CAS  Google Scholar 

  • Kubïnovã Š, Šlëgr J. ChemDuino: adapting arduino for low-cost chemical measurements in lecture and laboratory. J Chem Edu. 2015;92(10):1751–3.

    Article  Google Scholar 

  • Laganovska K, Zolotarjovs A, Vázquez M, Mc Donnell K, Liepins J, Ben-Yoav H, Karitans V, Smits K. Portable low-cost open-source wireless spectrophotometer for fast and reliable measurements. HardwareX. 2020;7:e00108.

    Article  PubMed  PubMed Central  Google Scholar 

  • Mundy C, Potgieter M. Hands-on spectroscopy: inside and outside the first-year laboratory. J Chem Educ. 2020;97(6):1549–55.

    Article  CAS  Google Scholar 

  • Poh J-J, Wu W-L, Goh NW-J, Tan SM-X, Gan SK-E. Spectrophotometer on-the-go: the development of a 2-in-1 UV–Vis portable Arduino-based spectrophotometer. Sens Actuators A Phys. 2021;325:112698.

    Article  CAS  Google Scholar 

Download references

Acknowledgements

Not applicable.

Funding

Following are the results of a study on the “Leaders in INdustry-university Cooperation + ” Project, supported by the Ministry of Education and National Research Foundation of Korea [Grant Number 2019CG008010102, 2021CG023010102]. This article was also supported by the research funds of Kunsan National University. This research was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) [Grant Number 2020R1C1C1012200].

Author information

Authors and Affiliations

Authors

Contributions

The manuscript was written through contributions of all authors. All authors have given approval to the final version of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Han-Kyu Choi.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Additional file 1. Section A.

Wire connection between the Arduino uno and the motor driver. Table S1. Pin mapping for Bluetooth communications. Section B. Bluetooth communication code for operating step motor. Section C. Peak assignment for Raman spectra of silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G. Table S2. Raman peak assignments of silicon wafer, 4-nitrobenzenethiol, and rhodamine 6G (numbers in cm-1)

Additional file 2. Video clip for rotating motions of grating and mirror unit.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Shin, J., Choi, HK. Arduino-based wireless spectrometer: a practical application. J Anal Sci Technol 13, 44 (2022). https://doi.org/10.1186/s40543-022-00353-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s40543-022-00353-2

Keywords