Close
0%
0%

JASPER: VIS-NIR SPECTROMETER

Grating-based VIS-NIR Spectrometer: Customizable for spectral range, resolution, SNR, and detector options aided by a software design tool

Similar projects worth following
In the realm of spectrometers, grating-based designs stand out for their unparalleled popularity and straightforward functionality. Enter the configurable grating VIS-NIR spectrometer—your ultimate companion in spectral analysis. With its innovative design tool, you can easily customize and adapt the spectrometer to meet your specific analytical needs, including spectral range, resolution, SNR, and multiple detector options.

With the limited options of line array CCD/CMOS detectors available today and the design complexity related to grating orders, arriving at the most optimal design is crucial. Addressing the third overtone, a spectrometer with an elaborate spectral range often proves unnecessary. Often, a spectrometer tailored to a specific spectral range and optimal SNR is the best fit for detecting specific analytes.

Introducing JASPER - Just Another Spectrometer? Not Quite!… Built for Right to Repair

This project started with a simple idea: build an accessible, high-performance VIS-NIR spectrometer that empowers users and supports the right to repair. We're incredibly excited to share our work with the Hackaday community.

A Hybrid Approach to Spectrometry

JASPER is designed for flexibility, supporting multiple sampling modes in a single, compact device. Whether you're in the lab or out in the field, JASPER adapts to your needs.

  • Cuvette Holder: Perfect for analyzing liquid samples like milk or plant extracts.
  • SMA Connector: Connect a fiber optic probe to measure samples directly, such as the surface of a piece of fruit or a plant leaf.
  • Accessory Port: This built-in port allows for standalone operation with an integrated tungsten halogen lamp, so you don't need a separate light source.

This hybrid approach allows you to seamlessly switch between lab-grade and field-ready configurations, giving you the best of both worlds with minimal hassle.

Stay tuned for more updates and detailed build instructions! Follow for future updates!!

  • Spectrometer Design Part 10: Optimal Grating Groove Density- Preliminary Estimate

    Tony Francis10/31/2025 at 18:39 0 comments

    Introduction: The COTS Design Constraint

    When designing a grating-based spectrometer, the primary challenge is not solving the physics—it's managing the real-world constraints of Commercial Off-The-Shelf (COTS) components. We must design around fixed detector lengths (LD) and standard focal lengths (LF).

    This presents a chicken-and-egg problem: finding the right Grating Groove Density (G) without first committing to a fixed Focusing Lens Focal Length (LF). We can get an early estimate for G based only on the desired Wavelength Span and the Geometry of our optical setup.

    The Core Design Principle: The Grating Equation Governs G

    The fundamental constraint is that the total angle the dispersed light occupies (∆β) must be related to the total wavelength span(∆λ). This relationship is governed purely by the Grating Equation, independent of any focusing optics.

    Step 1: Grating Equation for the Span Edges

    The Grating Equation (for the first order, m=1) relates wavelength (λ), angles (α, β), and groove density (G):

    By setting up this equation for our minimum (λmin) and maximum (λmax) wavelengths, and assuming the Angle of Incidence (α) is constant:

    Step 2: Isolating G

    Subtracting the first equation from the second elegantly removes the α term:

    By rearranging, we get the key design relationship for G:

    3. The Early Estimate: Setting a Practical Angular Window (∆β) 

     A COTS detector array can typically only capture light over a limited angular span (∆β), usually between 30° and 50°. By defining a center angle (βcenter) and a total angular span (∆β = βmax – βmin}), we can simplify the numerator using a trigonometric identity:

    This gives us the final, actionable equation for estimating the required groove density:

    Let's assume a full VIS-NIR span (∆λspan = 650nm) and a Center Angle βcenter = 15°.

    Angular Span (β)

    Trig Difference (∆sinβ)

    Required Gestimate (lines/mm)

    COTS Choice

    30°

    0.50

    769

    600 or 1200

    40°

    0.64

    985

    1200

    50°

    0.79

    1215

    1200

    Conclusion: Making the COTS Decision

    This early estimate methodology shows that for a wide VIS-NIR span, a 1200 lines/mm grating is the most likely candidate. Once G is fixed by this COTS selection, we can move to the next critical step: using the chosen G along with the fixed detector size (LD}) to calculate the exact required Focal Length (LF) for the focusing lens. This ensures the physical design is robust and uses readily available components.

  • Spectrometer Design Part 9: Calculate Grating Size for Your DIY Spectrometer

    Tony Francis10/30/2025 at 10:50 0 comments

    When designing a spectrometer, every photon counts! You can buy the fanciest grating in the world, but if your collimator mirror or lens is shining light past it, you're throwing away precious signal.

    The key to a high-efficiency spectrometer is ensuring your grating is wide enough to capture the entire cone of light emitted from your input slit or fiber. This isn't just the beam diameter—it's the beam diameter plus a correction for the angle at which the light hits the grating.

    Here’s the step-by-step derivation to find the absolute minimum physical width required for your diffraction grating  Wgrating

    Step 1: Defining the Light Cone and the Collimated Beam

    The light exiting your input source (fiber or slit) spreads out in a cone defined by its Numerical Aperture (NA).

    • Numerical Aperture (NA): This value is usually provided for optical fibers. If you have a slit and a lens, you calculate the NA from the lens-slit geometry. 

    Where θNA is the half-angle of the light cone.

    • Collimator Focal Length (Lc): The light cone hits the collimator mirror or lens at a distance Lc. The collimator converts this diverging light cone into a parallel beam.

    The maximum radius (R) of the light cone at the collimator mirror, and thus the radius of the resulting parallel beam, is found using basic trigonometry:

    The total beam diameter (Dbeam) is simply twice the radius:

    Step 2: The Grating Tilt—Why Wgrating > Dbeam

    If your grating were positioned perfectly perpendicular to the incoming beam (α= 0°), then your required grating width (Wgrating) would simply equal the beam diameter (Dbeam).

    However, in virtually every spectrometer design (like Czerny-Turner or Littrow), the grating is tilted by the angle of incidence, α.

    Because the grating is tilted, the parallel beam's cross-section is stretched when projected onto the grating's surface. Think of a spotlight hitting a wall at an angle—the illuminated area is larger than the spotlight head.

    The relationship between the true beam diameter (measured perpendicular to the light path) and the required physical width of the grating (measured along its surface) is given by:

    Rearranging this, we find the Cos(α) Correction Factor:

    Step 3: The Final, Practical Grating Width Formula

    We now substitute the expression for Dbeam from Step 1 into the equation from Step 2 to get the complete, actionable formula for the minimum required grating width:

    Since the half-angle θNA is defined by the Numerical Aperture, 

    the final formula is:

    Practical Implications for Design

    • NA is a Killer: If your fiber has a high NA (e.g., 0.22), the 

         term grows quickly, requiring a much wider grating or a much longer focal length Lc.

    • Angle of Incidence Matters: The higher your angle of incidence (α)  is (e.g., 60° for high dispersion), the smaller cos(α)  becomes, meaning Wgrating gets much larger. This is why high-dispersion designs often require the largest and most expensive gratings!

    Use this formula early in your design process to balance cost, size Lc, and efficiency.

  • Ibsen Spectrometer design review: Why design fails in Czerny-Turner Design

    Tony Francis10/20/2025 at 18:58 0 comments

    After struggling to design a spectrometer in Czerny turner configuration using spectrometer design guide https://ibsen.com/resources/spectrometer-resources/spectrometer-design-guide/and tool provided by Ibsen Photonics (https://ibsen.com/wp-content/uploads/Spectrometer.html), I uncovered a fundamental conflict between common spectrometer geometry and the raw physics of diffraction. This deep dive led to a surprising conclusion: for hobbyists and professionals building Czerny-Turner (CT) spectrometers, trying to calculate the Angle of Incidence (α) based on the fixed deviation angle (φ) is a recipe for failure with common high-resolution gratings.

    The core issue? The seemingly simple inverse trigonometric functions, arcsin and arccos, impose severe, hidden limits on your choice of grating and wavelength.

    The Grating Equation and the Two Geometries

    The physics of diffraction is governed by the Grating Equation:

    where:

    • G is the groove density (grooves/mm)
    • λ is the center wavelength
    • α is the Angle of Incidence (AOI)
    • β is the Angle of Diffraction (AOD)
    • The +/- sign depends on whether alpha and beta are on the same or opposite sides of the grating normal.

    The confusion arises from how the total Deviation Angle (φ)—the fixed angle between your collimating and focusing optics—is defined:

    1. The Littrow-like Geometry (The Ibsen Tool Approach)

    In compact and highly optimized spectrometers (like Ibsen's), the system operates close to the Littrow condition (alpha is approximately beta). The total deviation angle phi is defined as the difference:

    When this definition is combined with the grating equation (sin(α) + sin(β) = G*λ), the resulting formula for the Angle of Incidence (α) involves an arcsin function:

    The Practical Advantage: For this formula to work, the argument of the arcsin must be <= 1. This sets the limitation: G*m*λ<= 2 * cos(φ/2). Since φ is typically small (30 degrees), cos(φ/2) is close to 1. For φ=30 degrees, this limit is G*λ<= 1.932, which is generous and accommodates almost any commercial grating (e.g., 1200 g/mm at 550 nm gives G*λ=0.66, which works perfectly). This is why the Ibsen tool is so practical for Littrow-like geometry 


    2. The Classic Czerny-Turner Geometry (φ = α + β)

    In the traditional CT setup, both the input and output rays are on the same side of the Czerny-Turner axis, leading to the simple geometric sum: (φ = α + β)

    When this is combined with the same side of normal grating equation (sin(α) + sin(β) = G*λ), the resulting formula for alpha involves an arccos function (derived by exploiting the trigonometric sum-to-product identity, as seen in this derivation log):

    The Hidden Czerny-Turner Limitation

    This arccos-based formula is where practical design collides with math. For the arccos to return a real angle, its argument must be <= 1. This yields a dramatically tighter limitation:

    Let's look at the numbers for a very common fixed deviation angle, φ=30 degrees:

    This means that for a φ=30 degrees CT spectrometer using the φ=α+β definition, the product of G and λ MUST NOT exceed 0.5176 mm

    Why Your High-Resolution Grating Won't Work (The Real-World Test)

    Consider common commercial gratings:

    Grating (G)

    Max G*λ Limit (0.5176 mm)

    Max Center Wavelength (λ_max)

    Practical Use

    300 g/mm

    0.5176 mm

    1725 nm

    Works well across VIS/NIR.

    600 g/mm

    0.5176 mm

    862 nm

    Works well for VIS/short NIR.

    1200 g/mm

    0.5176 mm

    431 nm

    Fails for visible light (550 nm)!

    1800 g/mm

    0.5176 mm

    287 nm

    Restricted to Deep UV.


    If you attempt to design a φ=30 degrees Czerny-Turner spectrometer (where φ=α+β) using a 1200 g/mm grating to look at green light (550 nm), the required G*λ product...

    Read more »

  • Spectrometer Design: Tool Release- Optimal Slit Width Calculator

    Tony Francis09/28/2025 at 19:37 0 comments

    If you followed the theoretical deep dive in our last log,Spectrometer Design Part 8: Calculating Optimal Slit Width, you know that determining the entrance slit width (w) is the final, crucial step in the optical design of the JASPER spectrometer. This single parameter defines the fundamental trade-off: light throughput vs. spectral resolution.

    To make setting this parameter effortless for any design, we're excited to announce the release of the interactive tool:

    The JASPER VIS/NIR Optimal Slit Width Calculator

    What the Tool Does

    This online calculator instantly computes the ideal slit width based on your design goals, ensuring your system's resolution is perfectly matched to your detector's pixel size.

    The calculator:

    1. Explains the Math: It visually walks you through the four key steps (from the desired spectral resolution Δλ to the final equation) that were derived in the previous log.
    2. Solves the Equation: It uses the final derived formula, which elegantly links the physical slit width to your core design parameters: 

    Where:

      • m = Diffraction Order
      • Δλ = Target Spectral Resolution
      • LC = Collimating Lens Focal Length
      • d = Grating Groove Spacing
      • β = Diffraction Angle

     3. Provides an Interactive Interface: Just plug in your desired design values for spectral resolution, collimating lens focal length, grating grooves, and angle, and it instantly spits out the optimal slit width in micrometers (μm).

    🖱️ Use the Calculator Now!

    Whether you're building a JASPER or designing your own grating-based spectrometer, this tool will save you hours of manual calculation and help you lock in that perfect balance between light collection and spectrum clarity.

    👉 Find the live tool here:

    Jasper VIS/NIR Slit Width Calculator

    https://checkag.github.io/Jasper_VIS_NIR_Slit_Width/

  • Spectrometer Design Part 8: Calculating Optimal Slit Width

    Tony Francis09/26/2025 at 18:20 0 comments

    In our ongoing JASPER VIS-NIR spectrometer project, we have worked through the core components: fixing the geometry, selecting the grating, and deriving the focal lengths for the collimating (LC) and imaging (LF) lenses. The final piece of the optical puzzle is determining the optimal entrance slit width (w).

    The slit width is critical because it directly controls the amount of light entering the system (the optical throughput) and also dictates the final spectral resolution. We need a slit that is wide enough to capture sufficient light but narrow enough not to degrade the resolution we designed the system for.

    To find the optimal slit width, we must first recall the minimum required image size on our detector array.

    Step 1: Minimum Resolvable Image Dimension (Δd)

    The goal of any spectrometer is to distinctly separate two wavelengths that are very close to each other. This minimum difference in wavelength is our desired spectral resolution, Δλ.

    For the spectrometer to register this change, the image of Δλ must be separated by at least two pixels on the sensor array. This means the minimum resolvable image dimension (Δd) must be equal to twice the pixel width.

    The relationship between the change in wavelength (Δλ) and the resulting physical separation on the detector (Δd) is governed by the linear dispersion of the system:

    Note: The angular dispersion, dβ/dλ, which is the basis for this linear dispersion equation, was derived in detail in Part 6: Angular and Linear Dispersion https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243271-angular-and-linear-dispersion

    where:

    • m is the diffraction order (usually 1).
    • LF is the focal length of the imaging (focusing) lens.
    • d is the grating groove spacing.
    • β is the angle of diffraction for the wavelength being resolved (often taken at λmin).

    Solving for the smallest resolvable image dimension Δd at the desired spectral resolution Δλ:

    For optimal performance, this dimension Δd should be set to match the physical requirement of the detector:

    Step 2: Deriving the Optimal Slit Width (w)

    In an infinity-corrected optical setup—where the collimating lens (LC) and the imaging lens (LF) are used—the slit width (w) is imaged onto the detector plane. The relationship between the object size (w) and the image size (Δd) is simply the ratio of the focal lengths of the two lenses:

    We want the image of the slit to be exactly equal to our minimum resolvable image dimension (Δd) to ensure we utilize the maximum optical power without sacrificing resolution.

    Now, we solve for the optimal slit width w:

    Substituting the expression for Δd from Step 1 into this equation:

    Notice that the focal length of the imaging lens,LF, cancels out, which significantly simplifies the final equation for the optimal slit width:

    This final equation elegantly links the physical slit width to the core design parameters: the desired spectral resolution (Δλ), the grating characteristics (m and d), and the focal length of the collimating lens (LC). By setting the slit width according to this derivation, we achieve a system where the spectral resolution is perfectly matched to the detector's pixel size, thereby optimizing both light throughput and resolution.

    In the next part, we will use all these derived equations to plug in our target values and finalize the physical dimensions of the JASPER spectrometer.

  • Part 7: Deriving the Focal Length of a Collimation Lens

    Tony Francis09/24/2025 at 18:48 0 comments

    In our last post, we discussed how to select the right detector length and focusing lens. Now, we're going to dive into the optics of the grating itself, specifically how it affects magnification in your system.

    https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243375-part-5-a-guide-to-selecting-detector-length-and-focusing-lens-for-grating-spectrometer

    The Anamorphic Nature of a Grating Spectrometer

    A grating spectrometer is an anamorphic optical system, which means it magnifies in different ways along different axes. To briefly review this property, assume the entrance aperture of the spectrograph is a slit of width W and length L, aligned so that its projected image lies perpendicular to the direction of dispersion. The projected length l at the detector is then:

    where FF; and FC; are the focal lengths of the imaging lens and collimating lens, respectively.

    However, there's another crucial magnification at play—the magnification in the direction of the dispersion. This is a direct result of how light interacts with the grating.

    Deriving the Magnification from the Grating

    To understand, let's consider the grating equation, which describes the relationship between the angles of the incident and diffracted light.


    where:

    • m is the diffraction order
    • λ is the wavelength of light
    • d is the groove spacing of the grating
    • α is the angle of the incident ray with respect to the grating normal
    • β is the angle of the diffracted ray with respect to the grating normal

    Now, let’s consider two rays originating from opposite edges of the entrance slit. These two rays arrive at the grating with incident angles that differ by a small amount, Δα. After passing through the grating, the diffracted rays will leave with an angle difference of Δβ, where Δβ ≠ Δα. 

    The magnification of the grating, r, is defined as the ratio of these two angular changes:

    To find the relationship between Δβ and Δα, we can differentiate the grating equation with respect to α and β, while assuming the wavelength (λ) is constant.

    Let's start with the grating equation:

    Since m, λ, and d are constants for a single wavelength, their product is also a constant. Therefore, the derivative of the left side of the equation is zero. We can differentiate the right side with respect to α and β:

    Using the chain rule, this becomes:

    Rearranging the terms to solve for the ratio of dβ to dα, we get:

    The magnification, r, is the ratio of the change in the diffracted angle to the change in the incident angle. In the limit of very small changes (Δα and Δβ), we can replace dβ/dα with Δβ/Δα. Since magnification is typically concerned with the magnitude of the angular change, we take the absolute value:

    This term, cosα / sinβ, is the anamorphic magnification factor of the grating itself

    Putting It All Together: The Total Magnification

    The overall magnification (M) of the spectrometer is the product of the magnification from the lenses and the magnification from the grating. Therefore, the total magnification is:

    From this, you can solve for the focal length of the collimating lens Fc :

    In practical spectrometer design, a magnification (M) close to 1 is often targeted to maintain a one-to-one relationship between the slit and the detector image.

    In the next post, we'll discuss the final component of our optical system: the entrance slit, and how its width impacts the spectral resolution of your spectrometer.

  • Part 6: An Interactive Tool for Selecting Spectrometer's Focusing Lens and Detector

    Tony Francis09/18/2025 at 18:47 0 comments

    In the last blog post, we delved into the theoretical foundations of spectrometer design, particularly the relationship between spectral resolution and detector pixel size.

    https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243375-part-5-a-guide-to-selecting-detector-length-and-focusing-lens-for-grating-spectrometer

    Building on that, we have designed a new tool to help you tackle a critical design challenge: selecting the perfect combination of a focusing lens and a detector.

    The Problem: A Catch-22 in Spectrometer Design

    When you're designing a spectrometer from scratch, you quickly realize you're faced with a classic "chicken-and-egg" problem. The required length of your detector is directly dependent on the focal length of your focusing lens, and vice versa. Since both are unknown at the beginning, it's difficult to know where to start. Customizing a lens is prohibitively expensive, so you have to work with standard, off-the-shelf components.

    To solve this, we've developed a practical, iterative approach. Our tool lets you choose a standard focal length from a list of commercially available lenses. It then calculates the exact detector length you would need to capture your full wavelength range. From there, you can choose the closest-matching detector from a catalog.

    Introducing the Interactive Design Calculator

    Our new web-based calculator takes the guesswork out of this process. It's a single-page application that allows you to experiment with your design parameters in real-time.


    Try it out here: 

    https://checkag.github.io/detector_and_focusing_lens/

    A snapshot of the design tool:

    How it works:

    • Input Parameters: Enter your desired wavelength range (λmin to λmax), grating specifications (lines/mm), and diffraction order.
    • Practical Approach: Select a standard focal length for your focusing lens from the dropdown menu.
    • Real-time Visualization: Watch as the tool instantly calculates the required detector length. The interactive diagram on the right updates to visually demonstrate the effect of your choices on the spectrometer's geometry.

    This interactive tool is a significant step forward in our project, turning complex equations into a straightforward, visual experience. We believe this will be incredibly useful for anyone building their own spectrometer.

  • Part 5: A Guide to Selecting Detector Length and Focusing Lens for grating Spectrometer

    Tony Francis09/16/2025 at 19:05 0 comments

    In our last blog post, which you can find here, we discussed the concept of spectral resolution and its direct relationship to the pixel size of the detector.  In this post, we will discuss how to select detector length and the focal length of the imaging lens, which are crucial for the instrument's performance.

    1. The Role of the Focusing Lens and Detector

    The focusing lens (also known as the imaging lens) is a key component in a spectrometer. Its primary function is to focus the dispersed light from the grating onto the detector. The detector, typically a linear array sensor, then measures the intensity of each wavelength.

    A key design consideration is ensuring that the full range of wavelengths you want to measure (λmin to λmax) fits precisely onto the physical length of your detector.

    2. The Relationship Between Wavelength Span and Detector Length

    The angular span of the dispersed light, δ=βλmax−βλmin, is the difference between the diffraction angles for your maximum and minimum wavelengths. The focusing lens converts this angular span into a linear distance on the detector.

    The relationship between the detector length (LD), the focusing lens's focal length (LF), and the angular span (δ) is given by the following equation:

    This equation highlights the trade-off: for a fixed angular span, a longer focal length (L_F) will result in a larger image on the detector, requiring a longer detector.

    3. Calculating the Focusing Lens Focal Length (L_F)

    Often, the detector length (L_D) is a known value—you have a specific sensor you are designing around. To find the required focal length of the focusing lens, we can rearrange the equation above. 

    The angular dispersion describes how much the diffraction angle changes with a change in wavelength. It's defined as:

    • m: The diffraction order
    • d: The groove spacing of the grating
    • β: The diffraction angle

    The linear dispersion, which relates the change in position on the detector (dx) to the change in wavelength (dλ), is given by:

    We can approximate the linear dispersion for the full wavelength span. The change in position, dx, corresponds to the detector length, LD, and the change in wavelength, dλ, corresponds to the wavelength span, λmax−λmin.

    Rearranging this equation to solve for the focal length of the focusing lens (LF), we arrive at the formula :

    This equation provides a direct and practical way to calculate the required focal length of the focusing lens based on your detector length, grating parameters, and the desired wavelength range.


    Practical Approach

    Since both the detector length and the focusing lens focal length are unknowns in the spectrometer design, a common and practical approach is to fix one of them to find the other. 

    In practice, it can be challenging to find a detector with the exact length calculated above. Also, customizing a lens is costly, and stock lenses have standard focal lengths like 30mm, 50mm, 75mm, 100mm etc. Therefore, a more practical procedure is to calculate the detector length for the available focal lengths and then select the most optimal detector-focal length combination.

    1. Select a Trial Focal Length: Choose a commercially available focal length for your imaging lens. Common options are 30mm, 50mm, 100mm, 150mm, 200mm, etc. A longer focal length will result in a longer detector length and higher spectral resolution.
    2. Calculate the Required Detector Length: Using the focal length you've selected, plug the values for the other known parameters (m, d, β, and the wavelength span) into the equation above to calculate the required detector length,LD.
    3. Choose a Close Detector: Compare your calculated LD to the available sizes of commercial detectors. Select a detector that is the closest match to your calculated value.

    By following this method, you can start with a standard component (the lens) and then find a detector...

    Read more »

  • Spectrometer Design Part 4: Spectrometer design with sensor array

    Tony Francis09/15/2025 at 19:49 0 comments

    In our previous blogs, we tackled the initial steps of designing a spectrometer: fixing the geometry ϕ=α+β and then calculating the angles of incidence (α) and diffraction (β). We even created a simulator that showed how a varying α could achieve a desired spectral range. Details at 

    https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243109-spectrometer-design-choosing-the-right-geometry-for-vis-nir-spectroscopy 

    https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243174-spectrometer-design-part-3-deriving-alpha-and-beta-angles
    https://hackaday.io/project/202421-jasper-vis-nir-spectrometer/log/243185-simulating-diffraction-grating

    While a rotating grating-based monochromator offers supreme flexibility—allowing for variable spectral resolution or even the use of multiple gratings on a turret—it is not the optimal choice when spectral acquisition speed is paramount.

    For high-speed spectroscopy, the ideal solution is a spectrometer with a stationary grating and a sensor array detector. This design has no moving parts and relies on a constant angle of incidence (α). The entire spectral range is imaged simultaneously onto the array, where each pixel corresponds to a specific wavelength.

    Let's explore the key equations that govern this design.

    The Grating Equation for a Fixed-Grating System

    The fundamental grating equation is: 

    Here, m is the diffraction order, λ is the wavelength, and d is the grating groove spacing. For a fixed-grating system, α is constant. We can derive the equation for the diffraction angle β as a function of wavelength:

    The total spectral span captured by the detector is the difference in diffraction angles between the maximum and minimum wavelengths of interest, λmax and λmin.

    From Angular Dispersion to Physical Dimensions

    The spectral span δ is an angular measurement. We must convert this into a physical length that can be imaged onto the detector. This is where the imaging lens and its focal length (LF)come into play. The total length of the detector (dD) required to capture the entire spectral span is given by:

    This equation highlights the trade-off between the detector's physical size and the focal length of the imaging lens. The span is limited by these two parameters.

    To determine the smallest change in wavelength (Δλ) that the spectrometer can resolve, we need to consider the angular dispersion, which describes how the diffraction angle changes with a change in wavelength.

    For a very small change, we can approximate this relationship as:


    This angular change, Δβ, must be large enough to be detected by the sensor. The smallest resolvable image dimension (Δd) on the detector corresponds to the spectral resolution. This allows us to select a detector with an appropriate pixel size. The linear dispersion is given by:

    The physical distance between two adjacent resolvable wavelengths is Δd. To distinctly record two close spectral lines, they must be mapped onto two adjacent pixels.

    In practice, a design workflow is typically reversed. We start with a fixed pixel size and sensor length from available detectors and work backward to calculate the achievable spectral resolution. If the result doesn't meet the design goals, we can iterate on other parameters like the angle of incidence (α) or the grating's groove density.

    This shows that even with a fixed grating, there are many parameters to tune for an optimal design. In the next blog, we can create a simulator to compute the pixel size required for a given spectral resolution and span, bringing these equations to life

  • Angular and Linear Dispersion

    Tony Francis09/10/2025 at 19:32 0 comments

    At the core of the JASPER VIS-NIR spectrometer is a diffraction grating, a component with thousands of microscopic grooves. When light hits this grating, it is diffracted, with each wavelength bent at a different angle. This is governed by the Grating Equation:

    Here, λ is the wavelength of light, d is the spacing between the grating grooves, m is the diffraction order, α is the angle of incidence, and β is the diffraction angle. For a given setup, d, m, and α are constant.

    The measure of how well the grating separates different wavelengths is called angular dispersion, defined as the change in diffraction angle (β) for a small change in wavelength (λ). We can find this by differentiating the grating equation with respect to λ:

    This simplifies to:

    Rearranging for the angular dispersion, we get the corrected equation:

    A higher value for dβ/dλ means that two very close wavelengths will exit the grating at noticeably different angles, which is exactly what we want for a high-performance spectrometer

    From Angle to Position: The Role of Linear Dispersion

    After the light is separated by angle, it passes through a lens that focuses the diffracted rays onto a detector plane, such as a CCD or CMOS sensor. 


    This lens transforms the angle (β) into a specific position (x) on the detector. The relationship is given by:

    where f is the focal length of the focusing lens. This equation is accurate for a flat detector plane normal to the central ray.

    To understand how a change in wavelength relates to a change in position on the detector, we need to combine the two concepts. The key metric for a spectrometer is its linear dispersion, dx/dλ, which tells us how many nanometers of wavelength are spread across one millimeter of the detector


    Using the chain rule, dλ/dx=(dλ/dβ)⋅(dβ/dx). We can derive the expression for linear dispersion:

    This equation is a cornerstone of spectrometer design. A lower value of dλ/ corresponds to a higher resolution, meaning the spectrometer can distinguish between very closely spaced wavelengths. This is achieved by using a grating with a small groove spacing (d), operating at a higher diffraction order (m), or using a lens with a longer focal length (f)

View all 28 project logs

Enjoy this project?

Share

Discussions

Does this project spark your interest?

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