UV Flux Monitor

Introduction

Although our main project was to build an MCA, we also took on the additional task of making a UV flux monitor. Our mentor wanted to use the UV flux monitor to view and record the flux levels of LEDs over time. He is using UV LEDs as part of an artificial X-ray source. Monitoring, and later controlling, the UV flux of LEDs will help him make a fully-controllable, modulated X-ray source.

The UV monitor is, from an engineering standpoint, very similar to an MCA. It also uses hardware to look at photons. However, since UV light sources emit vastly more photons than X-ray sources, our device detects flux level rather than individual photons. Just like in the MCA, the UV firmware temporarily stores data, and sends it over USB. Also, the host application processes, saves, and displays flux data. In fact, the MCA and the UV monitor have similar, and sometimes identical, sections of code.

Analog Circuitry

To measure UV flux, we implement a UV photodiode and a transimpedance amplifier or current-to-voltage converter, as Figure 1 illustrates. For a given wavelength of UV light, the photodiode outputs a current proportional to the power of the light source. Note that the photodiode is connected to the main device via a BNC cable, to give the user more flexibility with photodetector placement.

Circuit Overview
Figure 1: The diagram shows major components of the UV circuit.

Using an op-amp, a resistor, and a capacitor, we create a current-to-voltage converter as shown in Figure 1. It takes the photodiode current and outputs a proportional voltage. The capacitor serves to keep the amplifier stable and plays no part in the actual conversion.

The system is powered by the user's computer through a simple USB connector. No other power source is necessary; the charge pump uses the USB source to produce the -5V needed for the photodiode.

Firmware

The overall function of the PIC is to obtain the voltage output of the photodetector circuit and send it to the computer. The firmware controlling the PIC can therefore be broken up into three parts.

1) The PIC samples voltages using an ADC. The default setting is for the PIC to sample once every 175 ms, producing a manageable amount of data and decent time resolution. In the future, we plan to allow the user to choose the sampling rate.

2) The PIC temporarily stores its voltage samples in a circular buffer with a size of 256 bytes. This way the PIC can send its data at longer intervals and in bigger packets, decreasing protocol overhead.

3) The PIC sends and receives data through USB. Note that bulk transfer to the computer ought to be emptying the circular buffer more quickly than the ADC is filling the buffer.

Host Application

The host application decodes bulk packets into 32-element list, with each element corresponding to a flux reading. As each list comes in, it is concatenated onto a growing master list containing all flux samples. At some point, e.g. every 5 seconds, the GUI can pull the master list. The GUI can then save the data as an ASCII file, plot the flux, and change the scale accordingly. After the program has been running for a while, the flux graph may look something like Figure 2.

UV Flux Graph
Figure 2: The flux graph is typical of what our device might read. The graph was produced by moving the PSD closer or further from a light source, and by occasionally covering the PSD.

Note that, because we know we are sampling every 175 ms, timing data is not necessary, reducing the amount of data we need to store.

In the future, we may add features to the GUI. For example, we can alter the display such that it only shows the last 100 or so readings. Alternatively, we can make the host application display two graphs. One graph can be the entire flux history while the other can just show recent flux data.