Another automatic alkalinity tester

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
So mostly to save money, to adress some grievances people i talked to had with commercial models, but also to have some fun tinkering with stuff, i want to build my own auto alkalinity tester and hopefully log my progress here.

The main inspiration was the KH Keeper which was recently released, but i also looked at the alkatronic, kh guardian, kh director and talked to people using them.

Basic components:
  • Main processor controlling everything and doing calculations
  • Reaction vessel
  • ph probe
  • ph measurement circuit
  • magnetic stirrer
  • sample intake/return pump
  • sample disposal pump
  • reagent dosing pump
  • motor control circuits
  • reagent container
  • waste container
  • plumbing
optionally also looking into automatic ph probe calibration which would add:
  • ph 4 Buffer dosing pump
  • ph 7 Buffer dosing pump
  • RO/DI flush dosing pump
  • sealed buffer containers, potentially with co2-scrubbed pressure equalisation
_________________________________________________________________________________________

I am still in the planning phase, but here are some of my thoughts:

Main difference between the different commercial models, besides their software, is in the pumps they use. Most have a high precision pump for the reagent, and less accurate pumps for intake and disposal. Exceptions are the kh director which uses GHLs standard quad dosing pump, and the kh guardian, which uses cheap pumps and optically counts reagent drops instead.

For intake and disposal i am currently planning on using Kamoer NKP pumps, like the kh guardian, but instead with a 1mm hose diameter offering lower flow but higher precision. I currently also use those in combination with l298n h-bridges and pca9685 pwm generators for my normal dosing of reef chemicals and i got them to be consistent to approximately 0.25ml which corresponds to 3 drops from the 2mm aperture of the hose holder, I stopped bothering to optimize after achieving that. With a bit of tweaking, that should be accurate enough, but maybe will take a few minutes to fill and empty the reaction vessel. In general, the disposal pump doesn't need to be accurate at all, if it runs too long, all that happens is wasting time, so overshooting by a generous amount is fine. If the 1mm hose is too susceptable to getting clogged from stuff from the tank, or is just too slow, i'll have to look into more expensive pumps like the KCS or KFS line with stepper motors.

For reagent dosing, i am planning to mirror the kh keeper and use the quite pricy Kamoer KAS pump, also with 1mm tubing. One big complaint, that all the people i talked to using this had, was that the thing sounds like a UFO taking off in your living room. I am planning to improve on that by using a high quality stepper motor controller, currently looking at the tcm2209 and similar chips by trinamic that are quite impressive regarding noise reduction in 3d printers, but not quite as cheap as their alternatives. But luckily i only need one (hopefully lol) of them, not five.

The second big difference is in the ph measurement. For the circuit, i am planning to use the reef-pi ph board by @robsworld78, for the probe i am going to experiment with a cheap one of aliexpress, mainly because i am pretty sure that the kh keeper uses the exact same one i ordered for 10€, which saves quite a bit compared to the atlas one or similarly priced ones used in the other commercial testers. If that one dies in an unacceptably short timeframe, i'll probably look at a refillable glass one. But these have yet to arrive, so i can't say anything about their performance yet.

For overall control, i am still a bit torn whether to directly use my pi running reefpi, or even a future version of reefpi itself, or to use a dedicated arduino or pi for this that controls the testing process and have the pi only query for tests/retrieve and log results. Currently tending towards the latter to not get too crowded with the number of available pins, but i might change my mind about that later.

Another thought of mine to improve on the existing design was to add 3 additional low precision dosing pumps to automate regular ph probe calibration, another complaint i heard often from people, probably connected to the cheap probe the kh keeper is using. The NKP pumps are cheap and should be plenty accurate for this purpose, the only question is whether the ph buffers can be held stable enough in dosing containers for a long enough period of time to make it worth it, but if they can, that would provide valuable validation with more expensive probes too, increasing trust in the results.

I'll leave out my thoughts about plumbing and stuff, probably not very interesting or important. The next step will be evaluating the ph board and probe once they get here and looking at the different ways to do the titration manually at first. I hope not everyone died of boredom reading this by now.
 
Last edited:

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,952
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Sounds good! I never got mine off the ground so to speak, but I love seeing the interest in the projects.

- Pumps sound good, it would be my recommendation too.
- Using stand-alone controllers for things like motor driving is a good option, it prevents having to go crazy with hiccups in non-real-time code on Linux, just leaving it for "command and control".

My only thought would be to revisit the use of a pH probe. I initially was super sold on the idea, but the colorimeter tests work suprisingly well, and have no drift problems of the probe. If you need finer control of the titration volumes, you can always use even more dillute acids. I have a bottle of 0.1N and 1N HCl I was playing with, which is a ton of re-agent (sold as standard acids, may need to buy from sources / resellers / non chemical supply outfits) and can work pretty well with the right indicator solutions.
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
Sounds good! I never got mine off the ground so to speak, but I love seeing the interest in the projects.

- Pumps sound good, it would be my recommendation too.
- Using stand-alone controllers for things like motor driving is a good option, it prevents having to go crazy with hiccups in non-real-time code on Linux, just leaving it for "command and control".

My only thought would be to revisit the use of a pH probe. I initially was super sold on the idea, but the colorimeter tests work suprisingly well, and have no drift problems of the probe. If you need finer control of the titration volumes, you can always use even more dillute acids. I have a bottle of 0.1N and 1N HCl I was playing with, which is a ton of re-agent (sold as standard acids, may need to buy from sources / resellers / non chemical supply outfits) and can work pretty well with the right indicator solutions.
Right yeah, timings from the pi wouldn't be great, probably would need to be at least two steppers in that case, I'll try to figure out arduino first.

Do you have more info on what "surprisingly well" means? Maybe it's just a pipedream but I plan to get 0.1° accuracy or better, even if that takes a probe recalibration every other day.

The point of all my automation is to be able to leave the tank alone for weeks without having to worry about problems that don't exist. That takes trust in the measurements.
 

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,952
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Right yeah, timings from the pi wouldn't be great, probably would need to be at least two steppers in that case, I'll try to figure out arduino first.

Do you have more info on what "surprisingly well" means? Maybe it's just a pipedream but I plan to get 0.1° accuracy or better, even if that takes a probe recalibration every other day.

The point of all my automation is to be able to leave the tank alone for weeks without having to worry about problems that don't exist. That takes trust in the measurements.

My target has always been within about 0.3 dKH. A lot of the commercial offerings ended up shifting to colorimetric since its a simple consumable, and resolves needing two more consumables for probe calibration + the probe consumable. You should be able to get a higher precision from a pH probe, but the tried and true indicators may have better long term repeatability. One reminder would be to flood the sample container with RO or tank water to hold the probe in to keep it immersed in liquid.

But its a DIY project, so its worth doing the thing you want to try :)
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
My target has always been within about 0.3 dKH. A lot of the commercial offerings ended up shifting to colorimetric since its a simple consumable, and resolves needing two more consumables for probe calibration + the probe consumable. You should be able to get a higher precision from a pH probe, but the tried and true indicators may have better long term repeatability. One reminder would be to flood the sample container with RO or tank water to hold the probe in to keep it immersed in liquid.

But its a DIY project, so its worth doing the thing you want to try :)
I have thought a bit about it, but the colorimetric ones put me (nano tank) between a rock and a hard place. Small sample volume gives a high error, larger sample volume means i would have to return the sample to the tank. Not too enthused about that with those coloring agents in it. But i'll see what kind of error i get with manually using the ph probe. Might switch over to colorimetric later and leave the probe in the tank
 

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
So mostly to save money, to adress some grievances people i talked to had with commercial models, but also to have some fun tinkering with stuff, i want to build my own auto alkalinity tester and hopefully log my progress here.

The main inspiration was the KH Keeper which was recently released, but i also looked at the alkatronic, kh guardian, kh director and talked to people using them.

Basic components:
  • Main processor controlling everything and doing calculations
  • Reaction vessel
  • ph probe
  • ph measurement circuit
  • magnetic stirrer
  • sample intake/return pump
  • sample disposal pump
  • reagent dosing pump
  • motor control circuits
  • reagent container
  • waste container
  • plumbing
optionally also looking into automatic ph probe calibration which would add:
  • ph 4 Buffer dosing pump
  • ph 7 Buffer dosing pump
  • RO/DI flush dosing pump
  • sealed buffer containers, potentially with co2-scrubbed pressure equalisation
_________________________________________________________________________________________

I am still in the planning phase, but here are some of my thoughts:

Main difference between the different commercial models, besides their software, is in the pumps they use. Most have a high precision pump for the reagent, and less accurate pumps for intake and disposal. Exceptions are the kh director which uses GHLs standard quad dosing pump, and the kh guardian, which uses cheap pumps and optically counts reagent drops instead.

For intake and disposal i am currently planning on using Kamoer NKP pumps, like the kh guardian, but instead with a 1mm hose diameter offering lower flow but higher precision. I currently also use those in combination with l298n h-bridges and pca9685 pwm generators for my normal dosing of reef chemicals and i got them to be consistent to approximately 0.25ml which corresponds to 3 drops from the 2mm aperture of the hose holder, I stopped bothering to optimize after achieving that. With a bit of tweaking, that should be accurate enough, but maybe will take a few minutes to fill and empty the reaction vessel. In general, the disposal pump doesn't need to be accurate at all, if it runs too long, all that happens is wasting time, so overshooting by a generous amount is fine. If the 1mm hose is too susceptable to getting clogged from stuff from the tank, or is just too slow, i'll have to look into more expensive pumps like the KCS or KFS line with stepper motors.

For reagent dosing, i am planning to mirror the kh keeper and use the quite pricy Kamoer KAS pump, also with 1mm tubing. One big complaint, that all the people i talked to using this had, was that the thing sounds like a UFO taking off in your living room. I am planning to improve on that by using a high quality stepper motor controller, currently looking at the tcm2209 and similar chips by trinamic that are quite impressive regarding noise reduction in 3d printers, but not quite as cheap as their alternatives. But luckily i only need one (hopefully lol) of them, not five.

The second big difference is in the ph measurement. For the circuit, i am planning to use the reef-pi ph board by @robsworld78, for the probe i am going to experiment with a cheap one of aliexpress, mainly because i am pretty sure that the kh keeper uses the exact same one i ordered for 10€, which saves quite a bit compared to the atlas one or similarly priced ones used in the other commercial testers. If that one dies in an unacceptably short timeframe, i'll probably look at a refillable glass one. But these have yet to arrive, so i can't say anything about their performance yet.

For overall control, i am still a bit torn whether to directly use my pi running reefpi, or even a future version of reefpi itself, or to use a dedicated arduino or pi for this that controls the testing process and have the pi only query for tests/retrieve and log results. Currently tending towards the latter to not get too crowded with the number of available pins, but i might change my mind about that later.

Another thought of mine to improve on the existing design was to add 3 additional low precision dosing pumps to automate regular ph probe calibration, another complaint i heard often from people, probably connected to the cheap probe the kh keeper is using. The NKP pumps are cheap and should be plenty accurate for this purpose, the only question is whether the ph buffers can be held stable enough in dosing containers for a long enough period of time to make it worth it, but if they can, that would provide valuable validation with more expensive probes too, increasing trust in the results.

I'll leave out my thoughts about plumbing and stuff, probably not very interesting or important. The next step will be evaluating the ph board and probe once they get here and looking at the different ways to do the titration manually at first. I hope not everyone died of boredom reading this by now.

This sounds like a cool project, I also vote for the Arduino and use the file driver in reef-pi to import the data. If you use an Arduino with a USB you can plug directly into a Pi USB and send data via serial which will be more reliable than I2C. I've done this and it's pretty slick.


For the pH board just so you know it can also manage the calibration and store the data internally. It works like the Atlas circuit, send commands with buffer values and readings, you can also send temp to offset, get slope and a few other things but there's a catch for some of it. When I adjusted the circuit code to work with reef-pi I wasn't able to use the ATtiny Wire library and had to switch to the full version to get the data in the format reef-pi expected, that took a lot of space so I had to disable some features but it can be reprogrammed. If you get a programmer you can make changes. The smaller library probably can be used to communicate directly with reef-pi just I couldn't do it.

I'm interested to see what you do with auto calibration if you go that route, once I setup a system that was semi auto. The first step it would wait for the reading to stabilize under strict conditions, something like 60 seconds without drifting more than +/- .005, my Atlas circuit could barely do it. Then it beeped and waited for user to press enter when ready for point 2, then same thing and when finished it would report the slope of the probe. I think the slope reports accurately but I can't be sure.

If you need info on it let me know.
 

kooibosmania

New Member
View Badges
Joined
Sep 3, 2020
Messages
1
Reaction score
0
Location
Netherlands
Rating - 0%
0   0   0
I am following and have a question what reagent do we use ? i understand it is some kind of acid ?
i heve been thinking to make something like this because prizes are crazy and am on the same path as op.
also arduino route i think.
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
I am following and have a question what reagent do we use ? i understand it is some kind of acid ?
i heve been thinking to make something like this because prizes are crazy and am on the same path as op.
also arduino route i think.
I have just now got the pieces for ph measurement, so i am not that far yet. But the reagent with all of these devices is either hydrochloric or sulfuric acid, titration quality, with different concentrations. Some devices use 0.1N, some 0.02N, some 0.01N. A liter bottle of any of those cost 23€ from a chemical supplier last time i looked. And if you are careful enough with the measurements, you can buy a 1N bottle and dilute it down to whatever concentration you want and save money.
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
Take a look here
Huh, printing your own peristaltic pumps, have heard of an approach like that before but never really thought about it.

Would maybe save even more money, but would present one more front to tinker, calibrate, worry with. On the other hand, shipping from China and customs takes forever right now, so...

Have to think about this
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
Anyone try to make HCl 0.1N from HCL 1N?
I was about to, but found out that my precision scale was less accurate than my coffee scale lol, have to wait for calibration weights to come in and have been all around busy recently, that put a hold on things for a bit
 
OP
OP
E

elysics

Valuable Member
View Badges
Joined
Jan 15, 2020
Messages
1,520
Reaction score
1,511
Rating - 0%
0   0   0
So, I finally got the pump after endless waiting, and it arrived broken. So that's a bummer. Can't test it pumping liquid, but at least I could try out running the motor and turning the pump head.

Neither at max speed, nor at any point during the acceleration of deceleration do I get any audible whine, just the normal noise of the compressed tubing. The tmc2209 clone is doing admirable work. The videos I was sent of the horror noises it makes in other products must have been due to a subpar driver.

Now the wait begins to have the broken parts fixed. Sigh
 

Caring for your picky eaters: What do you feed your finicky fish?

  • Live foods

    Votes: 22 31.4%
  • Frozen meaty foods

    Votes: 56 80.0%
  • Soft pellets

    Votes: 11 15.7%
  • Masstick (or comparable)

    Votes: 7 10.0%
  • Other

    Votes: 4 5.7%
Back
Top