Close
0%
0%

ramanPi - Raman Spectrometer

The open source 3D Printable Raman Spectrometer using a RaspberryPi and easy to find off the shelf components..

Similar projects worth following
The ORIGINAL open source 3D Printable Raman Spectrometer that uses a raspberryPi, a really bright laser and some parts you can grab from your favorite suppliers..!

BASIC DESIGN GOALS:
1. Make it Open.. Everything.. All of it..
2. Make it 3D Printable.
3. Make it modular and easy to upgrade.
4. Make it as easy to build as possible.
5. Make it easy to customize and open to improvement.
6. Use only commonly available off the shelf components whenever possible.
7. Have a remote interface that will allow it to be controlled and viewed from anywhere.
8. Compare the spectra to the online internet spectral databases.
9. Provide the capability to log data to remote databases, share with friends and colleagues..
10. Not be just another open source spectrometer..
11. Make it easy to use and intuitive.
12. Make it attractive with an elegant design..
13. Make it useful and just cool to have!

Welcome to the hackaday.io project page for the ramanPi! The ramanPi is a raman spectrometer that I decided to build back in April of 2014 because I needed one for another project and could not afford the tens of thousands of dollars a commercial product costs...and there are no DIY or open source systems in existence until now. I knew nothing about spectroscopy, let alone raman spectroscopy back then and everything here documents my learning process towards my goal.....A fully functional, and fairly high resolution raman spectrometer. When I started this project, I had wildly different ideas about how I was going to achieve my goal. The project logs begin very early in my design process and document how I changed my approach and what led to the form it is taking now. In the process of designing this system, and participating in TheHackadayPrize, I have learned a great deal.. Not just about spectroscopy and how raman systems work, but about how important it is to share your work with others..to contribute to the community and help others learn as well. Before I started this project, I had no idea I would later join the contest. I had started to post my project once...then deleted it because I didn't think anyone would be interested. I decided to post it after speaking to a friend who convinced me to go through with it. It wasn't long until Mike S. here at hackaday contacted me to do a Hacker Bio...apparently the first of it's kind on hackaday..! Of course I was interested and very grateful...Mike encouraged me to go further and really convinced me that this is important and sharing benefits everyone.. Boy did I learn how true that is.. In the journey so far, I have learned a tremendous amount, people have been wonderfully supportive and have offered some terrific advice! I want to thank everyone for everything! This is my first project that I've shared publicly, and I have not looked back..It's been one of the greatest experiences I've had the honor of to date.. I am determined to finish this project and make it the best it can be, because everyone has been so supportive and the interest it has generated has made me want to make it better..! Thank you to everyone who has been so great.!!

Be sure to check out the bio that Hackaday.com did on me!!

ST Micro gave me a shoutout on their Facebook page!

The great people over at RaspberryPi.org did a wonderful article on ramanPi!

Some kind words from the folks at 3ders.org too!

Thanks to Elecia and Chris White at embedded.fm for the great podcast interview!

Follow me on twitter too! I'll be tweeting on gitHub updates as well as from here!

Index of Instructions and Informational project logs:

THP Semifinals Video

You can also view the project log with this video that includes a full transcript HERE ...

THP Finals Video

A bench top, raman spectrometer constructed from very easy to source components and 3D parts printable on even entry level printers. My system is a completely unique innovative design in the world of raman spectroscopy and has many advantages beyond the fact it can be constructed for a tiny fraction of the cost of a used commercial system, which can cost tens of thousands of dollars! My system connects to multiple internet databases to retrieve spectral data to identify chemical compounds under test. It is completely scalable to fit almost any budget... Many of the components can be used for other purposes outside this system or project. It presents a great learning experience for anyone who is interested in electronics, science, physics, lasers, chemistry, and so on..!

Artists Rendition:

A description from Omega Filters ( http://www.omegafilters.com/Capabilities/Applications/Raman_Spectroscopy/Raman_General ) Describes raman spectroscopy as follows;

Raman spectroscopy provides valuable structural information about materials. When laser light is incident upon a sample, a small percentage of the scattered light may be shifted in frequency. The frequency shift of the Raman scattered light is directly related to the structural properties of the material. A Raman spectrum provides a "fingerprint" that is unique to the material. Raman spectroscopy is employed in many applications including mineralogy, pharmacology, corrosion studies, analysis of semiconductors and catalysts, in situ measurements on biological systems, and even single molecule detection. Applications will continue to increase rapidly along with further improvements in the technology. A Raman signature provides positive material identification of unknown specimens to a degree that is unmatched by other spectroscopy's. Raman spectroscopy presents demanding requirements for the detection and resolution of narrow-bands of light with very low intensity and minimal frequency shift relative to the source.

Raman spectroscopy is something very cool to behold, and imagine.. The idea that shining a light on a sample will yield data as to its composition and vibrational state is nothing short of amazing.. And this open source system delivers all of that within reach of whomever wants it now.. Something that was not possible before.

Imagine the keyboard in front of you... It is made of several elements...it's probably plastic, some metal, some silicon, and so on... Now imagine a glass of water, a tasty beverage or your favorite soft drink.. So now let's ask what's in that glass...you probably know there's a bit of water, and a lot of other components.. What if you look at that tasty beverage, and want to find out what chemical compounds are in it.. So take a sample of it, and put it into a 'cuvette' which is a fancy tiny test tube of sorts.. Then insert that into our Raman Spectrometer.. Then run an analysis on it and bam! You can see that your tasty beverage has C2H6O, carbon dioxide, water, etc..

Ethanol Spectra

Use it to determine any number of things.. Sort your sand collection based on the composition of silica (SiO2) and other materials(meant as a joke but you could if you really wanted to)! Or determine what kind of plastic or metal or ceramic or glue was used to make something... How fresh is your food? What happens to this material when I do this? Do a before and after analysis and find the raman shift!

You!! And literally everyone.. Schools, teachers, small businesses, hackers, hackerspaces, research scientists, chemists, biologists, cancer researchers, STEM advocates, average citizens who want to test their water, people who are interested in finding things out like what is in your favorite energy drink....people who have a taste for learning and experiencing the world! This is literally a tool that every hacker and hackerspace should have..

A lot can be said in this section... I'll boil it down to this... Basically, it works by shining a really bright laser through some optics to focus down to a sample...That laser light then hits the sample, and depending on the molecules it hits, and what they're doing...the light can be shifted up or down in color.. Some of that light, and some of the laser light is reflected back into the optics and is reflected through a couple of filters that removes the laser light completely..leaving only the shifted light from the sample.. That light is bounced off of a 'diffraction grating' which is sorta like a prism.. The light is separated and projected onto a camera(ccd) which takes an 'image' of the spectra. The computer analyzes that and compares it to a couple of online databases, then comes back and tells you what's in your tasty beverage on a very easy to read and intuitive interface!

Lasers + tasty beverages = Fun....no?

This entire process is based on an open source concept that side steps the expensive optics normally required for raman spectroscopy. Ordinarily, an expensive notch filter would be used which is cost prohibitive for most average people. My system avoids this cost by using two less expensive edge filters which when combined in the correct manner provide the same benefit as the notch filter...at the minimal cost of a little extra computing time.

Start off by putting a sample in the cuvette.. Insert the cuvette into the DIY 3D Printable Raman Spectrometer, run the analysis.....the data is retrieved from the internet spectral databases, a match is found...that match is displayed on the users remote terminal... You can store that data in an external database, share it online, or do what you please with it..

An early laser alignment test.

The majority of the raman portion of the system. Includes the laser emitter, mirror, shutter, splitter, objective lens, and filter wheel assembly.. Missing are the spectrometer and beam dump.

The actual raman portion of the system.

The following is what happens at each point in the optical system.

1. The laser emits a 532nm (green) beam of light.

2. The 532nm Pass Filter only allows the 532nm (green) light to pass, and filters out anything else.

3. The Cube Beam Splitter passes half of the light on to the Objective Lens, and the other half into the Beam Dump.

4. The Objective Lens focuses the light down to a tiny point in the sample.

5. The light in the sample interacts with the molecules, and depending on vibrations, bond angles, etc. the light is shifted from 532nm (green) to other colors/frequencies.

6. Some of the shifted light and a lot of the original laser light is reflected back into the Objective Lens and is collimated back to the Cube Beam Splitter.

7. The Cube Beam Splitter reflects half of the light to the Filter Assembly and half back into the laser.

8. The Filter Assembly contains two Edge Filters which block the 532nm (green) laser light and allow the other colors to pass. Since this is a low cost system, two edge filters are used instead of one Notch Filter...and so two separate exposures are taken and the images are stacked.

9. The Vertical Aperture (slit) controls the amount of light that enters the spectrometer section, and is a determining factor in spectral resolution.

10. The light from the slit is reflected off the Collimating Mirror on its way to the Diffraction Grating.

11. The Diffraction Grating acts like a Prism and divides the light into separate colors. Since the light originated as 532nm (green), and the shift is typically fairly minor, this light may be close to the original color...but also may be red (lower frequency) or even blue (higher frequency).

12. The light reflected from the Diffraction Grating is reflected by the Imaging or Focusing Mirror onto the Detector Array..

13. The spectra derived from the above process is reflected by the Imaging Mirror onto the CCD Array where it is captured by the raspberryPi for processing.. One image is taken with the first Edge Filter, then another exposure with the next Edge Filter and then some software to stack the images is used together along with some signal processing and possibly multiple exposures to gain as much brightness as possible so the computer can correctly analyze the spectra...

Originally I started out with a different configuration for mounting the optics. Since then, I decided to go with a much better solution where the optics are enclosed in a contiguous structure that eliminates stray beams and keeps ambient light out. It is also easier to set up, and should stay aligned longer in addtion to being more shock resistant and will reduce resonance.. The system is comprised of a number of individual modules, most of which are based around the optics listed above.

The spectrometer portion uses the Crossed Czerny-Turner Configuration shown below.

Crossed Czerny-Turner

The full system with spectrometer installed.. These parts were all designed using openSCAD and printed in ABS on a daVinci 1.0 3D Printer. This section of the project contains the optics as described above in the optics section. To print them, it requires about 1800grams of filament and several days.

Here without the laser and the spectrometer..

The parts that make up the filter selector assembly..

The filter selector assembly with the front removed..

A closeup of the inside of the spectrometer.. The fins are light baffles that keep reflections inside the device to a minimum.

Another closeup detailing the collimating mirror mount inside the spectrometer..

A view from the outside... The whole thing fits in a Prodigy mini ITX case by BitFenix..

The electronics are centered around a raspberryPi. There are three microcontrollers tied to the raspi through rs-232.. The controlBoard, the interfaceBoard and the imagingBoard.. The controlBoard is also tied to the power control board... and at this time, the imagingBoard and the interfaceBoard may be living on the same PCB..

All three boards are based on the ST Microelectronics Nucleo F401RE STM32F401RE MCU and fit into what used to be hard drive trays that slide into the case..using a 3D printed adapter..

The Nucleo F401RE is just one of many platforms supported by mBed.. The boards shown below are prototypes, I'll be publishing the Eagle files for the new boards when I get the bugs worked out with these..

I am using the mBed online IDE to program them.. Say what you will, it works great.. gitHub to firmware..

controlBoard

Schematics, board information and firmware can be found here.

More can be found here.

  • Power Relay for Laser
  • TTL Control for Laser
  • Monitor Temperature for Laser using DS18B20 sensor
  • BMP180 Barometric Pressure Sensor for integration into compensations
  • HIH-4030 Humidity Sensor also for integration into compensations
  • Control L298 HBridge for Heating/Cooling of peltiers on CCD Array and Cuvette
  • PID Monitor and control Cuvette temperature using DS18B20 and L298 HBridge
  • Monitor current draw from peltiers on CCD Array and Cuvette using ACS712 current sensor
  • Control Beam Shutter using a standard 9gram hobby servo
  • Detect Laser Good (verify beam is reaching destination) using a TEMT6000 ambient light sensor
  • Open and close Cuvette Tray using stepper motors driven by ULN2003, with optical end stops
  • Rotate Filter Wheel Assembly to change from 522nmSP to 550nmLP filters using ULN2003
  • Detect Filter Wheel Assembly position using rotary encoder
  • Monitor Cuvette Holder for presence of cuvette in tray using a optical proximity sensor

Board information and schematics can be found here.

  • Accepts power from main power supply and distributed it to other boards
  • Contains the L298 HBridge for the imaging and cuvette peltiers
  • Current Sensor monitors peltier current draw

Schematics, board information and firmware can be found here.

  • Arduino Pro Mini (for Adafruit RGB LED Ring which animates depending on activity)
  • ILI9341 2.2" TFT LCD Color Display
  • Capacitive Touch Panel with 12 'Buttons' using MPR121 touch controller
  • Displays system status and mini control interface
  • Accepts user input to open/close cuvette tray, etc..
  • LED Ring provides feedback regarding status, etc..

Current Schematics, Firmware and other details for the imagingBoard can be found in the project log located HERE.....or in the gitHub repository..

imagingBoard main board schematic

imagingBoard_ccd board schematic..

Schematics, board information and firmware can be found here.

  • Controls Toshiba TCD1304DG Linear CCD
  • Monitors Linear CCD Detector Array Temperature via DS18b20 temperature sensor
  • Monitors UV index and IR with a SI1145 UV Index Sensor to detect fluorescence and IR.
  • *Might, at least in future update control the Linear CCD sliding, which can be used to increase resolution.
  • Transmits CCD data to raspberryPi for processing

I will start by saying, there is no secret sauce to this project.. I am committed to sharing every detail of how this project works, how to build it and how to get it working...and hopefully how to modify it to suit your needs!

The entire system is based on a raspberryPi.. And uses 4 microcontrollers to accomplish its tasks.

Firmware for the controlBoard, interfaceBoard and the imagingBoard can be found either on the gitHub repo or directly at the mBed.org site...

controlBoard: http://mbed.org/users/flatcat/code/ramanSpectrometer_controlBoard/

interfaceBoard: http://mbed.org/users/flatcat/code/ramanSpectrometer_interfaceBoard/

imagingBoard: http://mbed.org/users/flatcat/code/ramanSpectrometer_imagingBoard/

The open source hardware information:

The open source software and library information:

For a more readable version of this, check the gitHub location.. I tried forever to figure out how to get this information on here in a readable format, but there just doesn't seem to be any way..

The device firmware for the controlBoard, interfaceBoard and imagingBoard are located in the gitHub under software and are in 4 formats..Three of which are zip files.. There are the actual C++ files and then the exports from the online compiler...which you should be able to import and compile without issue.. There is the Keil uVision4 .zip file, the mBed online IDE (mBed Tools) .zip file, and the zip archive (With Repositories) version.. As soon as I have some worthwhile code to share, I will start putting the pre-comiled .bin files on gitHub as well...that way you can just drag and drop them to your Nucleo board without concern..

The software consists of a server application that runs on the raspberryPi, the client software that runs on the remote machine you are using to perform tasks and view the spectra, and the firmware for the microcontrollers if you count that.. Above it the first version of the client software for the remote terminal...it is written in python and uses PyQt4 for the interface..It also uses matplotlib and numpy to plot the spectra.. It also uses the plot.ly API for posting the data to the internet for sharing... There will be a large amount of development with this soon.. Accessing the RRUFF online raman spectral database is coming, and many other features.. Since it's written in python, and uses PyQT4... it runs in linux and windows both.. Happy about that too..

Here's the plot.ly view of the same spectra shown above..this time from a web browser, which could be on your phone (I've tested it, works great), chromebook, tablet or whatever... This is something I wanted to include from day one..I'm very excited I was able to get this done so well. I plan on expanding to other data sharing sites too...

So, the process is pretty well explained above...in 'the process'.... But basically, the server software on the raspi doesn't really have a gui... it just runs and does what it needs to do.. The client connects via the IP network....you decide to take a sample...so you put your sample in..move over to your client machine...click 'get sample' it send a command to the raspberryPi across the network...the raspberryPi send various commands to the microcontrollers and begins the process of taking a sample... it might need to take several images, and process them, etc.... then it crunches some data... and sends it to your client.. now, before you clicked get sample.. the raspberryPi determined if you are on a PC or some other device... if you're on a PC it just spits the regular spectra to you and your client software goes out and does the spectral search through the databases, etc.. and obtains its match and displays it to you, etc... if you're on a less powerful device, say a smart phone.. the raspberryPi does the search and crunching, comparisons, etc. itself and spits out the resulting match to you...and a plot.ly graph.. How is that for simple?

Connectedness might be a subjective term.....but ramanPi meets or beats any expectation in this department... Being connected to the internet is central to the system.. Without internet access, ramanPi would not be able to identify the compounds under test as maintaining a local spectral database is hardly short of insanity. ramanPi also isn't a standalone device..it requires a workstation with client software which displays the spectra, etc.. In short, ramanPi is a lab instrument that analyzes samples of compounds in cuvettes inserted into the system through the cuvette tray...ramanPi can take commands through the integrated touch panel and display to do certain things like open and close the cuvette tray, configure some items, show system status, etc.. A remote workstation running the client software connects to ramanPi through the network and requests that it start the analysis, or a number of other tasks..the remote workstation is ultimately where the spectra is displayed...you can also send that data to plot.ly to share it on the internet either from the workstation or a smart phone or other portable device.. You can also configure ramanPi to tweet your latest data when you're done! If you're looking at ramanPi in the IoT (internet of things) perspective... then set up the system with a flow cuvette and set up a job to do a periodic sample of your homes incoming water supply, and then have it post that data to twitter and plot.ly when it detects abnormal levels of dangerous compounds! There's a ton of applications where you could configure ramanPi to monitor dangerous levels of certain compounds and alert you...how about a text message or email when your home brew is just right or has gone bad!?!?!

