Determination of concentrations of three atmospheric gases through absorption of light in an integrating sphere

Research Group: Grace Curley, Josh Demant, and Meg Fairborn

Launch: Whitworth Spring 2022

''The goal of our project was to determine the concentrations of ozone and nitrogen dioxide compared to the altitude. In the lower atmosphere, where life exists, ozone is toxic and the result of pollution, but in the upper atmosphere, it is essential for blocking the harmful radiation from the sun. Nitrogen dioxide is another gas that makes up pollutants in the air; however, we are primarily measuring it because it absorbs much of the same light that ozone does. To measure these concentrations the project employed an integrating sphere with four different wavelengths of light (385 nm, 525 nm, 600 nm, 670 nm) and a phototransistor to measure how much light passes through the sphere. As the altitude of the pod increased, we anticipated that the ozone concentration would rise; therefore, the turbid media would absorb more light, and our readouts from the phototransistor would decrease. By observing at what factor the amount of light absorbed by the phototransistor decreases, we can determine the rate at which the concentration of ozone in the atmosphere is increasing. From our data, we were able to watch the ozone concentration in the atmosphere rise over time; unfortunately, the command module failed to transmit data, so we were unable to compare our concentration data to accurate altitude data. We can estimate the height based on flight time and ascent speed with an uncertainty of 1000 feet, but that is nowhere near as accurate as desired. Regardless, we still observed the change in ozone concentration as the pod ascends and mapped the relative comparisons between ozone and nitrogen dioxide concentrations.''

Atmospheric Ozone
Ozone(O3) is a gaseous molecule made up of 3 oxygen atoms. It is found in the stratosphere and troposphere regions of Earth's atmosphere. It only makes up 0.00006% of the gases in our atmosphere but weighs approximately 3 billion metric tons. In the troposphere, where nearly all life exists on earth, about 10% of all atmospheric ozone is found. This ozone is called ground-level ozone, and it is very harmful to life. This ground-level ozone can lead to conditions like chronic bronchitis, asthma, emphysema, and overall damage to the lungs. It can also damage vegetation and cause mass die-off in crops by reducing growth and increasing disease. On the contrary, ozone in the stratosphere gives the ability for life as we know it. This "ozone layer" absorbs approximately 98% of all the Sun's harmful ultraviolet waves, which protects life from disastrous exposure to these dangerous waves. Most of this ozone originates from emissions; cars, factories, power plants, and other industrial processes all produce it. Unfortunately, in the last 100 years, the ozone layer has been depleting due to human pollution consisting of gaseous chlorine and bromine atoms which react with ozone and break it apart, effectively destroying it. Ironically, this pollution causes ozone to form in the troposphere, which is harmful to life. Environmental protection measures are being taken to prevent this troublesome depletion and creation cycle; regardless, to understand if these measures are working, we must be able to identify ozone content in the atmosphere. That is the goal of this project.

Measurement of Ozone
Measurement of ozone in the atmosphere can be done via local and remote methods. Remote measurements take place far from the sensors and occur by detection of ozone's absorption of UV rays. These methods consist of firing lasers and measuring absorption, detecting changes in UV absorption from the sun, detecting absorption of visible light, and detecting its emissions of microwave or infrared radiation. Local measurements require the gas to be drawn directly into an instrument to measure the absorption of ultraviolet light, the electrical current, or the light produced in a chemical reaction involving ozone. Our project seeks to do this local measurement via a high-altitude weather balloon in an inexpensive manner. Our instrument used for measuring is known as an integrating sphere. This sphere is very reflective and works by reflecting light around the sphere to maximize the distance the light travels before it reaches the phototransistor elsewhere in the sphere. Using this sphere, we can measure light absorption in a process known as absorption spectroscopy; this is measuring the absorption of radiation as a function of wavelength. This data can be used to determine the concentration of ozone in the atmosphere.

