close-circle
Close
0%
0%

DAV5 V3.01 Raman Spectrometer

The only thing worth doing, is the thing worth doing right!

Similar projects worth following
The DAV5 V3.01 Spectrometer will be the only project build here on Hackaday in its category, with ongoing, full performance and specifications documentation, this project will also be at least 85-90% 3D printed!

This project has 4 major Points:

a. Big & Bulky = "Bad" :(

b. Smaller and more compact = "Good" :)

c. Simple Design with Clear functionality = "Very good" :)

d. Complex and scary = "Very bad!" :(

**This project will also have full professional/analytical and chemical documentation.

***This project is in NO way related to, or in anyway, conceptualized to replicate the 3D Raman-Pi project here at Hackaday.***

UPDATE 8/7/2017 2:15:AM

Cost analysis comparing Raman Spectrometers and Lasers from StellerNet Inc. to the DAV5 V3.01 3D printable Raman Spectrometer:

DAV5 V3.01 Raman Spectrometer uses an Aries 532nm 150mW CW/DPSS Green Laser

Cost - $ 199.99 US

The DAV5 V3.01 3D Printable Raman Spectrometer

DAV5 V3.01 Raman Spectrometer - $ 657.35 US

Here is the 3D view of the turret control interface unit for controlling the stepper motor, which turns the diffraction grating mount inside the spectrometer.

2 new spectral images today using a 0.1 mm acetate (film) slit, I allowed only 2 mm in length, of light to pass through the monochromator.



I cleaned the CCD noise up a bit and readjusted R4 and R7, and it certainly made a big difference, also the significantly narrower slit width makes a difference too.

The values for R4 and R7 are approximate for the breadboard, since the runs are longer than they would be on a PCB, but this gives me a great calibration starting point when the circuit is put together and ready for testing.

As you can see in the above image, the entrance slit is a rig I designed about a year and a half ago.

New CCD Spectrograph Hardware and Software

7/13/2017

This unit captures all of the TCD1304's 3648 pixels using the ADC0820 8-bit half-flash converter. The time to digitize a frame is 32mS. At 115.2kBaud it takes a couple of seconds to download a frame.

Hardware

An ATmega1284 was chosen as the microcontroller. It has 16kB of RAM, which is double the Arduino Mega2560. The sensor is the Toshiba TCD1304AP, a 3648 pixel linear CCD sensor which operates on a single voltage (3.0V to 5.5V). The sensor is driven directly by the microcontroller, and the analog output is buffered by a transistor and an op-amp. The signal is digitized by an AD0820 analog to digital converter.

The ADC0820 has + and - reference inputs, and this design takes advantage of them. A pot is used to set the maximum range of the ADC, and another pot sets the minimum range. In this way you can tune out the unused portion of the range and get all 256 values from the ADC.

The things that set this spectrograph apart from the last one are its ability to read all 3648 pixels from the CCD, and read them faster than the previous version. Because the AD0820 is so fast, I was able to tighten the code up and get all of the pixels read in 32mS. It reads 3694 pixels, but the first 30 and the last 16 are dark reference or dummy pixels and are discarded.

The Mclk signal has increased from 380kHz to 470kHz on this version.

Reference;

http://davidallmon.com/pages/adc0820-spectrograph

The firmware can be downloaded here: Arduino CCD 8 Bit Driver Firmware



Stepper program for the 28YBJ-48 (stepper MTR) and degrees step
/64
Speed is controlled by a delay between each step.
The longer the delay the slower the rotation.
That delay value is obtained by reading and analog-to-digital
cover (A0 in this case/10K trimmer POT) which gives a value from
0 to 1023.

The value is divided by 4 and add 10 for a delay
in milliseconds:delay(analogRead(0)/4 +10)

For faster speeds change 10 to say 2.

This is calculated between every step to vary speed while stepping.

I incorporated unsigned long int Val, in order read a little bit more of the AN/Map
A nice feature of unsigned int's: if a val is unsigned, then val / 4 is optimized by the compiler into a bit shift, much more efficient than the actual division you would get if val was signed.

Highlights of this code:

1) NO debouncing program
2) NO external Stepper lib
3) NO PWM

4) unsigned long int val = (analogRead('...') / 4 + 2); if a val is unsigned, then val / 4 is optimized by the compiler into a bit shift, much more efficient than the actual division you get if val was signed.

5) Push button control incorporates 2 functions per switch;

1: momentary push & release = Start/Stop
2: press & hold = Continuous operation

I have run several tests using my Atmel 1284P Development Board and the data transfer protocol is working perfectly...

Read more »

x-zip-compressed - 3.47 MB - 08/14/2017 at 16:11

download-circle
Download

V301 Turret Grating Motor Controller proto1.zip

Updated gerber files 7/24/2017

x-zip-compressed - 32.08 kB - 07/24/2017 at 15:27

download-circle
Download

Raman project BOM july 17.png

Updated BOM 7/24/2017

Portable Network Graphics (PNG) - 281.52 kB - 07/24/2017 at 15:25

eye
Preview
download-circle
Download

~8 Bit CCD driver circuit REV D2 july16.zip

This is the latest REV D2 UPDATED 07/16/2017 @ 5:40:PM

x-zip-compressed - 50.64 kB - 07/16/2017 at 21:39

download-circle
Download

4 Button Control Panel JULY08.zip

*UPDATED* 7/13/2017 4:43:PM Fixed and updated 4 button control PCB, for the turret control interface assembly all gerber files

x-zip-compressed - 20.03 kB - 07/13/2017 at 20:42

download-circle
Download

View all 17 files

  • 1 × Cuvette Holder W/ Exit slit plate Dimensions; 45 X 45 X 25 mm / 3D-printed by Sculpteo
  • 1 × Round standoff M3 Nylon 13mm
  • 1 × Round standoff M3 Brass 11mm Used for enclosure
  • 1 × Machine screw Pan head phillips M3
  • 1 × Machine screw Pan head phillips M4