Please read more about how raman spectroscopy and this system works!

Read more »

  • 1 × Raspberry Pi Model B+ 512MB RAM $39.95ea Adafruit Product ID: 1914
  • 1 × ARM Nucleo Board STM32F4 STM32F401RE 512K $10.33ea Mouser Part Numer:511-NUCLEO-F401RE
  • 1 × Tosbia TCD1304DG Linear CCD Array Detector $14.99ea eBay
  • 3 × Black Plastic 3D Printer Filament Cartridge (I used an XYZ daVinci v1.0 - 1.75mm 600grams per cartridge) $28.00ea Amazon
  • 1 × Set of ramanPi PCB Kit (3x prototype boards, some solder and a long weekend) $TBD - Probably around $20ea

View all 77 components

  • ramanPi is ON HOLD

    fl@C@03/02/2018 at 02:36 1 comment

    I just wanted to drop an update..                                        Thursday, March 1, 2018

    In case everyone didn't already notice....   My efforts for ramanPi are currently on hold.  =D

    I will be returning to the project once I have completed a number of other milestones in larger project(s).  When I return my efforts toward ramanPi, I will be completely redesigning the optics, electronics and software.  I still have a need for an inexpensive raman spectrometer, so this will happen.  

    If anyone would like to take a leading role in coordinating other developers, etc. in the interim....please let me know and we can talk about how that might work...as there still seems to be a lot of interest int this project..

    Also, I want to take this moment for the people who either haven't read thoroughly through this project, it's logs, etc..  This project is listed as 'work in progress'....meaning it is not a fully functioning raman spectrometer as yet.  Much development is still required.  If you want a completely functional raman spectrometer of this nature,  I'll urge you to contribute to this project!  

    Thanks!

    -fl@C@ 

  • moar of the things

    fl@C@03/10/2017 at 08:08 2 comments

    So, I thought I'd throw a couple of these in for inspiration.... I'm really enjoying Fusion360... Anyone interested in helping with creating these?

    This is the beamSplitterAssembly reborn into a simpler, and easier to print design.. No more of that tiny little carriage for the cube, this one is much more robust and a way simpler design..


  • And...I'm feeling productive..

    fl@C@03/09/2017 at 07:53 0 comments

    And, so the beginnings of the new beam splitter assembly... I'm enjoying fusion 360 so far.. Took me a minute to get the hang of it, but I'm progressing...

    So, again...comments, questions are all welcome!

  • First new part - a new objectiveLensMount!

    fl@C@03/09/2017 at 04:44 0 comments

    Well, here it is...! A new start and a new part... I'll be adding these parts to the gitLab Repo as I finish them.. If you'd like to contribute to the creation, let me know through a DM here! The collaborative features of fusion 360 should make it pretty easy.. As always, questions or comments are welcome!

  • Moving On...

    fl@C@03/08/2017 at 23:23 0 comments

    Ok, the gitlab repository has started ( https://gitlab.com/ramanPi ).. I'm basically giving up on the website for ramanPi.org... I don't have the time to try to keep it from the constant bot attacks or whatever...

    So, this brings me to the next point... I'm going to be starting an updated version of ramanPi in the new gitlab repo. I am interested in everyone's opinion on this, so if you have any.....let me know here...asap!

    The new design will be created in Autodesk Fusion 360. The releases will be housed in the gitlab repo, and collaboration will be through fusion360.. If you'd like to get in on it from the start, now is the time! I have a TON of people who've wanted to join the dev team through this website... I'm going to approve them all... If you are still interested, let me know through a DM here, same goes if you're not interested anymore..

    Optics will be fairly similar, electronics are going to be majorly different (and I am going to take my time this time, not being rushed with a contest)... and hopefully, the whole thing benefits from better design software, more expertise, more experience, more care and time taken, etc...etc..

    Let's get going, finally... I've had a few failed starts...but my plate is clear now...Proof is in the pudding.. =D

  • gitHub vs. gitLab and other exciting news.

    fl@C@10/12/2016 at 01:01 0 comments

    I'm thinking about moving the repo from gitHub...and over to gitLab.. GitLab seems to be a lot better suited to what I'm trying to accomplish.. I'll probably keep gitHub there, and maybe update it with major updates or at certain intervals...but it won't be the repository that gets the regular pushes, etc.. Any questions or comments about that are welcome!

    Also......I am directing some efforts towards a redesign of the electronics in ramanPi... Meaning the four boards (interface, control, imaging, and power boards) will narrowed down to a single board....and that board will have a connector for a raspberryPi zero to sit on... I haven't gone through the specifics of how the zero will connect completely since there's the business with the USB, etc. to deal with in order to get wifi/networking....but the significant cost savings warrants a close look...this redesign is an effort to cut costs and complexity...so.....hopefully that's exciting news..

    ramanPi.org is on it's way back to life, thanks to some help from a generous web developer! Looks like the bot attacks are no longer an issue...now it's just back to business..!

  • MagPi Issue 50 - ramanPi is #7 !

    fl@C@09/30/2016 at 11:13 0 comments

    So, to my amazement...ramanPi is reaching more and more people... this time it looks like the great people over at Raspberry Pi's MagPi magazine included ramanPi in it's "Top 20 RaspberryPi Projects" and the "MagPi Issue 50 - Top 50 Raspberry Projects".. And a while ago they wrote a great bit on ramanPi in their blog..!

    Thanks to them, and everyone for everything..!

  • Update.

    fl@C@05/08/2016 at 17:42 6 comments

    So.. I figured I'd consolidate the last few logs into this one to make it easier to follow what's going on...

    Hackers.. I moved ramanPi.org over to a new host...and it's helped with reliability... But it hasn't stopped the 1,004 malicious login attempts and constant bot traffic trying to overwhelm the site.. I don't have the resources, time or whatever to spend on mitigating the constant attacks...

    Soo..... Basically, as a result.. I can't seem to recover anyone's email addresses, etc. If you were interested in developing, or were participating... Contact me here, I know a lot of people have..and I'm trying to keep up.. I'll get to you soon! But I'm thinking of just forming the 'team' here at hackaday.io to make life easier. It's not as organized, and a little restrictive...but it's here.

    So, hopefully some of you see this..and so on... Here's to picking up where we left off... :D I'll try to update here with what I can..

  • ramanPi and 3D Printing for the Citizen Scientist @localMotors

    fl@C@05/08/2015 at 15:26 0 comments

    Hey, short notice... But if you're going to be in the Phoenix area the week of the 14th, I will be in town at Local Motors to talk about ramanPi and 3D Printing for the Citizen Scientist..!

    Hopefully I can put up a video of the talk after if you missed out and are still interested!

    PM me if you're interested in more details!

  • Developer Developments

    fl@C@04/28/2015 at 23:04 0 comments

    So, it's been a great past couple weeks! I have had some really talented and incredibly smart people contact me and offer their help to contribute to ramanPi..!! I'm very excited about where this is going and I think by the end of it, we will have a very good system.

    We have a couple Python gurus, one of which has both PyQt4 and signal processing experience as well as being an electrical engineer with FPGA skills. Another being skilled with the various libraries we'll be using in addition to a multitude of programming languages and has a Masters in Physics. There's a couple people who have some in depth knowledge and experience with optics and lasers as well as raman systems, both in usage and design.. Another who is very skilled with FPGA design and will make the difference for the imagingBoard.. All of these people are being very gracious in offering their time, experience, knowledge and skills to work together to bring ramanPi to the next level and make it a system that can be used for serious science in the school, in the lab or at home!

    I'd really like to take a moment and thank everyone for all of this.. It's going to be very exciting!

    If you're interested in contributing as well, you can contact me at dev@ramanPi.org!

View all 88 project logs

  • 1
    Step 1

    Below is a list of build instruction logs that will instruct you on how to go all the way from sourcing your components to printing the parts, and constructing your very own raman spectrometer!

    To begin, you will need some tools..  Pretty much every section requires similar tools.  If a section requires a special tool not listed here, it will state that and show you which tool is appropriate.

    Tools Required:

    • 1. Needle Nosed Pliers
    • 2. 1.5mm Hex Driver
    • 3. 5/16 Hex Driver
    • 4. Philips Screw Driver
    • 5. Precision Tweezers
    • 6. Nitrile Gloves
    • 7. Cotton Gloves
    • 8. KimTech KimWipes

    3D Printed Part Guidelines:

    Printing the 3D Printable parts will take you probably about a week. The spectrometer portion alone took about 15 hours on my XYZ daVinci 1.0 printer.. The 5.25" Drive tray takes about 10, and most of the other parts are about 6 or 8 hours.. Print in high enough quality to make sure the parts end up solid enough that they won't crumble in your hands..use 30-50% density... Supports are a good idea and the spectrometer really should be printed with the inside facing the floor. I managed well with .2mm height, you might want to try .1 or whichever is best for your printer. All the parts have been designed for use with ABS plastic and I would recommend using black ABS filament.  For parts with beam paths, I am investigating different ways to coat the interior for reduction in reflections, etc. For now, if you like you can coat them with a flat black paint..this will help keep the noise floor down.

    All of the 3D Printable objects are located in the gitHub repository.  They have been created with openSCAD and can be modified, etc.  You can view the .STL files and you can download and edit / modify the .SCAD files as well.  

    Sections You Will Be Building and Configuring:

    Following Instructions:

    Each section of the raman spectrometer system is divided into separate build logs to make it easier to find a section and keep the flow.  You'll see each section has a "LET'S BUILD IT" graphic..

    You can click on that and it will take you to the appropriate instructional build log associated with that section!  At the end of the instructional build log, there will be a link to return here...or you can just close the tab and this tab should be here waiting!

  • 2
    Step 2

    Section: 1

    A Completed objectiveLens Mount

    Components Required:

    Click on the graphic above to open a new tab with instructions on how to build your objectiveLens Mount!

  • 3
    Step 3

    Section: 2

    A completed beamSplitter Assembly

    Components Required:

    Click on the graphic above to open a new tab with instructions on how to build your beamSplitter Assembly!

View all 13 instructions

Enjoy this project?

Share

Discussions

David wrote 10/13/2014 at 18:15 point
Well Done!

  Are you sure? yes | no

fl@C@ wrote 10/13/2014 at 19:59 point
Thank you! =D
I look forward to seeing your PCR machine...! I would like to build one myself... Hopefully I can see it in Munich!

  Are you sure? yes | no

David wrote 10/14/2014 at 12:22 point
Sure, no worries. If I get some PCB's made up by then, you can have one :)

  Are you sure? yes | no

Kojote wrote 10/15/2014 at 09:22 point
Make Munich too?

  Are you sure? yes | no

fl@C@ wrote 10/15/2014 at 19:44 point
Thanks David! :)
I want to get a group of instruments like yours, the pyppm and mine and whatever else can be found together to make a nice suite of lab gear.. maybe share a protocol and be able to integrate data.. An openLab suite so to speak..

  Are you sure? yes | no

