---
# System prepended metadata

title: Detector Setup

---

# Detector Setup

## Overview / Quick Start
![](https://i.imgur.com/bkPieiV.png)

The diamond sensor has strips on both sides running perpendicular respectively.  The strips shown in the above diagram are connected to amplifiers to measure the radiation current (held at pseudo-ground).  The strips on the opposite side are biased at high voltage (between -20 V to -120 V) to produce an electric field across the diamond.  The strips can be biased individually, all together (to measure a projection of the beam), or sequentially (to measure a 2D profile of the beam).

A diagram of the detector setup is shown above.  The detector communicates and receives power over ethernet (PoE).  The power for the detector is sourced by the PoE-enabled network switch.  A computer, connected to the same network as the detector, is used to connect to and control the detector.  Make the physical connections as shown.  The detector will power on automatically once the powered ethernet cable is plugged in.

For initial placement, the detector should be set on its side such that its LCD screen is on the top half of the detector.  **Do not let the beam strike the detector outside of the box drawn on the cover.**

Open Chrome and type the detector IP (displayed on the detector LCD) into the address bar.  The detector will now display a live feed of the current measurements on each channel of the detector.  Initially, each bias strip is floating.  To get started with a 1D-projection mode, click `Set Bias Active High`, which will set each bias strip to -20 V.  A more detailed overview of the operation and control of the detector is given below.

## Turning the Detector On or Off

The detector will turn on immediately when a powered ethernet cable is connected.  To turn the detector off, disconnect the ethernet cable.  The detector is ready to use when (and only when) the IP address is displayed on the on-detector LCD.

## MicroSD Card for Detector Initialization

The detector initializes from a file located on the on-detector microSD card.  The microSD card can be flashed with a new file using the following procedure:

1. Turn the detector off by disconnecting the ethernet cable.
2. Remove the microSD card from the detector by first pushing it into the card reader until it is released.
3. Once removed, plug the microSD card into the computer card reader (use and adapter if necessary).
4. The [balenaEtcher](https://www.balena.io/etcher/) application can be used to flash the microSD card.  Within balenaEtcher, select the file *e.g. system.bin*, the target corresponding with the microSD card, then click flash.

To restart the detector with the new initialization file, remove the microSD card from the computer, plug it back into the detector, and plug a powered ethernet cable into the detector.

# Detector Operation

## User Interface Introduction
The user interface for the detector is a web interface that is served by the detector itself, and viewed on a laptop.  The detector's LCD display will show the IP address configured for the detector; make note of that IP address.  In order to bring up the user interface, **open the Chrome browser on the provided laptop, and enter the IP address shown on the detector's LCD** (make sure to only include the IP address and not any subnet mask information like `/24`).

### Live View Tab
![](https://i.imgur.com/hfDWo9A.png)

Once the interface is brought up, two live-data plots are seen along with a `Detector Control` box.  The `Total Detector Current` plot is a rolling view with arbitrary time on the horizontal axis, and arbitrary current units on the vertical axis.  The `Channel Current` plot has a channel number on the horizontal axis and arbitrary current units on the vertical axis.  Both plots should always show instantaneous detector currents.  If these plots stop moving, the browser page may need to be refreshed to forcefully reconnect to the detector.

#### Plot Options Menu
![](https://i.imgur.com/CQy2uEr.png)

Each plot has a collapsible `Options` menu.  These menus give a few basic controls for how the data are displayed.

* The `alpha` option defines low pass filtering.  This value should be between 0.0 and 1.0, where 1.0 means no filtering.  A value of 0.1 is roughly appropriate for a `decimation` value of 10.  Please see [the wiki page](https://en.wikipedia.org/wiki/Exponential_smoothing) for more information.
* The `decimation` option defines the ratio of raw samples to data points displayed.  For example, a value of 10 means that data points are created at a rate of 4 kHz instead of 40 kHz.
* The `number of points retained` option defines how many points are retained before they drop off the plot.  Alternatively, this can be though of as the scale of the horizontal axis in term of data points.

### Take Data Tab
![](https://i.imgur.com/Gs283WU.png)

At the top of the page, another tab labeled `Take Data` is seen.  Click this tab label to switch over to data collection controls.

> **Note:** Unless otherwise specified, runs should be started with both the `CSV format` and `Compressed` checkboxes left *unchecked*.

### Log Messages
In order to see log messages from the detector that can alert the user to both errors and successful configuration changes, press `F12` to bring up the javascript console on the right-hand side.  The first message to appear after connecting to the detector should read `taking DAQ out of reset`, indicating that data acquisition has begun in order to feed data to the `Live View`.

## Setting the High Voltage Bias
The high voltage bias is configurable within the range (-120.0, -20.0].  Additionally, a set of switches control the delivery of the bias to strips on one side of the sensor in order to isolate the signal.  On startup, the switches are placed in a high-Z state, so that regardless of the bias voltage, there is no DC current that flows to the sensor.

The bias voltage can be set by entering the value into the input box labeled `Detector Bias` and hitting enter.

## Aligning the Beam
In order to see a 1-D projection of current on the sensor during alignment, **the bias should be set to constant-on across the detector by clicking the button labeled `Set Bias Active High`**.  Keep the `Live View` tab open so that the total detector current over time as well as the readout channel projection can be seen during alignment.

**Align the beam axis perior to beam delivery as best as possible to be along the horizontal and vertical alignment markings.**  Once the axis is aligned as well as possible and there is high confidence that the beam will be delivered within the box marking on the front of the detector, the beam delivery may begin.

**Once beam delivery begins, adjust the beam alignment until the `Total Detector Current` is maximized and any beam profile seen in the `Channel Current` plot is centered.**  The beam profile in the `Channel Current` plot is a vertical projection of the beam, and that is what should be used as a primary indicator when centering verically.  For horizontal alignment, only the `Total Detector Current` provides information.

### High-Voltage Strip Isolation
For the possibility of a finer horizontal alignment, a single high-voltage strip can be turned on instead of leaving on all strips to bias the entire sensor.  In order to switch high only a strip that is horizontally centered, first click the mouse in the `Manual Switch Activation` input box.  Then, enter the number `24`, and hit enter.  If the javascript console is visible (opened by hitting F12), a new log message should appear saying that the switching configuration has been updated (see screen capture below).

![](https://i.imgur.com/4o5MXYn.png)

## Starting the Imaging Sequence
After beam alignment but prior to taking data, the imaging sequence should be started by clicking the button labeled `Start Image Sequence`.  When this button is pressed, the detector will begin a periodic switching sequence that turns on and off individual strip biases so that imaging information can be constructed.  Once the image sequence is started, run data can be collected in the `Take Data` tab.

## Taking Imaging Data
Click over to the `Take Data` tab.  Then, enter `800000` into the `Number of Samples` input box.  Make sure that the `CSV format` and `Compressed` checkboxes are *unchecked*, then click the button labeled `Start Run`.  After 1 second, a run consisting of 8e5 samples will begin at 40 ksps, for a total of 20 seconds of run time.  The data will stream to the browser as a file download, and the download will appear at the bottom of the window.

> **Note:** The run data files do not contain information about the bias voltage.  After data collection is complete, the filename should be noted along with the detector bias used for the run.  Alternatively, the file can be organized into folders for particular biases.