Close
0%
0%

WiSci: Wireless Spectrometer

Portable Wireless Spectrometer that lets you explore the world around you.

Similar projects worth following
The aim of this project is to make spectroscopy a tool accessible to everyone, and not be limited to research and industrial applications. Spectroscopy is a powerful tool extensively used for diagnosing physical properties, assessing food quality, environmental sensing and various other applications.

We have built a portable, wireless spectrometer that talks to its companion Android application via Bluetooth to store and visualise the spectrum. We have used it for non-destructive testing of fruit ripeness (more on this below). Now we want everyone to build this device and start exploring the world around them. We are open sourcing all the build instructions, codes and design files required to build the device so that anyone and everyone can build one!

A spectrometer is an instrument used for studying the interaction between matter and electromagnetic radiation. Spectrometers operate over both optical and non-optical wavelengths like gamma rays and X-rays. In general, any particular spectrometer will operate over a small portion of electromagnetic spectrum because of the different techniques used to measure different portions of the spectrum. Mostly these instruments measure wavelengths and their respective intensities, which upon detailed study reveal various information of the material under study. The intensity measured from these instruments can either be in absolute units or in relative units. Instruments measuring intensities in absolute units are usually called Spectrophotometers.

A spectrometer is a very powerful tool. By analysing intensity/wavelength pairs of the interacted EM radiation with the material under study, detailed information like its chemical composition, crystal structure and other elemental information can be extracted. It can also be used for food analysis. For example, it can reveal adulteration in milk or oil and analyse toxins to understand causes of food poisoning to name a few uses. We have used it to non-destructively measure fruit ripeness. Also, did we mention, the Curiosity Mars Rover also houses a suite of Spectrometers for analysing various rock and soil samples(more information can be found here). Spectrometers are awesome!!

In our build we have used the C12666MA mini-spectrometer from Hamamatsu. As discussed earlier, every spectrometer is sensitive over a small portion of the electromagnetic spectrum, so is this. Its spectral response is from 340 to 780 nm, detailed specifications can be found here. Check out our paper in Scientific Reports here.

Zip Archive - 1.72 MB - 10/10/2016 at 09:09

Download

Zip Archive - 13.24 MB - 09/07/2016 at 10:07

Download

Zip Archive - 628.06 kB - 09/07/2016 at 08:53

Download

View all 3 files

  • 1 × C12666MA Spectrometer Hamamatsu Mini Spectrometer
  • 1 × Arduino Pro Mini 328 - 5V/16MHz
  • 1 × FTDI USB to Serial Board (5V) For burning code to Pro mini
  • 1 × HC-05 Bluetooth Module
  • 1 × Buck Boost Converter ( 3v to 5V) - TPS63060 based module
  • 1 × LiPo Battery - 200mAh/500mAh
  • 1 × Momentary Pushbutton Switch (mini)
  • 1 × Mini SPDT slide switch
  • 1 × LED Wavelength depends upon application
  • 1 × Optical Filters (Optional) Depends upon application

