Quantum Interactive
QOOOL Kit DIY Quenching Experiment
In this simple example, we want to show you how to use the QOOOL Kit DIY to build a simple, microwave-free sensor setup with the senseBox that makes magnetic field changes visible. In addition to the senseBox, we use an OLED display to show measured values, a green LED, a transistor, various resistors, Blockly, and some 3D-printed parts designed in TinkerCAD.
The Idea
The green LED of the QOOOL Kit DIY optically excites the diamond, and the photodiode with a color filter reads the intensity of the diamond's fluorescence, i.e., the red light emitted by the diamond when excited. The LED must be powered, and the photocurrent from the photodiode must be measured. The digitization of the photocurrent is done by measuring a voltage drop across a resistor, and this voltage is digitized by the analog-to-digital converter (ADC) of the senseBox. Another green LED serves as an indicator that a magnetic field change has been detected, and the corresponding measured values are displayed on the OLED display. The basic wiring on the senseBox breadboard was created with TinkerCAD:
The corresponding circuit diagram looks like this:
Function – Design of the Excitation Circuit:
Calculation of LED resistor R1: About 3.2 V drops across the LED at 30 mA (you get this from the datasheet, where you usually find a diagram or a table value). These 3.2 V must be subtracted from 5 V. Thus, 1.8 V drops across the resistor. According to Ohm's law, the resistance value is the voltage across the resistor divided by the current flowing through it.
So, 1.8 V divided by 30 mA gives 60 Ω, the next standard value is 62 Ω. In fact, the BC547 transistor also drops a maximum of 0.1 V, but this is negligible for this calculation.
The transistor amplifies the current flowing into its base (the middle connection of the vertical line in the circuit symbol) by a factor known as current gain "hfe." If you want to use it as a switch, the switched current in the collector (top connection) must not be greater than the base current multiplied by the current gain. The base current is calculated from the voltage at the digital output of the senseBox MCU (i.e., 3.3 V) and the base resistor R2. But be careful, the senseBox MCU has a 330 Ω resistor at its outputs (see https://github.com/watterott/senseBox-MCU/blob/master/hardware/senseBox-MCU_v15.pdf, Sheet 3, R26…R31), which must be added to the 470 Ω of R2. So, we get a base resistance of 800 Ω. Also, note that there is a diode voltage drop of 0.7 V between base and emitter (the connection with the arrow, which indicates a diode). So, we subtract 0.7 V from 3.3 V and get 2.6 V. Divided by the 800 Ω (Ohm's law again), this gives 3.25 mA. Thus, even the lowest current gain class "A" with hfe greater than 110 for the BC547 (see datasheet) is easily sufficient to switch the 30 mA. The Blockly program now only needs to set output C5 to "On" (for an analog output, that would be 255 counts).
Function – Measuring the Photodiode Current and Indicator LED:
The readout photodiode generates a light-dependent photocurrent, which is converted into a voltage by resistor R3. This voltage is converted by the analog-to-digital converter (ADC) of the senseBox MCU into a number, which can then be read and further processed by the Blockly program. R3 can be chosen between about 330 kΩ and 1 MΩ; we have had good experiences with 680 kΩ. The read value should be as large as possible but still leave some headroom below the ADC upper limit of 1023; values in the range of 800 to 900 seem favorable.
To avoid reacting to the green light of the excitation LED and only respond to the red fluorescence light of the micro-NV diamond, a red color filter is attached to the photodiode.
In the presence of an external magnetic field, the micro-NV diamond glows less brightly—the stronger the magnetic field, the less it glows. Therefore, the Blockly program is designed to respond to changes in brightness; if it falls below a threshold, the green indicator LED (LED2) is switched on.
You should never operate an LED without a series resistor (or current source), which is why a standard 470 Ω resistor is provided in the TinkerCAD-Arduino wiring. In the circuit diagram for LED2, this is missing because the senseBox MCU already has the 330 Ω resistors at its outputs. Thus, the LED has a 330 Ω series resistor. Program "QuenchOnOffCase" in senseBox Blockly:
Programming the senseBox is done via Blockly. The Blockly program for the experiment, with explanations, is shown below:
The Experimental Setup:
Bend the excitation LED over the readout photodiode so that both are as centered as possible, and the LED can shine through the micro-NV diamond (small opening in the flex cable of the resonator) onto the photodiode. The excitation LED runs at maximum brightness at about 30 mA. The OLED display is connected to the appropriate port of the senseBox.
If you build and operate this and bring a magnet close, you will find that the sensor reacts not only to changes in the magnetic field but also to changes in ambient light, especially if it suddenly gets darker.
You could measure the ambient light and take its influence into account in the Blockly program. The ambient light sensors included with the senseBox EDU are suitable for this. However, the simplest solution is to simply shield the ambient light. For this purpose, a housing was designed in TinkerCAD, which we call QOOOLBrick, for the quantum sensor, which can be 3D printed:
Printed, the base with photodiode looks like this. The photodiode is inserted into the breadboard through the base of the housing:
Then the excitation LED with resonator and microdiamond is mounted:
Finally, the lid is put on:
This protects the setup from stray light.
If you now bring a magnet close, the quantum sensor detects the magnetic field, the indicator LED lights up green, and the corresponding measured values are displayed on the OLED display:
Additionally, the averaged value of the ADC voltage (the large upper value on the OLED display) is sent to the PC via the USB cable and can be further processed there.