fl@C@ wrote 10/13/2014 at 20:00 point
Thank you!

  Are you sure? yes | no

PointyOintment wrote 10/09/2014 at 10:50 point
I remember you wrote recently (in one of the log entries?) about automatically moving the CCD for the purpose of superresolution. I can't find it again, but you might find this interesting: http://wayback.archive.org/web/20131002130348/http://www.cs.columbia.edu/CAVE/projects/jitter_camera/

  Are you sure? yes | no

fl@C@ wrote 10/09/2014 at 17:35 point
Yes, I did... I mention it in the project details for the imagingBoard and here - http://hackaday.io/project/1279/log/8927-spectrometer-physical-design-concept ... I think I mentioned it in the last video as well.. You've got a good memory!
Thanks for that link, it looks like it's got some good info.. I don't know why, but this part kind of fascinates me too.. I'd like to work on something that uses this for regular photograps as well..The idea of eeking details this way is pretty cool.. I haven't spent a lot of time on figuring out how I'm going to slide the detector on the spectrometer since I've been mostly focused on just getting it to work first... :) But it's definitely something I want to visit when I can..Thanks again!

  Are you sure? yes | no

WestInSide wrote 10/08/2014 at 13:31 point
Is the beam spiltter S or P polarized and would it be better to take a different reflection/transmission tatio e.g. 25/75?

  Are you sure? yes | no

fl@C@ wrote 10/08/2014 at 16:26 point
I designed the beam splitter module to have quick access to the beam splitter itself.. In case you want to swap them out, etc.. The build instructions show this in detail.. http://hackaday.io/project/1279/log/9966 You can insert whichever 12.5mm cube beam splitter you need...the .scad file is available as well in case you require more flexibility..

As for which is better.... This site shows some insight on the effects of polarization in raman spectroscopy... http://www.analyticalspectroscopy.net/ap4-7.htm There's also some good answers here http://www.researchgate.net/post/What_is_the_role_of_polarized_light_and_unpolarized_light_in_Raman_spectroscopy

The particular splitter I started off with in my version is from eBay (new ones are expensive, especially if you want laser-line polarizing).. listed as non-polarized dpss 532nm (I have to assume it's 50/50)..I'll probably end up buying a new one in the long term for my purposes.. To be honest, I've only been working on this project since June, I haven't had much time to consider the benefits of different ratios.. It's an interesting idea..

  Are you sure? yes | no

WestInSide wrote 10/10/2014 at 13:09 point
There are some PDF's on the page, which are quite informative. It seems that a
90/10 splitter increases the raman signal up to 4 times.
http://www.ondax.com/noiseblock-9010-beamsplitter-filters

  Are you sure? yes | no

fl@C@ wrote 10/10/2014 at 14:51 point
So, it looks like that replaces the splitter, and works in conjunction with their "sureblock" notch filter(s).. Almost like a mix of interference filter, beam splitter, diffraction grating and notch filter... Has a weird geometry too.. Wouldn't work in this system due to space constraints, etc..
Looks like a pretty cool product.... But I'm very afraid to ask how much those cost..or where to buy them..

  Are you sure? yes | no

cosmobird wrote 10/05/2014 at 22:50 point
Hi fl@C@,

I was a research intern in one of the premier R&D(CSIR-CEERI) institute in India. Now i am carrying out independent research. During my internship(~4 years), i have not learned much about optical systems and architectures involved in it, but learned much about spectroscopy in general. I contributed to the development of AOTF based NIR spectrophotometer - mostly working in analog signal conditioning, microcontroller interfacing, data acquisition in PC(gpl licensed)(https://github.com/lrmodesgh/Spectroserver), analyzing... etc. Coming from a farming and food based family background i was kind of attached to the project from then.

I was following your project for a long time, and really proud about guys like u to adapt peer production and free systems model to develop the project transparently. In the midst of proprietary (scio) and infectious incorporations (tellspec) projects like your ramanPi, spectruino, publiclab DIY spectrometer were very transparent and filled with freedom ambience.

Upon realizing from my first day about the positive impact that a spectrometer can create in ecology and society, i was very much interested to do one by myself. Unavailability of 3d printing or other similar production unit made it unimplementatble for me. Once even my proposal of creating a raman spectrometer like yours, was not answered for funding or facilitation. However, upon seeing your contribution encouraged me to do now with my own earnings. Hats off for your impression.

I am going to participate and contribute for STEM based education to change the hacking, research and development, situation in india from and at grass root level. Now i think i have the platform to create an impact here. I have learned a lot about the mechanical and optical architectures from your desgins and discussions with other members. I have recently forked your project from github and really trying to contribute to it. Furthermore, i feel so much satisfaction in your project due to complete usage of free tools without any proprietary pollutions.

:)

------------------------------------
However, after reading ur process overview the retrieval of spectrum from internet spectral databases lingers in back of my head all the time. It feels, like that the instrumentation and computing system which is completely decentralized, were then becoming dependent upon the online databases supplied by few r&d and private organizations.
1.) I know that presently, there is no other way to do acquire spectrum for reference. But to start with, raman and other spectral data are needed, which are sold for lot of cash and locked with proprietary formats that are not generic to read.
2.) You may be knowing about food chemicals codex for which we used in MIR spectrometers for calibration and testing of samples. I cannot find any equivalent vast database for NIR or for Raman (both are complementary). !
3.) Regarding sharing, I have a model where people could share their own spectrums about the samples (food, .....) like files in torrent, but using completely decentralized technologies.

It would be great if the process you proposed is completely decentralized.

Do you have any suggestions on that ??
:)

  Are you sure? yes | no

fl@C@ wrote 10/06/2014 at 16:06 point
Hi Neo,
Thank you for the interest and compliments.. :)

One of my biggest aims is to make this as available to people as possible.. Especially for education.. I'm actually pretty surprised how many people have taken interest.. Which is great, and to hear that people like you are planning to use it for such a great cause...it makes me very happy... and very glad to hear that people are already benefiting from my work..! I'm really glad I decided to share this project..this is the first time I've put anything out there for people to see.....I had no idea people would be so accepting..it's great..

Another major point I wanted to hit was the use of freely available and easy to aquire software and tools as much as possible.. When I decided to share this, I wanted to share all of it... I needed to build one for myself anyway, and wasn't putting it out there for profit or anything... It's means way more to me to hear from people like you that are using it to perpetuate the positivity.. Thank you for that.

When I started this I knew nothing about spectroscopy, raman or otherwise.. It's been a great learning experience, and I'm very happy to hear that others are benefiting from my learning as well! =) I hope you're able to meet your goals, please let me know if there's anything I can do or contribute!

