Water Level's Limitation

Expansion modules and attachments
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Water Level's Limitation

Post 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
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

What is the diameter of your pipe?
Roberto.
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

1/2
Image
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post 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...
Image
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post 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?
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post 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.
Roberto.
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Roberto

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

Best regards
Rafa
Image
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Roberto... you are the best.. worked as a charm...

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

Rafa
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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?
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post 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
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

Just look inside the file.
It should be only in one place.
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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.
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post 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
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

That looks to be a really old library.
Did you install the Reef Angel Installer that you recently download from the website?
Roberto.
rrodriguess
Posts: 132
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post 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
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

Try with a half inch pipe and let me know if you reach the limit
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post 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?
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post 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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post 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
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

Post by lnevo »

So it seems then that the limit is around the 18" mark.
User avatar
arch
Posts: 20
Joined: Sun Mar 10, 2013 12:22 am

Re: Water Level's Limitation

Post 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.
Post Reply