View all 13 components

  • App Update: Added option to select which Bluetooth device to connect to

    Ishan Kothari10/10/2016 at 09:42 0 comments

    In this app update, we have added the option for users to select which device they want to connect to, so that the app can connect to any device, irrespective of the name of the Bluetooth module used with the spectrometer.

    A standard dialog with a simple list was used to achieve this trivial but much needed feature as users could previously only connect to devices named "HC-05". The update increases compatibility to any Bluetooth module irrespective of its model, make or name. The code changes can be found here on the commit log on GitHub.

  • Measuring fruit ripeness

    Akshat Wahi10/02/2016 at 09:33 0 comments

    We have successfully used the device for non-destructive testing of fruit ripeness. Ultra-Violet (UV) fluorescence from Chlorophyll present in the skin of three different kinds of apples - Red Delicious, McIntosh and Empire was measured over the period of 11 days. The data collected showed strong correlation with the ripeness measured by a penetrometer.

    There are lot of interesting applications for such a portable device. Imagine carrying such a portable device when you next visit a supermarket, that helps you buy perfectly ripped fruits. Our work is published in Scientific Reports and you can read it in detail here.

    Illustration of the device checking for fruit ripeness.

  • Building the Android Application

    Akshat Wahi10/01/2016 at 18:02 0 comments

      We wanted the Android application to be compatible with as many Android devices as possible, so we ensured we only used features that were compatible with all devices running Android 2.3.3 or higher. This corresponds to 98.5% of Android devices. We also used Bluetooth 2.0 over BLE to ensure that maximum number of devices are supported. Using BLE would have reduced the percentage of supported devices (Based on statistics at the time of writing. Latest statistics can be found here).

      Android Studio IDE was used to develop the application using the target SDK as Android 5.0 (SDK 21) but using only APIs that are supported down till Android 2.3.3 (SDK 10). The app was build incrementally by adding modules, starting from a basic skeleton for the overall app and then developing individual modules. The modules were refined as the app was built.

      The overall architecture of the app consists of following modules with some overlap between modules:

      1. The driver routine: This consists driver routines for the app so that app can initialize and move ahead to appropriate parts of the app based on user inputs.
      2. The camera activities: To capture images of the objects being examined using the phone’s camera and save them onto local storage.
      3. Bluetooth activities: To pair with the spectrometer over Bluetooth and to trigger the reading of data from the sensor. Once the data is received, it is cleaned, visualized and stored.
      4. Visualization: To visualize the data received from Bluetooth and present it appropriately in the form of a plot so the spectrum can be observed.
      5. Database and data export: To store the spectrometer readings, images and to allow the user to exported the stored data to an excel file for further analysis.

  • Designing the housing

    Akshat Wahi09/28/2016 at 18:58 0 comments

    Considering the DIY nature of the build and need for constant modifications, we came up with a modular design for the housing. It’s small, everything fits neatly and at the same time gives easy access to different sections of the device for modifications. The device is split into four different sections -


    1. Nozzle - This section houses the excitation source, LED.

    2. Sensing Unit - The spectrometer and the optical filter sits in this section.

    3. Processing Unit - It houses other main electronics which includes the microcontroller, bluetooth module, battery, and the buck booster.

    4. Lid - There are no components in this section, once removed it provides access to battery connector for charging.

    All the sections easily press fit into a neat little device that looks good and can easily be carried in a pocket. :)


    All the design files can be downloaded from the ‘files’ section of this document. The files are available in ready to 3D print .stl file format and also in neutral file format for easy modifications! The parts designed are optimised for 3D printing and there is a file named ‘preferred_print_orientation’ that shows orientation of the parts on print bed while printing.

  • Building the Electronics

    Akshat Wahi09/28/2016 at 09:47 0 comments

    We wanted the device to be easily replicated by people and extend its capabilities and so in that effort we have build it using easily available modules. The list of materials is available in the components section.

    All required components

    Connections of all these modules can be found in the circuit diagram attached below.

    The modules used have all their PCB design files easily available for someone who wants to build a single PCB board that houses all the components used in the device. This can easily be done by someone with skills of PCB designing and fabrication. It is totally optional and not at all required for building and testing the device. Complete build instructions will be updated soon.

  • Developing the socket for C12666MA spectrometer

    Akshat Wahi09/27/2016 at 18:44 0 comments

    C12666MA is a sensitive module and it will be good to avoid direct soldering to the pins. Making a socket is easy and prevents chances of any damage to relatively costly spectrometer module.

    As the pins on C12666MA module are round, so for good electrical connection round female headers should be used (Link for reference - https://www.sparkfun.com/products/743). And you will also need a small piece of Perfboard (ref ) and after soldering the headers it should look something similar to the image below.

    Socket


    Extra perfboard should be removed for proper assembly in the housing.

View all 6 project logs

  • 1

    The idea was to make a device that can easily be replicated by everyone, and so we have tried to use as much possible easily available modules. The device can be easily replicated and extended as per use case. In a nutshell the steps to be followed are mentioned below-

    1. Source all the components/modules required.
    2. Connect them together as per the circuit diagram.
    3. Burn the code in the microcontroller.
    4. Print the housing and assemble all the components inside
    5. Download the android app
    6. Start exploring!
    7. Extract raw data and perform detailed analysis.
  • 2

    The required components/modules are mentioned in the components section of the document.

    The circuit diagram for connecting all the modules is given below.


  • 3

    Burn the code available here to the microcontroller (Pro mini). Pro mini is a neat little board with just the essential stuff for making small packaging. So you would need external USB to UART board that will help you burn the code to the Atmega328p chip that sits on the board. USB to UART hookup guide can be found here.

    Important Note:- Make sure the bluetooth module is not connected to the RX,TX lines while burning the code. It will be helpful to create a removable connector for bluetooth connections to the microcontroller using male female headers.

    Now let’s check all our connections to know if everything is working as desired. Open your preferred serial monitor and send ‘s’ character. After few seconds you should see a stream of numbers. These are ADC readout values from the spectrometer. You can perform a quick check to know what the spectrum looks like by plotting those values. If the spectrums looks similar to one attached below, then you can tell that the light fixtures has white light LEDs in them. This is the characteristic spectrum from the white LED light source(more on this here). Exciting right!

    White LED Spectrum

    Chlorophyll fluorescence from apples


View all 3 instructions

Enjoy this project?

Share      

Discussions

Cory Vickruck wrote 01/21/2017 at 21:12 point

will you be updating your code for the new C12880MA? 

  Are you sure? yes | no

Robert wrote 09/21/2016 at 12:31 point

Is there any way how to estimate light source (LED) power? What LED did you use? I'm thinking about using the C11351 with wider spectrum range (up to IR) and I don't know what LED I should use.

Also what is the purpose of the filter in front of spectrometer?

  Are you sure? yes | no

paola_draicchio wrote 09/16/2016 at 08:21 point

When is it possible to buy it?

  Are you sure? yes | no

Anshuman Das wrote 09/20/2016 at 17:47 point

Hi Paola, 

We have made everything open source and you can build it from scratch. Currently, we dont have any plans to sell it. If we do, we will get in touch. 

  Are you sure? yes | no

ccasillas wrote 09/09/2016 at 22:12 point

If only I remebered more about Electronics I would do one for my self! I am will ing to try this product in an intensive and industrial enviroment. Please contact me if you what to try it with  Grape tomatoes And Cherry tomatoes in a real chalenging enviroment.

The goal would be to determine BRIX content in the fruit in a non destructive way.

  Are you sure? yes | no

Anshuman Das wrote 09/20/2016 at 17:46 point

Hi CCasillas, That sounds like an interesting application. We are in the process of improving the prototype and the app. We will get in touch once it is ready for more testing. 

  Are you sure? yes | no

Jong KIM wrote 09/09/2016 at 03:03 point

Wow, it's quite handy and cute!

  Are you sure? yes | no

Anshuman Das wrote 09/20/2016 at 17:44 point

Thanks Jong!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates