Jestersix

DIY Automated Alkalinity Tester

I haven't had a chance to do a ton with this recently, but the past two days I've gotten back into it. I need to update the info and do some more testing, but I just had my first successful test. It involved manual steps (manually stirring, manually triggering each step, ...), but it all basically worked.

My Hannah alk read at 9.0 when I tested. Doing it with my dosers + pH + acid setup I got 8.9! Hopefully it wasn't a fluke and I can reproduce success again this weekend and then have it running automatically.
 
PXL_20230404_233332911.jpg


Success!!!

I just tested my frag tank for the first time with it. I intentionally didn't test what the Hanna until afterwards to avoid biasing my test.

Result: Hanna 9.7, ReefBuff 9.8. That's certainly within range of accuracy of the test kits, so I'll consider accuracy proven. I also consider the precision proven, because yesterday I was testing a different water sample and it repeatedly gave me the exact same reading multiple times in a row. I actually added some kalk to the water sample to verify that somehow it wasn't just repeatedly giving me a bogus number, and when the kalk was added the alk reading shot up from 8 to 12.

In all, the accuracy is proven to be reasonably accurate both directionally and compared to a reference. The precision is proven to be reasonably accurate because of repeatability.

I'm suuuper stoked about this!

Here's a picture of the current hardware:
PXL_20230404_234211357.jpg


I still need to diy a stirrer versus the one I'm currently using, clean up the electronics, flesh out the software a bit more, and print a case for it, but it's overall at a state where I can test my various tanks in a hand off manner.
 
Let me know when you have your electronics finalized. I can help PCBfy it and make it a standalone device.
I ended up actually going down a different route and have effectively a single standalone PCB for it (plus a separate pH probe circuit). I realized after getting this all setup that since it's basically just 3 stepper motors + a dc motor for doing the mixing, it's the same hardware wise as a 3-axis CNC. From that I found for $25 I can get a 3-axis stepper circuit, including LCD touchscreen + 3 stepper drivers.

I'm still working on the software updates for that, but I was pretty psyched when I realized it.

At some point here I'll finalize this all and update. Been busy with work though...
 
PXL_20230508_064204325.PORTRAIT.jpg


Newer fancier hardware I've finally gotten together, including a circuit board supporting all the pumps and an LCD touchscreen. Getting the connection to the peristaltic pump's stepper motor was a much bigger pita then I was expecting. It turned out the circuit board I bought has multiple separate chips that are being coordinated together to send the signals to the motor.

That's way more complicated than the previous setup I was using, and I ended up having to do a lot of source code reading and reverse engineering to get it to work. I haven't actually tried using this to measure alk yet, but at this point it should only require plugging in some wires and I'm done.

This is pretty exciting, not just because it was a big ordeal of figuring out a bunch of tech I didn't previously understand, but also because this makes the entire thing almost completely plug and play! All the electronics are buyable from a combination of parts from robo-tank.ca + Amazon or AliExpress. I'm pretty sure the final build of one would be measured in minuters, with the most complicated part being calibrating the pH probe.

Funnily the most expensive part is the pH probe, which seems absurd. I'm going to buy a cheap one and see how well they work. Being accurate is very important, but I think the cheap ones are $20 instead of $50.
 
Last edited:
View attachment 47254

Newer fancier hardware I've finally gotten together, including a circuit board supporting all the pumps and an LCD touchscreen. Getting the connection to the peristaltic pump's stepper motor was a much bigger pita then I was expecting. It turned out the circuit board I bought has multiple separate chips that are being coordinated together to send the signals to the motor.

That's way more complicated than the previous setup I was using, and I ended up having to do a lot of source code reading and reverse engineering to get it to work. I haven't actually tried using this to measure alk yet, but at this point it should only require plugging in some wires and I'm done.

This is pretty exciting, not just because it was a big ordeal of figuring out a bunch of tech I didn't previously understand, but also because this makes the entire thing almost completely plug and play! All the electronics are buyable from a combination of parts from robo-tank.ca + Amazon or AliExpress. I'm pretty sure the final build of one would be measured in minuters, with the most complicated part being calibrating the pH probe.

Funnily the most expensive part is the pH probe, which seems absurd. I'm going to buy a cheap one and see how well they work. Being accurate is very important, but I think the cheap ones are $20 instead of $50.
Super cool! Seems like it could be a fun group buy for parts and group assembly activity for the club.
 
AJFCJaU-JaFCHdvbUQcw6hiMs1Bi1lNp32zPVFbwXTsCJxnfAZxx9FSJWEwP2tzryX3jdCM90aZjc0PW0OSTz00EtI_b6AKMew8iVkAuLqGpBjb1YMyZFW-dcJJkNn6dX7x6SQky_jCFqbn8DULqXBCQUPG9xSxUh4OSe-JOl14dbt5J6grisL3j1eJbSALhJjT_6717fnT-9O2uJu2qCV20o1EUnmwnfqdRHWciahjWF-CAqCud2Ig6t3iWqvPMYEbJ-24XgY4RWBBAVKBNOBvABUKIx1jHQ9fa-dE5m3MTZPrVYENUJvsuzFT6Yp2RbW2poA55XSffGFSp3xWyaUQYCOgh_e7LoayV-j8lhHbtq5NgQ2I8STLr7NIE5A3bbqRNi635qYfC7J3tEK4vxOWrNODjuyt-f9txPT-1pU25qTmN0OF4INOg69fahx0Gkb0u66t8UKTP-HG1dUDukwLPUrB-Y1dbs3mNLoawcAIe4uBvb4LB48OHx5YctxpkirFDmyju-tZYUi1lZbniI2U8U_IoVbt35IVItFO7AGF2SxEpHMZZRsLfsJJrbP6lEGn1hoFiWGlp7dz9LyAfHM05a_d-0S88xAi1cnqDHVJaW71DHPaZ-x0cbLp77J05W0_9xR2BXgiXfLGh7caFYO3gih7nH-sfnC6lORaN_Ckz-cNuHVDt7QwEW9ywYJbPlU1CcS-g8xV-wdi4MYJeOUr8tPKCIpJlcPd4AS8ig6JesqaWbCdzvam2FHSNqPCDpFFMVbKyZFtXVzsHb0Y6HnPFMqnNb8ST_4MktLo2ynhq0XZZp3eZaJYCJAeAl5weDF__OZ2KMBU3wM0GaR5PJ50QRsOoa2znxRhanCR97FPrwreWNzFWiGtF955rrfoUU4NHjlD6ZFX1Sz_l98d2jQ1EmKYQBAv2Y6rSEpPNF2BoQMEXrLZ_bIdTyxRAJdTy6-pc=w1728-h1296-s-no


I have V3.0 working now, including touch screen controller.


With this new board everything is a lot simpler/cleaner in terms of connections. The touchscreen also hooks up with a single table.

AJFCJaXpva44OUpWUAN4QerjQksfZ1nzVamtAtjbPlrAcnFpVzbmUcgAdfRH1x_Aw2xjRD7hPTMY0lY56id3ETlK0b-wQ9h7SDuMs4FQabI2isR4Dix5lW2V2eU6bg0A4XTQ-_qG8PmXrvPOnWmq2hrA7PYxzd3lRRuCXdtjNWCtKY1zXgHgb5n9Xi4p1LmM-RgXrxuni4NZ08czpjxUKPmXQjGaR6aVvVd9P6bOkvH4QeD3wlz8KXW0URGtRptGRx2jYXMZ_G1cN7DgQElRl3Azono12CwaVgrfJ10p8AUqkkkYtRTu8IirLVrql7ZfPV9zGSD7yqZLwSu9zlnufP7BanrdfTl2ti6f94tciAfH1N7vScTQRMNCnjwTYBa6J9wjX4Nfuq2Gmcna6oW--QtI4fNrOuvNeeZ8TI_Ab72IYgNX64LF70tny1Dko3dLD3GRQXrwBYzKhIdoiqaamtoAp_CdrdXhy9o2PiGze4zmokvDHv0LErgOhHNXk0cJbnLOLqSThu4dTvwx3HnAt_rx7Z8CNlVppoCRAj23JHdRxhT4rJVs2ch739LVAT7xqOIOpiirDqojEpFq7LV_3Ur3kHiWejC5nLKnniSVb8sZNrD8C-g10yrTtzFHv1ZxdaJc7WYEF_Ix2rTjLZONxfBwMp8OyWEWn34TaioqSz0mPeFaR95Aybg09U5EuYJ8R8ZUpe5VLwDhMfgHfG8sCnMKVDj-IZ9QNXMf7zxRCI1DmFcpiUk1r4vIpoD_Y6KGtl22-4ky_sSyO4v_OsiCjJBewW8TZ9y-h9eWNNkcs0McM7rT8OwifqpcuYwfKePAk1g6f8eCd6LHlL50y6atDkayu466m7lh4SjvmQUUAgl6dlnfK6BeTnc3VnRAu3TorvJI1k5kW50BHfTm6x6ntXyoTHDgQ7gGwUtV0dVZR5zAK_57SIB7QOnleaJM9YeRbcFu=w1728-h1296-s-no


Getting the screen working took some more reverse engineering and learning graphic/UI libraries on an embedded system (using LVGL). Luckily these days a lot of the concepts seem to get stolen from one approach (website development) and applied to all the other ones (custom embedded system UI development) so the learning curve isn't nearly as steep as it otherwise would have to be.

Hardware wise the last piece is building a stirrer instead of using a magnetic stir plate I happened to have on hand. I have the parts for building this, but last time I tried I burnt out a board. I don't have an extra on hand, so waiting for an extra to arrive from aliexpress before trying again.

Towards the actual testing quality, it's been a bit hit or miss recently. Part of the issue was I needed to tweak some of the software, since there were some timing issues making it not accurately dosing (it was missing steps because the on/off interval was too fast for pulsing the stepper motor). However I fixed that, after a copious amount of debugging.

Another issue was the pump I'm using for dosing reagent is getting bubbles in the tube. There's various ways I can fix that, but the easiest was fix it in software. I now have it dump all the HCL acid back into the container, and prime from scratch every time.

Now my plan is just do some repeated tests and see what happens. It might be that everything is stable and my pH swinging causes my alk readings to change, which might be an accurate reading.

Anyway, fun project. Hopefully in the end it is super stable and easy to reproduce another one!
 
Back
Top