Page 2 of 2

Re: Water Level's Limitation

Posted: Fri Mar 11, 2016 9:35 pm
by lnevo
rimai wrote: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
Would the sensor we were talking about for co2 tank work in this application or we'd need something in the between somewhere?
arch wrote: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.
400mm = 15.7 inches which is probably pretty close enough to what I'm seeing.

Re: Water Level's Limitation

Posted: Sat Jan 20, 2018 5:22 pm
by rrodriguess
Roberto

Using webwizard and RA*, how can I change the programmable gain?

Code: Select all

addr+=0x01; // Programmable Gain
Best regards
Rafa

Re: Water Level's Limitation

Posted: Sat Jan 20, 2018 7:29 pm
by rimai
Can't :(

Re: Water Level's Limitation

Posted: Sat Jan 20, 2018 7:50 pm
by rrodriguess
So..no alternative? The pipe is limited to aprox. 18 inches tall?

It's seems that cloud hub has a solution implemented

http://forum.reefangel.com/viewtopic.ph ... ain#p55404

Can't we just use "WaterLevelMax_write" function (or any other) to set the maximun value manually?

I use "roberto flow", and this is very important..

Re: Water Level's Limitation

Posted: Sat Jan 20, 2018 9:49 pm
by rimai
You would need to use Arduino IDE instead of webwizard.
That way you can manually change the libraries

Re: Water Level's Limitation

Posted: Sat Jan 20, 2018 11:14 pm
by rrodriguess
How can I do that?

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 5:42 am
by rrodriguess
Ok.. just download the arduino software and upload using the RA+ option. Worked.. will try to change the gain.

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 6:31 am
by rrodriguess
Something is wrong....

Installed the Arduino IDE, changed the gain, uploaded the code. But the calibration does not ends.... keeps running...

Image

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 9:57 am
by rimai
Did you download and used the latest dev branch of the libraries?
https://github.com/reefangel/Libraries/tree/dev

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 10:46 am
by rrodriguess
No.. Just the Arduino software from the Download section. Gonna try and get back..

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 11:01 am
by rimai
I would also recommend using IDE v1.6.8
http://forum.reefangel.com/viewtopic.php?f=7&t=5993

Re: Water Level's Limitation

Posted: Sun Jan 21, 2018 11:22 am
by rrodriguess
Sure thing....

Re: Water Level's Limitation

Posted: Wed Jan 24, 2018 6:39 pm
by rrodriguess
Ok.. will be a littel difficlt do make myself clear since english is not my mother language... but let's try.

- Download and install IDE v1.6.8 - done!

- Download the latest dev branch of the libraries = done!

- Changed addr+=0x03; to addr+=0x01; in waterlevel.cpp - done!

- Code compiled and uploaded - done!

After that I've calibrate the pipe/sensor out of water (0%), and fully submerse (100%). End of calibration. With the pipe still in the last position (fully submerse), I've hit "Exit Menu" and...... RA* does not show 100% as expected, but only 69% instead.

I Tryed again with orignal code (addr+=0x03;). Before calibration: Channel 1 shows 111%. Did it all over again. Pipe out of water, pipe fully in water... and RA* shows 111% again (instead of 100%)

You may think "Pull the pipe some inches out of the water, dumbass". The problem is that 100% is near in the middle of the pipe (it's a long pipe), and that way is pointless trying measuring anything.

Before asking.... yes, I've tryed with others channels. I even tryed with addr+=0x02;.

It's looks like there is another place in the library with addr+=0x03; fixed, and as much as I try to change in waterlevel.cpp it is not working.

I hope you all can understand me.

Roberto, any Idea?

Anyone?

Best regards
Rafa

Re: Water Level's Limitation

Posted: Wed Jan 24, 2018 9:29 pm
by rimai
Does it work correctly if you use a shorter pipe?

Re: Water Level's Limitation

Posted: Wed Jan 24, 2018 9:59 pm
by rrodriguess
I Will have to try that... But I think It does since I was using Just Fine with RA+

Re: Water Level's Limitation

Posted: Wed Jan 24, 2018 10:20 pm
by rimai
There is a max sensing capability from the sensor itself.
If it goes past the maximum pressure (0.57 PSI), things can get weird like you are experiencing.

Re: Water Level's Limitation

Posted: Wed Jan 24, 2018 10:20 pm
by rimai
You can try a pipe with a smaller diameter to see if that makes it better.

Re: Water Level's Limitation

Posted: Thu Jan 25, 2018 2:43 am
by rrodriguess
Roberto

I am already using a 1/2" instead of a 3/4" pipe.

Re: Water Level's Limitation

Posted: Thu Jan 25, 2018 2:57 am
by rrodriguess
Roberto

I dont think It is the sensor limit. I was using the same pipe and the same sensor (attachment) before, but different controller (RA+ tô RA*).

Re: Water Level's Limitation

Posted: Thu Jan 25, 2018 6:43 am
by rrodriguess
Ok Roberto

I did some testing. For all tests, I used only RA * with Multi-Water Level directly connected through an Expansion Port. Everything else was disconnected.

I used the same lean code:

Code: Select all

#include <Salinity.h>
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_TS.h>
#include <RA_TouchLCD.h>
#include <RA_TFT.h>
#include <RA_TS.h>
#include <Font.h>
#include <RA_Wifi.h>
#include <RA_Wiznet5100.h>
#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetDHCP.h>
#include <PubSubClient.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_ATO.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RA_CustomLabels.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <PAR.h>
#include <DCPump.h>
#include <ReefAngel.h>
#include <SoftwareSerial.h>

void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.Star();
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature
    
    
    ReefAngel.AddMultiChannelWaterLevelExpansion();

}

void loop()
{
   
    ReefAngel.Network.Cloud();
    ReefAngel.ShowTouchInterface();
}
The result was this table below:

Image


None of the tests gave an accurate result. I really have some problem.

As I already said, I am using this Multi-Water level for 2 years with RA+ untill last weekend when my RA* arrived and I decided to migrate.

May be something (or not) but very often when calibrating, I get 0 from the reading, and have to start all over again.

best regards
Rafa

Re: Water Level's Limitation

Posted: Thu Jan 25, 2018 8:07 pm
by rimai
Ahhhh.
You just found a bug :)
Thanks for the troubleshooting.
The RA* is not saving your calibration values.
Patch has been pushed to the dev branch and also to the web wizard.
Can you upload your code again and try?

Re: Water Level's Limitation

Posted: Fri Jan 26, 2018 2:53 am
by rrodriguess
Roberto

Glad I could help.

As soon as I get home from work, I give it a shot.

Another question just to clear my mind: Using the arduino IDE to upload the code, my RA* seems not be able to connect to the cloud, even putting the comment's strings with user/pass created by the webwizard. Is that so?

I am using the IDE to change the WL gain, but I would like to use the Uapp+cloud as well.

Rafa

Re: Water Level's Limitation

Posted: Fri Jan 26, 2018 9:25 am
by rimai
You have to edit manually the file RA_CustomSettings.h

Re: Water Level's Limitation

Posted: Sat Jan 27, 2018 11:22 am
by rrodriguess
Roberto

Both the patch and RA_CustomSettings.h configuration worked!!!! :D :D :D :D

Thank you again!!

Rafa

Re: Water Level's Limitation

Posted: Sat Jan 27, 2018 11:26 am
by Sacohen
So how long of a pipe are you using Rafa?
When I get around to setting mine up and the RA* I want to use a 25” long 1/2” diameter pipe.


Sent from my iPhone using Tapatalk

Re: Water Level's Limitation

Posted: Sat Jan 27, 2018 11:35 am
by rrodriguess
20" long and 1/2' diameter.

I think 25" won't be a problem.

Re: Water Level's Limitation

Posted: Sat Jan 27, 2018 12:36 pm
by Sacohen
Cool


Sent from my iPhone using Tapatalk