Water Level Sensor Calibration Problem

Expansion modules and attachments
Post Reply
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Water Level Sensor Calibration Problem

Post by ebbtide »

I tied in my single water level sensor control. The 0% level calibration shows a reading of 0. If I accept this the 100% level also shows 0. There's no reading any where throughout the length of the pvc when calibrated in water. This module is connected to a expansion which also has a wifi connected to the expansion hub and the wifi works fine. I tried a different USB port but got the same results. Not sure what to try next.
TIA
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level Sensor Calibration Problem

Post by rimai »

0 is not normal.
What happens when you connect it directly to the relay box?
Roberto.
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Re: Water Level Sensor Calibration Problem

Post by ebbtide »

Ok so I must have been tired last night when I wrote the post. I do have my wifi connected but not into the usb expansion. I do have a green light on the expansion when plugged into the relay box. I have tried plugging the water sensor into the relay box with the same results. Yet when plugged into the relay box the usb connector does not seem to insert all the way. I thought it should be ok cause I received power to the expansion module. Should the usb insert completely into the relay box connection?
When the sensor is calibrated and running is the output a linear slope from 0-100%
Is the 100% calibration done at the top of the pvc cap where the airline tube connects?
Thanks,
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level Sensor Calibration Problem

Post by rimai »

Yes, it is a linear slope.
You can choose the 100% to be wherever you want.
That's why you calibrate it. To mark where you want the 100% to be at.
I use only 6 inches of the total length of the pipe, so my 100% is not at the top of the pipe where the cap is located.
Did you try another usb cable? This definitely seems wrong if you can't get any reading even with the module connected directly to the relay box.
Roberto.
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Re: Water Level Sensor Calibration Problem

Post by ebbtide »

I stopped at Best Buy and picked up another cable. That was the problem. Sensor calibrated fine and is now running my ATO. My sump and controls are downstairs and the DT is upstairs in the living room. I want to add another relay box for the DT. Is it the same as the one I received in the package? I just want to ensure that I can run my DayLight and Atinic's with dimming off the upstairs relay pack.
Thanks much for the help.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level Sensor Calibration Problem

Post by rimai »

Cool.
No, the expansion box will not have functional dimming ports.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level Sensor Calibration Problem

Post by lnevo »

If you have a plus you can use the ato switch ports into 5v pwm and extend the signal from those to upstairs now that you have the water level sensor working.
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Re: Water Level Sensor Calibration Problem

Post by ebbtide »

Thanks for the info. I'm a little unsure how I would reconfigure my ATO inputs over to PWM outputs. My coding ability with C is lacking. I'm becoming more acquainted with the language and structure so hopefully in time I'll have a better understanding. I got to say the Forum is amazing. Full of knowledgeable members and thanks to Roberto for what may be the "Best" customer support around.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level Sensor Calibration Problem

Post by lnevo »

pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,X*2.55);

Change X to the % you want the pump to be. This is also built into the DCPump for LowATO in the dev branch of the libraries... we'd have to add the channel support into the libraries for HighATO. The standard only could do PWM on the Low...

ReefAngel.DCPump.LowATOChannel

You will also need a special jaebo cable to support 5V PWM I believe. Roberto can confirm
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Water Level Sensor Calibration Problem

Post by rimai »

I'm a little confused.
Are you using the standard dimming ports in the main relay box?
Roberto.
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Re: Water Level Sensor Calibration Problem

Post by ebbtide »

Ok. So this changes the pin assignment to an output
pinMode(lowATOPin,OUTPUT);
This writes to that pin "X" *2.55
analogWrite(lowATOPin,X*2.55);
The 2.55 is milliseconds?
Can you point me in the direction where I can find a listing of the libraries, functions, and their arguments.
Thanks again
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Water Level Sensor Calibration Problem

Post by lnevo »

http://www.easte.net/RA/html

the 2.55 is a scaling factor. Since we normally use 0-100 to represent %, the RA uses 0-255 for the amount of power to send to the output. So if you passed 0-100 you wouldn't get the full 5V output when you want 100%.
ebbtide
Posts: 11
Joined: Mon Mar 31, 2014 7:33 am

Re: Water Level Sensor Calibration Problem

Post by ebbtide »

Thanks Inevo for the information. I'm going to mess around this weekend with the code. Oh and backup my current code. i know that's working fine. A lot to learn but this stuff is sweet.
Post Reply