For your points... There is some dependency on the spectral databases...... I've thought about this many times as well. On one hand, you want data that is known good to compare and identify... You are right in that a lot of companies which charge for access to their data... Which I don't like, and you're right..it doesn't fit with the theme of this project.. :) However, I had made contact with a couple alternatives (specifically raman spectra) and received permission for read only access (free of charge) so long as I don't download the entirety of the database.. I am still looking into options in this area..

I had thought of a peer to peer setup where users could contribute and share data.... My concern in the beginning was management... it had occurred to me that you could set up a voting system where the system adds data from a user...then other users get to match and vote for it's integration into the database.. Maybe something where if two people contribute spectra from the same sample, the peers vote and it's possibly averaged or whatever and integrated then shared across everyone... This all sounds very interesting... But I also wonder how accurate the data is in the end.. It seems to me that the spectra you're comparing to wants to be as solid as possible..definitely worth a lot more thought though...

Having said all of that, I am working right now on coding for the portion to share data with peers...not exactly in the napster fashion, but I am experimenting with plot.ly right now...and it's fairly promising.. There's a couple other services on my list to try out as well...

  Are you sure? yes | no

Scott wrote 10/02/2014 at 02:06 point
@David - not a dumb question! I thought I'd chime in on this from my experience in designing many commercial Raman spectrometers...
A typical laser diode has significant out-of-band spontaneous emission (some can be greater than 50nm in bandwidth!). A clean-up (laser-line) filter is usually necessary in Raman spectrometer design so that you're not overloading the bulk of your Raman spectrometer spectral range (even a 20nm shift from 532nm is a Raman shift of 680cm^-1) with spontaneous laser emission (ASE is the term we use).
The other major issue is Rayleigh light getting back into the spectrometer. A typical Raman laser in the milliwatt range is exciting a sample whose typical Raman emission signal is on the order of pW to nW (10^-9W) -- that's 10^6 - 10^9 higher excitation energy than emission energy. The big issue which trying to block that Rayleigh light once it gets in the system is the amount of (stray light) it creates. The key is to keep it suppressed with an LP filter before it gets in to the spectrometer portion of the system. If you tried to use a blocker (i.e. black tape or say mirror as an obstruction) you have to place it after the focusing element beyond the grating since only at that position do you have the Rayeligh/laser light separated from the Raman light of interest. Unfortunately, though, you've now introduced tons of Rayleigh (laser excitation light) into the system since you're not blocking it until it makes it toward the detector. Any blocking, mirror or obstruction at this point in the system will inevitably cause tons of Rayelight/laser light to bounce around throughout the system. This will invariably make it back to the detector. Even if one considers high-absorbance sidewalls, we're again talking about getting rid of 10^6 X more photons than the ones you are trying to detect. That pretty much limits one to using combinations of dichroic beamsplitters and long pass filters at the front end of the system before you get to the slit.

  Are you sure? yes | no

David wrote 09/30/2014 at 07:58 point
Maybe a dumb question but:
Instead of using two Edge Filters or one Notch Filter to block the 532nm laser light, could you just place a physical light-blocker in front of the Linear CCD at the 532nm point? Maybe something like a strip of mirror, so you can direct that light out of the sensor chamber and not have it bounce around in there?

  Are you sure? yes | no

fl@C@ wrote 09/30/2014 at 10:45 point
Hi David.. There are no such thing.. :)

That's an interesting idea... The first thing that comes to mind being the intensity of the 532nm portion of the beam in comparison to the raman scattered light.. In theory, if you had a material, or method of containing the entirety of the light in that position on the sensor, without the possibility of reflection or 'splashover'.... It is theoretically possible as far as I can see off the top of my head.... I'm not entirely sure how one would do that.. In addition, and maybe someone could correct me if I'm mistaken...but I believe the beam would also reflect at the different orders or at least the 1st order from the grating surface as well..so, you'd have to mitigate those reflections also.. ultimately I think the contamination of light would blind the CCD and it'd be difficult to obtain a signal... A side note, not having done the math....I'm not sure how small that light-blocker would have to be... pretty small if I'm not mistaken...in the microns I believe...The pixel width of the CCD is 8microns... http://www.spectronicdevices.com/pdf/TCD1304AP.pdf Depending on what resolution you'd want, that'd be a tiny mirror...I think you'd have to worry about focal lengths too.. It might be food for thought though!

  Are you sure? yes | no

David wrote 09/30/2014 at 11:57 point
Hi fl@C@,

I took a look at your photo from the inside of the spectrophotometer chamber (with the rainbow of light spread over the linear CCD). It looks deep red to near UV to my eye, so maybe about 630nm to 430nm light? Lets says about 200nm bandwidth in total. The Linear CCD is about 29 mm long according to the data-sheet, and you use long-pass and short-pass filters at 550 and 522nm respectively. So, that's (550-520)/200*29, or about a 4mm of physical light-blocker to equal what your filters do. Like you say, that will only work if you don't get any weirdness with the grating, but maybe it's worth investigating?

  Are you sure? yes | no

fl@C@ wrote 10/01/2014 at 01:32 point
Definitely worth investigating... 4mm sounds very wide to me for some reason... I know the filters I am using for this particular build are spread pretty far, about as far as you'd ever want.. I'm on the lookout for a closer match when I can find them.. From my understanding, the raman shift usually isn't very far off center...and very weak.. I have to wonder as well what the effects of not filtering before the grating would be.. and why they wouldn't just coat the CCD window with a notch filter coating..aside from expense maybe.. I know they do coat some with UV coatings, etc.. Interesting though.. Something to keep in mind when I move to designing the lower cost platforms for sure. This is my first shot into spectroscopy so I needed to start somewhere.. I have all sorts of improvements in mind for the next version(s).. =D

  Are you sure? yes | no

David wrote 10/01/2014 at 11:46 point
I was thinking more about your Raman Spectroscope last night. Most spectra online (here for example, http://www.process-instruments-inc.com/pages/pharmaceuticals.html ), show measurements between about 200-1800 cm^-1. Using this calculator: http://www.photonetc.com/EN/DOCUMENTATION/Raman_Shift_Calculator-299
with your laser at 532nm, and 200 and 1800 cm^-1, I get a range of 537.72 to 588.34 nm. ie, you should move the Linear CCD away from the grating, until it only is hit from green to orange light. That would give you the best range for Raman analysis, although it would be not-so-good for general spectroscopy. You could even place the CCD such that the laser light missed the CCD completely.

  Are you sure? yes | no

fl@C@ wrote 10/01/2014 at 13:30 point
I see what you are saying David.. The light from the grating is reflected from the focusing lens...with a predetermined focal length.. Moving the CCD farther from would cause the spectra to be out of focus, and it wouldn't be very useful.. Perhaps something like a monochromator grating and a photodiode detector.. Some older systems are set up that way, the grating rotates and the photodetector picks up the light as it passes by... With that setup you could control which part of the spectrum you look at...

  Are you sure? yes | no

David wrote 10/01/2014 at 13:57 point
In that case, you would need to calculate a focal length for the curved mirror that focused the light from about 535nm to about 590nm onto an image of the same width as the CCD sensor. So, a focal length a few times longer than what you have now I guess?

  Are you sure? yes | no

A. M. Aitken wrote 10/01/2014 at 15:26 point
My understanding is that between 400 and 1500 rcm is the fingerprint region, if the task is matching a sample to a library entry it's probably not a bad choice but it's difficult to work things out from that spectra. The 'full' spectrum from 400 to 4000 rcm contains more information that can be related to the molecule so I would want 676nm optically. The difference between the reflected signal at 532 and the raman signal could be 4 or more orders of magnetude. I saw someone on youtube do raman with a block in the spectrum instead of a filter but it seems a tall order to make it work well.

  Are you sure? yes | no

fl@C@ wrote 10/01/2014 at 18:34 point
This.. I also designed the spectrometer so it could be used outside of this raman system.. So, keeping it within what standard systems have was my main priority to start... I'm still working on it, but I created the .SCAD file so you could plug in your own values for the optics and it would alter the shape and focal lengths to fit whatever optics you decide on... I suppose you could tweak your configuration to have an offset like your thinking.. I still think it'd probably be just better to use a monochramator grating.. That'd give you an easy way to mitigate the stray 532nm (or whatever wavelength you choose) coming in.. The edge filters I'm using are only around $15 each...It seems like a lot of effort to save $30 when there seems like other places in the system to do that... Especially when my next goal is to work on a much less expensive version that uses different optics after I get this one complete... I think Marvin makes a good point as well, the center of this project is matching spectra to online databases. I encourage everyone interested to modify the design to suit their needs to whatever extent they wish! If enough people are interested, I'd be happy to include it in the design.. Right now, I'd like to start from a known good configuration so I can work my way into optimizing it from there since I'm still a newbie..

  Are you sure? yes | no

Benjamin Franzmayr wrote 09/17/2014 at 03:24 point
Hi. I've got a couple of comments.

Firstly, I'd like to have a low cost spectrometer without the raman aspects of it so when you're done, can you perhaps take out a subsection of your project and write it up as a complete project? If so, I'd personally want to be able to sample in the infrared and UV ranges as well (perhaps 200-900nm? or 250-800?) so would that require a shortening of the light path from the diffraction grating to the CCD? Perhaps having a second position for the focusing mirror closer to the other optics would make that possible (and wouldn't be too hard to add to the design). Also, would you or someone be able to offer a kit of parts or an assembled unit for sale? I'd rather buy one kit than to find a dozen different components (not as easy or cheap to do outside the US)
Secondly, for the spectrometer, you've printed it "right way up" with a curved top and a bunch of supporting material. Would it be simpler and cleaner to have a flat top and print it upside down?

