February 17, 2025

Software for the BTC100 spectrometer - running it on Windows

I develop this software on Linux (specifically Fedora 41 as of February, 2025). I also have a machine running Windows 10, and periodically test this software on that machine. If you are having troubles, contact me, but follow these tips first. You may discover a unique problem, or I may just need to add something to this page.

I will give a short list of what you will need to run this software, then give details for the various steps afterwards. Note that I did some of these things several years ago when I was working on Raman software, so you may find problems due both to my memory of what I did and due to changes in how packages need to be installed.

In short

Details for each of the above follow, but not necessarily in that order.

Installing Git

Here is the official "how to install" page. Skip down to the instructions for Windows, use the download link for "Git for Windows" and do the usual thing to install it.

Git, Github, and this project

I keep the latest version of this project on Github, as per this link: Once you have git installed on your windows machine, there are only 2 things you need to know about: clone and pull First to get the software:
git clone https://github.com/trebisky/Spectro.git
Type the above command (I use the "power shell" these days) and you will get a folder named Spectro will all of my software in it. You only ever need to do this once.

As time goes on and I make changes to the software, you will need to "pull" periodically to keep your version up to date:

cd Spectro
git pull
You can try a git pull any time you want to be sure you are up to date with what I have placed on github. Git update does something entirely different, so don't try that.

Running the program

This may be putting the cart before the horse, if you haven't done all the steps listed at the start of this, but you can do those then come back here.

Once you have cloned my "Spectro" repository, do this (again, using power shell):

cd Spectro
python spec
If you have the cable to the spectrometer all hooked up and the spectrometer powered on you should see this (or something similar)
Using port COM3
init found device at 115200
Init OK
Probe with ascii command
Scan binary spectrum
Done
Once this had finished you should find a file named "spectrum", which will be an ascii file with 2048 lines in it. You could plot it with gnuplot, or just admire it.

Python -- wx and serial

These are optional python packages that my software uses.

When you installed python, you should also have received a package called "pip". The "pip" program is a tool to install additional python packages. So do this (once again, I use power shell):

pip install pyserial
pip install wxPython
This should be simple and easy. You can also type "pip list" to get a list of what python packages you have installed and their versions.

The serial device for your USB cable

You may or may not (probably will) need to fuss with this.

Launch "device manager". This is part of control panel apparently. I just type "device manager" into the search thing, it finds it and I start it.

When I first plugged in my "Ugreen" USB to serial cable (which worked immediately with linux by the way), it popped up in "device manager" as "Other devices" with a warning icon. Windows did not have a driver. I double click on this and after a bit it finds a driver for a Prolific PL2303GT device (which is exactly right). I click OK and now it shows up in "device manager" under "Ports" and will be called "COM3", which is what I will refer to it as in my software.

Installing Gnuplot

You can (and perhaps should) just ignore this, it is "extra credit" and optional.

Gnuplot is a very general graphing tool that I have used to plot spectral data (and many other things over the years).

You can search on "gnuplot download" then follow links to get here:

Version 6.0.2 was the latest as of February, 2025. A big green button near the top of the page should offer to download "gp602-win64-mingw.exe", so do this. When the download finishes, click on the "exe", and answer the usual questions. You may or may not want the desktop shortcut.

To run it, I do launch it via the desktop shortcut. Then inside of Gnuplot:

cd "..\Spectro"
plot "spectrum" with lines
A window should pop up with a spectrum plot. Gnuplot can do everything, including slicing bread:
Have any comments? Questions? Drop me a line!

Tom's Electronics pages / tom@mmto.org