Chiller and Exhaust fan linked

Share you PDE file with our community

Posts: 14
Joined: Sat Aug 24, 2013 10:12 pm
Location: Arizona
PostPosted: Sat Sep 07, 2013 10:41 pm
I am new to coding for the RA so anything new I discover gets a good 3-5min celebration lol........ :oops:

I have all my equipment for my aquarium under my stairs and when my chiller turns on I have an exhaust fan that routes the hot chiller air out of my fish room. I first set the RA to where both the chiller and the the exhaust fan were defined as ReefAngel.StandardFan() but I really wanted the exhaust fan to be more independent.... so I finally figured out that I can just have the controller look to the chiller port to see if its on and turn the exhaust fan on accordingly.

Code: Select all
//Chiller Fan
    if (ReefAngel.Relay.isMaskOn(Port1)) ReefAngel.Relay.On(Port2);
    if (ReefAngel.Relay.isMaskOff(Port1)) ReefAngel.Relay.Off(Port2);


I thought this way the chiller fan is not just functioning on the same temp gradient or definition as the chiller and can be activated by other events in the future like the fish room temp and overheat temp....

I dont know if anyone else has done this but I was quite satisfied with my meager two lines of code lol..

Can the RA interface with controllable fans through its dimming ports? If it can I would like to have my fans further control the temp of my fish room by speeding up or slowing down :)
User avatar
Posts: 5335
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Sep 08, 2013 4:28 am
Good job but that will only work if you manually turn on the chiller. You can use the Status function instead which will tell you the real status of that port.

Right now you are looking at the override bits to see if someone manually turn on/off the chiller.

Posts: 14
Joined: Sat Aug 24, 2013 10:12 pm
Location: Arizona
PostPosted: Sun Sep 08, 2013 6:14 am
Aww ok. It did work when I manually turned it on but I hadn't let it do it automatically yet. Is the Status fxn part of the Relay class? What is the proper syntax for the Status fxn?

An after thought. .. sorry if this wasn't the right forum section to post this
User avatar
Posts: 5335
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Sep 08, 2013 6:55 am
You did good though :) No worries. the IsMaskOn / Off functions are pretty good to know.. Sometimes you want to do something different when the port is overridden vs just on / off.

The functions is ReefAngel.Relay.Status(Port). It will return true for on and false for off.

Posts: 11927
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Sep 08, 2013 7:59 am
Awesome!!!
Here is the line you need to help you understand:
Code: Select all
ReefAngel.Relay.Set(Port2, ReefAngel.Relay.Status(Port1));

Status() will give you the current status of a particular port no matter if it is automatically or with overrides.
Set() will turn on/off a particular port based on the 2nd parameter, which in the code above, we are checking for status of Port1. So, it will follow the same thing as Port1.
For your fan question, I do a similar thing. I use PWM controllable blowers to blow air in the surface of the tank to control temperature by evaporation, instead of chiller.
It will slow down and speed up depending of the water temperature.
The fans/blowers need to be PWM controllable and you need to have a PWM dimming port though.
Roberto.

Return to My PDE/INO file

Who is online

Users browsing this forum: No registered users and 1 guest

cron