DIY Automated Colorimetric Alkalinity Tester

babrooks

New Member
View Badges
Joined
Feb 28, 2020
Messages
22
Reaction score
43
Rating - 0%
0   0   0
Here is my take on the DIY automated alk tester. Most of the other builds I have read about use the acid titration method with an electronic Ph probe. That approach has the virtue of simplicity but it requires occasional recalibration. I decided to try to implement a colorimetric version in the style of the Hanna checker, in the hopes that it will require less fiddling once I get it up and running. Here is what I came up with:
1635704162424.png

I built it inside of an old PC case that I had hanging around. Bottom left is the ATX-style PSU. On the right are the four peristaltic pumps: Drain, sample, reagent, and RODI (to wash out the cuvette). They are 3d printed from my own design that I have been using for a couple of years for auto water change and 2 part addition. I wrote about those in a separate thread. Top left is the control board. More on that in a minute. Bottom center is the flux capacitor. Here is a close up:
460D1674-25C6-4414-BE37-859E84FC668C_1_105_c.jpeg

Again, 3d printed from my own design. Here is the CAD picture which makes it a bit easier to see how it fits together, and with the cover off the cuvette:
alktester_withscale2.png

In the middle is a square cuvette with the bottom drilled out and a cut-off pipette tip jammed in. Here it is before I cut and glued the tip:
1635703890238.png

The cuvette is suspended on a 500g load cell that I got from Sparkfun (the horizontal bar of aluminum at the bottom). So, the idea is that all of the additions (sample, reagent, RODI) are measured by mass using the load cell. That way, I don't have to bother with calibrating the pumps, and I can even detect when there is an error (like a pump is running but the weight isn't changing). The sample/RODI/reagent lines are suspended above the cuvette, so they don't put any strain on the cell. There is some strain from the drain line and the wires, but this doesn't seem to affect the accuracy of the scale, which reads accurately to ~0.01g.

On one side of the cuvette, I have a 610nm LED which is soldered on to this little breakout board I had printed (nice excuse to use my DIY reflow oven!)
1635704046954.png

On the other side is a TSL2591 light sensor breakout that I got from Adafruit.

The test sequence is, roughly:
1. Drain RODI water that is left in the cuvette between tests.
2. Fill cuvette with sample to clean, then drain.
3. Fill cuvette with test sample.
4. Take first measurement.
5. Add reagent.
6. Mix sample and reagent by adding a bit more sample and running the drain pump forwards and backwards several times.
7. Take second measurement.
8. Drain sample and reagent.
9. Fill and drain several times with RODI. Leave the cuvette full of RODI.

The system is drawing sample directly from the tank and RODI from my top off bin, and the drain line connects to the drain for my AWC, so the only thing that has to be replaced is the reagent (which should last for about 120 tests, in theory).

Here is a close up of the electronics:
F1A20F06-C717-4AE2-BD53-DD5B776FCFC7_1_105_c.jpeg

Everything is being run by an Arduino Uno. There are 4x TMC2209 stepper motor drivers running the pumps, which the Uno communicates with over UART. The TMC2209's are on this little breakout board that I had printed:
1635704795453.png

There is a Sparkfun HX711 load cell amp for the weight measurements. Once the test is run, the Uno just sends the test result to an ESP-01 over serial. The ESP-01 is programmed to just listen for serial input, and when it receives it, send me the serial input in an email. (I found that this was easier than sending the email from the Uno, because I kept running out of variable memory on the Uno. I also thought about doing the whole project with an ESP board, but I couldn't get software serial to work, which I need for the stepper motor drivers.)

The system is a work in progress. I was able to make this calibration curve:
1635729931359.png

Blue are measurements and red are fitted values (ordinary least squares). Pretty close to linear.

I think this is a good proof of concept, but in all honesty, it struggles with reliability. I had to switch from 4mm to 3mm ID tubing to prevent air bubbles from forming in the lines. This seems especially important for the drain line, since it is used for mixing the sample and reagent (and I need to know that all of the liquid is back in the cuvette before I take a measurement). I keep getting air in the reagent lines, so still troubleshooting that. Some lubricant at the junctions between lines seems to help. I also had to move down to smaller aperture pipette tips. And I have made several changes along the way to the test procedure, e.g., rinsing out the sample line before taking the sample, washing the cuvette with sample rather than RODI, having the pumps pull back after the desired weight is reached to minimize drips, and a longer mixing cycle.

I do feel that it is getting more reliable, and will eventually be more reliable than manual testing. It will probably not be as accurate as commercial testers in some respects (e.g., I haven't used any optical filters on the sensor; the measurements are based on full spectrum readings). But it eliminates other sources of noise. I am pretty sure the load cell method will measure out sample and reagent more consistently than I do with a syringe (and use smaller quantities of each per test).

Anyhow, that is my project. Comments are welcome. I will post the openscad files for the cuvette holder on my thingiverse page soon, and happy to share the eagle-cad files for the boards and the Arduino code, in case anyone else wants to try to build this thing!
 
Last edited:

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,487
Reaction score
1,722
Location
United Kingdom
Rating - 0%
0   0   0
I hear you issues - faced them myself in my DIY Alk monitor build.. the drain line is the most important one - it needs to be able to drain your reaction chamber even if there is air in your line (or otherwise you risk overflowing your chamber)..

You need really good peri pump head - which will pump air if there is no water in the line, i.e. the pump tubing needs to be squeezed hard enough.

As for colourmetric version, it's interesting - however I think it's a suboptimal route. What reagents are you going to use to determine titration endpoint? 0.1N hydrochrloric acid is very cheap, you make make it multiple times cheaper if you buy undiluted acid and dilute it yourself. PH probe - is not expensive either and to be honest it does not need frequent recalibration as 0.1DKH precision is almost guaranteed..

Also with hydrochloric acid - you can discharge dirty water back into your tank without any issues, I am not sure if you can do that with coloured reagents..

I am not sure if I followed closely - is there a stirrer? You do need a magnetic stirrer irrespective of what type of test you use..

Anyway - following with interest, if you have questions, don't hesitate to reach out.
 
OP
OP
B

babrooks

New Member
View Badges
Joined
Feb 28, 2020
Messages
22
Reaction score
43
Rating - 0%
0   0   0
I hear you issues - faced them myself in my DIY Alk monitor build.. the drain line is the most important one - it needs to be able to drain your reaction chamber even if there is air in your line (or otherwise you risk overflowing your chamber)..

You need really good peri pump head - which will pump air if there is no water in the line, i.e. the pump tubing needs to be squeezed hard enough.

As for colourmetric version, it's interesting - however I think it's a suboptimal route. What reagents are you going to use to determine titration endpoint? 0.1N hydrochrloric acid is very cheap, you make make it multiple times cheaper if you buy undiluted acid and dilute it yourself. PH probe - is not expensive either and to be honest it does not need frequent recalibration as 0.1DKH precision is almost guaranteed..

Also with hydrochloric acid - you can discharge dirty water back into your tank without any issues, I am not sure if you can do that with coloured reagents..

I am not sure if I followed closely - is there a stirrer? You do need a magnetic stirrer irrespective of what type of test you use..

Anyway - following with interest, if you have questions, don't hesitate to reach out.
I just used a certain commercially available reagent :)

I think you could also use methyl orange which is pretty cheap. You’re right, it can’t be discharged back to the tank, which is why I have the separate drain line.

The test doesn’t use titration. You measure the change in light transmission through the sample before and after adding a reagent. You combine the reagent and the sample in a known ratio. The reagent changes color depending on the alkalinity, so the light transmission at specific wavelengths will change.

There’s no magnetic stirrer… I just run the drain pump in forward and then reverse several times to mix the sample and reagent. I thought about using a stirrer, but it would require a much more complicated system to move the sample back and forth to the mixer.
 

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,487
Reaction score
1,722
Location
United Kingdom
Rating - 0%
0   0   0
I just used a certain commercially available reagent :)

I think you could also use methyl orange which is pretty cheap. You’re right, it can’t be discharged back to the tank, which is why I have the separate drain line.

The test doesn’t use titration. You measure the change in light transmission through the sample before and after adding a reagent. You combine the reagent and the sample in a known ratio. The reagent changes color depending on the alkalinity, so the light transmission at specific wavelengths will change.

There’s no magnetic stirrer… I just run the drain pump in forward and then reverse several times to mix the sample and reagent. I thought about using a stirrer, but it would require a much more complicated system to move the sample back and forth to the mixer.
Nice!
 

Algae invading algae: Have you had unwanted algae in your good macroalgae?

  • I regularly have unwanted algae in my macroalgae.

    Votes: 33 33.7%
  • I occasionally have unwanted algae in my macroalgae.

    Votes: 21 21.4%
  • I rarely have unwanted algae in my macroalgae.

    Votes: 9 9.2%
  • I never have unwanted algae in my macroalgae.

    Votes: 6 6.1%
  • I don’t have macroalgae.

    Votes: 26 26.5%
  • Other.

    Votes: 3 3.1%

New Posts

Back
Top