The problem with the temp/humid control is that there's no hysteria, so if the temp/humid swings around the setpoint the relays will turn on/off quite fast and then there's a chance that they burn out...
BillieBricksI had this same problem in designing my aquarium/aquaponics monitor except in my case the issue was with my float switches which controlled my pumps via relay. With the water moving it would cause waves in the tank causing my float switch to go up and down turning on and off my relay constantly. The medicine to this problem is in the blink without delay example code http://arduino.cc/en/Tutorial/BlinkWithoutDelay. Basically what I did was made to variables for each pump one that records the last time the float was high and then one that records the current time the float was high and then previous - current > 5 sec turn on pump. I also included an if else that say if float is low reset previous. If you have any question or want some example i can dig it up and help you out just pm me.
Thx for the input! Yet I think the problem I have is slightly different then your situation. You are using time to prevent the relays from burning out and I'm using temperature and humidity.For example: Let's only use the temperature for this one... I set the set point for the temperature at 25°C. So when the temperature reaches 26°C the fans will turn on. Resulting in the machine registering the temperature drop to 25°C, but actually it is 25,9°C. The fan's stop working and almost immediately the temperature registers 26°C and everything starts over again. Now with a hysteria you have a set point (25°C) and a deviation or hysteria (value the setpoint can deviate). So this would result in (assuming the set point is 25°C and the hysteria being 2°C) that the fan's turn on at 26°C and turn of at 24°C (actually 24.9°C), giving the machine a whole 1,1°C to climb before the fan's are turned on again...
I have a question for you...How many float switches do you use in your setup? I've got two...one on the bottom and one on top. When the top one is 'LOW' the machine registers this, but doesn't do anything, other then displaying 'Tank Half Full' (we're optimistic like that ) Only when the bottom one is 'LOW' the solenoid valve is turned open. This remains open until both float switches are 'HIGH' again. Meaning the nutrient tank is full...
I didn't think about analyzing the standard deviation and then setting that for my trigger value. I like that idea maybe that would be a better option for the point of processing and consistency. You can still apply the no delay blinking type program to your it would be slightly different you might want to apply the concept in both direction for turning on the fans and turning them off.
My question for you is How long do your fans usually run? or how long on average does it take you to low your temperature 1 degree?
Why does your program register a temperature of 24.9 as 24? Why not keep that decimal? or if you are going to round round 24.0-24.4 to 24 and 24.5-24.9 to 25?
My setup it slightly different because I have live fish in my main tank.I have 3 tanks a 20 gallon which houses my fish (2 float switches a high and a low), a 10 gallon filter tank that filters large debris and converts the nitrites to nitrates through biological filtration (2 float switched high and low), and a 10 gallon refill tank that just holds water (2 float switches a high and a low).Every 15 minutes during the daytime i run a cycle the water from main tank is pumped to the filter tank and then pump into my grow tubes, and drains to my refill tank that is pumped to the main tank.
something you might be interested in would behttps://www.sparkfun.com/products/10221
Advice is develop some kind of fail safe
Nice work on your project Billie! I had to go and order one of those touch screens. I really like how your interface looks!
You have any ideas on that one? I also think that the failsave is more important for you since you have live fish. Plants are more forgiving if they don't receive the right treatment.
This is going way off-topic, but tomatoes need to have a humidity of 75 - 80% for the pollen to develop. Once the pollen are there it should be enough to shake the plant to pollinate
Now in your setup if you do use an automated water top off to maintain water levels in your solution you will wont to monitor concentration of your solution. If you don't use a top off system you still want to monitor concentration (in case of evaporation) so you do not chemical burn your plants.
Hi Billie,Just wanted you to know I'm quietly following all of this after asking early questions... Thanks for showing us so much!
Great link to you tube you just gave me. I found the principle of fault tolerance in the float switches combined with the pH probe quite interesting... I did implement an auto top-off function in my device, but this is just to make sure the nutrient tank doesn't become dry and kills the pump...