Page 1 of 2

Water Level's Limitation

Posted: Fri Sep 12, 2014 2:29 pm
by rrodriguess
Hi there

Is there any limitation in the Multi-Channel Water level Expansion?

I am using my own pipe, with 60 cm tall (23 inches). I am sure it is air sealed since my water level does not drop.

For each pipe/sensor, when I try to calibrate it, the max reading is the same (2072, as I remember). The problem is that I get this value in the middle of the pipe.

In other words.. my 100% reading for all of the sensors/pipes gets the same reading (2072) in the middle of the pipes. No matter how much I sink them, the reading just gets at 2072. When I pull them off the water, the level starts to drop in the same point that I get the max reading of 2072.

Is that right? I searched all the forum but could not find this issue.

Best regards, and thanks in advance
Rafa

Re: Water Level's Limitation

Posted: Sat Sep 13, 2014 3:47 pm
by rimai
What is the diameter of your pipe?

Re: Water Level's Limitation

Posted: Sat Sep 13, 2014 6:53 pm
by rrodriguess
1/2

Re: Water Level's Limitation

Posted: Mon Sep 15, 2014 3:35 am
by rrodriguess
Any idéias? Despite of this problem, it's seems to be working fine. But I still need to know where my real 100% level is...

Re: Water Level's Limitation

Posted: Sat Sep 20, 2014 1:30 pm
by rrodriguess
Well.. I don't know if it is a hardware limitation or a software limitation. I reboot reefangel, uploaded a new code, build a new pipe.. don't know what else to do.

The fact is that no matter what I do, the calibration reading only gets up to 2047 (this is the real reading.. I am at home now), what is aprox. 32 cm (12.5 inches) of the pipe. The problem is that my pipe (and my sump) is 46 cm (18.11 inches) tall.

Roberto, is that it? Am I doing anything wrong? Is there a workaround?

Re: Water Level's Limitation

Posted: Mon Sep 22, 2014 8:40 am
by rimai
I still have not had the time to test it, but by looking at the libraries, you can try changing the gain.
Line 55 of WaterLevel.cpp
Change this:

Code: Select all

	addr+=0x03; // Programmable Gain
To this:

Code: Select all

	addr+=0x01; // Programmable Gain
Let me know if this helps.

Re: Water Level's Limitation

Posted: Mon Sep 22, 2014 9:14 am
by rrodriguess
Roberto

Tks man.. I will try as soon as possible and let you know...

Best regards
Rafa

Re: Water Level's Limitation

Posted: Wed Sep 24, 2014 5:53 pm
by rrodriguess
Roberto... you are the best.. worked as a charm...

Tks man.. glad to be part of the ReefAngel community

Rafa

Re: Water Level's Limitation

Posted: Wed Sep 24, 2014 6:16 pm
by lnevo
Cool!!! I was a bit worried because I'd like to be able to measure the water level in my brute containers one day. If you can, are you able to see how high we can measure with the gain turned up now?

Re: Water Level's Limitation

Posted: Mon Nov 03, 2014 3:52 am
by rrodriguess
Hi Roberto

I installed arduino again and I cannot find the line "addr+=0x03; // Programmable Gain" in the WaterLevel.cpp to be changed.

Line 55 now is a closing brackets. Is that right?

best regards
Rafa

Re: Water Level's Limitation

Posted: Mon Nov 03, 2014 8:32 am
by rimai
Just look inside the file.
It should be only in one place.

Re: Water Level's Limitation

Posted: Mon Nov 03, 2014 11:21 am
by Sacohen
lnevo wrote:Cool!!! I was a bit worried because I'd like to be able to measure the water level in my brute containers one day. If you can, are you able to see how high we can measure with the gain turned up now?
Agreed. I'm planning on doing this with 2 20 gallon Brute trash cans, 1 for RO/DI and 1 for SW.

Glad to see this will work.

Is this going to be incorporated into the libraries or will we need to make the change on our own in the future.

Re: Water Level's Limitation

Posted: Mon Nov 03, 2014 1:33 pm
by rrodriguess
Roberto

This is my WaterLevel.cpp:

/*
* Copyright 2010 Reef Angel / Roberto Imai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* Updated by: Curt Binder
* Updates Released under Apache License, Version 2.0
*/

#include "WaterLevel.h"
#include <Globals.h>
#include <Wire.h>
#include <InternalEEPROM.h>


WaterLevelClass::WaterLevelClass()
{
level=0;
}

int WaterLevelClass::Read()
{
int iWaterLevel=0;
Wire.requestFrom(I2CWaterLevel, 2);
if (Wire.available())
{
iWaterLevel = Wire.read();
iWaterLevel = iWaterLevel<<8;
iWaterLevel += Wire.read();
}
return iWaterLevel;
}

void WaterLevelClass::Convert()
{
unsigned long t=0;
for (int a=0;a<20;a++) t+=Read();
t/=20;
if (t!=0)
{
t=map(t, InternalMemory.WaterLevelMin_read(), InternalMemory.WaterLevelMax_read(), 0, 100); // apply the calibration to the sensor reading
t=constrain(t,0,200);
}
level = t;
}



I couldnt find the instruction "addr+=0x03; // Programmable Gain" on line 55.

Am I doing anything wrong?

Rafa

Re: Water Level's Limitation

Posted: Mon Nov 03, 2014 4:25 pm
by rimai
That looks to be a really old library.
Did you install the Reef Angel Installer that you recently download from the website?

