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:
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:
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:
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:
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!)
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:
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:
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:
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!
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:
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:
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:
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!)
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:
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:
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:
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: