Table of Contents

DADOS RCU

Introduction

For calibration of the DADOS spectra we use the Alpy calibration module from Shelyak, which is equipped with an argon-neon lamp for wavelength calibration and a tungsten lamp for flat-field calibration.

To remotely control this calibration unit, a simple remote control upgrade module (RCU) has been created. It allows the user to remotely control both a flat-field lamp and a wavelength calibration lamp via serial communication through a COM port on a computer. The heart of the RCU is a simple microcontroller that controls a two-relay module that acts as a switch to turn the spectrograph's two calibration lamps on and off.

Hardware and Setup

The DADOS RCU has exactly five cable connections that must be connected in order to operate the RCU. These are

RCU schematic

All connections are clearly marked on the cable ends or on the plastic casing itself. It is important to note that when connecting the RCU to the spectrograph, the 12V connectors in particular can be a little difficult to connect. Carefully push the plugs into the socket without applying too much force to avoid damaging them.

The schematic of the RCU shows the connection between the microcontroller and the relay modules.

DADOS RCU

Communication Protocol

Communication with the RCU, i.e. the microcontroller, follows a specific protocol, which is described below. Each command sent must end with a semicolon (;). Some commands change the state of one of the two calibration lamps. The following list gives an overview of the possible commands to control the calibration lamps.

Single-Lamp Commands

The commands usually start with a capital letter (F for the flat field lamp or W for the wavelength calibration lamp). We use # as a wildcard, which should be replaced by the letter F or W in a practical example.

Safety Mode

The wavelength calibration lamp for many spectrograph calibration units is usually an arc lamp (e.g. Th-Ar or Ne-Ar). These lamps typically have a relatively short lifetime, so the RCU has a safety mechanism enabled by default. This mode can be controlled with the variable force # and is set to false by default. The idea is to switch off the lamps after a certain time, after which they can be considered to have been “accidentally” switched on. Depending on the maxtime# variable, this time can be set individually. By default it is set to 600 seconds. The numeric value is interpreted in seconds.

Command examples

The following examples show the commands in a practical context. Lines starting with “»>” represent a response from the RCU triggered by the previous command. Everything after the colon is a comment in this context and does not appear in the real communication protocol.

Turning the Flat Field Lamp On and Off:
Fget; // ask for the current state of the flat field lamp
>>> 0 // flat field lap is OFF (i.e. the result is 0), OFF is the default state for any calibration lamp with which it is initialized in the beginning
Fon; // switch the flat field lamp on
Fget; // ask for the current state of the flat field lamp
>>> 1 // now, the flat field lamp is switched ON (i.e. the response is a 1)
Foff;  // switch the flat field lamp off again
Set variable maxtimeW:
Wforceget; // queries the current state of the forced operation mode
>>> 0 // is initialized with False (i.e. the response is 0) by default
Wgetmaxtime; // asks for the current maximum allowed on-time for the wavelength calibration lamp
>>> 600.00 // default is 600 seconds
Wsetmax60; // sets the maxtimeW to 60. We can check whether the command was successful with ...
Wgetmaxtime;
>>> 60.00 // now the maxtimeW variable is indeed fixed at 60 seconds after which the wavelength calibration lamp will automatically switch off if forced operation mode is disabled (recommended)