A Far Red Bacteria Incubator

A Far Red Bacteria Incubator

Last summer, a good friend of mine from the Biochem department approached me for some help. He was conducting some research that involved studying the response of certain bacteria to various level of Far Red light. They needed a setup where one could embed multiple test tubes, each exposed to a different intensity of light.

The electronics I felt was the easy part, and it was the actual design of the incubator that was alluding me. I wanted to design something minimal but mass reproducible if required. At first I thought I could laser cut, glue and paint a stacked tray like arrangement. But again, this was not too elegant as it would involve forming multiple parts together. It then occurred to me that almost all University labs have access to 3D printers. Using one would also mean I could print the whole fixture in a few parts!

So I sat down and thought of a design and eventually settled with this:


The base accepts a custom PCB that hosts the various LED and circuitry. The whole incubator can be printed as 2 parts. I broke it into 3 because my printer is rather small.

The circuit was a simple string of LED controllers with 10 turn pots for simple control (i was asked to keep it simple and add the pots as opposed to some fancy digital control)


Finally after hours and hours of printing, the finished product looked rather nice:



3 Phase WiFi Smart Meter

3 Phase WiFi Smart Meter

Back in 2015, after completing my first year of EEE at Imperial College, my tutor offered an interesting research opportunity. The project was to design an affordable but capable 3 Phase Power Meter. The meter was to be able to work in a sort of swarm/network and communicate wirelessly to a central server.

The idea behind the meter was to be able to perform thorough analysis on various loads/points on the grid.  After much deliberation, I came up with a scheme where 3 synchronised ADC’s (1 per phase) sampled the voltage and current and dumped the samples onto a fairly capable DSP. The DSP would them communicate with an on-board ESP8266 which would finally send that data to a server.

The meter itself also had the capability of displaying the data on a LCD, as it had an onboard DSP you could even display a split screen between FFT and time domain plots!

The ADC sample at 8KHz and output 24 bit words.

photo (3).jpg
The assembled board
photo (5).jpg
FFT and Time Domain view of an input signal
Experimenting with Directional Couplers

Experimenting with Directional Couplers

Recently, I have been obsessed with homebrewing  RF/microwave test equipment. There is something so enthralling about building something that would help you build something else.

Perhaps the most important RF instrument is the Vector Network Analyser. As the name suggests, a VNA can characterise a DUT. This is done in the form of Scattering Parameters. For a 2 port device there are:

Image result for S parameters
source: http://edadocs.software.keysight.com/display/sv201007/Theory+of+Operation

More on this later, in the VNA build posts. For now we focus on measuring reflected power or S11/S22. How exactly, does one measure these? Thinking about a general transmission line, we know at any given moment there is a forward and reflected wave travelling, we need a device that only measures/responds to the reflected wave. As usual, there are many ways to do this, but the result is a device typically called a directional coupler. For example, a micro strip approach would consist of 2 coupled lines:


Such a device is only really suitable for high frequency (>few GHz), and requires careful construction using specialised PCB laminates. Another, more broadband approach (suited all the way down to DC) is to employ a standard Wheatstone bridge:

Source: Agilent 

Although the “mechanism” for detecting the reflected wave is totally different, the detector output is still proportional to the DUTs reflection coefficient as required. All we are simply doing here is measuring how well our DUT input impedance matches our reference impedance (usually 50 Ohms). As the bridge only consists of resistors, we can expect a very broadband device. However, this is not always the case; if we observe the circuit closely, we can see that the detector is port is not ground referenced, i.e the detector must be able to make differential measurements. This is obviously not what typical spectrum analysers or RF power meters can do, as there inputs are ground referenced. So to make single ended measurements we must employ some kind of single ended to differential converter. The simplest approach uses a passive balun using a Transmission Line Transformer. However, if this were to be embedded in some RF instrument, we could actually just rely on the fact that most modern RF IC’s such as mixers, ADC’s have differential inputs to begin with, so we can interface them to the bridge directly using some conditioning circuitry of course.

Anyhow, as a simple test, I built one and milled the PCB in house:


Two of the resistors shown previously, are not in the schematic above because they represent our DUT (on the OUT port) and some LOAD standard/reference (REF port).

This is what the board looks like after assembly:


Now to characterise the directional coupler, we must compare it to an ideal directional coupler. What would an ideal directional coupler produce at the detector port when terminated into a perfect 50 Ohm load? Zero ofcourse, as it there will be no reflection present. However, this is obviously not the case with real world directional couplers, for various reasons. For our topology the biggest non-ideality is the performance of the balun: It is not a perfect single ended to differential converter and presents some phase and amplitude errors, i.e the differential outputs are not perfectly balanced. Furthermore, the the return loss on the OUT port is also far from perfect, specially due to my DIY fabrication process. What all this means is finite Directivity – a figure of merit for directional couplers. In summary, directivty represents the bogus reflection present even when the DUT is a perfect 50 Ohm, we can think of this as fundamental limit on return loss measurements that we can make. As an extreme case, imagine our DUT has a return loss of 40dB while our directivity is mere 20dB. Using the coupler in such an instance means we incorrectly measure the DUT return loss as 20dB. Generally speaking, we can only measure DUT return loss upto a few dB below the bridge directivity. So the best way of thinking about directivty is simply the Dynamic Range of return loss measurements. 

The DC shown above is still under improvement. As it stands directivity is around 21dB from 100 MHz upto about 800 MHz. Not suitable for the 3GHz VNA im designing, but a step in the right direction. Keep an eye on this post for updates.