DIY dKH controller

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
Hello everyone, I have just completed the demo for the next project: measuring dKH based on the mechanism of Aquawiz. The results are very promising:
1736921231737.jpeg




1736921324570.png





I start the lights at 8 AM and begin running the calcium reactor when dKH is below 9. I will continue monitoring for 3 weeks (until after the "tet" in Vietnam) before packaging the product and sharing more about the project. Thank all :D
 

Gumbies R Us

God, Bouldering, and Reefing
View Badges
Joined
Nov 10, 2022
Messages
29,358
Reaction score
51,952
Location
North Georgia
Rating - 0%
0   0   0
This is a really neat idea! Do you have more photos about how you were able to make this?
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
This is a really neat idea! Do you have more photos about how you were able to make this?
I honestly don’t know how to describe it because, in terms of hardware, it’s not very complicated: 3 peristaltic pumps or 6 solenoid valves + 1 peristaltic pump, 2 air stones, an air pump, a pH sensor, and an ESP8266 for processing.

All my focus is on the software. The task is actually quite simple: handling noise and predicting dKH based on changes in pH across two samples.

After replacing the solenoid valves (due to the presence of metal components prone to oxidation) with 3 peristaltic pumps, the noise level in my results skyrocketed. :face-with-tears-of-joy:

I am trying to build an effective AI model—something that can compensate for the noise in the pH sensor readings as well as the inaccuracies of the equipment.
real housewives GIF by Slice
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
This is a really neat idea! Do you have more photos about how you were able to make this?
Thanks to your question., I had time to think about why switching from a solenoid valve to a pump could result in such significant errors.
Today, I checked again and discovered the issue lies in the fact that the two chambers are connected by a water-filled tube. When aeration occurs, it causes water to be drawn from one chamber to the other due to the principle of communicating vessels – something that didn’t happen when using the solenoid valve.

I will fix this issue and believe the calculations will be much more accurate afterward.
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
I have been monitoring the system and have noticed some limitations in this model. I also have serious doubts about the ±0.05 accuracy claimed by Aquawiz, though I believe that with precise calibration, it could be achievable—but that would be a long process.

Currently, I am still using it with an acceptable accuracy of ±0.5, which is sufficient to keep my tank stable on a daily basis. I am also working on another project that combines the advantages of both Aquawiz and KH Guardian.

Once I have some free time, I will share the fabrication process as well as the challenges I encountered here.

Thank you for following!
 

mercurialchen

Community Member
View Badges
Joined
Feb 24, 2023
Messages
39
Reaction score
16
Location
Vietnam
Rating - 0%
0   0   0
Nice to see a fellow viet reefer here. Im using aquawiz myself and the results have been solid. Would be great if your project is successful. Good luck!
 

Bazzo

Community Member
View Badges
Joined
Dec 26, 2021
Messages
41
Reaction score
14
Location
São Paulo
Rating - 0%
0   0   0
I honestly don’t know how to describe it because, in terms of hardware, it’s not very complicated: 3 peristaltic pumps or 6 solenoid valves + 1 peristaltic pump, 2 air stones, an air pump, a pH sensor, and an ESP8266 for processing.

All my focus is on the software. The task is actually quite simple: handling noise and predicting dKH based on changes in pH across two samples.

After replacing the solenoid valves (due to the presence of metal components prone to oxidation) with 3 peristaltic pumps, the noise level in my results skyrocketed. :face-with-tears-of-joy:

I am trying to build an effective AI model—something that can compensate for the noise in the pH sensor readings as well as the inaccuracies of the equipment.
real housewives GIF by Slice
interesting, I want to build one for testing. Can you share your esp8266/32 code? It would be very interesting to know how it works.
 

Bazzo

Community Member
View Badges
Joined
Dec 26, 2021
Messages
41
Reaction score
14
Location
São Paulo
Rating - 0%
0   0   0
@HappyFm
Regarding the noise in the precision, are you using a stepper motor or a 12v DC pump?

In some projects I had to put a capacitor in the power input of the motors. It's quite unclear.

I want to convert what I have today, which uses reagent, to what doesn't.

However, I still have doubts about the dkh calculation.

How long are you leaving the samples aerated? 15 minutes?

Do you read both samples and what calculation do you use? This is still unclear to me.
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
@HappyFm
Regarding the noise in the precision, are you using a stepper motor or a 12v DC pump?

