DIY Alkalinity Monitor

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
ok so i think i have some issues with my pH probe as i don't get consistent results

which probe do you use and how do you do the calibraton ?

(is you code open source?)
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
ok so i think i have some issues with my pH probe as i don't get consistent results

which probe do you use and how do you do the calibraton ?

(is you code open source?)
Consistent means if you retest immediately. There are (sometimes) instances where the results may deviate by more than 0.1 DKH and it's unclrear what might be causing it (maybe displaced stirrer bit?).

The accuracy of PH probe is probably the most important thing. I am now using Milwaukee se220 double-junction PH probe but previously used Extech Instruments 601500, both are very good probes.
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
extech 601500 like me, but i don't get consistent results. (even pH 7 is far away, insted of 1500 i'm near 1100)

is you code open source?
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
extech 601500 like me, but i don't get consistent results. (even pH 7 is far away, insted of 1500 i'm near 1100)

is you code open source?
I published my code here - what do you mean by "open source"?
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
I published my code here - what do you mean by "open source"?
I mean if i can find the code somewhere. i dind't find the complete code here.
I'm looking for the ph probe calibration, how do you do that by code ?
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
ok so i think i have some issues with my pH probe as i don't get consistent results

which probe do you use and how do you do the calibraton ?

(is you code open source?)
The code in in page 7 of this thread, you clearly didn't look thoroughly..

calibration is just about measuring voltage level at PH4 and at PH7 and then interepolating any other voltage to derive PH.. I wrote my own calibration routine..
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
im not using an external ADC , latest esp32 chips have the ADC calibraton done in factory but im having huge issue with repetibility. if i do 2 consecutive tests, i get two different results
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
This is a reworked version of alk monitor:
- larger LCD screen
- well organised electronics inside
- reaction chamber and PH probe easily accessible from outside


IMG_4591.JPG

I have changed the stirrer bit to a smaller one - 10mm long, 4mm wide. This minimizes the risk of stirrer bit displacement. Current accuracy of DKH measurement is less than 0.025 DKH (if test is repeated). Current acid concentration is 0.025N.
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
Did you compare with commercial kh test like Tropic Marin, Hanna o red sea ?
I have a similair system (not based on your code but the Math is the same) and I'm geting A LOT of difference every time. more or less 1.0 / 1.5 dkh less than the commercial test (tried hanna, tropic marin, salifer and redsea, they are almost identical +/- 0.1/0.2 differences but 1.5 difference than mine)
 

cliffE

Community Member
View Badges
Joined
Mar 31, 2023
Messages
84
Reaction score
56
Location
Alaska
Rating - 0%
0   0   0
Did you compare with commercial kh test like Tropic Marin, Hanna o red sea ?
I have a similair system (not based on your code but the Math is the same) and I'm geting A LOT of difference every time. more or less 1.0 / 1.5 dkh less than the commercial test (tried hanna, tropic marin, salifer and redsea, they are almost identical +/- 0.1/0.2 differences but 1.5 difference than mine)
in order for us to help you, prob need to see what your set up looks like. Impossible to guess as to why you are getting different results.

If the difference in your system is always 1.5 from your commercial test I suggest that your build is a success. I think in the reef world the goal is a stable alk in the 8-10 range, not a specific number. The point of this device is to track changes in alk over time. I use it to make sure I adjust my effluent as the tank SPS grow and more alk is used.
 

cliffE

Community Member
View Badges
Joined
Mar 31, 2023
Messages
84
Reaction score
56
Location
Alaska
Rating - 0%
0   0   0
Here is my experience with this build





Step 1: Sourcing parts








Electronic: Since Borat sourced many of his parts from England and I am across the pond in Alaska I didn’t have access to the same parts.





1- Arduino mega mini-








2- ESP32





3. Stepper drivers








4- Ph Probe








5- Stepper motors








I made lots of mistakes on this.


The first ones I bought were NEMA 12. Too small


The second ones I bought were NEMA 17 but lacked the torque ( I think they had 12Ncm) to turn in a the peristaltic pump.


This pump has high torque. Buy this one, it has 55Ncm





6: Stirrer fan








40mm X 40 mm X 10 mm, 12 V with two wires. I got this 3 wire one, but I didn’t need to.





7: LLC converter: this allows a change in voltage to provide power to ESP32.


https://www.adafruit.com/product/757





Easy to damage, buy an extra





8: rotary encoder:


https://www.adafruit.com/product/4991


And







9: LED


https://www.adafruit.com/product/4650





10: DS 3231 RTC: its your clock to keep track of time








11: Power supply. You need something that converts your AC to DC power. Specifically 12 V DC power. This device will connect to a computer cord and provide power to your device. This was waterproof and I liked that.











12: 12 V to 5 V converter. Actually a fairly hard part to source





Part 1470-VR10S05-ND at Digi-Key.com





13: C14 panel, this connects your power supply to your computer cable.


digi-key.com. Part number 486-1003-ND





14: Ph probe board: apparently the probe is not that good, can’t just buy the board. May be sourced somewhere else.




15: capacitor 100uF 16v








17: Relay switch:











Materials:





1: Santoprene tubing for acid handling: I used this for the pump that carries the acid.











2: Barb fittings:











3: M3-10 nuts








4: M4 bolts








5: JST connections: this connects PCB board to electronic devices.











6: Acrylic was easy, I found a local plastic supply store and bought some of their scraps.





7. HCL 1.0M. I bought this from a science supply store. No one would ship to alaska. So it was shipped to the lower 48 and a friend is bringing with them when they come up. This was the hardest part to source..

Tools:


1: sodering iron


2. Crimper tool
https://www.amazon.com/dp/B01N4L8QMW?psc=1&ref=ppx_yo2ov_dt_b_product_details


3: Multimeter: you need to check and make sure your soldering joints are good and trouble shoot what is not working.


Step 2: electronics assembly
1- I sourced by PC boards from here

https://jlcpcb.com/?from=VGB&gad=1&...Ot6L2_r6JhI658Z05rhRAY9W4InXfxUBoCQikQAvD_BwE
Borat provides the “gerber” files. The site will ask you to “add gerber file”. Simply add and buy. You can only buy quantities of 5+

2- Soder components to PC board. I had never sodered before. I watched a few YouTube videos. I would recommend starting with the JST connections. Then move to other things. Once soddered on it is hard to remove.
  • Use a good flux
  • Keep a clean tip

3- Wiring
-each component should have a Ground and a VCC (positive). You will need to make a lot of wires and connections for each component to attach to PCB.

  • RTC, LED, Rotary have SDA and SCL. (4 total wires)
  • Probe has 3P0 ( 3 total wires )
These are all printed on the component and should attach to PCB as noted attached.
Screen Shot 2023-07-07 at 12.04.46 PM.png

  • Stepper motors are also unique. You need find which wire is which polarity. Most motors come with a diagram that labels wires A+ A- B+ B-. You need to match stepper motor wires to driver wires. This can be done by identifying driver wires and then stepper motor wires. There are tutorials online on how to identify stepper motor wires since this is not always clear.

  • 12V to 5 V DC conversion: make sure you know which side is 12 V and which is 5 V. Look at the website and it will tell you. If you put it in backwards you will fry components. See attached for the one I sourced.
  • Screen Shot 2023-07-07 at 11.41.30 AM.png
  • Relay switch is unique ( 3 wires in and 2 wires out). This turns the fan on and off during the test.
    • You will have to split your power supply. It will send one wire to the PCB and another + goes to the relay and a ground goes to your stir fan.
      Screen Shot 2023-07-07 at 11.46.26 AM.png
  • Capacitors, you will know if you put them in backwards.
I found the electronics was fairly hard. I burned through multiple LED. Quite fragile and a simple crossing of wires will fry the LED. I sodered a component on wrong and it would take forever to remove, often ruining the board or component to remove.


Step 3: Build you case


This was fairly straight forward. Measure, cut, weld. Borat has some great ideas on how to do this and I don’t think any additional input is needed.

  • few pointers.
    • Thicker acrylic may be more manlier, but is not better
    • Cylinder shaped test container will stir better then a square one. Don’t make a square one
    • Keep at least one side and probably the top accessible for repairs.
    • Cut holes into sides before glueing it together

Step 4: Code


Okay here is where it gets complicated.


1-Download the Arduino code provided by Borat


2- Open the code on your computer. It will look complicated.


3- The first part of the code reads “include”…This indicates what libraries need to be added to the code. Search and add all libraries in “library manager on the left side”. They will get saved somewhere on your computer and the code will retrieve them when it is uploaded.


4- There are some ares of the code that need to be changes. Date for example. Time also. Make these changes.


5- Plug the board into your computer. You will then select a board to upload code to. Select “mega 2560”


6- Under tools select the port where your Arduino board is is plugged into your computer.


7- Upload. If you did it all right the code will upload.
 

cliffE

Community Member
View Badges
Joined
Mar 31, 2023
Messages
84
Reaction score
56
Location
Alaska
Rating - 0%
0   0   0
This is a reworked version of alk monitor:
- larger LCD screen
- well organised electronics inside
- reaction chamber and PH probe easily accessible from outside


IMG_4591.JPG

