Close

Does this project spark your interest?

Become a member to follow this project and don't miss any updates

ramanPi - Raman Spectrometer

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

40 157 123
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 05/30/2014 and last updated 3 days ago.

Description
An open source 3D Printable Raman Spectrometer that uses a raspberryPi, a couple of arduino compatible ARM boards, a really bright laser and some parts you can grab from eBay, adafruit, sparkFun, Mouser, or wherever...!

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!
Details

ramanPi - the DIY 3D Printable

RaspberryPi Raman Spectrometer

I changed the name from DIY 3D Printable RaspberryPi Raman Spectrometer..!  I never really like the length of the previous name..  Probably not great to do it mid-stream, but better late than never.. :)

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

ST Micro gave me a shoutout on their Facebook page!

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

WHAT IT DOES:

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

There have even been examples of how you can distinguish different brands of tasty beverages using a Raman Spectrometer! You can do the same thing for other samples, like gasoline, your blood, tears, or even your cat's hair...pretty much anything..

WHO SHOULD BE INTERESTED:

You!  Or anyone who is interested enough in hacking and/or science to be on hackaday!  Every home lab, school science dept. and hackerspace should have one...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 my food?  What happens to this material when I do this?  Do a before and after analysis and find the raman shift!  Anyone who is interested in making what they do better.. Of course it takes some knowledge to use, but isn't that the whole spirit of hacking?

HOW IT WORKS:

Raman Scattering

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 goes back 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. Then 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!

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

THE PROCESS:

Process Overview

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.. 

THE OPTICS:

Optics Overview

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 remaining light is collimated by the Bi-Convex Collimating Lens to the Vertical Aperture (slit).

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

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

12. 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).

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

14. 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.

I have decided to go with the Crossed Czerny-Turner Configuration for the spectrometer portion.. It seems to be the best fit so far..

Crossed Czerny-Turner

OPEN SOURCE:         aka THE SOFTWARE

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 controlBoardinterfaceBoard and the imagingBoard can be found either on the gitHub repo or directly at the mBed.org site... 

controlBoardhttp://mbed.org/users/flatcat/code/ramanSpectrometer_controlBoard/

interfaceBoardhttp://mbed.org/users/flatcat/code/ramanSpectrometer_interfaceBoard/

imagingBoardhttp://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 HARDWARE:

Hardware Overview

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:

controlBoard

Schematic for controlBoard can be found here.

  • Power Relay for Laser
  • TTL Control for Laser
  • Monitor Temperature for Laser using DS18B20 sensor
  • 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

powerControlBoard:

powerControlBoard

  • Accepts power from main power supply and distributed it to other boards
  • Contains the L298 HBridge for the imaging and cuvette peltiers

interfaceBoard:

  • 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..

imagingBoard:

  • Controls Toshiba TCD1304DG Linear CCD
  • Monitors UV index with a SI1145 UV Index Sensor 
  • *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

Please read more......the description for the process has been updated!

Read more »

Components

See all components

Project logs
  • How to build a spectrometer

    5 days ago • 5 comments

    Ok.. It's been a lot of tweaking, and refining...  A lot of going over the design, fixing issues and overcoming problems..  But I have reached a pretty good point with the spectrometer design..  I managed to design this part of the system so it can be used completely independently from the rest of the raman setup..  You can print this portion, install the optics, setup the fairly simple electronics, configure the software, make some minor adjustments to the optics so they're properly aligned, hook it up to a PC (or the ramanPi) and get some work done!

    This spectrometer should be about on par with what you'd get from an ocean optics commercial product... Well, at least as good as one could expect to get..  I might experiment a bit with better options than razor blades for the entrance slit..  But really, the diffraction grating is pretty much on par, the CCD is the same model... we should be getting some great results... I need to calibrate mine with a known light source... I have a neon ampoule, and a mercury vapor lamp...I'll be trying those out pretty soon..  In the mean time, I did a quick sample with a 532nm laser....  Here's the result from that...

    I'd call that pretty clean considering it is my first try... and it's a cheap eBay handheld laser pointer... Unfortunately, we can't use that to calibrate the spectrometer... 

    I wanted to make this post a sort of how to for assembling the spectrometer... as much as I can anyway...  So, here's a quick guide...!

    We start by loading up the files to print the plastic parts...

    Set up the printer and start printing.... Wait a good 12-18 hours....

    Keep an eye on it every once in a while...

    And then you have the makings of quite a few lost weekends to come.. 

    Once you've removed it from the printer... There's going to be a little cleanup required...  All the supports, and rough edges, screwholes and everything need to be free of debris, etc..

    Once you get that all cleaned up.. Your spectrometer parts should look something like this...

    Gather your other parts... The access port cover, the necessary screws, the diffraction grating..the collimating mirror, the focusing mirror...the mounts for the optics...your imaging board and the CCD board...

    Here are the parts I designed this version of the spectrometer to use..and is what I am using in mine..

    The diffraction grating...    Stock No. #43-216

    • Edmund Optics 1200 Grooves/mm, 25mm Square, VIS Holographic Grating ......   $135.00

    The collimating mirror....    Stock No. #46-239

    • Edmund Optics 20mm Dia x 80mm Focal Length, Spherical Mirror   .......................   $37.50

    The focusing mirror...        Stock No. #43-471

    • Edmund Optics 50mm Dia. x 100mm FL Protected Aluminum, Concave Mirror  ...   $42.50

    I'll post the specifics on mounting the optics in their mounts soon, but for the moment, lets assume they're already mounted..

    Go ahead an place the focusing mirror assembly in place and screw in the adjusting screws...

    And always... make sure you're wearing proper gloves, and not to touch the surface of the optics!!!

    Now, let's go ahead and place the collimating mirror assembly into place and screw it in...

    Again, make sure to be very careful not to touch the surface!

    Once that's in place, go ahead and place the diffraction grating assembly in...

    BE EXTRA SUPER VERY MAJORLY CRAZY ULTRA CAREFUL NOT TO TOUCH THE DIFFRACTION GRATING SURFACE!!!!!!!!!!!!!!!  ANY CONTACT WILL RUIN IT... Just look at mine... :(  It fell on it's face on a very clean surface and is going to have to be replaced...

    Here is what you should have at this point... A very nice start!  

    At this point, your optics are probably going to be way out of alignment.. We'll have to make sure they're all snug and aligned before we can use this thing for anything...

    But we'll cover alignment in another project log as well... For now, let's follow...

    Read more »

  • Even more spectrometer!

    7 days ago • 0 comments

    I'm sure people are tired of seeing the spectrometer... I know I'm just about there...  But, progress is progress...and this is a pretty important part...and it's pretty complex.....  So.... Check this out...

    The next to final version... (This one doesn't have the baffles inside, but has everything else)  Notice the access port cover... Ooo0oo0h..

    Here's a slightly closer shot of the cover in place...

    And the whole thing on end...with no CCD mounted...

    And here we see it cracked open with the optics in place and working... No baffles here yet..that's in the next print...(probably starting the print tomorrow)..

    A nice overview..  

    Another angle...  My optics are a little dusty... =/

    A little closer shot... and you can see my poor diffraction grating got a little scratched... I'll probably be replacing that when I finish this thing up..and it'll probably be the last thing I put in there before closing it up.

    Here you can see the mount for the collimating mirror, which has three adjustment points..allowing you to pinpoint the light on the diffraction grating...this setup proved to work VERY well... Dusty mirror =(

    Here's my sad diffraction grating in it's rotating mount...which might end up with a small stepper motor in the final version...  But this works very well..

    And here we have the focusing mirror mounted in it's nice little adjustable bracket too... The adjustment screws work great...

    A nice little overview...

    Got to love that color.....

    A nice angle showing the collimating mirror, detector array and the diffraction grating... Take note of what this looks like...after a couple days, this will look much different with the light baffles in place....

    One last internal shot...  I am very happy with how this is coming out...

    And an external shot with the led flashlight in place.. :)

    Here's a couple renderings of what it'll look like with the light baffles in place!!

    The other side...

    As always.... I'm happy to hear what you think!!

  • ramanPi - Now with more spectrometer!

    9 days ago • 2 comments

    After a good cleaning, and re-calibration of the printer...and about 16 hours of printing... I have success.. Here is the spectrometer top and bottom!

    With the entrance slit facing us...

    Top on the left and bottom on the right... 

    I'm very happy with the way this came out... Now it's time to put the whole thing together!!!

    I'll post some in progress shots of assembling it, with the optics, etc...    soon!  I didn't include the light baffles, etc... because I want to work out the best configuration...  This is still a rough version, albeit much nicer than the last...but the screwholes need to be widened up a bit too...mostly for the four mount points and the collimating mirror mount..  Updates soon to follow!

View all 51 project logs

Build instructions
  • 1

    Preliminary instructions are as follows:

    Acquire the hardware listed in the parts list.

  • 2

    Print the 3D Printable parts.

  • 3

    Either etch, buy, or have made the PCBs you choose to go with.

See all instructions

Discussions

Matouš wrote 12 days ago null 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 12 days ago null 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 12 days ago null 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 12 days ago null 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 12 days ago null 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 11 days ago null 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 11 days ago null 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 11 days ago null 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 11 days ago null 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 11 days ago null point

sent you an email with the updated schematic to make sure noone else gets confused

Are you sure? [yes] / [no]

fl@C@ wrote 11 days ago null 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 11 days ago null 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 wrote a month ago 1 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 a month ago null 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 a month ago null 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 a month ago null 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 a month ago null 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 a month ago null 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 a month ago null 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 2 months ago null 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 2 months ago null 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 3 months ago null 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 3 months ago null 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]

Marvin wrote 3 months ago null 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 3 months ago null 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 3 months ago 1 point

the actual photos in the project log really shows your progress. Impressive build!

Are you sure? [yes] / [no]

nmz787 wrote 3 months ago null 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 3 months ago null 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 3 months ago null 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 3 months ago null 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 3 months ago -1 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 3 months ago null 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 3 months ago null 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 3 months ago 1 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 3 months ago null 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 3 months ago 1 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 3 months ago null 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]

jaromir.sukuba wrote 4 months ago 1 point

Nice project.
I really appreciate finding and using relatively cheap and available components from ebay.

Are you sure? [yes] / [no]

fl@C@ wrote 4 months ago null point

I totally agree.. the savings can be amazing...if you can deal with the wait times.. ;)

Are you sure? [yes] / [no]

fl@C@ wrote 4 months ago null point

I'm working as fast as I can to get all the information up here as soon as possible!!

Are you sure? [yes] / [no]