kh monitor + variable dosing

Requests for new functions or software apps
Post Reply
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: kh monitor + variable dosing

Post by lnevo »

Last 24 results:
02/15/19 04:10:39 7.82 dKH / 140 ppm
02/15/19 05:50:55 7.87 dKH / 141 ppm
02/15/19 07:31:13 7.86 dKH / 140 ppm
02/15/19 09:11:34 7.86 dKH / 140 ppm
02/15/19 10:51:57 7.87 dKH / 141 ppm
02/15/19 12:32:18 7.87 dKH / 141 ppm
02/15/19 14:19:06 7.82 dKH / 140 ppm
02/15/19 15:59:18 7.77 dKH / 139 ppm
02/15/19 17:45:24 7.67 dKH / 137 ppm +
02/15/19 19:31:43 7.63 dKH / 136 ppm +
02/15/19 21:18:03 7.58 dKH / 135 ppm +
02/15/19 23:04:23 7.58 dKH / 135 ppm +
02/16/19 00:49:43 7.64 dKH / 136 ppm +
02/16/19 02:29:39 7.68 dKH / 137 ppm +
02/16/19 04:09:42 7.71 dKH / 138 ppm
02/16/19 05:56:21 7.72 dKH / 138 ppm
02/16/19 07:43:33 7.76 dKH / 139 ppm
02/16/19 09:23:55 7.82 dKH / 140 ppm
02/16/19 11:04:18 7.86 dKH / 140 ppm
02/16/19 12:44:39 7.86 dKH / 140 ppm
02/16/19 14:24:54 7.86 dKH / 140 ppm
02/16/19 16:05:22 7.86 dKH / 140 ppm
02/16/19 17:45:43 7.86 dKH / 140 ppm
02/16/19 19:26:03 7.86 dKH / 140 ppm
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: kh monitor + variable dosing

Post by lnevo »

So, both my hanna and idip measure 20-30ppm below the KHG. Both the hanna and idip are within 9ppm consistently which is approx .5 dkh. My goal the past few days has been to increase the alkalinity until the idip value should be at 130 which would have the KHG reading at 155-160ppm. I've been using my variable dosing code to bring me up to that point. So far it's doing it very smoothly, the controls I have put in place are working. I've steadily increased over the past two days going from 138 ppm to 156 today at peak. That's pretty much .5dkh which was my target. I still have a bit of supplementing to go because I'm at the low end of my threshold and my tank is currently at it's peak consumption so I gave it some headroom to keep dosing otherwise its' going to start dropping back down and I'd rather level off than have a spike. Pretty pleased with how this is working so far.

Anyway, once I get to the target alk I want, I'm going to calibrate the KHG to match my other testers. Maybe I'll average the two :) I haven't decided which to calibrate it to. From there my goal will be to maintain as tight and steady alkalinity on the tank.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: kh monitor + variable dosing

Post by lnevo »

So far I like what I've seen. I've been extremely stable since I've raised the alk and calibrated. At this point I'm going to try and loosen up the corrections I make in case I'm over-compensating or my dosing needs more time to take affect. I've increased my daily dose. My "target" is 140ppm, but I've been averaging 138 or 139 so I definitely need to get 1-2ppm higher in order for my average to be at my target. I've also changed the KH guardian to 120 minutes from 90. I may go to 180. It's doubtful that I'll ever go to 240 which is the max. I like seeing the granularity. So since I do one action per test stretching out the time I will need to dose. Currently I get ~3 tests that have me increase my dosage per day. We'll see if that number goes down or increases. The other parameter I can play with is how much of a dose I make when it's needed, but for now I'm leaving that at 3ml (+1ppm).

Here's some graphs to show how it's going. In the charts, alk is the blue line. The green is either ph or calcium. You can see where I increased the alk and calibrated. The variance you see in the alk each day is ~5-6ppm swing.
ph-week.png
ph-week.png (2.69 KiB) Viewed 22051 times
dosing-week-1.png
dosing-week-1.png (3.49 KiB) Viewed 22051 times
ph-month.png
ph-month.png (2.94 KiB) Viewed 22051 times
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: kh monitor + variable dosing

Post by lnevo »

Ok so I extended the frequency of the testing to 2 hours from 90 minutes. And after it made a few adjustments my alk was as stable as I'd try and make it. The variance was .17 dkh and essentially 3ppm.

Today though, because of the extended frequency, the delta system I'm using didn't kick in and it caused my alk to jump a bit more than expected. It does take a while for adjustments to mix thoroughly. I increased the impact an action will make so it will take longer to decay.

Then I realized I had another issue because skipping a dose caused an issue because I would clear the state of the adjustment after the adjustment was over. Well skipping makes the pump stop much earlier lol and then usual code would kick in so I had to change how I did that a bit. Right now I'm just doing it at half past when dosing should be finished.

I was able to realize the last bug was happening when I graphed my dosing log and saw calcium was still increasing but alkalinity was not. After reviewing it all, I realized what I did. Even with that slight swing, we're only talking about a 5ppm difference between high and low.

Also, I feel like the instinct when it's doing too many extra dosings would be to reduce the amount I dose each time, but on the contrary, I think increasing it would be a better approach. It's taking too many doses to make a correction, maybe a slight bit more would help balance it faster.

03/07/19 17:01:51 7.86 dKH / 140 ppm (+0.00/+0)
03/07/19 19:12:42 7.81 dKH / 139 ppm (-0.05/-1)
03/07/19 21:23:53 7.82 dKH / 140 ppm (+0.01/+0)
03/07/19 23:35:15 7.82 dKH / 140 ppm (+0.00/+0)
03/08/19 01:46:14 7.82 dKH / 140 ppm (+0.00/+0)
03/08/19 03:57:26 7.82 dKH / 140 ppm (+0.00/+0)
03/08/19 06:08:39 7.82 dKH / 140 ppm (+0.00/+0)
03/08/19 08:19:53 7.86 dKH / 140 ppm (+0.04/+1)
03/08/19 10:31:20 7.90 dKH / 141 ppm (+0.04/+1)
03/08/19 12:42:38 7.90 dKH / 141 ppm (+0.00/+0)
03/08/19 14:52:26 7.90 dKH / 141 ppm (+0.00/+0)
03/08/19 17:03:28 7.86 dKH / 140 ppm (-0.04/-1)
03/08/19 19:14:35 7.86 dKH / 140 ppm (+0.00/+0)
03/08/19 21:25:40 7.81 dKH / 139 ppm (-0.05/-1)
03/08/19 23:36:43 7.77 dKH / 139 ppm (-0.04/-1)
03/08/19 23:36:43 7.77 dKH / 139 ppm (-0.04/-1)
03/09/19 01:47:34 7.71 dKH / 138 ppm (-0.06/-1) +
03/09/19 03:58:35 7.70 dKH / 138 ppm (-0.01/-0) +
03/09/19 06:09:48 7.73 dKH / 138 ppm (+0.03/+1) +
03/09/19 08:21:04 7.87 dKH / 141 ppm (+0.14/+3)
03/09/19 10:32:32 7.94 dKH / 142 ppm (+0.07/+1) -
03/09/19 12:44:00 7.98 dKH / 143 ppm (+0.04/+1) -
03/09/19 14:55:15 7.94 dKH / 142 ppm (-0.04/-1) -
03/09/19 17:06:25 7.95 dKH / 142 ppm (+0.01/+0) -
03/09/19 19:17:17 7.90 dKH / 141 ppm (-0.05/-1)

Average: 7.85 dKH / 140 ppm (+0.04/+1)

Minimum: 7.70 dKH / 138 ppm
Maximum: 7.98 dKH / 143 ppm
Deviation: 0.28 dKH / 5 ppm
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: kh monitor + variable dosing

Post by lnevo »

Ok, looks like I worked out all the kinks. I also discovered that when I was increasing my cal and alk, I was also increasing mag which I currently have disabled so I added a check that a supplement needs to be at least 1 before it's dosage get's increased. I fixed the delta issue and also another bug where I was updating my baseilne tracking. Because I was skipping a dose, it would never increase the baseline either, so my baseline was skipping and then when it was calculated again, it would come back to the correct value making it looked like the baseline was getting a dosing increase! Argh.
dosing-bl.png
dosing-bl.png (36.48 KiB) Viewed 21915 times
Anyway, it looks much better today. Here's some raw data tracking the delta and the actions I'm taking. I need to have my external script grab the value from the RA to track that too. On the RA I'm also comparing the value I receive from the KHG because there's a device and an analog to digital conversion going on to get that signal. I've had miss on that in the past.

03/15/19;20:12:40;7.78;7.8;139;READY;NONE;3
03/15/19;20:12:40;7.78;7.8;139;READY;NONE;2
03/15/19;22:23:30;7.74;7.7;138;READY;DOSE1;1
03/15/19;22:23:30;7.74;7.7;138;READY;NODOSE1;5
03/16/19;00:34:38;7.73;7.7;138;READY;NODOSE1;4
03/16/19;00:34:38;7.73;7.7;138;READY;NODOSE1;3
03/16/19;02:45:47;7.74;7.7;138;READY;DOSE1;2
03/16/19;02:45:47;7.74;7.7;138;READY;NODOSE1;6
03/16/19;02:45:47;7.74;7.7;138;READY;NODOSE1;5
03/16/19;04:56:48;7.78;7.8;139;READY;NONE;4
03/16/19;04:56:48;7.78;7.8;139;READY;NONE;3
03/16/19;07:06:21;7.78;7.8;139;READY;NONE;2
03/16/19;07:06:21;7.78;7.8;139;READY;NONE;1
03/16/19;09:17:27;7.82;7.8;140;READY;NONE;0
03/16/19;11:28:21;7.82;7.8;140;READY;NONE;0

It skipped the dose at 00:34 because the delta (4) was not less than my max which was also 4. I'm probably going to have to play with that as the time between tests is still too far apart to maybe rarely cause a skip yet. Still trying to rationalize the best way to get this part to function to prevent too many dosings or skippings.
sesame
Posts: 71
Joined: Sun Aug 04, 2013 2:29 am

Re: kh monitor + variable dosing

Post by sesame »

very interesting investgation.
a further more idea if its possible to control KH by RA by its own. :)
Post Reply