Water Level's Limitation

Expansion modules and attachments
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rrodriguess »

Roberto

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

Code: Select all

addr+=0x01; // Programmable Gain
Best regards
Rafa
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

Can't :(
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rimai »

You would need to use Arduino IDE instead of webwizard.
That way you can manually change the libraries
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

How can I do that?
Image
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Ok.. just download the arduino software and upload using the RA+ option. Worked.. will try to change the gain.
Image
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Something is wrong....

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

Image
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

Did you download and used the latest dev branch of the libraries?
https://github.com/reefangel/Libraries/tree/dev
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

No.. Just the Arduino software from the Download section. Gonna try and get back..
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

Post by rimai »

I would also recommend using IDE v1.6.8
http://forum.reefangel.com/viewtopic.php?f=7&t=5993
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Sure thing....
Image
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rimai »

Does it work correctly if you use a shorter pipe?
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

I Will have to try that... But I think It does since I was using Just Fine with RA+
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rimai »

You can try a pipe with a smaller diameter to see if that makes it better.
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Roberto

I am already using a 1/2" instead of a 3/4" pipe.
Image
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

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

Re: Water Level's Limitation

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

Re: Water Level's Limitation

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

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rimai »

You have to edit manually the file RA_CustomSettings.h
Roberto.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Water Level's Limitation

Post by rrodriguess »

Roberto

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

Thank you again!!

Rafa
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

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

Re: Water Level's Limitation

Post by rrodriguess »

20" long and 1/2' diameter.

I think 25" won't be a problem.
Image
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Water Level's Limitation

Post by Sacohen »

Cool


Sent from my iPhone using Tapatalk
Post Reply