Thanks and keep it up!
Benjamin

  Are you sure? yes | no

fl@C@ wrote 09/17/2014 at 06:24 point
Hi Benjamin,
Absolutely.. I fully plan on making sure the spectrometer portion will work outside the raman system.. It will not require much extra work, and I completely see the use for it.. That's part of the reason I'm working in such detail with this part.. The spectrometer firmware should work in both situations without modification.. In fact, there shouldn't be any modification required for it to work in both situations once I'm done.. Even if you have it in the raman portion, it can be removed and used outside...I've put some thought into a bypass or something that may make it usable without removing it too, maybe via fiber or something.. I'll know more when I get that far..
As far as UV and IR, I don't see a problem there either.... You may need a different diffraction grating, but that shouldn't be a problem.... and if there are any modifications to the focal lengths, or whatever... I have created the .scad file for the spectrometer 3d model with enough parameters that basically, you can enter the focal length, diameter, and whatever else and the spectrometer basically redesigns itself based on those...it calculates the angles and everything...I haven't gotten that part to work 100% yet, but I'll have it there soon enough... So, basically you could download the files...plug in your values and it'll design a customized spectrometer based on your optics and requirements... :)
And for a kit.... I would love to offer a kit for that.. Hackaday just opened their online store...maybe they'll consider the spectrometer portion as something they'd like to work with..!
The reason I printed the case oriented the way I have is from trial and error... I thought so too, printing it without as much support and everything seemed more logical...until I saw the result.. At least on my daVinci printer....the walls came out warped, the whole thing just looked miserable..and I wasn't able to get it just right... I've printed four of these now with it oriented this way and they come out flawless....takes more plastic and more time...but it's fairly important to make sure the dimensions stay true...
Thanks to you!

  Are you sure? yes | no

Pixel Pirate wrote 09/16/2014 at 01:16 point
It seems as if the Raspberry Pi is a little unnecessary. I bet you could probably hammer out the details for the STM32 with a 12 pack of Coke or three. (After all, Everyone knows that Soda to Software is the most efficient energy conversion known to man)

  Are you sure? yes | no

fl@C@ wrote 09/16/2014 at 03:55 point
The raspberryPi is actually very important.. First and foremost, it provides an internet connection and retrieves spectral data from the online databases... It also does the image stacking, and a fair amount of the computational stuff.. It acts as a central hub for the remote interface to determine what needs to happen based on the task the user requests.. And a number of other things.. It also provides a solid platform for experimentation and ventures into using the whole platform for things I didn't originally think of..future expansion and so on. I don't want the system too reliant on the remote interface for image processing, stacking, hardware control, etc.. since I thought it would be better to allow for more OSs to use it, etc.. Ultimately, that's the beauty... if someone decides they don't want to add a certain portion, they can modify it to suit their needs, etc.. =D

  Are you sure? yes | no

Pixel Pirate wrote 09/16/2014 at 05:35 point
I can see all but the image processing being done on an embedded setup, and that is mostly because you would want the client to interpret and manipulate the data through a GUI. Though in the end it is your project...

  Are you sure? yes | no

fl@C@ wrote 09/16/2014 at 05:53 point
I haven't reached the point in development yet, and the documentation doesn't reflect it yet...but in the long run... the spectrometer will come in three flavors.. one of which is a low cost option with the raspberryPi camera module...which is originally where the raspi came in.. A little into development, I moved to a Linear CCD for the spectrometer...that's early in the project logs.. So, mostly that is where the raspi started, in addition to providing all the stuff I mentioned.. I still plan on supporting the raspberryPi camera module for people who want to use a lower end/cheaper spectrometer...using a dvd diffraction grating,etc...
Also.. I will argue that it facilitates the theme of modularityI am trying to design into this entire project... Without the raspi as a hub, I'd have to code each MCU to communicate and they'd be reliant on each other.. I suppose I could work around that, but for simplicity and modularity.. I like the approach..and it makes the system slightly more standalone and gives room for more features......which I haven't hinted at yet... but I plan on making this a part of a group of instruments that share data and so on... For the $40, it seems like it provides a big bang for the buck on my ultimate goal...

  Are you sure? yes | no

Matouš wrote 09/03/2014 at 19:57 point
Hi! I am trying to reproduce your method of driving the Toshiba CCD with the Nucleo, but so far I am failing to do so. Could you please update the schematics of the imagingBoard to the latest version?
I managed to make up from your code on mbed that the pins PB_8 (shiftGate) and PC_6 (shiftGate_int) should be connected, possibly using a resistor for protection and the shiftGate_int pin is used to trigger the checkState function from the shiftGate PWM. I don't understand why you are connecting the CCD VDD pin to 5V. Maybe if you at least connected the CCD output to the 5V tolerant (if I understand the uC datasheet correctly) A1 pin, but you are connecting it to the A0 input, which I believe can damage the uC when the CCD output exceeds 4,0V.
If you could just update the connections schematics, I would be glad as I could see if I am doing something wrong or my CCD is dead. Thanks!

  Are you sure? yes | no

fl@C@ wrote 09/03/2014 at 21:37 point
Hi Matouš,
The schematic I posted in the project log - http://hackaday.io/project/1279/log/6558-1st-step-to-spectral-success Is the current configuration I am using.. I''ll be revisiting that soon, but for now it seems to work pretty well.. You might be right about the value exceeding 4.0V, however I didn't anticipate that in my testing since the light levels are so low.. This is a point that needs some attention though and I do plan on making it more robust..
The image at https://static.hackaday.io/images/3837731407588694775.png is what works for me though.. The CCD datasheet appears to me to imply that it's 5v tolerant.. http://www.spectronicdevices.com/pdf/TCD1304AP.pdf

I'm not entirely sure I understand your question... Regarding the CCD VDD pin (Digital Power Supply - pin 1 on the CCD) is connected to 5v on the nucleo.. Pin 2, which is the Analog Power Supply (VAD) is also tied to 5v from the nucleo.. (Which might be more relevant to your concern of overdriving the nucleo Ain, I will have to check the STM32 datasheet to see what it's tolerances are, but I was under the impression it was 5v)..
In any case, I would imagine you should get something from the device... Are you using the 1304DG or AP? Are you using the mBed online compiler? What are you using to determine your output? Have you checked your signals using a logical analyzer?

I'd love to help, let me know! Also, take a look at this image, it's pretty easy to follow too... https://static.hackaday.io/images/1410861407588576564.jpg

  Are you sure? yes | no

PointyOintment wrote 09/04/2014 at 01:07 point
> You might be right about the value exceeding 4.0V, however I didn't anticipate that in my testing since the light levels are so low..

Maybe clamp the output to 4.0 V with a Zener diode just in case? That way you don't lose resolution in the part of the range you're using.

  Are you sure? yes | no

fl@C@ wrote 09/04/2014 at 03:33 point
I'll be revisiting the hardware for the analog portion soon... I'm not really convinced the final version will even use the ADC in the STM32.. I've been reviewing multiple ADCs, some which are pretty appealing and use I2C and are higher resolution, etc.. The current setup was mainly for testing...but it does work...I wouldn't use it for anything serious though.. As soon as I get the rest of the hardware and optics for the spectrometer finished up and tested, I'll go back to the electronics and clean up my work there....and that will probably include some new code as well.. :)

  Are you sure? yes | no

