Jump to content

Using a low-cost spectrophotometer for accurate measurements of aquarium water chemistry


EMeyer

Recommended Posts

Hi all,

I want to share with you how I'm measuring water chemistry for my experiments at AquaBiomics. I've found an affordable instrument that in principle can measure any color-based test kit more precisely and objectively than the human eye. It cost me about $230, so while I won't say its cheap, I think its fair to say its within the budget of the a dedicated hobbyist.

The instrument I'm using is the generic "Model 721" widely available on Ebay and AliExpress. 

https://www.ebay.com/itm/Visible-Spectrophotometer-721-Lab-Equipment-350-1020nm-110V-tungsten-lamp/201962694258

For some reason every picture I've ever taken of mine is absurdly blurry

etZ1rFyJmpGDx3aX5bFtAkwvNwWvo7jn3rBqqjvW

Considering the source I suspect there may be substantial IP violations making this instrument so low priced. But I've worked extensively with several different lab-grade spectrophotometers in my research career. At a basic, functional level, this thing compares to the lab instruments. It has NO bells or whistles. No sipper, no automation, it doesnt even connect to a computer to output data (it has a digital readout, and you write down the number). But it appears to be a fully functional visible wavelength spec. 

So far I have used this to measure Ammonia, Nitrites, and Nitrates. But it should work for all the usual endpoint color-based tests. (In principle, you could do titrations too, but why bother? The precision of those tests is determined by the accuracy and size of the drops more than visual evaluation of the color)

Here I will share details of developing and using those tests. 

Ammonia

I've mostly worked with the Red Sea kit but have recently switched to API. I'll show those API results at the end of this section. 

The first step for any colorimetric (absorbance based) assay is to identify the wavelength of max absorbance. Make a standard solution of ammonia sulfate, run a test according to the instructions, and run another one on an ammonia-free solution (for the blank; I used NaCl at seawater equivelent concentrations). Then measure its absorbance at a range of wavelengths (blanking the instrument at each wavelength with the blank test). 

pubchart?oid=883850102&format=image

This is a sensible result - there is an obvious peak at 680 nm. I like sanity checking everything, including lab work. The solution is green, and 680 is red, we expect a green solution to absorb in the red. 

Next, I prepared a stock solution with a known concentration of ammonium sulfate using a precision lab-grade balance. I made a series of dilutions from this to prepare several tubes with known concentrations ranging from 0-2 ppm ammonia. These look like this

c2VzQQRkKAgMffkKI5kLiOa75NKB9i007PsCWJZw

Blanking the instrument on the 0 ppm solution, I read the absorbance of the others. This relationship is shown here

pubchart?oid=1200030518&format=image

 

This is a sensible result. The relationship is linear throughout this range of concentrations, and the intercept is nearly zero (i.e. when the concentration is zero, the absorbance is approximately zero). These are good features for a quantitative test. The coefficients for this test are: m=0.59, b=-0.02. 

So to use the test: I simply follow the instructions with the kit, then put the solution in a cuvette and read it on the spec. I use coefficients from the linear regression to calculate the concentration (sounds harder than it is). i.e. if Absorbance=0.5, I calculate concentration as

y = mx + b
x = (y-b)/m
x = (0.5 - (-0.02)) / 0.59
x = 0.95

(This is all easily handled in a Gsheet spreadsheet with little typing)

This has three major advantages over using my eyeballs.  

1. It's more objective and consistent. The lighting of the room, how much blue light my eyes have recently been exposed to, the amount of whiskey or coffee I've recently consumed... all of these are likely to influence my brain's subjective evaluation of a color. Not the spec. The spec is a sober and emotionless robot. Given the same solution, it will always give you the same number. 

2. Its more precise. The color scales provided with these tests have 6 or so levels (0, 0.25, 0.5, 1, etc.) A human reading the test has to match the color to one of these levels. So you have a precision of ~0.25. Or perhaps at most you allow for "this color is between those two colors", so you can get a precision of half that (~0.13). The spec can tell the difference between 0.102, versus 0.103, versus 0.104, etc. It reports 3 digits and based on repeated readings of the same solution I observe consistent readings to 3 decimal places. So this can detect smaller changes in the substance than reading the test by eye.

3. Its more sensitive. Look at that image. To my old-man eyes, E and F look identical. Honestly, so does D. Maybe a little tiny bit but I'm not sure. The spec is sure, though. Those are the 3 lowest points on the curve shown above. So this can detect lower levels of the substance than reading the test by eye. 

Complications

The ammonia test has an annoying complication. It works great in NaCl solutions but not as great in actual seawater. One of the reagents is a strong base, used to increase the pH for the reaction. In seawater, this leads to precipitation, or cloudiness (you see the same thing when you dose carbonate in your tank). Cloudiness interferes with the spec and leads to weird results.

I've been fixing this by putting the samples in the centrifuge for a few minutes before reading them. But this costs time and a disposable centrifuge tube. And few hobbyists have high-speed centrifuges in their fish rooms. I mean, I am a huge geek, but I dont have one at home either. So I recently developed a new tweak to fix this thats quick and easy. Acid. Add 7 drops of 2 M hydrochloric acid after allowing the color to develop. This clears up the cloudiness without any need for centrifugation, and the test remains linear. 

API test kit

This kit is cheaper, so I've recently switched after testing. It has similar properties to the Red Sea kit shown above (although the relationship is different because of the acidification step). I'm acidifying the tests before reading as described above to remove cloudiness. Here is the standard curve for this test; again, nice and linear throughout the range, with a low intercept

pubchart?oid=652909686&format=image

So thats what I'm using for ammonia from here on. The coefficients for this test are: m=0.29, b=-0.02.

Nitrites

I used the Red Sea test for this one initially, and have recently started exploring Seachem as an alternative. These data are for the Nitrites test. I'll show the same info as above, without all the text. 

I used sodium nitrite for the standard curve, prepared with an analytical balance (1 mg precision). The test has an optimum absorbance at 550 nm

pubchart?oid=216445837&format=image

The tests prepared for a standard curve from 0-2.5 ppm look like this. Check out those invisible colors at the low end.

p6QOTnvhPC2z16641NByht7dz3yrB92n-clUxray

Again the spec has no problem detecting them. Here is the standard curve -- the coefficients for this one are: m=0.25, b=-0.01. My only complaint about this test is that it maxes out the absorbance pretty low (~6 ppm) so different dilutions are required to measure higher values, which is a pain. Of course, its rare NO2 reaches anything higher than "undetectable" in a mature tank so a minor issue. 

 pubchart?oid=625981190&format=image

 

Nitrates

Finally NO3. The only complication here is that as far as I understand it, this test actually measures the sum of NO2 + NO3 -- it converts existing NO3 into NO2 then measures the sum of NO2 + NO3. So I run this test as instructed, using a standard curve as above, then subrtract the NO2 data

The absorbance spectrum matches NO2, as you would expect (since its actually measuring NO2). Peak at 550

pubchart?oid=1285367706&format=image

Tests prepared on a series of known concentrations (0-8 ppm) of sodium nitrate looked just like the NO2 tests above, except paler. The standard curve looks like this, with coefficients: m= 0.03, b = 0.00.

pubchart?oid=1389739517&format=image

 

----

So thats how I'm measuring water chemistry in the lab. I'll be adding other tests as time goes on. I'm especially curious to see how sensitive phosphate tests are using this instrument, since this is one of the few materials present at low levels where we really care about the concentration. 

  • Like 4
Link to comment
Share on other sites

6 hours ago, EMeyer said:

2. Its more precise. The color scales provided with these tests have 6 or so levels (0, 0.25, 0.5, 1, etc.) A human reading the test has to match the color to one of these levels. So you have a precision of ~0.25. Or perhaps at most you allow for "this color is between those two colors", so you can get a precision of half that (~0.13). The spec can tell the difference between 0.102, versus 0.103, versus 0.104, etc. It reports 3 digits and based on repeated readings of the same solution I observe consistent readings to 3 decimal places. So this can detect smaller changes in the substance than reading the test by eye.

This is one reason I tend to prefer titration tests but, obviously, this is an even better approach and once you have set up the curves it's pretty straight forward - assuming you have a spec of course 😀

Link to comment
Share on other sites

I was actually contemplating getting a spectrophotometer for this purpose myself, but since I mainly needed to use it for phosphates, calcium, magnesium, and some trace elements, I put it off because figuring out whether or not the spectrophotometer could detect various solutes/ions (and how to make it do so) was going to take too much time. 

Link to comment
Share on other sites

Just to be careful on the quality of your data.

Beer-Lambert's Equation does not have a y-intercept. 

You should always fix it to 0 in Excel. 

Image result for beer lambert's equation

The form is y=mx where y=A, m=epsilon*l and x=c. Epsilon is the slope because your cuvettes have a width of 1 cm.

On the low-level concentrations a y-intercept of non-zero, will demonstrate a deviation from the real concentration, which is the most common areas of measurement in aquariums.

Keep up the cool experiments, but be careful on your data. A b-value of -0.02 could represent 10-20% deviation on a concentration below 0.25 ppm.

Edited by milesmiles902
Link to comment
Share on other sites

You are right of course that in theory the intercept is zero. In theory there is no difference between practice and theory. In practice there is :)

Apologies if this appears argumentative, but in all absorbance or fluorescence based assays it is critical to consider the intercept. It is often not exactly zero for a variety of reasons. Not sure where this misunderstanding arose from. This is the case for literally every chemical assay I've ever worked with or published, e.g. Bradford assay for proteins or fluorometric dye-binding assays for DNA concentrations. 

Forcing the intercept to zero would be an error that any reviewer would rightly call us out on; you always have to report both slope and intercept. We report and include the intercept because it is often not exactly zero, and forcing it to zero would result in errors by changing the slope. 

But you are correct that the intercept should be very very close to zero as it is here. So in practice there is little to no difference between our positions, even if there is in theory.

Edited by EMeyer
Link to comment
Share on other sites

In my experience of being a PhD graduate student in physical chemistry, also publishing and specifically studying spectroscopy across many different types of the electromagnetic spectrum, along with how this equation was derived. 

Theory is what made good practice and good practice comes from accepting theory. 

Concentration within a solution is a linear process and because your dilutions or solution making was not accurate in all experiments to the significant figures specified. You either can't trust your data or have to add a standard deviation bar to your plot, which is the only way to accept this data. 

The standards across many fields have become lenient, but coming from the field of chemistry that defined and made this equation. 

It is required to either re-make your stock-solutions or make the y-intercept zero. We also teach this in general chemistry with similar spectrophotometers. 

I am positive that in the field of environmental chemistry, which is what you are achieving. They will do the same.

The difference between our arguments is accuracy, which is cool.

I love your work. Keep it up! I wish I had a spectrophotometer to do similar work.

 

Link to comment
Share on other sites

Rather than comparing credentials perhaps I can explain this better with data. I often find clarity in exploring data rather than verbal arguments. 

If the true b=0, there is no difference between your suggestion and the way I'm handling this. (subtracting zero is the same as not subtracting zero)

In the real world there is always measurement error, so the intercept is basically never zero. In these cases, the handling of the data matters. For an example, consider a linear relationship with m=6.12, b=-0.025, r2=0.999. Anyone would accept this is a good fit and useful for quantifying the concentration. 

If you attempt to back calculate the known concentrations from observed absorbance while ignoring the intercept, you'll make bigger errors than if you consider the intercept. 

You can easily demonstrate this yourself with some toy data. I've pasted some example data below if you'd care to explore this. In this example dataset, ignoring the intercept (your suggestion) leads to a 6% error at the low end and a 2% error at the high end. If you include the intercept you make <3% error at the low end and just under 2% error at the high end (overestimating it in both cases, since the intercept is negative in this example). The effects of ignoring intercepts are always most pronounced at the low end. 

(Fun debate but lets also keep in mind we are quibbling over 3% vs 6% errors while reading these things with human eyeballs will lead to probably 25% errors :) )

Example data for fun:
C		A
2		12
1.5		9.5
1		6.1
0.5		3.05
0.25	1.4
0.125	0.72
0		0

I'll be focusing on barbecuing and stuff like that today but always happy to discuss data analysis later! Have a good 4th,

-Eli

Edited by EMeyer
  • Like 1
Link to comment
Share on other sites

It was like trying to read another language [emoji53] lol. I'm glad we can have a civil debate on here though! Happy 4th everyone!
[emoji322][emoji312][emoji322][emoji322][emoji312][emoji322]

Sent from my BLU R1 HD using Tapatalk

  • Like 1
Link to comment
Share on other sites

3 hours ago, TheClark said:

Holy smokes, very cool and some deep stuff here! 

Could this spectrometer be used to analyze LED light spectrum?

Certain spectrophotometers could, but I believe the one in question here is one designed to test absorbance spectrum (aka what does so and so substance absorb?) as opposed to emission.

At least physically speaking, the spectrophotometer in question uses cuvettes that you need to insert into the machine, so I don’t believe you would be able to test an LED with it.

I’m sure if you were very determined though, you could get it to work haha.

  • Like 2
Link to comment
Share on other sites

47 minutes ago, LadAShark said:

Certain spectrophotometers could, but I believe the one in question here is one designed to test absorbance spectrum (aka what does so and so substance absorb?) as opposed to emission.

At least physically speaking, the spectrophotometer in question uses cuvettes that you need to insert into the machine, so I don’t believe you would be able to test an LED with it.

I’m sure if you were very determined though, you could get it to work haha.

You're right. He could do something fancy, such as not have the lamp on (cover the entrance with card stock) and shine the LED into the detector above the cuvette. If the detector becomes over-saturated with light, then hold the LEDs farther away. It probably would work with water in the cuvette. The LEDs have a sharp emission around limited wavelengths that water shouldn't absorb. Then, as stated earlier, can also be used for testing water samples.

All you need is the detector to do what you are saying. The tungsten-lamp is used to specify and emit wavelengths for wide-spectrums, similar to the LEDs, except LEDs are commonly a sharp spectrum for small-detection. I bet it would work with some straight-forward and non-destructive finagling. 

As said, the problem is emission vs absorption detecting. Adafruit has some wavelength and rgb value detectors, which can also be used for the emission and likely LEDs: https://www.adafruit.com/category/61

  • Like 1
Link to comment
Share on other sites

@TheClark the only question I would have is for @EMeyer

Does this detect the whole visible spectrum or select wavelengths?

pubchart?oid=883850102&format=image

I believe for LEDs you should find a spectrometer that scans/detects the entire spectrum at once to get a good profile of the LED, which I imagine you want it for and not specific wavelengths.

Edited by milesmiles902
  • Like 1
Link to comment
Share on other sites

9 hours ago, milesmiles902 said:

@TheClark the only question I would have is for @EMeyer

Does this detect the whole visible spectrum or select wavelengths?

pubchart?oid=883850102&format=image

I believe for LEDs you should find a spectrometer that scans/detects the entire spectrum at once to get a good profile of the LED, which I imagine you want it for and not specific wavelengths.

The product site says: “Wavelength range: 350-1020 nm.” It has all the various equipment specifications here:

http://vi.raptor.ebaydesc.com/ws/eBayISAPI.dll?ViewItemDescV4&item=201962694258&category=185256&pm=1&ds=0&t=1559592426000&ver=0&cspheader=1

 

8 hours ago, TheClark said:

Interesting!  I have not googled lately... but "back in the day" we were always trying to get our DIY LED spectrums to match T5s.  A spectrometer would have been nice, we just winged it with semi educated guesses!

 

It would be very difficult to ever get LEDs to match T5’s, as T5’s have a wide emission spectrum whereas each LED has a sharp tall peak. See those above spectrum graphs? Imagine LED’s as really sharp, tall, extremely narrow peaks. Whereas T5’s would likely display big hills if you will, not too tall, but very wide and sloping, though even that would change depending on the T5 make and model.

Edited by LadAShark
Link to comment
Share on other sites

5 hours ago, LadAShark said:

The product site says: “Wavelength range: 350-1020 nm.” It has all the various equipment specifications here:

http://vi.raptor.ebaydesc.com/ws/eBayISAPI.dll?ViewItemDescV4&item=201962694258&category=185256&pm=1&ds=0&t=1559592426000&ver=0&cspheader=1

 

It would be very difficult to ever get LEDs to match T5’s, as T5’s have a wide emission spectrum whereas each LED has a sharp tall ball. See those above spectrum graphs? Imagine LED’s as really sharp, tall, extremely narrow peaks. Whereas T5’s would likely display big hills if you will, not too tall, but very wide and sloping, though even that would change depending on the T5 make and model.

Right!  That was the working theory, so we tried to balance it out with a big mix of diodes.  Exactly why a spectrometer would be handy to test all of that first hand... But I am so outta date since the early DIY LED days.  Nowadays I just buy some Ocean Revives and the coral grows out of the tanks.  Success!  Who needs a spectrometer!!?  :)

 

  • Like 2
Link to comment
Share on other sites

2 hours ago, TheClark said:

Right!  That was the working theory, so we tried to balance it out with a big mix of diodes.  Exactly why a spectrometer would be handy to test all of that first hand... But I am so outta date since the early DIY LED days.  Nowadays I just buy some Ocean Revives and the coral grows out of the tanks.  Success!  Who needs a spectrometer!!?  :)

 

People who want to test their lights AND nutrients at the same time with one product, given they have the know-how 😉

Edited by LadAShark
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...