Billie's Hydroponic Controller

superman:
BillieBricks

I 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...

Both have their advantages and disadvantages. I could be wrong off-course :wink:
Your idea is nice thinking by the way :wink:

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 :wink: ) 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...

Oh and of course I've read the article 'blink without delay' which gave me a headache before I got around it... :fearful: Still have to use the base code to start from, I'm ashamed to say :fearful: