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

JASPER: The Open, Fully Customizable VIS-NIR Optical Bench

 This project started with a simple mission: build an accessible, high-performance VIS-NIR spectrometer that empowers users, embraces modularity, and fiercely champions the Right to Repair. JASPER is not a locked-down black box. It is a fully exposed, highly adjustable optical bench designed for engineers, researchers, and makers who need full control over their spectral architecture. We are thrilled to share this next-generation iteration with the global hardware community.

Customizability:

The real magic of JASPER VIS-NIR Spectrometer lies in its mechanical adjustability. JASPER allows you to customize your spectral span, resolution, efficiency, and sensor choice on the fly:

  • Adjustable Grating Engine: The diffraction grating is mounted on a precise rotating mount with integrated tip-tilt adjustments. Want to target a specific blazed wavelength or shift your spectral window? Just loosen, rotate, and lock it in.
  • Interchangeable Slits & Optics: Easily swap out the optical slit to balance throughput and resolution, or modify the focusing and collimating optics to suit your target application.
  • Variable Focal Lengths & Angles: The detector assembly is mounted on a sweeping curved track, allowing you to accommodate different focal lengths and align perfectly with any custom grating angle.
  • Dual Detector Compatibility: Choose your sensing paradigm. Plug in a commercial off-the-shelf (COTS) monochrome camera for quick spatial-spectral testing, or drop in our custom line array detector PCB for high-speed, dedicated industrial sorting.

                                                                       Neon Spectra

                                                                      Industrial Design

                                                                     Optical Bench


Join the Journey

We are actively tuning the core firmware, optimizing calibration routines, and refining the open-source manufacturing pipeline. Follow the project for regular build logs, raw spectral data releases, and open-hardware schematic deep-dives!

  • From 4.2 nm to 1.9 nm resolution: Cylindrical Corrector Delivers 40% Gain

    Tony Francis09/02/2026 at 11:20 0 comments

    Last time we shared a 500–1000 nm spectrometer design that landed around 3–4 nm resolution. Decent, but not great — best was 2.1 nm at 600 nm, worst stretched to 4.2 nm. We suspected the camera was holding us back. Turns out we were right, and the fix came from a lens that’s curved in only one direction. With it, the design now sits at ~1.9 nm across the band, confirmed in BeamFour. And as always, it’s open‑source

    Where we left off

    Our earlier log traced a cost-optimised 500–1000 nm spectrometer built from stock 1‑inch lenses. It worked, but the resolution sat around 3–4 nm and the spots got fat toward the edges of the band. We said at the time that the limit wasn't the colours and wasn't diffraction — it was something about the camera. This log is what that "something" turned out to be, and how we fixed it.

    Everything here is done in BeamFour, a free ray tracer, plus a few Python scripts. No expensive optics software.


    The problem: the camera focuses onto a bowl, not a flat plane

    When we looked carefully, every wavelength was actually sharp — at its own best focus. The catch is that "best focus" isn't at the same distance for every colour. It swings back and forth by about 2 mm across the band, in a smooth curve. The camera's focal surface is a shallow bowl, and our detector is flat, so only part of the spectrum can ever be in focus at once. The band edges (500 and 1000 nm) sit deepest in the bowl, which is exactly where the spots were worst.

    This is called field curvature, and it's a property of a simple lens — not colour, not diffraction. Tilting the detector helps a little (it lines up with the average slope), but you can't tilt a flat plane to match a curved bowl.

    The fix: a lens curved in only one direction

    Here's the key insight. In a spectrometer, only one axis matters for resolution — the direction the colours spread out in (the "dispersion axis"). Blur in the other direction (along the slit height) just smears the line vertically; it doesn't mix one wavelength into the next.

    So instead of a normal (spherical) corrector lens, we used a cylindrical one — a lens curved in the dispersion plane and flat in the other. It flattens the focal bowl exactly where it counts, and leaves the slit-height axis alone. A normal spherical corrector would also stretch the whole spectrum (it acts like a Barlow) and we'd run off the end of the sensor; the cylinder sidesteps that because it only has power in the one plane.

    It's a plano-cylindrical piece of N‑BK7, sitting just in front of the detector.

    Figure 1: The full trace. Fiber (far left) → collimator → grating → camera → the cylindrical field flattener (the small concave lens before the detector) → TCD1304. The rainbow is the 500–1000 nm spectrum being sorted onto the sensor.

    The result: ~1.9 nm

    With the cylinder in and the detector refocused, the delivered resolution across 500–1000 nm is:

    • ~1.9 nm mean, 2.9 nm worst (single exposure)
    • every wavelength between about 0.8 and 2.9 nm — no bad outlier

    That's roughly a 40% improvement on where we were. And this number isn't just from our own script: we encoded the cylinder in BeamFour's own format and traced it there. Our offline tracer and BeamFour agree to better than a tenth of a micron on every wavelength, so the physics is trustworthy.

    Figure 2:The spot analysis from the BeamFour trace. Each panel is one wavelength; the numbers are the RMS spot size and the delivered resolution Δλ

    Figure 3: RMSx (spectral-axis blur) for each wavelength. The dashed line is one detector pixel.

    Two Points worth noting

    We removed the fiber relay entirely. The old design imaged the fiber onto the slit through a pair of lenses; a commenter on our last post rightly pointed out that (a) those relay aberrations don't actually belong in the spectrometer's resolution budget, and (b) for a fiber instrument you can just butt the fiber right up to the slit. That's what we do now — the fiber sits...

    Read more »

  • Building a 500–1000 nm spectrometer with BeamFour

    Tony Francis08/26/2026 at 18:07 0 comments

    Before building the hardware, the design should be simulated. Ideally, we would like to have a spectrometer design covering 400-1000nm, but cleanly covering the full 400–1000 nm needs a more complex (and costly) order-sorting filter, which goes against our aim of an affordable, user-modifiable instrument.  This log covers a cost-optimised design: a budget design for 500–1000 nm built entirely from 1‑inch off‑the‑shelf lenses and a short Hamamatsu linear detector. The challenge: how much performance can you squeeze out of affordable, standard parts?

    The optic design uses BeamFour, a free ray‑tracer, plus small Python scripts to derive the spot size. No expensive optics software needed.

    We will walk through the design, then explain every parameter we use to judge it, so the charts further down make sense even if you've never touched optics software.

    The design

    Light comes in from an optical fiber, gets collimated (turned into a parallel beam) and re-imaged 1:1 onto a narrow entrance slit. That slit is the "object" the spectrometer looks at. After the slit, a lens collimates the light again and sends it onto a diffraction grating, which is the part that actually splits broadband light into its colours by bending each wavelength through a slightly different angle. A final camera lens focuses each colour to its own spot on the detector. Because different colours land at different positions, the detector sees the spectrum — a strip of light where position equals wavelength.

    It's called a 4f design because the lenses are spaced by their focal lengths in a way that keeps the beam well-behaved, and it's folded (bent with the grating and layout) so the whole thing fits in a small box.



    Figure 1: The JASPER 4f prescription in BeamFour. Each row is one optical surface — the four doublets, the 30 µm slit, the 600 l/mm grating, and the tilted S15796 detector.

    This is the actual "recipe" for the instrument, as BeamFour stores it. Each line is one optical surface — one face of a lens, the slit, the grating, or the detector — described by where it sits and how strongly it's curved. Reading it top to bottom follows the light:

    • Four identical doublets (AC254-045-B). A doublet is a lens made of two glasses cemented together (here a crown glass, N-LAK22, and a flint glass, N-SF6HT). Gluing two glasses together cancels most of the colour smear a single lens would add. All four lenses in the system are the same stock 45 mm, 1-inch Thorlabs part — that's the "cost-optimised" part of the story. Two form the fiber relay, one is the collimator, one is the camera.
    • The 30 µm entrance slit. Listed as the iris, 0.030 mm wide.
    • The grating, 600 lines per mm, working in first order — the disperser.
    • The detector (CCD), a Hamamatsu S15796, 14.336 mm long, whose position and tilt we're allowed to adjust.

    Figure 2: BeamFour ray trace of the full folded path: fiber → 1:1 relay → slit → collimator → grating → camera lens → tilted detector. The colours fanning out at bottom right are the 500–1000 nm spectrum being sorted onto the sensor.

    This is what a ray trace looks like: the software fires hundreds of light rays through the design and draws where each one goes. On the left, the fiber light is relayed to the slit (the pinch point in the middle). It's then collimated, hits the grating, and the camera lens (lower right) focuses it down.

    The rainbow fan at the bottom right is the whole trick of a spectrometer made visible — the grating has bent each colour by a slightly different angle, so red, green and blue rays arrive at different places on the detector. That spread along the detector is the spectrum.

    How we judge the design — the parameters:

    Before the analysis charts, here's what each number means. Every one of these is measured from the traced rays.

    Spot / spot diagram. When the camera focuses one single colour, it should ideally land as one perfect point. In reality it lands as a...

    Read more »

  • Interactive Optical Bench Simulator

    Tony Francis07/24/2026 at 19:30 0 comments

    Most VIS-NIR spectrometers designed for specific applications require fine customization of spectral span, optical resolution, or Signal-to-Noise Ratio (SNR).

    For instance, the Zemax spectrometer design guide highlights a system tailored for Optical Coherence Tomography (OCT) in retinal imaging. That specific application demands a narrow 50nm bandwidth (855 nm to 905 nm) optimized for deep, non-invasive imaging within the near-infrared biological window.

    However, standard optical simulation software (such as Ansys Zemax OpticStudio) often falls short when modeling physical diffraction efficiency curves, real-world blaze angles, and practical mounting tolerances. For researchers, optical engineers, and hardware builders, having a physical, reconfigurable benchtop setup is indispensable.

    We are building a truly customizable, open-source optical benchtop for reflective-grating spectrometers that allows you to easily swap and tune key hardware parameters:

    1. Slit Sizing: Interchangeable mechanical slits to balance optical throughput against spectral resolution.
    2. Optics Selection: Modular lens mounts to evaluate different collimating and focusing focal lengths.
    3. Grating Geometry: Independently adjustable incident (α) and diffracted (β) angles to test custom blaze conditions and spectral dispersion profiles.
    4. Sensor Versatility: Flexible detector positioning to evaluate COTS camera modules or specialized high-speed linear CCD/CMOS array sensors.

    To help refine the optical layout and clear aperture tolerances for the JASPER VIS-NIR Spectrometer, we built a lightweight, interactive simulator that models our optical bench mechanics directly in the browser!

    You can try out the live tool here:
    https://checkag.github.io/jasper-bench-sim/ 

    What the Simulator Models

    When designing compact Czerny-Turner or transmission-grating VIS-NIR optical benches, balancing detector arm placement against grating rotation is always a trade-off between spectral range and focus depth.


    This simulator lets you interactively adjust and test:

    • Detector Angle (Φ): Sweep the detector arm continuously from 45° to 95° across reference markers to see the central wavelength (λ) shift across the line array.
    • Grating Rotation Stage: Rotate the primary diffraction grating stage (0° to 50°) independently of the detector arm.
    • Focus Travel Calibration: Slide the sensor along its own optical axis (0% to 100% travel) to evaluate focal distance tweaks relative to the focusing optics.
    • Real-time Ray Tracing: Visualizes how the diffracted spectral band maps across the active sensor plane.

    Built for Open-Source Transparency

    Rather than relying on heavy desktop CAD packages or proprietary optical simulation software for quick spatial checks, we built this tool with pure, self-contained HTML5, CSS, and inline SVG. It requires zero external assets or dependencies, making it instantly scannable and accessible on desktop or mobile.

    Feel free to run the "Run full demo" loop on the page to see the automated mechanical sweep sequence in action, or turn off labels for a clean visual view!

    The repository is fully open-source under the MIT license:

    📁 GitHub Repo: checkag/jasper-bench-sim

    Give it a try and let us know your thoughts on the mechanical geometry

  • Beyond Normal: The Modified Grating Equation For Real-World Optics

    Tony Francis07/22/2026 at 18:09 0 comments



    It all started with a diagram in the JASPER project logs that didn't quite look right. The angle subtraction geometry for the diffraction grating felt ambiguous, leading to a rabbit hole of second-guessing and a quick post over on Reddit to see if the community could untangle it. A helpful comment pointed toward a deeper truth: if you really want to understand gratings, stop thinking purely in right triangles and start looking at them from Fourier space.

    That advice sparked a dive into reciprocal lattices, Bloch waves, and vector formulations. But rather than just taking someone's word that "vector mechanics and trigonometry are the same thing," let’s build the actual bridge between them.

    The Diagram That Started It All


    When dealing with real-world layouts, getting the sign conventions right for angle subtraction matters immensely. If your angles are on the same side of the normal, you subtract them; if they're on opposite sides, you add them. But why does the math behave this way? To find out, we have to look at the boundary through the lens of electrodynamics.


    The Fourier Space Perspective: Bloch Waves and Momentum Matching

    Periodic structures—whether an array of micro-grooves or nanophotonics particles—impose discrete spatial periodicities. From a rigorous standpoint, every electromagnetic field interacting with a periodic grating must obey Bloch's theorem. When you expand the grating's spatial profile into a Fourier series, periodicity naturally translates into discrete momentum contributions in reciprocal space. In wavevector terms, the parallel component of the outgoing wavevector isn't arbitrary; it is shifted by a discrete reciprocal lattice vector


    :

    This component-based formulation 

    is fundamentally the exact same concept as the classical grating equation, expressed as momentum conservation.

    The 2-Line Bridge: From Fourier Space to Trigonometry

    For a Hackaday audience, equations are best when you can trace them back to something you can plug into a spreadsheet. Let's look at the x-components of our wavevectors in 1D to see how Fourier space collapses back into the classic formula.

    Start with the reciprocal lattice condition:

    Substitute the wavevector magnitudes 

     in terms of angles relative to the normal

    and the grating period 

    results in

    Divide the entire expression by 2*pi / λ  and rearrange, and you arrive right back at the familiar form:



    Just like that, abstract Fourier-space momentum matching resolves cleanly into the trigonometry we use on the benchtop.

    Practical Takeaways for Spectrometer Design (e.g., JASPER)


    1. When to use trigonometry: For a standard 1D VIS-NIR spectrometer layout where light stays strictly in-plane (perpendicular to the grooves), the classical equation 

     is efficient and accurate. Handling angle subtraction properly keeps your layout geometry  straightforward.

    2.  When vector mechanics matter: If you move away from simple in-plane designs into conical diffraction geometries (out-of-plane scattering), or if you need to calculate rigorous diffraction efficiencies and polarization-dependent behaviors, the full vector/reciprocal lattice approach becomes essential.


    By connecting the confusing diagram on the wiki to a Reddit thread, and a Reddit thread to Fourier-space electrodynamics, we’ve closed the loop. Good optics isn't just about plugging numbers into formulas—it's about knowing why the formulas work when the diagrams start looking weird.

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

View all 32 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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