Even though ozone is not the only gas in the atmosphere, it is necessary to examine the properties of the other gases. Of these gases, only nitrogen dioxide (NO2) seems likely to cause major interference in the accurate collection of ozone concentration data through absorption spectroscopy. This is because nitrogen dioxide's absorption spectrum covers much of the same range as ozone's (see Figure 1 and Figure 2 ). Thus, the concentration of NO2 in the atmosphere must also be recorded, so its concentration and that of ozone can be separated and more accurately analyzed and determined.

Mechanical Design
The interior of our pod was designed to house an integrating sphere, fans to circulate air through the sphere, and the required electronic parts to operate these systems. The design also employed a battery mount to keep the 9-volt batteries secure and prevent them from flying all over the pod and damaging essential systems. The architecture of our sphere was largely derived from work done by previous groups, most notably the 2017 group, though we made some adjustments to their design.

Integrating Sphere
Our integrating sphere was made with two Fat Daddio 4” Cake Pans that we purchased from Amazon. We drilled holes into it and painted it white with multiple coats of spray paint. On the upper hemisphere of the sphere, a 1/4" diameter hole was drilled directly at the top of the pan where the LEDs would attach via a PVC pipe cap. Another hole with a diameter of 7/32" was drilled midway above the rim of the pan for the phototransistor. The lower hemisphere had two 1/4" holes drilled into it; these were made in such a way that we could attach our 3D printed fan mounts to the pod and place them flush with the walls of our pod. We then took a 1" PVC pipe cap, drilled four 7/32" diameter holes into the top of the cap, and inserted our four LEDs using a white epoxy. The LEDs(385nm, 525nm, 600nm, and 670nm) had wavelengths firmly in the different sections of absorption spectra for ozone and nitrogen dioxide. Similarly, a TEPT5600 phototransistor and the 3D printed fan mounts were secured directly into the sphere with silicon. The PVC cap with the lights was epoxied to the upper hemisphere, and the two hemispheres were joined together. This method of securing the lights to the sphere was conducive for two reasons. First, it reduced the number of holes drilled into the hemispheres. That would ultimately ruin its reflectivity and reduce the reflected light our phototransistor could absorb. Secondly, it acted like a different form of a baffle in the integrating sphere. A baffle is simply a wedge between the light that inputs directly into the sphere and the phototransistor to absorb light. It exists to prevent light from going straight into the detector rather than reflecting around the sphere through the light-absorbing gases. The longer the light travels through the sphere the more light can be absorbed. From this, we get more accurate data. Finally, once all of this worked, we wrapped all of the epoxied and silicone joints in electrical tape to ensure that no light from the environment could interfere with the LED light in our sphere. That was the key to the accuracy of the integrating sphere; the more exterior natural light that entered our integrating sphere, the worse off our data would be. It would not take much light to ruin the data, so total darkness within the integrating sphere was essential for our project. This integrating sphere design would accomplish our ultimate goal of generating a way to measure light absorption by the gases present in the sphere as it rises into the stratosphere in the most accurate way possible.

Fans




A system of two fans was employed to generate air circulation through the pod and create an interchange of atmosphere that continually replaces the air molecules in the sphere. That was required because without some form of interchange the air would become trapped in the sphere, and we would get practically constant data (with some noise) because the same air would be absorbing the same amount of light. The fans, one in each direction, circulate air through the sphere to constantly replace it and keep it consistent with the surrounding air. To attach these fans to the pod, we designed a fan mount in SolidWorks, 3D printed it and inserted Brushless DC computer fans into these mounts. Not only did these fan mounts funnel air through the sphere, but they were also our best method of securing the sphere to the inside of the pod. The fan mounts attached to the sphere fit neatly into the corner of our pod. Holes were then cut into the walls of our pod at the location of the fan mounts. That was done to allow for the movement of air between the atmosphere and our sphere.

Here are the STL files for the fan mount cap and base SolidWorks drawings:





Securing the Pod
With the integrating sphere assembled, the circuit board constructed, the fan mount circuit completed, and the flight computer all hooked up, we began securing everything into the pod. Because of the orientation and size of the integrating sphere, the first step was to make a cutout of the wall to fit the sphere and PVC cap. We wanted to be sure not to snap any of the wires. With the sphere fit into the pod, we had to conform the other hardware around it. That involved a lot of zip ties and silicone. For the flight computer, breadboard, and fan circuit board, we poked holes through the side of the pod and ran zip ties through the whole and around the hardware to secure it in place to the wall of the pod. Along with using silicone to attach the fan mounts to the walls to secure the sphere, we also ran zip ties around it to hold it in place. Another major concern was securing the batteries to prevent them from flying around the pod. To accomplish this, we designed a battery mount in SolidWorks and 3D printed it; we then used silicone to attach it to the pod base and tied it to the side with a zip tie. The mount was designed with just enough tolerance so that the batteries could barely slide in and therefore were tight enough in the mount that they would not move around or slide out of it in flight. The final step was to cut out some foam from the lid so that it would fit firmly on top of the pod. With everything secure, a shake test was conducted that found no moving parts, so the pod was good to launch.

The STL file for the battery mount drawn in SolidWorks:

Electrical Design
Because our pod relies heavily on the collection of data from electric components, our pod required two circuits – one for the fans and one for the LEDs and phototransistor.

Fan Circuit
We modified a fan circuit created by the 2018 group. The two fans were connected in parallel to a voltage regulator that took the voltage from a standard 9V battery and converted it to the 5V required by the fans. This circuit was separated from the LEDs and the phototransistor to reduce electrical noise and improve the organization of the pod interior.



LED and Phototransistor Circuit
The major circuit required by this project was a circuit that blinked the LEDs and sent data about their brightness to our pod’s microcontroller. In this circuit, we used a single breadboard. The lower half was dedicated to blinking the four LEDs while the upper half dealt with sending data from the phototransistor to the microcontroller. Because the microcontroller produced a different voltage than was required by the LEDs, the left power strip was dedicated to the 5V power needed by the LEDs, while the 3.3V from the microcontroller was routed to the right power strip. Additionally, the two ground strips on the board were connected so that the board had a common ground. On the upper half of the board, a TS27L2IN operational amplifier was connected to the phototransistor to convert its signal to something that was more easily readable by the microcontroller. The operational amplifier boosted the signal produced by the phototransistor and provided a connection between it and the microcontroller. Furthermore, the operational amplifier was connected to the 3.3V power produced by the microcontroller and provided power to the phototransistor. Near the midsection of the board, a circuit, much like the one on the fan board, took the power from a 9V battery and converted it to 5V. That voltage was routed to the left power strip to power the LEDs. At the end of the board, the four nearly identical circuits connected the four LEDs to the microcontroller so they could be programmed to flash in a sequence. Because we wanted the PCB to be relatively easy to remove from the pod and work on, we soldered long wires onto the legs of the LEDs, with black ground wires and power wires that corresponded with the color of light produced by the LED: the 670nm LED was red, the 600nm LED was yellow, the 525nm LED was green, and the 385nm LED was blue. The LEDs were connected to the ground strip and BS170 MOSFET transistor, which allowed them to be controlled by the microcontroller indirectly because they required more current than could be provided directly from the microcontroller. Additionally, a resistor was placed between the power strip and each LED to provide it with the correct voltage and amount of current to prevent it from burning out. When we looked at what resistors we needed for each LED to work with the voltage we wanted to use, factors we considered included the current, the voltage to get the LED to turn on, and the powering voltage. During the testing and calibration stage, we determined the precise resistors each LED required.

For the LED600L and the LED670L we know that the max current both of them can take is 75mA and so that we do not burn the light out, we wanted to use just 80% of the max current which we found to be 60mA for these two LEDs. For the LED385L and the LED525L, we know that their max current is 30mA, and 80% of that is 24mA. From there, we used the equation (input/powering voltage)-(LED voltage)-(80% of LED current)(R)=0. R is the resistance in ohms that we need. We plugged in each value and solved for the resistor. Then we wanted to size up when we did not have the proper resistor, so we decided to look at parallel and series circuits. For the LED600L, we were able to use an exactly 47ohm resistor. For the LED670L we used a 47ohm and a 10ohm resistor and connected them in series. For the LED385L we used two 47ohm resistors connected in parallel and then another 47ohm resistor connected in series following the parallel connection. Lastly, for the LED525L, we decided to use just a 100ohm resistor. These decisions were each made because we wanted to limit the number of resistors we had to use and also effectively arrange them on the breadboard.

main.cpp
This is the code used for blinking the LEDs, logging data to the SD card, and transmitting data to the command module. It flashes the red LED connected to pin 16 first and collects and averages 50 measurements of light. It then transmits this data to the command module and saves it to the SD card before going to the next LED. To see the code in its entirety, click "Expand".

mbed_app.json
This file needs to be included in the main folder to integrate the code with the mbed.

Testing LEDs and Phototransistor
To test the LEDs and phototransistor, we began by assembling a simple circuit on a breadboard. It possessed an LED and its corresponding resistor attached to a power supply set to 5V on one side of a breadboard. Then we began by simply turning on the power to determine whether or not the LED would turn on.

Next, a circuit was assembled to test the phototransistor- determining its minimum and maximum values and verifying the accompanying code for the MBED. As pictured above, the phototransistor was powered by the MBED's output voltage and was connected to a TS27L2IN operational amplifier. It is important to note the phototransistor pictured in the circuit above was exchanged for a different one; however, they were tested with the same circuit. This circuit was based on Dr. Larkin's "Detecting Light with a Phototransistor" project and is a transimpedance amplifier that transformed current into voltages that could be read and interpreted by the MBED. The code from the aforementioned project was adapted slightly and used to determine the approximate range of values the phototransistor would produce.

Knowing that both the LEDs worked and the phototransistor could detect light, the next step was to step up a circuit to blink an LED. A relatively inexpensive LED from an Embedded Systems Lab kit was placed in a circuit with a BS170 MOSFET transistor. The MBED could not directly power the LEDs because they required 5.0V and the MBED only produced 3.3V, so it was necessary to control them indirectly. For this the BS170's source pin was connected to the ground, its gate to pin5 on the MBED, and we connected an LED in series with a 330Ω resistor directly to the Vout pin of the MBED with the drain pin. In the above diagram, the red wire goes to power, the blue to pin 5, and the black to ground. Testing a simplified version of the program we hoped to use to blink the LEDs, we discovered the LED blinked once every second as expected.

Finally, all these components were combined on a single breadboard, with BS170 transistors connected to the actual LEDs. The LEDs were attached inside the PVC cap, and the code was uploaded to ensure they would blink as expected before attaching them to the integrating sphere. Once it had been verified that they worked, the cap was taped onto the integrating sphere, and baseline values were recorded for the different LEDs; this was done to ensure that their values were between the maximum and minimum values detected and transmitted by the phototransistor. At this point, some resistor values were adjusted on the circuit to ensure that the red (670 nm) LED did not transmit the maximum value while keeping the blue (385 nm) LED's values above the minimum. Once the resistors were finalized, the sphere was fully assembled. Then data from each of the LEDs' lab readouts was recorded for later comparison with the data collected from the launch.

Fan Circuit and System Testing
Before the launch, we needed to evaluate our fan circuit and the system with the fans inside the mounts to make sure everything worked properly. To test that, we connected our circuit to a power supply via the battery ports that would later be connected to a 9-volt battery in flight. We ran 9 volts through the circuit and identified through both sound and sight that both fans were running and would continue to do so as time progressed. When validating the fan circuit to confirm it was operational, we ran into some issues with the fans themselves. Because of the way they were originally inserted into the fan mounts and how tight the fit was(for airtightness), the wires got kinked. That caused them to snap at the intersection between the circuit board on the fan and the wires. Initially, we attempted to solder the wires back together; however, that failed, so we resorted to getting new fans and changing the way we inserted the fans to prevent the sharp corner in the wire. With this fix, we successfully got the fan circuit running. The only other process that needed to be "calibrated" once the pod was fully assembled was verifying that there was no tape, silicon, or any other material blocking the fan from spinning. That originally was not the case, but after some minor adjustments, the fan circuit was validated to success.

Ozone Absorption Testing




To test the efficacy of our integrating sphere design and the code running the flashing LEDs, we intended to test our system in an ozone tank. From this, we could receive known levels of ozone and then determine the outputted values of the phototransistor for each LED based on the ozone concentration in the tank. Whitworth had a pre-existing ozone tank; however, the last time of use resulted in broken and missing pieces from the tank. The fans and required circuit still worked, and the seal on the lid seemed to be fine, but one of the funnels had snapped, and there was no way of attaching the ozone generator to the tank itself. To fix these problems a funnel was drawn in SolidWorks, 3D printed, and attached to the tank lid to successfully transport ozone into the tank. To connect the ozone generator to the tank through the funnels, we used 1/2" diameter silicon tubing with 1/2" diameter brass 90° elbow fittings and hose clamps to secure the ozone generator. We also found a previously built stand(by an unknown constructor) for the ozone generator that we placed the generator on top of with a slight height modification using a short, standard 2" x 6". Finally, everything seemed to be working, so we charged and placed the A-22 Ozone Sensor from Eco-Sensors into the pod and plugged it into a computer. We received a code from Dr. Larkin that would store and plot the data from the ozone sensor because the code that came with the sensor was no longer working. Unfortunately, we discovered the battery on the sensor could hold no charge. The last fix to the ozone tank was drilling a hole through the lid to allow the ozone detector's power cord to run out so it could remain charging through the testing process. We then used silicon to seal the hole around the wire. Unfortunately, after all of this work, we experienced too many malfunctions in our program and our circuit design and ran out of time to use the ozone tank in testing; however, for following groups in future years, the ozone tank should be ready for use in validation and calibration.

STL file of the drawn funnel for the ozone tank:

Link to the code for pulling data from the A-22 Ozone Sensor: https://github.com/WhitNearSpace/A22_Ozone_Reader

Data and Analysis
We selected our LEDs so that two of them (the 385 nm and the 525 nm LEDs) would mainly measure the concentration of NO2. The other two LEDs (the 600 nm and the 670 nm) would have less interference from the presence of NO2, so they could be used to determine the concentration of O3.

By analyzing the absorption charts for ozone and nitrogen dioxide, we approximated the ratios of light absorbed by each gas. We expected that the red (670 nm) LED best described the concentration of ozone in the atmosphere because this wavelength of light is near the peak of ozone's absorption spectrum while falling near the tail of nitrogen dioxide's absorption spectrum. Additionally, we believed the yellow (600 nm) LED would express traits characteristic of both the concentrations of NO2 and O3, as it is more firmly on nitrogen dioxide's spectrum than the 670 nm LED is, but it is also approximately at the peak of ozone's absorption spectrum. The green (525 nm) and blue (385 nm) LEDs were there primarily to collect data on the concentration of NO2, as nitrogen dioxide overall tends to absorb light to a greater extent than ozone does.

The transmittance was determined for each LED by subtracting the value the phototransistor returns in the presence of no light (VN) from the experimentally determined value at a time (V), and then dividing this by the maximum recorded value for the LED (V0) minus VN. These transmittances were then graphed over time for each LED and used to determine the measured absorbances of each LED over time.

\begin{gather*} T = \frac{V - V_N}{V_0 - V_N} \end{gather*}

\begin{gather*} A = -log(T) \end{gather*}

