Team:Newcastle/Notebook/Lab/Component

Measuring GFP Expression using Off-the-shelf Hardware

During the development of our plug ‘n’ play kit we observed that it was difficult to see the fluorescence of our bacteria in-situ. This is partly due to the small size of the chambers and the low fluorescence levels of our populations. An important part of work is that people are able to see how our system could work in practice so we decided to investigate ways that our components could report their fluorescence to the user even when the fluorescence levels are too small to be observed directly in the chambers in normal light conditions.

There have been previous iGEM projects which have investigated measuring GFP expression levels using off the shelf electronics components. Examples include x, y & z. After investigating each of these projects we decided to use a similar scheme using a photo-resistor as our light sensor and a UV LED as our source. These would both be controlled by a microcontroller which could measure the GFP expression and report this to the user. We chose to use an Arduino compatible microcontroller to ease our development process. We started experimenting with the ATmega32U4 as found in the Arduino Micro with the aim of later porting our system to the ATTiny45 which can be programmed in the same way but has a smaller form factor, allowing it to be integrated directly into our components.

Our first experiments were conducted using a photo-diode system. The principle on which photo-diodes work is that current is generated when photons are absorbed by semiconductor. Additionally, a small amount of current is produced in the absence of light. Consequently, the difference in current measured corresponds to light intensity. By adding a UV filter to our photodiode and shining a UV LED through the growth medium containing GFP expressing bacteria we hoped to be able to measure a change in current corresponding to the amount of GFP being expressed.

Figure 1: Diagram of apparatus for measuring GFP flourescence signal using off the shelf hardware.

Before we progressed to measuring GFP expression we first tested to see if we could sense light using our photodiode. Photodiode’s and LEDs are very similar. In fact, an LED wired in reverse can serve as a photodiode most sensitive to the colour light which it would normally emit. This lead us to our second circuit which is based on a way of measuring the light falling on an LED. Our second circuit takes advantage of the fact that we can treat our photodiode as a capacitor storing charge across the diode.

Figure 2: Circuit layout (top) and diagram (bottom) for measuring light incident on a photodiode when using the photodiode as a capacitor.

The photodiode has two sides, because of they way the silicon is doped during construction, a P side and an N side. By pulling the N side high and the P side low charge will build up across the photodiode. If the N side is later pulled low the charge will leak back down to ground. The speed at which it does so depends on the light falling on the photodiode, the greater the light intensity the faster the charge bleeds away, with lower light intensities taking longer. As these measurements take on the order of microseconds, charging and discharging the photodiode is a valid way of measuring the light falling on it. We used the code in program 1 to perform this measurement.

pinMode(LED_N_SIDE, OUTPUT);
pinMode(LED_P_SIDE, OUTPUT);
digitalWrite(LED_N_SIDE, HIGH);
digitalWrite(LED_P_SIDE, LOW);

pinMode(LED_N_SIDE, INPUT);
digitalWrite(LED_N_SIDE, LOW);

for ( j = 0; j < 30000; j++)
{
    if (digitalRead(LED_N_SIDE) == 0)
    {
        break;
    }
}
Serial.println(j);
Program 1: Code to measure incident light on photodiode using discharge time.

When we used this method we found we were able to reliably detect light and dark conditions by shading the photodiode. However, we found the signal was too noisy to measure small changes in light intensity, as we would find in our system, with any reliability.

At this point we decided to investigate further components that could be used as a light sensor. We felt it would be best to build the simplest system possible and then work on improving that rather than using complicated components as we had very little time to acquire these. To that end, we settled on using a photoresistor as our light sensing component. These behave very simply as variable resistors whose resistance falls in the light and increases in the dark. As such they can easily be measured with the straightforward voltage divider circuit. This is the same principle we use to determine voltage drops in our circuit modelling.

A voltage divider circuit consists of both a known and unknown resistance which share the same source voltage (e.g. 5V DC) and which are tied to ground. The current flows through both resistors in proportion to their resistance, consequently if you were to measure the voltage drop across each resistor the amount would be related to the resistance as a total of all the resistance in the circuit.

Figure 3: Diagram illustrating construction of a voltage divider circuit.

This is useful to us because it is very easy to measure the voltage across each resistor using a microcontroller. From this it is then possible to work out the value of the resistor provided at least one of them is known. This gives us the resistance of the photoresistor which is in turn a measure of the light intensity falling upon it.

We found this system worked well for measuring light intensity, like the photodiode so we moved to seeing if we could measure the light intensity from an LED positioned at the same distance and with similar brightness to the system as it would be integrated into our components.

To do this we had the microcontroller blink an LED at a known frequency whilst measuring the light intensity (via voltage) using the system described above. In doing this we found we were able to observe changes in the resistance which are easily identifiable when visually looking at the data but which are difficult to identify algorithmically because of noise in the data which causes the threshold to for differentiating between the two states to change over time.

Figure 4: Graph of the voltage signal in light and dark conditions. Note that there exists periodic noise in both regions.

As we felt this was a promising approach we decided to try some signal processing algorithms to clean our signal in the hope that this would make it easier to extract the data we desired. We felt this was a sensible approach because on observing the data over prolonged periods of time we noticed that the noise was periodic, increasing or decreasing at a set interval. This we hoped would make it easy to identify and remove.

Our first task then was to identify the period of the noise, in other words its frequency. To do this we took a sample of the signal from the experiment above and performed frequency decomposition in MATLAB using the fast Fourier transform (FFT). By performing this decomposition, we found two peaks in our spectrogram, one corresponding to the frequency at which our LED was set to blink and the other, we assumed, to the frequency of the noise.

Figure 5: FFT Transform of the Output Voltage Signal.

We were able to identify that the noise has a frequency of approximately 0.2069Hz. You can see this by comparison with the sine wave of that frequency in figure 6.

Figure 7: Output Voltage Signal (Orange) and Sine Wave of Frequency 0.2069Hz (Blue).

Having identified the frequency of our noise we set out to filter it out. There are a number of different software filtering strategies. We investigated smoothing using various moving average algorithms and the related butterworth filter to create a software band stop or high pass filter.

Figure 8: Results of using a moving average (top) and butterworth filter (bottom) on our voltage signal. Noise still remains.

We also tried using alternative sampling frequencies, those higher than the noise frequency to see if this had any effect but due to the frequency being variable were unable to remove the noise sufficiently.

Figure 9: Signal (Blue) and decimated signal (orange) showing that noise remains.

Finally, we set out to identify the source of the noise itself in the hope that this would allow us to eliminate it. After conducting some research, we thought that one culprit could be the USB power source for our Arduino board. This is a source of noise as the reference voltage used by the Arduino to measure the voltage on the analog pins is the same as the power source. Thus, if the power source voltage varies then the reference voltage also changes as does the derived measurements. In our first attempt at rectifying this we switched the analog reference voltage from the power supply to the on-board 1V reference which should be less noisy. Unfortunately, this did not solve the issue.

The alternative would be to use an alternative 5V power source such as a USB battery pack. However, in our current scheme we were using USB serial as a way of reporting the light intensity so it is unavoidable that we would have the USB power plugged in. Given more time we may have been able to adapt the system to use an alternative power source and also use USB serial or some alternative reporting mechanism but we were unable to do so in the time we had available.