Using a diffraction grating to view the sun As part of the eclipse 2017 festivities, I plan on constructing a home made pinhole camera.  Is there a good technique to incorporate a diffraction grating in order to look at the Sun's spectrum during the eclipse in this kind of setup?
Assume that I'm already going to have the materials to setup a basic pinhole camera using 2 sheets of cardstock and aluminum foil with a pinhole as the camera (I might go for the more shoe-box one too).  Assume that I can get a (reasonably?) good transmission diffraction grating, al a this 1000 lines/mm one mounted as a slide projector slide.   Assume I'd be willing to setup an additional slit aperture (by using a razor blade on the foil) for use with the grating.
Is there some sort of precision requirement in the setup of diffraction gratings that just makes this impractical to do in an ad hoc manner?  
What factors/features are most important to control in trying to setup a simple diffraction demonstration with sunlight in the context of a pinhole/narrow slit camera.
 A: Even assuming a very trivial plan along the lines of "I just want to look at the visible spectrum" you have two competing needs:


*

*A bright enough pattern to see

*Enough spectra resolution for spectral structure to show (this is especially difficult if you hope to see absorption lines)


You basic problem is that a slit aperture doesn't let much light through and then you propose to disperse it even more by passing it through a diffraction grating—and the longer the projection distance from your grating to the viewing surface the more diffuse the light gets. 
But to see any but the coarsest structure in the spectrum you have to spread the spectrum over a relatively large linear distance by projecting over an adequate distance. Now, with the $10^{-6}\,\mathrm{m}$ line spacing that you suggest, the blue end of the first period is at about
$$ \theta_{400\,\mathrm{nm}} = 0.41\,\mathrm{rad} = 24^\circ \;,$$
and the red end is at
$$ \theta_{700\,\mathrm{nm}} = 0.78\,\mathrm{rad} = 44^\circ \;,$$
for a angular spread of around $0.37\,\mathrm{rad} = 20^\circ$.
That's actually not too bad: projecting over only $10\,\mathrm{cm}$ gives you a visible spectrum $3.7\,\mathrm{cm}$ wide, meaning that you could reasonably expect to resolve features only a few nanometers of spectrum wide under ideal circumstances. 
But how much light do you have? If we treat the system as strictly two-dimensional then the visible brightness is reduced by a factor proportional to $3.7\,\mathrm{cm}/(\text{width of slit aperture})$,1 which is a pretty big factor for a fine slit (200ish? more?). 
Making the slit wider helps with light, but the angular size of the slit as seen from the grating represents a low limit on the angular size of the spectra feature that you can expect to discern. So making the slit bigger to get more light reduces your spectral resolution. That's the core trade-off you are fighting here.
In the end you'll want to experiment with different slit widths and projection distances (something you should do before eclipse day) to optimize your design.
You'll certainly want to put the spectrometer in as enclosed a setting as possible (i.e. use a box geometry, not a open one), so that at least you are looking at a dim pattern in a dark space, rather than a bright one.

1 More generally that's 
$$ \frac{\text{linear size of the visible spectrum}}{\text{width of slit aperture}} $$
for continuous spectra (including those with absorption features. For spectra that are mainly emission lines the light is concentrated in those lines which will be brighter than this estimate suggests.