Looking at our graph (Fig. 14), it seems to follow the trends much as we expected. The green and blue curves have a very similar shape, and the yellow curve appears to be a mix of the red curve with the other two. The red LED's curve slightly resembles the shape of the other curves (as it is comprised of approximately a one-to-one ratio of light absorbed by ozone and by nitrogen dioxide), but one can see that its shape is quite distinct from that of the green and blue curves. In Figure 14, it appears that between 6500 seconds and 7500 seconds the most ozone was encountered and absorbed.

By analyzing the graphs of the absorption spectra in the background section of our Wiki, we estimated the ratios of ozone and nitrogen dioxide that would absorb different wavelengths of light.

\begin{gather*} A_{385} = c_{O_3} + 100,000c_{NO_2} \end{gather*}

\begin{gather*} A_{525} = 11c_{O_3} + 1500c_{NO_2} \end{gather*}

\begin{gather*} A_{600} = c_{O_3} + 5c_{NO_2} \end{gather*}

\begin{gather*} A_{670} = c_{O_3} + c_{NO_2} \end{gather*}

Using the data we found and the relative absorbances we calculated, we used a Colab file created by Dr. Larkin (Two Gas Absorbance Analysis 2022 - Colab) to input our data and determine the relative concentrations of ozone and nitrogen dioxide over time. The program fits values for cO 3 and cNO 2 using the above equations and the actual experimental data we collected. The program consistently found concentrations that fit the 385nm, 525nm, and 670nm LEDs' data closely, but often the program did not fit the 600nm LED's data nearly as well.

Lamentably, this semester the Command Module was unable to connect with any of the pods on the flight, so we do not have accurate altitude data. We were counting on the Command Module's time data synching with our time to ensure an accurate altitude at each time. But, using the Stabilization Group's data, we could estimate the approximate altitude the balloon reached. Based on the time between launch and the balloon popping and an average ascent rate of 1000 feet per minute, we estimate that the flight climbed to an altitude of 77650 ±10% feet. While we did not record the precise time we turned our pod on, we believe we turned it on approximately 22 minutes before launch. According to this estimate, it began its ascent at around 1300 seconds. Thus, it reached its maximum height at about 6000s. Unfortunately, this is a rough estimate, and there is a high level of uncertainty surrounding it.

Furthermore, due to the time constraints and our inability to calibrate our integrating sphere in the ozone tank, we possessed no baseline data to compare our data. Nor could not find any data with which to compare our findings; so regrettably, our data is inconclusive along the lines of absolute readings of ozone and nitrogen dioxide concentrations in our atmosphere.

Conclusion
Overall, the experiment was moderately successful. We were able to obtain and graph data on the relative concentrations of NO2 and O3, though our findings were inconclusive because we had no data for comparison as afore mentioned.

Additionally, there were a variety of factors that may have influenced our data. These included the fact our fans drained their battery before the flight was complete and we are unsure of when that occured, and that our circuit likely had more noise than we intended because we were not able to amplify our results as we originally intended. Thus our data had a greater margin of error. Moreover, the equations derived to relate the absorption of nitrogen dioxide and ozone were based on estimates from the graphs of their respective absorption spectra and not concrete equations. Especially with the scaling of the graphs, there was another element that introduced a margin of error. Furthermore, we were unable to calibrate our entire integrating sphere in the ozone tank due to time constraints. Having calibrated our sphere would have given us increased accuracy in interpreting our results.

Future groups may want to consider either starting with the integrating sphere we designed this semester or building their spheres early on so they can dedicate more time to creating the circuit for gathering and amplifying their data. Preferably, the sphere would be entirely constructed before halfway to the launch date to ensure leaving ample time to calibrate and validate. Other improvements could include testing the fan circuit to see how long the fans run for and adjusting times accordingly, including the second amplifier in circuit to reduce noise, and using an actual printed circuit board to reduce issues with connection. Additionally, the next group should spend time determining how they will interpret their data before launch. They could also figure out some failsafe for either recording altitude or at the very least recording the precise time they turned their pod on so that they can make more accurate predictions about height over time.