fl@C@ wrote 09/04/2014 at 08:05 point
Matouš, I just reviewed the Nucleo data sheet.. You are correct, the analog input is 3.3v... In this case, I would suggest powering the Analog Power Supply to the CCD with 3.3v instead of 5v.. And change the code for the output to the raspi (or whatever you're reading it with) from raspi.printf("%i\t%4.12f\r\n", pixelNumber, 5 - ((pixelValue[pixelNumber] * 5) / 4096.0)); ............. to ............. raspi.printf("%i\t%4.12f\r\n", pixelNumber, 5 - ((pixelValue[pixelNumber] * 3.3) / 4096.0));

That way, the analog out will not exceed 3.3v... You can also drive the CCD itself from the 3.3v supply if you wish as it has a relativelly wide range...but I'd suggest reading the datasheet to understand the implications... Do you plan on using this in a raman spectrometer, or another application?

  Are you sure? yes | no

Matouš wrote 09/04/2014 at 17:03 point
I have the 1304DG, but I believe the only difference between DG and AP is the packaging... I am using the mbed online compiler and probing the output with an oscilloscope. I tried the code you have on mbed (http://mbed.org/users/flatcat/code/ramanSpectrometer_imagingBoard/file/841663cf312c/main.cpp) and I still don't understand the way the checkState function is supposed to be triggered. You have the shiftGate_int pin tied to trigger the function on rise, but on the schematics you posted the pin (one of the Morpho headers if I am not mistaken) is not connected to anything...
If I wire everything as you are suggesting on this image https://static.hackaday.io/images/1410861407588576564.jpg, the checkState function never triggers.

I am planning to first trying to make it spit out at least something and than probably make some PC software for it. I already have something as I was attempting to do this before, but failed, so it is just lying on my HDD, waiting for it's chance. Eventually I would like to make a spectrometer - probably not as complicated and professional as yours, but if I have plenty of time and money, I might give it a try :)

Regarding the voltage problems - firstly I believe the voltage output of the CCD goes actually higher with lower light. Secondly I see no reason to drive the CCD from 5V instead of 3,3V except that it will work on a bit lower frequencies. Is that the reason you chose to power it ftom 5V?

Thanks for the replys anyway, it is a very nice project I would really like to see finished and working!

  Are you sure? yes | no

Matouš wrote 09/04/2014 at 17:33 point
Oh and I am using the Nucleo-F411RE, not F401 as you are, but that should not make a difference...

  Are you sure? yes | no

fl@C@ wrote 09/04/2014 at 19:43 point
Matouš,
My mistake.. In my rush, and absent mindedness... I failed to document that I am using a jumper across PB_8 and PC_6.. Sorry, my memory is very very short...and if I am not in the middle of something, I completely forget.. Sorry.. Like I said though, this code and hardware configuration was never intended to make it to the final version.. It is a proof of concept that I could use states to trigger the stages.. I will be going back and possibly using an external ADC.. I don't think the 411 board should cause any problems, the pin configuration differences between it and the 401 board seem fairly trivial.. The jumper across those pins should make a world of difference for you though, I had to do that because the mBed platform doesn't support a lot of functions required to trigger an interrupt from an outgoing signal.. I'll be eliminating that dependency in the next version as well...

Hope that helps you... it certainly would explain why you're getting nothing from the CCD.. Let me know if it helps!

  Are you sure? yes | no

Matouš wrote 09/04/2014 at 21:48 point
Yeah, I figured that out in the beginning already. Turns out the problem was the supply voltage after all. When I connected the CCD to 5V it suddenly started working. Probably should have calculated the frequency at which the CCD is working. Why don't you like the uC ADC? It's 12bit, that means 4048 resolution no? That times the 3648 pixels of the CCD seems like quite a lot of data... I wouldn't rush very much to upgrade the hardware. When I was first attempting this, I was using an LPC1114 with 10bit ADC and undersampled the pixels to only 1024 samples, which still gave me nice 1Mb of data...
Also what do you not like about mbed? It is not as fast as writing native code for the processor, but I think it is much more manageable and also easier to understand for others who didn't write the code. It is not that slower too...
But I guess it depends on what you expect from the machine in the end. It's just that you can always buy a better ADC and add it there, but until you have a good foundation to give you usable results, it is all useless anyway, no?

Anyway my CCD seems to be talking to me right now, so I thank you for your help and depart to play with it for the rest of the day :)

  Are you sure? yes | no

Matouš wrote 09/04/2014 at 22:10 point
sent you an email with the updated schematic to make sure noone else gets confused

  Are you sure? yes | no

fl@C@ wrote 09/05/2014 at 00:08 point
Matouš,
Don't get me wrong, I actually really like the mBed platform.. It's just that the Nucleo boards are missing some support until they fill in the gaps..
I might still use the internal ADC, but there are some 16bit devices that deserve a look at least..they are more tailored for CCDs.. I'll definitely be posting on my findings with that as I move along..
Spectral resolution is the goal.. the more information I can get from the CCD about the spectra the better the results.. http://bwtek.com/spectrometer-part-5-spectral-resolution/ is a good overview.. Speed of the ADC, the ability to eliminate noise..
I guess I'm the type that defines the outer limits of what my expectations are for the project...I build a rough sketch of what I envision the final product to be...then I fill in the gaps until I am satisfied with the result... Especially on a big project like this one.. I could spend months working on each part individually until each is perfect, and then fit them together when they're done.. but I lose flexibility and interest along the way.. I'm a little more dynamic in my approach and it evolves as I fit it together.. It may not be the best approach for everyone...and at times may look buggy along the way....but it always works out and has worked very well for me to date.. :)

  Are you sure? yes | no

fl@C@ wrote 09/05/2014 at 00:14 point
I'm glad to see you got the CCD going... btw and thank you for the info and interest!! Hopefully, I can integrate some of this into this..!
If you need a jumpstart on the PC side.. I can share some python code I have that produces a nice matplotlib graph from the CCD... (Shown in a couple of my project logs)..
Good luck!

  Are you sure? yes | no

Jasmine Brackett wrote 08/15/2014 at 21:30 point
Hello fl@C@, I've just checked your project and it meets the requirements, so it will be considered for the next round of The Hackaday Prize. Thanks & good luck.

  Are you sure? yes | no

peter jansen wrote 08/10/2014 at 22:34 point
Great project. I just read your new post about difficulty finding (and driving) linear CCD/CMOS sensors, and having to find out-of-production models on eBay, which makes it tricky for others to replicate the project. I've been looking for similar (but much smaller) sensors for a new version of the open mini embedded spectrometer for the open source science tricorder, and there look to be some good offerings from Hamamatsu. Some of them have high MOQs, so they're a little out of reach, but after talking with a rep it looks like there are a few in the ~$50 range with a MOQ of 1, and might be worth switching to. If you'd like example code for driving a linear cmos, there's some Arduino code if you google "Open Source Mini Spectrometer". Eagerly looking forward to seeing the first specra from your raman spectrometer!

  Are you sure? yes | no

fl@C@ wrote 08/10/2014 at 23:42 point
Thanks Peter! Yes, I want to avoid designing something with end of life parts for sure.. I looked at the Hamamatsu mini-spectrometers ( http://www.hamamatsu.com/eu/en/4016.html ) a little while ago... I think I was looking at the C12666MA.. Marvin commented on my Bio page about the resolution.. I didn't contact a sales rep, but $50 isn't too bad. Did the rep mention any distributors that sell them? I check Mouser, Digikey, Avnet, element14..not that any of them sell the Toshiba chip either...but the Toshiba TCD1304 does seems to still be in production.. Although I couldn't find the AP only the DG, which is the one I have and seems the only difference is the ceramic vs. plastic packaging.. I'll definately take a look at your code.. I'm not using an arduino, but I am sure it'll be helpful.. I'm hoping to have some spectra fairly soon! I hope to get it in before the August 20th deadline..!

  Are you sure? yes | no

fl@C@ wrote 08/11/2014 at 06:37 point
Just ran across this link again.. You can buy the TCD1304DG from Avnet Express for $22.49 each (moq=1)... They have over 6k in stock.. :)
http://avnetexpress.avnet.com/store/em/EMController?langId=-1&storeId=500201&catalogId=500201&action=products&N=0&mfr=TOS&term=TCD1304DG(8Z%2cAW)

  Are you sure? yes | no

davedarko wrote 08/04/2014 at 12:51 point
is the neopixel ring planned as a kind of "preview" output spectrum? would be kind of cool.

  Are you sure? yes | no

fl@C@ wrote 08/04/2014 at 12:58 point
The thought had crossed my mind... Mostly I had planned on using it as a sort of indicator sorta like the spinning wheel on a mac or the hourglass on windows, etc.. with different patterns for different functions... Maybe it can display the spectra as it's imaging to indicate it's working........ I will definitely keep that in mind.. :) Thanks for the skull BTW!

  Are you sure? yes | no

fl@C@ wrote 08/04/2014 at 16:26 point
Just as a note too... I had planned on hopefully having it display a preview graph on the 2.2" LCD as it processes the info as well..

  Are you sure? yes | no

Zeke_D wrote 07/15/2014 at 22:29 point
Found a university example that may be of use for reference. http://fzu.cz/~dominecf/electronics/usb-spect/usb_spectrometer_dominec.pdf
Keep up the great work. :)

  Are you sure? yes | no

fl@C@ wrote 07/16/2014 at 03:46 point
That looks very useful.. Particularly the CCD driving stuff.. I'll read this over tonight..!
Thank you, much appreciated..!

  Are you sure? yes | no

