2025-10-10 - spectrograms of different light sources

after discovering project 326 YT channel i came across a review of dirt cheap spectrometer (see also part 2) manufactured by an individual in china. actually it looked quite impressive and with a price tag of 50€ there really did not need any more convincing… so this year i bought my 1st spectrometer. this blog post is a collection of samples and some interesting observations made with it.

device

little garden spectrometer1) came nicely packed, and fairly fast (~1w time). some of the more interesting parameters are:

  • spectrum range: 340nm-1050nm
  • 1nm prevision for visible light
  • 1-3nm outside of visible light

i'll not get into internal workings, though it's actually very interesting. i highly recommend the linked review videos for more details.

SW setup

from protocol PoV, the device is nothing more than a webcam. however to be able to interpret the white dots, a SW package is needed. it also need to be calibrated.

the SW package is a modified theremino, that has some improvements to work best with this device.

it' over a quarter of century since i'd don't use Windows as my primary OS. this also means i'm _very_ uncomfortable running any binary SW. in this case the SW is also only runnable for windows. so for start i decided to run it inside a VM.

take 1: Win XP

since it runs on windows (XP), i decided to use a VM for that. TL;DR it took me so much time to try to run a USB camera there it actually turned out to be faster to use linux + wine. i'll spare you the frustration of dealing with XP (those were some truly dark ages back then).

take 2: linux + wine

start as usual: qemu + debian:13 base. example command to run the tool:

# this gets the camera device:
camera_re=" 0c68:6464 Sonix Technology Co\., Ltd\. USB 2\.0 Camera"
dev=$(lsusb | grep "$camera_re" | awk '{ print $2 "/" $4 }' | tr -d :)
 
# here we start the VM:
qemu-system-x86_64 \
  -enable-kvm \
  -vga virtio \
  -drive file=disk.qcow2 \
  -m 4G -smp 4 \
  -usb -device usb-ehci,id=ehci -device qemu-xhci \
  -nic user,model=virtio-net-pci,hostfwd=tcp:127.0.0.1:22017-:22
  -device usb-host,hostdevice="/dev/bus/usb/$dev"

once OS is there, install X11 and some light graphical env. you can also get mplayer to ensure camera is working properly:

mplayer -tv "driver=v4l2:width=1920:height=1080:device=/dev/video0" -vo xv tv://

if all is fine, it's time to install wine and enable 32-bit support:

apt install wine wine32:i386 winetricks

since we need 32-bit app support, make sure you have these in env at all times:

export WINEARCH=win32
export WINEPREFIX=~/.wine32

now it's time to configure wine itself (the defaults are fine):

winecfg

and install old .NET version (echos of XP pains are back):

# install:
winetricks dotnet40 gdiplus
# confirm it's there:
winetricks list-installed

ok - now it's time to start the show! :)

export WINEARCH=win32
export WINEPREFIX=~/.wine32
# start from within the SW package from google drive, linked above:
wine theremino.exe

calibration

we're almost there. once the application is up, you need to calibrate it. the instructions and video tutorials go into details. TL;DR is that you need:

  • connect fluorescent light
  • let it heat up (~1 min is enough)
  • shine fluorescent light onto the device, to capture spectrogram
  • mark 436nm and 546nm peaks, as seen below

fluorescent light - selecting reference

once the calibration is done – you're off to the races! :)

measurements

this section contains some measurements from different light sources i found around, with a comments… and some unexpected findings. :)

click on an image to enlarge it.

daylight

sunlight

as you can see, there's quite a bit of IR and some UV-A.

a classic one. interesting as a reference for other sources.

daylight behind a double window

sunlight behind a double window

common wisdom is that glass blocks UV… and the first surprise – yes, it blocks UV… but not a close-UV.

candle

candle light

many times i've heard ppl saying natural fire light is similar to sunlight, so it's “better” (TM?). well – when you look into spectrogram and compare to sun's light, you can see it's actually very different. while overall shape looks similar, it's heavily shifter towards IR. in fact - half of the spectrum is outside of a visible range (heat! surprise! surprise!). so it's nice, it's warm… and it's nothing like a sun's light. everyone plz deal with it. ;)

halogen

halogen light

another surprise – halogen light looks almost like a candle light! just must less bright (ok - my halogen light was just a small, desk lamp). here also big chunk is emitted as IR.

red laser (pointer)

red laser pointer

well – very much as expected. 1, sharp peak at the reference frequency / wavelength (659nm).

green laser (pointer)

nope. :D i do not have one. nevertheless i decided to put a comment why it is so, as a word of warning.