In some projects I had to put a capacitor in the power input of the motors. It's quite unclear.

I want to convert what I have today, which uses reagent, to what doesn't.

However, I still have doubts about the dkh calculation.

How long are you leaving the samples aerated? 15 minutes?

Do you read both samples and what calculation do you use? This is still unclear to me.
I have replied to you in the email. Just noting this here to let you know that I have read it. :D
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
Due to the complexity of building a reagent-free system, I have decided to return to a reagent-based system:


  • The measurement method is similar to the reagent-free approach, so there is no need to calibrate the pH probe.
  • Periodic calibration of dKH (weekly? monthly? quarterly?) is mainly to assess the pH probe's drift over time.
  • The reagents used are high-concentration HCl and H2SO4. 100ml is sufficient for over 3 months of continuous 24/day operation, with wastewater discharged directly back into the tank.
  • Fast measurement speed—each test takes only 15 minutes (or even faster?).
  • Significantly smaller size (which I like the most) and silent operation (since no air bubbling is required).
  • Potentially high durability. I am redesigning the system to completely isolate the electronics in a sealed compartment, possibly with moisture-absorbing packets.

The initial results are quite promising, with an error margin of only around 0.1 dKH (or even smaller :D). I will further improve accuracy by developing an AI to process the final data.
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
The initial results are quite promising. The first part of the graph represents the dKH in my tank (7.7 - 8 dKH), while the latter part is from a test using a 7.0 dKH sample without any living organisms.
Screenshot 2025-03-17 at 00.15.34.png
 

Bazzo

Community Member
View Badges
Joined
Dec 26, 2021
Messages
41
Reaction score
14
Location
São Paulo
Rating - 0%
0   0   0
What sulfuric acid are you using? I thought about adapting mine for this, but I don't know if it would replace sulfuric acid.
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
I also have a similar idea for the reagent-free method. However, the size will be even smaller since it only requires a single reaction chamber and no sample storage. All challenges will be handled with an AI model. Wish me luck! =))
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
What sulfuric acid are you using? I thought about adapting mine for this, but I don't know if it would replace sulfuric acid.
I'm using HCl, which is theoretically quite safe since the H⁺ ions are consumed in the process of neutralizing dKH. The remaining Cl⁻ is negligible in a marine environment (NaCl).


I also dosed a bunch into my tank during testing =)) So far, everything seems fine!
 
OP
OP
HappyFm

HappyFm

Community Member
View Badges
Joined
Dec 4, 2024
Messages
92
Reaction score
93
Location
Ha Noi - Viet Nam
Rating - 0%
0   0   0
1742146568070.jpeg

During the development process, I had some free time and made a DIY test kit.


For just $3.14, I got a pH reagent (500 tests with a fixed color at pH 4.5). I diluted HCl until it matched the consumption of the commercial reagent.


The results were surprising—the error was only around 0 to 0.3 compared to the commercial test! :D That's more than enough for my dKH testing needs since I only need to maintain dKH rather than knowing the exact value.
 

commod0re

that one guy
View Badges
Joined
Mar 22, 2025
Messages
682
Reaction score
913
Location
Bothell, WA
Rating - 0%
0   0   0
ESP8266 for processing.
This is probably where your noise came from, the ADCs in esp8266 and many variants of esp32 are quite noisy. I find that oversampling with a sliding window moving average helps a lot but a higher precision peripheral ADC would probably work even better

another thing you can do to help with false low readings is maybe only trigger the dose if 2 or 3 readings in a row fall below the threshold
 

TOP 10 Trending Threads

HOW DO YOU ADJUST YOUR CUC AS ALGAE DISAPPEARS?

  • Capture and re-home CUC

    Votes: 6 6.7%
  • Increase white light/hours in tank to spur algae growth to feed CUC

    Votes: 6 6.7%
  • Feed nori to support CUC

    Votes: 31 34.8%
  • Feed herbivore pellets to support CUC

    Votes: 28 31.5%
  • Allow attrition to balance CUC and algae

    Votes: 40 44.9%
  • Provide macro algae to feed CUC

    Votes: 6 6.7%
  • Introduce CUC predators

    Votes: 1 1.1%
  • Other (please explain)

    Votes: 8 9.0%
Back
Top