View all 14 components

  • Adjustable Mechanical Slit 3D-Printed for Raman Spectrometer

    David H Haffner Sr6 days ago 0 comments

    This was a design I worked on back in December of 2016, I took the inspiration from a ThorLabs design, which gave me the idea to make one using a mechanical micrometer a means to manually adjust the entrance slit in increments of my choosing.

    Namely, in the range of 0.005/mm, it works on FreeCad v0.16 using the animation simulation, but I am still trying to work out some tolerance issues that are plaguing this design, mainly because of the 3d printing material and techniques.

    I'm going to upload the mesh/.stl files anyway in case someone can tweak it and make it better, don't worry there is no license or anything, as all my work here is provided freely, just relying on an honor system of giving credit where credit is due.


    The blue hexagon, are 2 Gillette utility knife razor blades, which I examined the edges with my microscope (100x) and the edges are surprisingly even, with fewer jagged edges than normal blades, so both edges come together with a very tight fit.


    I have the mechanical drawings available if anyone is interested, just let me know and I will email them to you.   

  • *Data Update* 8-Bit CCD Driver Circuit (TCD1304DG)

    David H Haffner Sr08/03/2017 at 19:50 0 comments

    Well I've worked out some noise issues concerning the 8 bit ccd design, I'm glad I got to play around with it on the breadboard before ordering the PCB. I was able to make some needed tweaks in DesignSpark and update the gerber files and now they are getting made @ PCBWay.com :) 

    I am confident in it's performance, even @ 8 bits, I did learn a few things though about working with CCD's, one is, thermal noise, yeah, even with NO power its still there, and on the breadboard it has little room for any air circulation underneath, so I had to compensate for this "dark current" by taking at least 5 dark frames and comparing the frame with the least amount pixel depth and then averaging the other frames together at their higher RMS #'s and subtracting that from the low pixel numbered frame and that gave me a pretty good representation of the most stable dark current values.

    I did the same procedure with the sample frame, I used my Solux 50 Watt Halogen lamp (4700K), which uses a 12vdc regulated power supply @ a distance of 52 cm and a slit width of 0.5 mm and slit length of 16 mm.  The biggest reason for following the same procedure with the sample frames is because of what is called "shot noise," 

    Which is caused by the random arrival of photons.  This is a fundamental trait of light.  Since each photon is an independent event, the arrival of any given photon cannot be precisely predicted; instead the probability of its arrival in a given time period is governed by a Poisson distribution.  With a large enough sample, a graph plotting the arrival of photons will plot the familiar bell curve.

    Shot noise is most apparent when collecting a relatively small number of photons.  It can be reduced by collecting more photons, either with a longer exposure or by combining multiple frames.

    I chose the multiple frames option because I am not capturing any live spectra, as one would if you were imaging a galaxy for example, so I used an integration time of 0.50 ms long enough to get the shot but short enough to not introduce unnecessary noise caused by longer exposure times.

    The first plot we will look at is figure 3, because its the raw spectrum from 260 pixels to about 1200 pixels in length. I processed the CCD data using Spectragryph 1.2.0 designed and written by Dr. Freidrich Menges PhD. and is now certified by the NIST. I already subtracted it from the dark frame and flipped it right side up using this LOG formula in excel; =(10*(-B2))*100. This will convert the Y values to -LOG so the spectrum will revert to a transmission spectrum, because negative numbers do not make sense in this case.


    The next plot figure 2, is the spectrum cutoff at 385 - 800 pixel counts. This was the reason for the 16 mm slit length, the only way to manually control the wavelength range was to simulate an actual spectral image on the CCD substrate without a diffraction grating.

    In figure 2 you also notice, how I calibrated my Solux spectral image to correspond to a master reference spectrum, a Solux spectral plot I downloaded from Solux Technical Data and Graphs


    Here is the spectral resolution data for this spectral plot below


    Keep in mind that, @ 1 and 2 nm it's not the best but we are working from a breadboard after all, with no diffraction grating or optics!

    Finally I put it all together in figure 1, best for last, and introduced a feature in Spectragryph 1.2.0 called "Spectropic view," where I can align the plot to fit a particular wavelength range and image the spectral lines.


    The next steps are clear when the PCB boards come in and then the final phase of testing can begin :)

  • Excel Plots for 8-Bit CCD Driver TCD1304DG Circuit Charts I & II

    David H Haffner Sr07/18/2017 at 12:17 0 comments

    UPDATE

    07/18/2017 11:29:AM

    I wanted to add that, the objective of this post was to demonstrate a very important aspect of the scientific process; The trail of evidence, this is for those nay-sayer's who have questioned my integrity and data, I will always provide all of my processed along with all raw data, in order to provide full disclosure.

    I converted the raw data from the spectral images from the other day using the formula I previously mentioned and wanted to demonstrate how it is utilized in Excel:

    The image below is the same as above, also as of right now there is no way to calibrate the spectrum until everything is put together and tested in the enclosure and the software is updated.

    I didn't realize until I took a closer look that there must have been some light leakage in the monochromator, you'll see it in the image below:

    Now this is the full spectral range from 0 - 1323 pixels, you will notice at the far left of the chart a line shooting straight up the chart, this is the transmission line, which use to be the "absorption" line, by implementing this equation: (10ᶺ(-B2))*100

    We can "flip" the spectral image right side up.

    I am hoping that by presenting these charts and examples that it starts to bring more clarity to the complexity of this particular discipline :)

  • Description of operational aspects of the 3D printable Raman Spectrometer Operational Manual Part I

    David H Haffner Sr07/17/2017 at 17:05 0 comments

    07/17/2017

    Description of operational aspects of the 3D printable Raman Spectrometer

    Operational Manual Part I

    I am including this brief explanation for some of the operational aspects of this project so it's functions and interconnectivity is less ambiguious.

    There are 2 MCU's that control the units overall functions;

    Arduino mega 2560

    This was necessary in order to operate the turret grating mount system, by using 3 holographic diffraction gratings of various line resolutions ranging from 1200 ln's to 2400 ln/mm, a wide range of wavelengths can be achieved on the "fly" so to speak, without having to physically open the unit up and change it, who would ever want to do that?

    The Mega 2560 was chosen because it is a low cost and efficient MCU with sufficient PWM and digital int pins that fit well with the design of this project.

    Second, I could not drive the CCD and MTR control all with the Atmega 1284. (I tried)

    Atmega 1284P

    This was chosen for good reasons, the ATmega1284P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture by executing powerful instructions in a single clock cycle, the ATmega1284P achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.

    The ATmega1284P provides the following features: 128K bytes of In-System Programmable Flash with Read-While-Write capabilities, 4K bytes EEPROM, 16K bytes SRAM, 32 general purpose I/O lines, 32 general purpose working registers, Real Time Counter (RTC), three flexibleTimer/Counters with compare modes and PWM, 2 USARTs, a byte oriented 2-wire Serial Interface, a 8-channel, 10-bit ADC with optional differential input stage with programmable gain, programmable Watchdog Timer with Internal Oscillator, an SPI serial port, IEEE std. 1149.1 compliant JTAG test interface, also used for accessing the On-chip Debug system and programming and six software selectable power saving modes.

    Ok, these are the brains behind the brawn of the system, in the examples below I will illustrate that the LED is not on the PCB, but routed to the front panel PWR indicator LED (yellow,) nor are the pwr plugs required on the PCB's unless you want them there, because there connections are also routed to main power.(UR only saving 0.60 cents per board?) Figure. 1 below

    The 4 Indicator LED's to the left, are routed to the LCD control interface panel (illustrated in figure. 2

    Both MCU's are routed to main PWR (12vdc 1.5A), as seen in figure. 3

    The power supply may look a little odd, (it is a pwr supply from Vonage,) I had an extra one and metered it out and it was exactly 12.13 vdc, pretty darn good, and it has been operating very well for awhile now, so I trust it!

    You would be surprised how many plug-in power supplies you can meter out and 99 percent of them are no where near the voltages they claim to be, (so much for the "UL" ratings...Ha ha)

    Well, this concludes part I of this operation manual, I am at 95 percent project ready test mode, where the rubber really needs to hit the road...its called data!

    The proof will be in the proverbial pudding :)

    Part II of the operations manual will be very in depth, because it deals with the optical aspects of the design, and how there are no work around's with the quality of optical equipment used. All this will be discussed in detail in my next posting :)

  • 3D Printable Raman Spectrometer BOM 07/17/2017 Updated...

    David H Haffner Sr07/17/2017 at 10:27 0 comments

    Here is the currently updated BOM (99%) finished for the Raman spectrometer project, there are 2 MCU's powering the unit;

    • Mega 2560 R3 controls the Triple turret diffraction grating system (stepper MTR control)
    • Atmega 1284P drives the CCD detector
    • LCD front panel interface
    • 4 button sure control

    Highlights:

    • Raman spectrometer for under 1K
    • 65 percent 3D printed (POM or user preference)
    • Field portable
    • 12vdc power supply (1.5A)
    • Turret mount can accommodate 3 holographic diffraction gratings
    • Front panel indicator LED's
    • under panel mount for Mega 2560 R3 MCU

    The PCB's I get are manufactured from PCBway.com, which only cost me 5.00US for 5 boards, downside is...unless U live in China the shipping cost 27.00 :( still not too bad of a deal, the boards I have received so far have been very good and their turn around is pretty fast.

  • *UPDATED* 8 Bit CCD Driver For TCD1304DG PCB Board

    David H Haffner Sr07/16/2017 at 15:01 0 comments

    Well, after careful consideration and inspection of my design I took the advice I was given and re-designed the entire circuit, I had to manually place the components on the board instead of using the auto placement feature in DesignSpark.

    This may have been the problem, it arranges the components in the most optimal way yes, but does not take into account any analog to digital cross talk situations, if it does, I haven't found it, anyway's I finally got it done and did a 3D rendering also, which actually helped a lot in recognizing some further mistakes that I was able to rectify quickly.

    So here it is:

    ( The blue lines represent bottom copper and the red lines are top copper in the image below)

  • It Lives! 8-Bit CCD Driver Circuit TCD1304DG...

    David H Haffner Sr07/13/2017 at 15:44 0 comments

    *UPDATE* 07/15/2017 @ 3:14:PM

    New updated schematic (8-Bit CCD driver circuit)

    It was brought to my attention today that there may be some signaling and grounding problems with this design and PCB, well I cannot see them, please if anyone else can see a problem here as compared to the 4 spectral images I have posted in the last 2 days, let me know.

    It was stated that I should start all over again?

    Early this morning I fitted my entrance slit with a #3 variable adjusting Polarizing filter (30 mm diameter,) which I can turn from 0 deg to 360 deg open or closed depending on how much light I want to enter.

    These two spectral images are the results from those tests this morning:

    I used another CFL lamp with the same rating as the overhead lamp from before, only this one is portable, and as you can see from the data description it is only 8 cm from the slit, but now I can adjust the polarizing lens to let only a certain amount of light through.

    Keep in mind now, that the spectral image is is not bounced off of any diffraction grating, just straight through the monochromator, this is just fine though because the slit is only 2 mm in length and a width of only 0.1mm, so the peaks are sharp and well defined.

    The SNR (signal to noise ratio is well within the expected range I thought it should be in,) I will be making another post soon explaining how the SNR works and how to calculate it, it is crucial, and you need to know it :)

    This spectral image was taken with a factor of 075 deg aperture opening.

    The next spectral image panel has an aperture opening of 025 degrees;

    UPDATE#2 I uploaded the fixed gerber files for PCB manufacturing.

    UPDATE: I almost forgot to tell everyone, the spectral images are inverted but not to worry, this is the formula that will turn it right side up:

    (10ᶺ(-B2))*100

    The "-B2" is just the cell# in the second column in Excel, you would input this in that cell# and copy it down the entire path of data in that column, and it will transform the inversion to Transmission data.

    Well, it..is...ALIVE! I had to de-construct the PCB files, I made a terrible mistake that was costly, so I rebuilt the circuit on my breadboard and she runs beautifully :) I have fixed all the gerber files and will upload the updates. 1st things 1st...here are the first test spectra using a CFL lamp at 7.5ft (228.59cm) overhead room lamp:

    This is the 1st test using an integration time of 0.250 sec

    This is the 2nd test using an integration time of 0.5 sec

    The next set if images are of the circuit build on the protoboard:

    I will be uploading the PCB gerber files which are all updated and fixed up, the board dimensions are: 88.99 X 80.01 mm

    Here is the updated and fixed schematic:

  • 4 Button Stepper Motor Controller PCB Mistakes...

    David H Haffner Sr07/08/2017 at 20:42 0 comments

    Yes I make some boo-boo's on this, but thankfully didn't cost too much...

  • Stepper Motor Controller Using Arduino Mega 2560 Sec III

    David H Haffner Sr07/01/2017 at 12:02 0 comments

    Updated code can be found here: Arduino Playground Sketches/Code snippets

    This is section 3 for the stepper motor controller interface unit, in my previous posts I had discussed and shown the use of a 1 x 4 membrane push button panel, well…at $2.00 it performed poorly so I’m not going to rely on it so I designed my own 4 button keypad on DesignSpark and the schematics are posted here.

    The keypanel is being manufactured as I write this by PCBway.com.

    This is my schematic design of the 4 button control key pad, dimensions: 48 x 36 mm ( 1 7/8″ x 1 7/16″.)

    Above is the PCB lay out.

    Here is the BOM (bill of materials,) which together only costs $3.84 per board to make and it is far more reliable than the membrane keypads.

    This button control keypad coupled with the motor control interface module will provide superiour stepper motor performance and control, even for a low end stepper motor such as the 28YBJ-48.

    This is another example I wanted to share of cost effective measures I have integrated into my overall project designs (most of the time because of budget constraints,) but I have been able to produce many high end parts that would otherwise cost many hundreds of dollars had I bought them outright.

    I also wanted to highlight the processor that is at the heart of all this, the Arduino Mega 2560 R3, I think this device is highly underrated and it’s versatility is really quite amazing! I like it number one, because of its a very low power consumption and extra ports, not the fastest machine around but it doesn’t need to be for the applications that are demanded of it.

    Reliability and performance are far more important to me than speed.

    As you might notice on mine here, I have a small 15 x 15mm aluminum heatsink on the CPU, only because I did notice that it does get a little warm now that I have her doing a lot more than usual, It does reduce overall temp by about minus 12 celsius.

    Lastly, I did want to talk about some of the new features I added to the control program, as you can see on the image above to the right of the AN/Map, I added a “float” so I could read the Ref voltage from the ADC @ the stepper coils that control direction on the stepper motor. The range is from 0 to 5vdc and the readings are in real time, when the buttons are pressed the 4th line shows the button pressed and the 3rd line shows the coils activated.

    As the motor spins in the desired direction the voltage is shown on the AN/Map as the coils are activated. This value is controlled with a 50k trimmer POT at pin# A0, usually a 10k POT is used because of signal loss at the ADC but I have been experimenting for awhile and I am convinced that at 50k there is enough signal and very little loss at the ADC, the benefit of this is more sensitivity and better response time from the button control pad, thus a faster response at the diffraction grating turret.

    Updated code can be found here: Arduino Playground Sketches/Code snippets


  • *Updated Code* For UniPolar Stepper Motor Controller ...

    David H Haffner Sr06/30/2017 at 22:11 0 comments

    I incorporated a couple of code changes to the stepper MTR program, one is, now when a button is pressed U can see the voltage displayed on Ln 1 of the LCD in real time, reading is taken from A0 via the ADC/mapping of the directional coils controlling direction.

    2nd change is, a 50K trimmer POT, yes I experimented enough and I am convinced that this is the right value and setting for the functions that this stepper MTR program needs to perform.

    Here is the code:

    #include <LiquidCrystal_I2C.h>

    #include <Wire.h>

    /* Program 1 REV B

    Updated 6/30/2017 @ 5:30:PM

    Code concept and project design by David H Haffner Sr.

    Stepper program for the 28YBJ-48 (stepper MTR) and ULN2003 driver

    This particular stepper motor is 5.625 degrees per step

    /64

    Speed is controlled by a delay between each step.

    The longer the delay the slower the rotation.

    That delay value is obtained by reading and analog-to-digital

    cover (A0 in this case/50K trimmer POT) which gives a value from 0 to 1023.

    The value is divided by 4 and add 10 for a delay

    in milliseconds:delay(analogRead(0)/4 +10)

    For faster speeds change 10 to say 2.

    This is calculated between every step to vary speed while stepping.

    I incorporated unsigned long int Val, in order read a little bit more of the AN/Map

    A nice feature of unsigned ints: if a val is unsigned, then val / 4 is optimized by

    the compiler into a bit shift, much more efficient than the actual division you would

    get if val was signed.

    Further incorporated a pin array;//read the pushbutton value into a variable

    int sensorVal[] = { digitalRead [2][3] };//SW1 pin2 & SW2 pin3

    This will illuminat LED's #10(W) and LED #12(bl) to indicate that the switches

    on HIGH. These values are then displayed on the LCD menu on line 3 as a monitor

    of the switches values.

    // set the LCD address to 0x27 or 0x3F for a 20 chars 4 line display

    // Set the pins on the I2C chip used for LCD connections:

    // addr, en,rw,rs,d4,d5,d6,d7,bl,blpol

    The commands below will be compiled into machine code and uploaded

    to the microcontroller.

    This is in the public domain.

    Compiled size 6646 bytes.

    */

    const int yellow = 7; // M1

    const int orange = 5; // M2

    const int brown = 6; // M3

    const int blue = 4; // M4

    const int CW = 2; //Sw1 in schematic

    const int CCW = 3; //Sw2 in schematic

    unsigned long int val = (analogRead(A0) / 4 + 10);

    unsigned long int val1 = (analogRead('...') * 4 + 2);// scale it to use it with the MTR (value between 0 and 175)

    LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

    void setup() {

    // initialize digital pin LED_BUILTIN (13) as an output.

    pinMode(LED_BUILTIN, OUTPUT);//Modified "blink" sequence (2)millisec in-step/W/MTR sequence

    pinMode(10, OUTPUT);// this is the LED pin for sensor val prgm

    pinMode(12, OUTPUT);// this is for LED pin 12 sensor Val prgm

    digitalWrite(CW, 1); // pull up on

    digitalWrite(CCW, 1); // pull up on

    pinMode(blue, OUTPUT);

    pinMode(brown, OUTPUT);

    pinMode(orange, OUTPUT);

    pinMode(yellow, OUTPUT);

    // all coils off

    digitalWrite(blue, 0);

    digitalWrite(brown, 0);

    digitalWrite(orange, 0);

    digitalWrite(yellow, 0);

    lcd.begin(20, 4); // initialize the lcd for 20 chars 4 lines, turn on backlight

    // ------- Quick 3 blinks of backlight -------------

    for (int i = 0; i < 3; i++)

    {

    lcd.backlight();

    delay(250);

    lcd.noBacklight();

    delay(250);

    }

    lcd.backlight(); // finish with backlight on

    // set up the LCD's number of columns and rows:

    lcd.begin(20, 4);

    // Print a message to the LCD.

    lcd.print("AN/MAP:");

    lcd.setCursor(16, 0);

    lcd.print("0-5V");

    lcd.setCursor(0, 1);

    lcd.print("Direction:");//CCW or CC

    lcd.setCursor(0, 3);

    lcd.print("SwitchState:");//4th line for version display

    lcd.setCursor(0, 2);

    lcd.print("DIV:");

    Serial.begin(115200);

    }

    void loop() {

    // read the input on :

    for (int i = 0; i < 6; i++) {

    val1 = analogRead(i);

    delay(10);

    // Convert the analog reading (which goes from 0 - 1023) to voltage range (0 - 5V);

    ...

    Read more »

View all 111 project logs

  • 1
    Step 1

    These are the build instructions for my LS-532 CB/fiber optic laser collimation tube;

    New Holographic diffraction grating holder assembly.W/drawings:

    The newly re-designed parts came in so I began to prep them and wanted to include them here under build instructions;

    These are the first preliminary drawings and CAD blueprints depicting several aspects in the assembly design and by no means is this the final assembly steps;

  • 2
    Step 2

  • 3
    Step 3

    10X Lens Holder Base assembly and holder design W/ slide rail feature:

View all 13 instructions

Enjoy this project?

Share

Discussions

Fredgbh wrote 07/15/2017 at 08:14 point

Please don't send the uC board for fabrication, it needs some work, some aspects are sub-optimal (that's code for something impolite).

I think you need to start again:

Place your analog section all together, away from the digital bit. Short traces, consider crosstalk, and having a separate analog Gand

Think of the xtal as analog as well, short traces, away from signals of all species.

Do the placement, then route the power, separate filter for analog power

Only then do the signals, if the power and clock aren't right the rest will be a belt made of watches.

Apologies for the slight snark, you are clearly intelligent and have got off your a$$ and done Something, kudos!

I would like to help avoid the frustration when signal integrity doesn't happen

  Are you sure? yes | no

David H Haffner Sr wrote 07/15/2017 at 12:52 point

Hell Fredgbh, no offence taken...yet, which circuit are U talking about? The 16 bit of 8 bit? You have to let me know so I am clear what we are talking about first, Thanks :)

  Are you sure? yes | no

Fredgbh wrote 07/15/2017 at 17:05 point

Schematic says 8 bit.

I have no sense of what analog performance you need to reach and can't correlate the quality of your layout with the likely performance.  What I can see is that aspects of the layout are sub-optimal. First the schematic errors:

- Both sides of C2 are connected together to GND - easy to see on the layout, not so easy on the schematic

- Common point of C4 and C5 needs connecting to GND

- C3 is connected backwards, the schematic symbol is pretty unclear but again obvious in the layout with the + terminal connected to GND

- LM324 unused amplifier inputs left floating

- Not an error but the CCD datasheet appears to suggest connecting the NC pins to GND - always good practise not to have floating bits of metal


Now the layout - if it works well enough for your application then no problem but there's room to improve it.

Placement:
- Minimise the length of the high impedance analog traces, get the components connected to the analog inputs of the LM324 near to the chip. Currently these sensitive nodes are dragged across the board under the uC
- Place components to minimise net lengths, eg D1 near the power input, anything else relatd to the regulator near to it.
- I'd recommend using 0.05" for GND and Power grid, its not just GND that needs a low impedance trace
- Separate analog gnd and power connected together at one point so that digital currents don't flow in the analog GND

Cosmetic - none of these will stop anything working - feel free to ignore
- The schematic isn't just a means to an end, its the documentation for the circuit, current one is hard to read even with so few components - review some others, perhaps more complex ones to get an idea.  This won't stop it working but makes it harder to debug.
- There are refdes in all four orientations - harder to read
- 45 degree trace angles are not necessary but give a more pleasing and compact result

  Are you sure? yes | no

Muriel Green wrote 07/04/2017 at 21:12 point

Reading the news today and they mentioned raman spectroscopy! http://www.bbc.com/news/science-environment-40494248

  Are you sure? yes | no

David H Haffner Sr wrote 07/05/2017 at 07:11 point

What a fascinating article Muriel, thank you :)

  Are you sure? yes | no

David H Haffner Sr wrote 03/09/2017 at 12:26 point

@fl@C@ , I did not mean to offend your project, my thoughts about your methodology are just my opinion, not a rant about my superior intellect. You made a few bold claims about your devices capabilities and did not provide enough documentation to support them, that's all I was getting at. 

In the scientific spectrum, there is always a clear trail of evidence that others should be able to follow in order to verify claims made, and to all experiments. 

Your project is quite extraordinary,

no doubt, but there are several flaws in some of the capabilites that you claim that it can do. As far as utilizing some of your design concepts, very few, the 3D prints are my own design, the Czerny-Turner configuration is just good science, the CCD detector and MCU, are NOT your design, so get over that. 

The .src code I am using is not yours either. When I talk about "full" documentation, that's exactly what I mean, not only the mechanical side of things, but the chemistry and spectroscopy side of things also...The process, that's what is important. Yes, the long boring techy stuff, the stuff like, what standard did you use to calibrate and verify your spectrometer? Did you use holmium Oxide?

Because when all is said and done, that is what I'll be using (and I'm going to have to make the $$ sacrifice of about $450.00US,) to verify that my spectrometer is on point and ready to go. I'm not recommending that anyone else has to do this, I'm doing it because I want this project to reflect my commitment to excellence.

Let me explain once more this projects details:

The DAV5 V3 Spectrometer will be the only project build here on Hackaday in its category, with ongoing, full performance and specifications documentation, this project will also be at least 95% 3D printed! The main goal for this project has 4 points: 

1) To build a rugged and reliable low cost spectrometer with 3D printable parts. 

2) A spectrometer capable of producing consistent and professional quality results in the field, home or Lab 

3) A device with upgradeable capabilities 

4) Every part of this project will have it's .STL file (for 3D-printing,) available for download. 

**This project will also have full professional/analytical and chemical documentation.

**Also as an aside, I have owned my Aries 532nm Green laser (150mW) for over 4 years,) so I did not rip that idea off either.

  Are you sure? yes | no

Loki wrote 03/03/2017 at 12:07 point

Especially with many cell phone cameras enabling access to RAW format images from their cameras (iPhone 6 and newer, many androids), is there any reason not to skip the CMOS all together, and use a cellphone camera; and also use it for the image processing?  Essentially, just have the light source, slit, diffraction, and raman filter in this device, and design it to mate to a cell phone camera?  That would give 8MP+ of resolution.

  Are you sure? yes | no

David H Haffner Sr wrote 03/03/2017 at 12:23 point

Well Loki, the problem with that idea is, cmos has a spectral limit of 1100nm, (metal oxide,) Raman spectroscopy requires a set up like the Czerny-Turner configuration. Also you need a stable laser source coupled with an appropriate bandpass filter.  

  Are you sure? yes | no

Loki wrote 03/03/2017 at 12:54 point

I think that's what I just said.  When I said "device", I meant external device: all the parts of this project (or the Montoya one), except for the CMOS camera and image pipeline.

  Are you sure? yes | no

David H Haffner Sr wrote 03/03/2017 at 13:01 point

"and design it to mate to a cell phone camera?  That would give 8MP+ of resolution."
you stated the above though, and that's what I was going by, if I misunderstood sorry.

  Are you sure? yes | no

Loki wrote 03/03/2017 at 13:07 point

No, that is correct.  Instead of using an older DSLR such as is used in the Montoya design, use a modern cell camera.

Could you explain more about why the CMOS spectral limit is a problem?  perhaps that's what I don't understand, in light of a CMOS sensor being successfully used in the Montoya design.

  Are you sure? yes | no

David H Haffner Sr wrote 03/03/2017 at 14:18 point

It all comes down to photons interacting with silicon. cmos if you are not familar, are 1000's of microscopic photo diodes, photons with an energy above 1.1eV will not necessarily interact with silicon. Their probability interaction depends on how much higher than the 1.1eV band gap the energy of the photon is, this defines an absorption coefficient  [cm-1] depending on the wavelength and the type of material.

This absorption coefficient defines which percentage of the photons entering a one centimeter material will be absorbed. 

To make it even simpler, silicon as a material substance, will only by its own nature, absorb so many photons no matter what, and it just so happens that the limit is approximately 1125nm.

So, as long as you are willing to stay around the 400 - 700nm range in the spectrum you'll be fine...see my point?





  Are you sure? yes | no

Loki wrote 03/03/2017 at 14:32 point

If we're going for stokes raman:

"Raman signals excited by a 532nm laser are distributed in the visible range, where the response is best for most silicon-based CCD chips. Meanwhile, Raman signals from 785nm systems fall within the NIR range (750-1050nm), where the response is still relatively good. For 1064nm, however, typically there is no response from the CCD above 1100nm" (http://bwtek.com/wp-content/uploads/2015/07/raman-laser-selection-application-note.pdf).

As long as we use a 532nm laser, the resulting stokes radiation we need to detect stays in the visible range - which would seem to allow for the use of a CMOS camera.  Also, to get around issues with low signal intensity, why are people sticking with 150mw range lasers, when so much higher power lasers are available for approximately the same cost?

  Are you sure? yes | no

David H Haffner Sr wrote 03/03/2017 at 15:07 point

Yes, you are correct about that, as I stated; as long as you stay within the boundaries of 400-700nm, a 532nm CW laser at at least 150mW will work. The reason I changed up my design scheme was that at 532nm for that particular set up would not have been very effective for analytical Raman spectral work of liquid mediums.

This type of Raman spectroscopy works best at the reflectance level, and I just didn't want to drastically re-design the whole system to accommodate it. Too many more parts and 3D printed parts, more headaches :( 

Ok, typical 785nm Raman spectroscopy is just NOT feasible for a cmos camera, after 700nm the spectrum gets very "scraggly," unpredictable and very unusable. http://www.aphesa.com/documents.php?class=wp - click on the pdf file that says; "Spectral Response of Silicon Sensors"

  Are you sure? yes | no

finstp wrote 02/28/2017 at 21:57 point

There is a very simple design for a home-made 3D printed Raman spectrometer in the literature, complete with very nice example spectra.

See 'A Homemade Cost Effective Raman Spectrometer with High Performance' by EH Montoya, A Arbildo and OR Baltuano published in Journal of Laboratory Chemical Education 3(4) p 67-75, (2015) doi:10.5923/j.lce.20150304.02. This could easily be coupled with the Spekwin32 software (see here on Hackaday), which can extract a linescan spectrum from the digital camera image and you have all the benefits of professional software too!

  Are you sure? yes | no

Michael Stone wrote 01/18/2017 at 01:32 point

This is actually really really awesome. Battelle is a defense contractor here in the states, they sell a biohazard detector that is pretty large for a lot of money, this thing can be made for a fraction of that cost and easily applied to do biohazard detection. Great work!

  Are you sure? yes | no

David Challener wrote 01/13/2017 at 19:19 point

I have been looking at Raman designs, and they all seem to have beam splitters in them. but I don't see one in your design. I have never been really sure why there was a beam splitter in the first place, so perhaps it isn't needed, but I don't understand why anyone would reduce the amplitude of the reflected light by a factor of 2 if it were not needed.  Additionally, Is more lines better or worse? (I can get a good 2500 lines per mm for $26).

  Are you sure? yes | no

David H Haffner Sr wrote 01/13/2017 at 19:56 point

Hey David, first, the more lines per mm the higher the spectral resolution, but will "reduce" your wavelength range, so when choosing a higher order grating you have to make sure you know what wavelength your working in.

1200 lines is perfect when using Holographic gratings or high quality ruled blaze angled gratings, the DVD piece is fine at 1540 lines, mostly because some of those lines are not placed so perfect during manufacturing, but there are enough good lines that are parallel where the diffractive properties are just fine, (hence the Schott glass color filter.)

Second, beam splitters, especially the cube type, are used to separate wavelength and power distribution of the laser's collimated light, in the case of Raman spectroscopy, it is used because in most set ups, there is an adjustable diffraction grating that can be rotated to select a particular wavelength. 

I don't have to use it, although it certainly would improve the overall sensitivity of my system but then it will start to become very complex and costly and since I am only concerned with the region between 500-4000 cm -1 (546.5 - 675.6nm,) I am confident all will be well. 

I know it may seem a bit strange why you would want to attenuate the incoming light beam, but depending on the application, you may want to only have 45% transmission 55% reflectance or aligned for maximum p-polarized transmission (99% reflected - 1% transmitted.) 



  Are you sure? yes | no

David H Haffner Sr wrote 01/13/2017 at 20:05 point

Also I wanted to add a quick note, mine has a secret weapon; 532nm, 12.5mm Diameter, Raman Edge Filter. http://www.edmundoptics.com/optics/optical-filters/longpass-edge-filters/raman-longpass-edge-filters/86225/

  Are you sure? yes | no

Ryan White wrote 01/23/2017 at 11:07 point

There ya go, that's what's up, but you've gotta hold your laser on that wavelength, and your laser needs to be single mode, what's your source?

  Are you sure? yes | no

David H Haffner Sr wrote 01/13/2017 at 08:38 point

Hey Ted, for an application such as this one, I would use a UV Reflective Holographic Grating, 1200/mm. Cost is around $131.00US, depending on the source and quality.

Also I wanted to add that, Holographic gratings have a low occurrence of periodic errors, which results in limited ghosting, unlike ruled gratings. The low stray light of these gratings makes them ideal for applications where the signal-to-noise ratio is critical, such as Raman Spectroscopy.

I am hoping that the Schott glass color filter placement with the diffraction grading placed before the spectral image strikes the detector, will eliminate the stray light and most ghosting effects, if not, I will be forced to adapt and use the holographic grading, which will cause a slight re-design and significant up-cost.

  Are you sure? yes | no

David Challener wrote 01/12/2017 at 22:56 point

So next question - why are you using a DVD for your diffraction grating?  I see them used in very low cost spectrometers, but they clearly aren't quite parallel lines.  Does this matter?

  Are you sure? yes | no

David H Haffner Sr wrote 01/12/2017 at 23:53 point

Hey David, good question, I'm using the 4.7G DVD piece with 1540 lines per mm. Spectral resolution is more important than how straight the lines may be on the diffraction grating, I've been researching this aspect for over a year now and I know that it does work, you just have to be willing to be patient and rotate the grating carefully until the spectral lines are straight.

I explained how to do this in a previous log and in some research notes on Public Lab. That is also why I cut the piece 18 x 18mm square and placed each corner on the flat top end of the Schott glass filter locking sleeve, so it can be rotated as you are watching the spectral lines in live capture mode on screen. 

I use a 2300K 13W CFL (compact fluorescent light) to calibrate the diffraction grating piece because of the mercury lines.

I hope this explanation helped!



  Are you sure? yes | no

David Challener wrote 01/11/2017 at 17:14 point

I am interested in building one of these.   Is it ready to go?

  Are you sure? yes | no

David H Haffner Sr wrote 01/11/2017 at 17:29 point

Hey David, everything is ready except the Raman longpass edge filter, I will not be able to purchase it until sometime next month, I included it on the bill of materials because it certainly needs to be there.

The rest of the device is performing beautiful in the UV/VIS range-300-800nm. It will do absorption/fluorescence and UV as it stands at this moment.

  Are you sure? yes | no

PointyOintment wrote 01/10/2017 at 09:22 point

> The DAV5 V3 Spectrometer will be the only project build here on Hackaday in its category

Even if the category is as narrow as "open-source 3D-printed Raman spectrometers", there's already another project in it: #ramanPi - Raman Spectrometer

  Are you sure? yes | no

David H Haffner Sr wrote 01/10/2017 at 11:38 point

Hey pointyointment, yes that is true, but the Ramanpi project's main documentation is mainly centered around the 3D printing of their design and on their concept of home automation. Proving their concept is very questionable for such bold claims.

They do not have sufficient scientific documentation validating the Raman aspects of their device. The process for doing so is very meticulous and precise and must be done with caution, scientific claims must be able to stand up to intense scientific scrutiny by your peer community and not be prefaced by popularity.

My project has intentional and methodical steps and protocols in order for clear validation, when I am ready to capture Raman signals that will be a whole separate set of steps and protocols.

Also, my project includes cost analysis for full transparency, in order to keep the projects main goal under $700.00US. The average cost even for a 3D printed version of high sensitivity and precision can cost upwards of $2500.00 to 3000.00US Total.

  Are you sure? yes | no

Ted Yapo wrote 01/13/2017 at 00:35 point

Do you know approximately how much cost it would add to the BOM to use a commercial replica grating instead?

  Are you sure? yes | no

fl@C@ wrote 03/09/2017 at 11:00 point

I would have hoped that you would have contributed to, instead of insulting a project that clearly inspired not only the name of this project, but the design as well..  Although, after reading your replies to most of the comments here.....It doesn't sound likely that your input would be very useful when taken as a member of a group, rather than you taking credit and imposing your superior knowledge on everyone.  If your understanding of ramanPi is limited to the thought that it is centered around home automation, maybe you should review the documentation again.  It's quite interesting that you seem to have chosen many of the same components, for such a questionable concept... 

  Are you sure? yes | no

Jarral Ryter wrote 01/05/2017 at 21:28 point

yes raman has some sort of light scattering by shining laser onto the sample.... maybe you made a fluorescence spectrometer. Which is still cool.

  Are you sure? yes | no

David H Haffner Sr wrote 11/24/2016 at 14:47 point

Hey Ryan, that's a good question, and I'm glad you asked it. Most Raman spectrometers are usually quite large and have very complicated optical designs, but the basic operating principle is still the same, resolving power of the optical mirrors and lines per mm on the diffraction grating.

A raman spectrometer can be composed of either a CCD or a CMOS detector, I have worked for a year researching the cmos type, and that is why I am using it, (cmos,) I am experimenting with the use of only one mirror, the square silver coated focusing one. The optical resolution of the spectrometer is determined by the input slit size and the optics inside the spectrometer. The best possible resolution that can be obtained is the diffraction limit, which is the resolution obtained with an infinitely small input slit. The diffraction limit is related to the size of the beam width inside the spectrometer.

The wider the beam, the more grating lines the beam illuminates and, therefore, the better the resolution. This is also referred to as the resolving power of the grating.

I will be posting a more detailed explanation of the theory and concept of my design, and the mathematics to back it up, plus I have research to back up this design also. So Raman merely means the resolving power of the spectrometer to clearly define the spectral lines with precise definition for accurate molecular finger printing.

  Are you sure? yes | no

Ryan White wrote 01/23/2017 at 11:03 point

OK, but, Raman spectrometers use high intensity laser sources and look for the signature in the Raman shift of the scattered light, right? So basically you're looking for very weak signals very close to, but not at, the wavelength of the light source. 

Raman spectrometers use laser sources of very high spectral purity (i.e. narrow spectral line width, low phase noise, whatever you want to call it) and very narrow band filters, and as far as I understand it both are tunable, you don't seem to have either. "modern instrumentation almost universally employs notch or edge filters for laser rejection and spectrographs either axial transmissive (AT), Czerny–Turner (CT) monochromator, or FT (Fourier transform spectroscopy based), and CCD detectors." - https://en.wikipedia.org/wiki/Raman_spectroscopy

This, as far as I can tell, is not a Raman spectrometer.

  Are you sure? yes | no

Ryan White wrote 01/23/2017 at 11:05 point

I've just seen your more recent comments, I'd love to see this working and I'd love to see how you're controlling the wavelength of the laser source. 

  Are you sure? yes | no

David H Haffner Sr wrote 01/23/2017 at 11:43 point

Ok Ryan, my laser is a CW (continuous wave,) 150mW DPSS, I have posted the specifications for it here many times, I have a 532nm CWL, 10nm FWHM, 25mm bandpass filter employed in my fiber optic laser collimation tube assembly, I have already stated in previous postings that I am waiting on my 532nm, 12.5mm Diameter, Raman Edge Filter, it costs $450.00US, I am not made of $$.

I never stated it was a Raman spectrometer YET, it will be by the time I am finished, I strive for perfection, not speed or popularity. I do NOT need a CCD to detect Raman signals.

Finally, I am not going to explain myself over and over again, when I have been quite clear in my research and documentation, not only about Raman spectroscopy, but spectroscopy and chemistry itself. Read my work.

 

  

  Are you sure? yes | no

Ryan White wrote 01/23/2017 at 11:48 point

Good luck with it! I'm watching with interest because I know how hard this stuff is, not because I think you won't do it. The internet is bad at capturing my tone, and (as I'm sure you know) there's been a lot of bullshit merchantry around handheld raman spectrometers for all kinds of applications, hence my skepticism. 

  Are you sure? yes | no

Ryan White wrote 01/23/2017 at 11:52 point

Nice write-ups as well, looking forward to seeing the results (and building one!) 

  Are you sure? yes | no

Ryan White wrote 11/24/2016 at 13:37 point

How is this Raman? 

  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