Matouš wrote 06/26/2014 at 21:00 point
Wow. I love this. I would love even more to build this or help to make it better in any way! I have actually attempted to construct a much simpler version of this with an LPC1114FN28 and some Toshiba CCD chip, but it ended up occupying one breadboard and not working very well - I could see some reasonable output with an oscilloscope, but the ARM chip is probably a bit too slow for driving the CCD, reading from it and sending the data over serial to PC. Always only one of those three worked at one time :) Anyway I did not have any of these fancy mechanics and optics, just the bare CCD, so this is a great step for me. Thanks for this a lot, I will study on how to build upon your work after exams :)

  Are you sure? yes | no

fl@C@ wrote 06/27/2014 at 19:15 point
Thank you! I'm always open to input and suggestions..! Sounds like you have some practical experience with the CCDs.. I'm still looking into options in that dept., but I hope to dive into it very soon.. I've been eyeing the sony ILX511 and the Toshiba TCD1304AP recently.. I'm glad that any part of what I'm doing can help... that's my main goal with this! I really want to narrow it down to the cheapest and easiest way to build and source everything. =)

  Are you sure? yes | no

A. M. Aitken wrote 06/16/2014 at 01:13 point
The Edmund grating listed is the UV optimised version. The VIS version is the same price. Is that intentional and down to a different use geometry?

  Are you sure? yes | no

fl@C@ wrote 06/16/2014 at 07:00 point
Oops.. Thanks for pointing that out.. It wasn't intentional..and related to my trying to do too many things at once.. :)
It should be the 1800 Grooves/mm, VIS Holographic Grating, 12.5mm x 25mm Stock #43-221

Thanks for pointing that out!! I'll fix that right now..

  Are you sure? yes | no

sammy wrote 06/09/2014 at 20:37 point
the actual photos in the project log really shows your progress. Impressive build!

  Are you sure? yes | no

nmz787 wrote 06/09/2014 at 05:38 point
Have you actually tested the device yet, got spectra and compared them to a reference spectrum (like how Ben Krasnow does in his video on DIY Raman)? The LP filter seems pretty far from the laser line, and I've heard the coherence is hit-or-miss on cheap diode lasers. I'd love to hear your experience! Your bio says you're using a raspiCam, I found the digital noise on my raspiCam to be quite high, so high I've discarded it as a usable imager for science. Did I get a crap camera? It was really bad in low-light for me!

  Are you sure? yes | no

fl@C@ wrote 06/09/2014 at 05:55 point
I've tested the optics and a bit of crude code I wrote.. Yes, there's about a 28nm gap which isn't optimal..but without spending more money that's the best I could do when I purchased them...it also kinda depends on what deals you can find on eBay at the time.. I might end up replacing mine, but for now these should do.. There was actually a pretty in-depth conversation a couple days ago in the bio hackaday did.... http://hackaday.com/2014/06/05/thp-hacker-bio-flc/ Several imaging options, etc. were covered... it might be worth a glance.. :) I'm not convinced I'm still heading in the raspiCam direction, and if I do...it will probably include a peltier cooler...

  Are you sure? yes | no

nmz787 wrote 06/09/2014 at 06:10 point
Reposting this here from my post on your bio page "​The simplest 'spectrophotometer mount' I know of is a concave aberration-corrected flat-field grating. It combines the czerny-turner design's mirrors with the grating, and has some optical engineering done to change the shape so the spectrum is fairly linear on a flat sensor like a CCD or CMOS."

Also, cooling the sensor will only reduce dark noise, not shot noise (including readout noise or other digital/amplifier noise).

  Are you sure? yes | no

fl@C@ wrote 06/09/2014 at 10:25 point
I am currently using a Horiba Aberation Corrected Monochromator Grating Type 532 00 110 ... http://www.horiba.com/index.php?eID=tx_cms_showpic&file=uploads%2Fpics%2F532_00_110.gif&width=800m&height=600m&bodyTag=%3Cbody%20style%3D%22margin%3A0%3B%20background%3A%23fff%3B%22%3E&wrap=%3Ca%20href%3D%22javascript%3Aclose%28%29%3B%22%3E%20%7C%20%3C%2Fa%3E&md5=ce89b0dc511daa962ab5c570388c75d5 I think I got it for around $49 on eBay..and there was more up last time I looked..
There might be better options, but part of the point of this project is to make it as adaptable to what people can find used on eBay so they don't have to spend so much money on new optics..

Here's a grating list that includes mine..
http://www.horiba.com/us/en/scientific/products/diffraction-gratings/for-industrial-applications/aberration-corrected-monochromator-gratings-type-iv/grating-list/

Spectral Range (nm): 190-800
Dispersion (nm/mm): 8.0
Grooves Density (l/mm): 1200.00
Deviation D (deg): 61.60
A: 100.00
B: 94.00
Blank DIm: 32.32
F: 3.00
Blaze: 250.00
Order: 1.00
Reference: 532 00 110

  Are you sure? yes | no

nmz787 wrote 06/09/2014 at 15:29 point
A monochromator grating won't result in a linear spectrum being imaged onto the sensor array, so comparing to a reference spectrum might be made difficult, but hopefully you'll be able to visually make some correlations! Check this app note out:
http://www.gratinglab.com/Information/Technical_Notes/TechNote3.aspx

Also section 6 and 7 here (repost from Richardson Gratings):
http://optics.sgu.ru/~ulianov/Students/Books/Applied_Optics/E.%20Loewen%20Diffraction%20Grating%20Handbook%20(2005).pdf

  Are you sure? yes | no

fl@C@ wrote 06/11/2014 at 15:54 point
There seem to be several examples of how to correct for the non-linear spectrum (mirrors, etc) which shouldn't be a problem.. I'm also investigating linear CCDs for imaging and the possibility of a couple other options that will become more relevant when I am at that stage of development..

I'm curious about your design and why you chose such an expensive grating for an opensource project? Does the propeller chip offer any advantage over the Cortex M3? I found this ( https://www.kickstarter.com/projects/makerhaus/open-spectrometer/?ref=kicktraq ), which seems to be an old kickstarter campaign...have you made significant progress since then, have you imaged any spectra with this device?

  Are you sure? yes | no

nmz787 wrote 06/14/2014 at 10:43 point
I chose the grating because the simplification of the optical system seemed well worth it, it is a grating that is recommended for analytical/Raman use which is one of my intended uses for the device. The Parallax Propeller is an 8-core processor, so it is really good at doing things in parallel while still talking to each other. The instruction set is smaller than a Cortex M3, for that kind of processor I'd recommend starting with an LPC Link V2 which contains a triple-core Cortex M4 and two M0s, for ~$20... with an 80 MSPS ADC on-board too!

  Are you sure? yes | no

Jrsphoto wrote 06/06/2014 at 18:50 point
Great project! Was looking for your email but couldn't find it. I have some links about image stacking in python for the Pi that you might be interested in. It should get you pointed in the right direction. Some of these use this python camera lib:

https://github.com/ashtons/picam

However, would use this one, its much more capable:

https://github.com/waveform80/picamera
Docs are here:
http://picamera.readthedocs.org/en/release-1.4/#

Stacking examples in Python:

http://www.davidhunt.ie/macro-pi-focus-stacking-using-raspberry-pi/
http://stackoverflow.com/questions/9251580/stacking-astronomy-images-with-python
http://onlyjus-photopy.blogspot.com/2012/09/image-stacking.html

Hope it helps,

John, jrsphoto@gmail.com

  Are you sure? yes | no

fl@C@ wrote 06/16/2014 at 07:11 point
Thank you! And thanks a ton for those links! Those will most certainly come in handy!

  Are you sure? yes | no

Mike Szczys wrote 06/05/2014 at 15:58 point
Wow, that last build log is mamoth, nice!

Thanks for entering this in The Hackaday Prize. As you continue to document the project don't forget to take into account the Basic Judging Criteria on this page: http://hackaday.io/prize/details

In general though, fantastic work on sharing all the info. I love it!

  Are you sure? yes | no

fl@C@ wrote 06/05/2014 at 17:32 point
Thanks Mike!! This is a pretty big project, lots of parts! I'm trying to make this as open as I can! All the files are up on gitHub!

I'll be sure to do that... I've been working on some ways to demonstrate the 'connectedness'.. It will be ultimately controlled by a remote interface on a PC, and the data can be transferred to other devices to incorporate in whatever experiments you're running... I had actually planned on developing a protocol so this device can talk to others I've created, allowing them to communicate and make adjustments automatically based on the output from the spectrometer and a couple other devices/variables...

I'm also really working hard to make this as easy to customize, and reproduce as possible.. I want to use the easiest to find/readily available components I can find for the cheapest prices..

Keep an eye out for the youtube video! And thanks to you all at hackaday for the chance to share my work! =)

  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