A calibrated spectrometer? It is essentially a prism that bends light. Different frequencies bend different angles. By observing the angle for the brightest spot in the beam you know the frequency. But of course the device needs to be calibrated to be of any use, and that might be a bit harder if you are making your own spectrometer.