http://www.open-raman.org/quantifying-methanol-in-ethanol-us...
It can be used to detect and quantify methanol in ethanol. This is interesting because ethanol is (relatively) safe to drink, while methanol is metabolized to poisonous compounds when ingested. Methanol and ethanol look the same and have nearly identical densities. The odor and taste of methanol are distinguishable from ethanol only at high concentrations. Raman spectroscopy is one way to distinguish a dangerously adulterated alcoholic beverage from a safe one.
You do need to put a sample of the substance to be tested in the machine, though. You can't point the machine at a container in front of you and get a reading. Also, Raman spectroscopy is suitable for distinguishing many but not all substances. The Tricorder's capabilities for universal remote analysis are superior if fictional.
Here is a paper detailing its use in determining methanol content of ethanol spirits: https://pubs.rsc.org/en/content/articlelanding/2019/an/c8an0...
The methanol I've worked with has a strong wintergreen odor, impossible to mistake for ethanol. I'd always assumed that's just what methanol smells like. Is it actually an odorant?
The only consumer product I know that resembles this is the SCiO: https://www.consumerphysics.com/scio-for-consumers/
Not everything is so constrained. Lasers can get smaller. Certainly electronics. As those things get more efficient, the batteries can get smaller.
Now, it all depends on what you're trying to measure. And there are cases where the chemicals themselves cooperate with you in some way. For this reason, single purpose instruments can often be quite small. An example is the finger cuff for blood oxygen.
If you search for mini- or micro-spectrometer, you'll find that these things are all over the place. Many of them demonstrate one interesting application with great fanfare, that is perpetually almost sensitive enough for practical use.
It seems quite simple, in that it seems to use a light source and looks at the reflection using photodiodes with different lenses on top.
So as I understand it wouldn't perform as well as a spectrometer with diffraction grating and linear CCD, but would be interested to hear from someone knowledgeable about spectrometers about that.
But it does seem to use a simpler principle than a raman spectrometer, I believe this is the general term for the approach it uses - https://en.wikipedia.org/wiki/Near-infrared_spectroscopy