I have changed the stirrer bit to a smaller one - 10mm long, 4mm wide. This minimizes the risk of stirrer bit displacement. Current accuracy of DKH measurement is less than 0.025 DKH (if test is repeated). Current acid concentration is 0.025N.
WOW!!!!
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
If you are out by fixed DKH from benchmarks - there could be a few possible reasons:
- benchmark is off (possible) google an article about lavender titration colour using salifert (https://www.reef2reef.com/threads/alkalinity-titration-endpoint-ph-salifert-endpoint-color.543556/)
- your probe calibration is off
- your reagent of of wrong concentration
- your PH endpoint is set differently (doubt it)

i always had ~0.3 dkh lower reading than salifert test, but accepted it by virtue of setting 4.4 ph endpoint and pink versus lavender titration cutoff
 
Last edited:

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
in order for us to help you, prob need to see what your set up looks like. Impossible to guess as to why you are getting different results.

If the difference in your system is always 1.5 from your commercial test I suggest that your build is a success. I think in the reef world the goal is a stable alk in the 8-10 range, not a specific number. The point of this device is to track changes in alk over time. I use it to make sure I adjust my effluent as the tank SPS grow and more alk is used.
not sure if the difference is stable. That's what i'm trying to know.
It's a simple ESP32 with dfrobot analog ph meter (the v2, with 3.3v compatibility), an Extech ph probe (0.02 accuracy) and, testing it from a couple of days, the dfrobot ADS1115

What is strange is that every time i make a test, the result dkh is different from the previous (+/- 0.5). Probes is totally calibrated (with calibration solution at ph 4.01 i can see 4.01/4.02 ph, with the 7.0 I can see not more than 7.01)

Very very strange.
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
- your probe calibration is off

No, i've calibrated and tested multiple times. there is not more than 001/002 differene than the calibration solution

- your reagent of of wrong concentration

maybe, but i've used the reeffactory reagent 1:9 with RO water. Tested with a precision scale (1/10 grams). 100g of reagent, 900g of water.

- your PH endpoint is set differently (doubt it)

I stop titrating at ph 4.3 (4.5 gives even more distant results). Also, reading some chemicals books, 4.3 is the proper endpoint for titration because only at ph 4.3 you all carbonates dissolved.

i aleays had 0.3 dkh lower reading than salifert test, but accepted it by virtue of 4.4 ph endpoint and pink versus lavender titration cutoff

0.3 is much different than 1.0/1.5 like me. 0.3 (if stable) would be ok.
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
Also ,you are not using an external ADC. I'm currently using an ADC1115 that is 16bit precision, and should be much more sensitive than the stock ESP32 ADC (that was buggy in some hardware models) or Arduino.

Same probe like you, i think (extech 600150)
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
not sure if the difference is stable. That's what i'm trying to know.
It's a simple ESP32 with dfrobot analog ph meter (the v2, with 3.3v compatibility), an Extech ph probe (0.02 accuracy) and, testing it from a couple of days, the dfrobot ADS1115

What is strange is that every time i make a test, the result dkh is different from the previous (+/- 0.5). Probes is totally calibrated (with calibration solution at ph 4.01 i can see 4.01/4.02 ph, with the 7.0 I can see not more than 7.01)

Very very strange.
Instable readings (in my experience) are caused by the stirrer failing to start.. If you have my v2 setup - it's not possible to see if the stirrer is working. This is the reason why I redesigned it. I also discovered that even a small stirrer bit sometimes fails to start (fans have very little torque) - so you have to adjust the strength of magnetic bit - so that it does not prevent the fan from rotating.. This is where I would focus my efforts, if I were you.

I had changed the stirrer bit by choosing a much smaller one - but even that one failed to start today and with no stirring the PH reading remained constant (so failed test!). I am going to move the reaction chamber 2mm higher tomorrow to reduce the risk of stirrer motor failing to start. I also ordered slightly different stirrer bits - to experiment.
 

iLMaRiO

Well-Known Member
View Badges
Joined
Jun 24, 2020
Messages
601
Reaction score
131
Rating - 0%
0   0   0
stirrer Always starts, it's a 5v DC motor , not a fan and i can see (and ear) the stirrer working as it's pretty noisy
 
OP
OP
Borat

Borat

Valuable Member
View Badges
Joined
Apr 4, 2021
Messages
1,508
Reaction score
1,749
Location
United Kingdom
Rating - 0%
0   0   0
stirrer Always starts, it's a 5v DC motor , not a fan and i can see (and ear) the stirrer working as it's pretty noisy
If you are constantly out by a fixed amount - it's not reallty a big deal, just choose a higher PH endpoint. The idea of alk monitor is not to give you the most precise DKH reading - but to give you an indication that your DKH changes. Stability is key, not the DKH level itself. I stopped checking absolute level long ago and all I care is that the level remains constant between consequitive readings.
 

Just grow it: Have you ever added CO2 to your reef tank?

  • I currently use a CO2 with my reef tank.

    Votes: 8 6.9%
  • I don’t currently use CO2 with my reef tank, but I have in the past.

    Votes: 4 3.4%
  • I have never used CO2 with my reef tank, but I plan to in the future.

    Votes: 5 4.3%
  • I have never used CO2 with my reef tank and have no plans to in the future.

    Votes: 94 81.0%
  • Other.

    Votes: 5 4.3%
Back
Top