Re: Water Level's Limitation

Posted: Tue Nov 04, 2014 2:43 am
by rrodriguess
Roberto

No.. I did noooooot. :oops: Shame on me

I used an old post teaching how to install on linux.

Totally newbie

Best regards
Rafa

Re: Water Level's Limitation

Posted: Thu Dec 17, 2015 6:04 pm
by lnevo
So 1/2" pipe do we know the limitation yet? I have a 20 and a 30 brute. I'm about to redo my mixing station and get my AWC and RO feed to my reservoir upstairs setup.

Re: Water Level's Limitation

Posted: Thu Dec 17, 2015 6:08 pm
by rimai
Try with a half inch pipe and let me know if you reach the limit

Re: Water Level's Limitation

Posted: Thu Dec 17, 2015 6:13 pm
by Sacohen
Lee;

I believe that is you do what Roberto said below there is not limit. I think I have seem people with 1/2" pipes over 20".
rimai wrote:I still have not had the time to test it, but by looking at the libraries, you can try changing the gain.
Line 55 of WaterLevel.cpp
Change this:

Code: Select all

	addr+=0x03; // Programmable Gain
To this:

Code: Select all

	addr+=0x01; // Programmable Gain
Let me know if this helps.

Re: Water Level's Limitation

Posted: Sat Dec 19, 2015 5:44 am
by lnevo
Ok I ordered the multi level sensor. Roberto is it worth adding code to make the gain increase per channel or to active the change in code?

Re: Water Level's Limitation

Posted: Wed Dec 30, 2015 10:19 pm
by lnevo
Just a tip, I put a tee on the bottom of the pipe to keep it off the edge and also help keep it upright.

Re: Water Level's Limitation

Posted: Thu Dec 31, 2015 6:11 am
by Sacohen
I've done that too.
The difference is I drilled out the stop in the T so the pipe sides all the way thru and I glued the T a little off the bottom of the bin.

I think when you calibrate the WL sendor, do it with the T on so you get true 0.

Sent from my SM-G928P using Tapatalk

Re: Water Level's Limitation

Posted: Thu Dec 31, 2015 1:42 pm
by lnevo
I'm ok with it not all the way down. Will most likely have my rigid feed tubing go below the water level sensor opening. This way when I hit 0 there will still he water to draw

Re: Water Level's Limitation

Posted: Sun Jan 24, 2016 8:38 am
by Sacohen
Lee,
How long are your WL tubes?
I saw on FB that you have your setup, up and running and i wanted to know if you had to change that line off code in the WaterLevel. Cpp.

Sent from my SM-G928P using Tapatalk

Re: Water Level's Limitation

Posted: Sun Jan 24, 2016 11:24 am
by lnevo
Yes I changed that line of code. The Brutes are less than 36" I didn't measure but I can get some measurements later. It seems that there is plenty of headroom though.

Re: Water Level's Limitation

Posted: Sun Jan 24, 2016 1:52 pm
by Sacohen
I'm using a 20 gallon Brute.
The WLS is only about 24".
I would like to know what length yours is so when I redo my water container it will be about 30".

Sent from my SM-G928P using Tapatalk

Re: Water Level's Limitation

Posted: Tue Feb 23, 2016 9:56 am
by lnevo
So on the 20 gallon brute, it's working fine. On the 30g brute, there seems to be a cap on the water depth that it's able to manage. At some point it reaches the cap (~1500 on the sensor reading) and doesn't read higher at a certain depth. I'm currently filling to a bit under the lip where it expands (~22g). It seems that the first few inches before that lip all read at 1500.

On the 20g brute, I fill to around 16g and it reads fine as the water is drawn out. The only wierd thing is that the percentage seems off, but the rate of change seems the same, although I'm only looking at a 7 day windows. I just started monitoring the levels on reeftronics so I should be able to get a reading later this month to see if the rate is consistent or curved. Either way, it's good and i can rely on it for usage. Not sure if I'll hit the same cap if I overfill. I am at the same sensor reading for 100% (1520)

Roberto, any thoughts on being able to raise the sensitivity further?

Re: Water Level's Limitation

Posted: Tue Feb 23, 2016 10:00 am
by Sacohen
You added that 1 line of code yhat Roberto gave a while back?

What is the length of the pipe in the 30g?

Sent from my SM-G928P using Tapatalk

Re: Water Level's Limitation

Posted: Tue Feb 23, 2016 10:26 am
by rimai
I would have to test the sensor.
It seems you are hitting the end of the sensor and not the end of the chip scale.
The chip is a 12bit ADC, which means 4096 steps. 2048 positive and 2048 negative.
If your readings are stopping at around 1500, it seems the chip can read further, but the sensor can't.
That means you would only be able to do that if the sensor was replaced with one with higher PSI reading.
The current sensor is for .52PSI

Re: Water Level's Limitation

Posted: Tue Feb 23, 2016 12:02 pm
by lnevo
So it seems then that the limit is around the 18" mark.

Re: Water Level's Limitation

Posted: Thu Feb 25, 2016 3:12 pm
by arch
I'm not sure about the multi-channel water level expansion, but according to the eagle files, the water level expansion (v1.2) uses a Freescale MPVZ5004GW7U pressure sensor.

The spec sheet for the sensor quotes a pressure range of 3.92kPa - or about 400mm.