Skip to main content

Accessing the spectro through USB

Connecting to the spectro

It is possible to control the device from the Serial over USB. You could use for example the command screen in a bash if you're used to it, but the easiest is probably to use the "Serial Monitor" of the Arduino program. Indeed the spectrophotometer appears as a "Lilipad Arduino USB" and you can just select it and access the data.

caution

When using the Arduino program, it is critical to choose the right board ("Lilipad Arduino USB") when programming it. Indeed the spectro contains an Atmega 32U4 at 8MHz. If it is programmed at a different frequency, the firmware will be corrupted and you will not be able to program the spectrophotometer again.

Accessing data from the Arduino program

  1. Install the Arduino IDE software
  2. Select 'Tools -> Board -> Lilypad Arduino USB'
  3. Select 'Tools -> Port -> xxx Lilypad Arduino USB'
  4. Click on Serial monitor icon (top right)
  5. Select linefeed and 9600 in the bottom of the screen

Select the right port

port.png

Open the serial monitor

serial.png

Select Newline as line ending

newline.png

Controlling the device

You may now control the spectrophotometer from the keyboard. To see the available commands just enter h + Enter.

The instruction s will show you the current settings.

ParameterNumberDesciption
A0Transmission sample color 1
B1Transmission sample color 2
C2Transmission sample color 3
D3Transmission sample color 4
E4Transmission sample color 5
F5Transmission blank color 1
G6Transmission blank color 2
H7Transmission blank color 3
I8Transmission blank color 4
J9Transmission blank color 5
K10Delay before acquisition of the blank
L11Delay before the acquisition of the sample
M12Delay between each acquisition of a kinetic (after blank and first)
N13Number of experiments for kinetic (max 240 / (number colors + 1))
O14Number of the next experiment
P15Current time waiting
Q16Number of acquisitions of 100ms that will be taken (default 10). This value could be reduced for fast kinetic
R17Invert the rotary button direction
S18Battery voltage (hundredth of volt)
T19Temperature (hundredth of degree)
V21Active leds and other. A number between 0 and 63. Each bit represents a function (Red, Green, Blue, UV, Voltage, Temperature). 5 would correspond to Red and Blue (binary combination).
W22Error
X23Value of the channel that will be displayed in the result
Y24Status
Z25Current menu

You may change the parameters K, L, M, N, Q, R, V from the command line. To check a value just enter the corresponding uppercase letter (ie N) followed by Enter. To set a value, enter the new value just after the uppercase letter (ie N20 to set 20 experiments for kinetic).

To retrieve all the data acquired in a kinetic, the easiest is use the d command. This will dump all the acquired data. Please beware that the data is stored in the RAM and it therefore lost when the device is not powered.

The dumped data will contain many columns. The first column corresponds to the time (in ms) since the device was turned on, the next columns correspond to all the acquired colors. The first line corresponds to the blank and the next lines to the kinetic. The values for each column are directly proportional to the quantity of light that reaches the detector. If you want to calculate the corresponding absorbance you need to subtract to each value the corresponding value of the first row.

There is a utility that will allows to directly convert and plot the results on-line (using Google Chrome).

This device is also compatible with the project Arduimon, which can be used by programmers. The default qualifier is expected to be 21569. You may check the current qualifier of your device using the instruction uq. You may set the qualifier using uq21569.