these are commonly done as a charge-pump in IR, that causes emission in a visible light. this means that aside from obvious green peak, there's another one in IR (aka: invisible) range. this can potentially be dangerous to eyes, as there's much more energy emitted by these, than you can see. a silent trap, if not made correctly (i.e. with an IR filter). this is why i decided to not buy one.

LEDs

here are some LEDs i found laying around.

5mm blue

blue LED

it clearly shows a difference between LED and laser – peak is more bell-shaped (centered around 466nm) than just a sharp spike. however interestingly – it's actually very bright. we'll get back to this very soon…

before we move one, note also a much smaller, 927nm “peak”. this is a second-order diffraction – i.e. an artifact of the measurement process. we can ignore it – it's not really there.

5mm green

green LED

571nm. similar in idea to blue, just at a different frequency… and much, much dimmer. interestingly enough – the difference is not as prominent with a naked eye (even though it's clearly visible). the reason is that human sight (as most other senses) is logarithmic – not linear.

5mm red

red LED

632nm. when it comes to brightness, somewhere in between blue and green.

5mm yellow

yellow LED

590nm, similar in brightness to red LED. again – visually seems a bit dimmer, than it actually is.

white

so… we have: R, G and B… RGB! so we have white, by putting all 3 in the same die, right? well, actually – no!

in fact white LEDs work in a completely different manner. it's being driven by a 1-color, bright LED that hits luminophore layer, that emits a wide spectrum. looking at the spectrograms below, you can see that blue is the weapon of choice. remember how bright it was, compared to other LEDs, driven by similar current? there you have a practical application of this effect.

note that this also explain why RGB-LEDs are less common than RGBW-LEDs. it's just that “white LED” is it's own, separate channel, to give better mixed (and brighter) light.

as a nice side effect this also means that LED light is also much closer to the natural sun light, than a candle! the only differences are no IR component and a dip between blue (driving) and green+ bands (stimulated) – a band gap.

home light

home LED light

phone light

white LED from phone "flashlight"

5mm white

5mm white LED (discrete)

IR 850nm

IR LED 850nm

near IR. this one is not visible with a naked eye, but can still be captured by a cellphone's camera, as slightly brighter spot.

declared as 850nm, measured as 844nm. even though it's already out of visible range, the precision is still quite good (though a bit below declared values).

IR 940nm

IR LED 940nm

farther IR. this can neither be visible by an eye, not my a phone's camera. some ESP32 night-vision cameras have this range, so it's a perfect lighting for nighttime conditions, as it does not draw attention, yet still makes target visible. because of that it is however a bit tricky to work with, as it's not visible to usual debug tools at hand, so it's hard to tell if lighting is correct, unless the final camera is used.

declared as 940nm and measured as 943nm – very good and within the spec.

UV LED 395nm

this one is no joke! 395nm is on the edge of visible spectrum, so that you can only see a small glow, despite flashlight being very bright. this is obviously dangerous, as it can damage your eyes.

just to give you a sense of how much power the flashlight in question emits – a few seconds to shining over “glow in the dark” printed block made it shine so bright in visible spectrum, i do not think i have ever seen it so bright before, even when left on a natural sunlight!

the flashlight came with “protective googles”. while the whole set was rather on a cheaper side, i had my doubts in how good the googles actually are, so just in case, used to prepare an object i needed to “charge”, close my eyes and only then turn flashlight on. now, equipped with a proper measuring tool i can finally check the googles, to do visual inspections.

flashlight

UV LED 395nm

394nm measured for declared 395nm – spot on! the spike is _huge_. you can tell there's _a lot_ of energy pumped there. the 788nm and 1188nm are 2nd (394*2 == 788) and 3rd (394*3 == 1182) order diffractions and thus can be skipped.

through the protective glasses

UV LED 395nm

now that's impressive! there's literally nothing but a background noise! all the UV power is gone. the glasses not only actually work, but work very well. now i know i can safely use these to protect my sight.

summary

spectroscopy is fun! since you made it hear, i'm positive you agree. :) it was super interesting experience for myself and also fun for kids to watch mesmerizing, colorful plots changing with the light sources. at a 50€ price tag there's no excuse to give it a shot! go for it… as soon as the device is back in stock, that is. ;)

1)
before you roll your eyes on the name – in chinese “little garden” is a place of contemplation, meditation or hobby. this is the reference here.
blog/2025/10/10/2025-10-10_-_spectrograms_of_different_light_sources.txt · Last modified: 2025/10/10 20:25 by basz
Back to top
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0