Billie's Hydroponic Controller

BillieBricks: 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 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?

BillieBricks: 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...

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.

That is the simple version of how my system works.

something you might be interested in would be https://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!

superman:
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.

For the fans I’m going to use the principle that i stated. For the float switches I’m going to incorporate your idea. Water has the tendency to move so stabilizing this would be better… :wink:
In my pH algorithm the hysteria is indeed going both sides of the scale. That’s because the pH needs to be stable at a certain setpoint and can deviate to both sides of the scale. Temperature and Humidity don’t go both sides. If it gets to hot/wet then the fans need to be turned on, otherwise not…

superman:
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?

This depends on the weather condition. If it’s warm and the sun is shining, the fans will run more then when it’s cool outside. That’s why I’m using Temp/humid in stead of Time.

superman:
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?

The program doesn’t register that. It’s the DHT11 probe that only measures in whole numbers in stead of decimals… I ordered the DHT22, which can measure in decimals, but that is for another application I’m currently working on. For the greenhouse/hydroponic set-up the DHT11 will suffice :wink:

superman:
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.

So you use Aquaponics for growing your plants. I’ve looked into that idea, but didn’t go that way because you don’t know what levels of nutrient’s one’s giving the plants. I use HydroBuddy to calculate the ‘perfect’ amount of nutrients my peppers need to grow. Last season my plants grew to a hight of 3m40 until they reached the roof of my greenhouse :grin:

superman:
something you might be interested in would be
Liquid Level Sensor - 8" - SEN-10221 - SparkFun Electronics

That looks nice, but for that price I can buy myself twelve duckbill float switches on Ebay. So since I’m on a budget this is a no-go :wink:

superman:
Advice is develop some kind of fail safe

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.

cyclegadget:
Nice work on your project Billie! I had to go and order one of those touch screens. I really like how your interface looks!

Good for you :smiley: There are a number of very nice people out there who wrote a library so writing the code for the screen isn’t that hard to do. I’ve used the UTFT library from Henningkarlsen.com which worked perfect!!!

Byebye and don’t forget to have fun while playing with your Arduino :wink:

BillieBricks: 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.

i personally have not had the issue but with our float switches being directly in contact with water and chemicals you will likely have to deal with nutrient build up and myself having hard water issues and algea. Others report that the switches get stuck so i guess clean them often. In my situation i cant have very much overfilling without having issues a possible idea is to take two pieces of wire seperated by small distance program them like a switch and mount them on the side of my tank if water overflows it should short and then turn off all pumps or whatever action.

I previously had some large tomato plants growing hydroponically but i didnt understand the manual pollination process do i had tons of flowers but no tomatoes. amatuer move

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 ;)

BillieBricks: 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 ;)

Yes it was the first time i really grew anything and i didn't understand the fact that i needed to shake or manually pollinate the plant. I now use an old electric toothbrush turn it on and place it slightly bellow the flower and watch the pollen move.

Let me throw an idea out On the other hand I believe that the salt water aquarium people use there pH levels to monitor the concentration of their chemicals and to prevent overfilling from occurring. Watch this video starting at 4:50 http://www.youtube.com/watch?v=E8FQGz_s_g8 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!

superman: 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.

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... The fact that the pH will become higher than desired is compensated with the pH control function, which adjusts it to the pH set-point... Then I still have a nutrient solution which is out of range, because no nutrients are added. But this causes the plants no harm on a short time basis (I'll still check my tank on a daily basis) and will be adjusted manually for now, until I incorporate EC monitoring and dosing, which is a part of the controller I'm going to build when the time is right (read, when I have the money for it...)...

terryking228: Hi Billie,

Just wanted you to know I'm quietly following all of this after asking early questions... Thanks for showing us so much!

You are quite welcome! This is a problem I had when I first started with Arduino. Lot's of people who had more experience in programming then me pointing out that I made rookie mistakes and giving me pieces of pseudo-code which didn't make sense to me...Ok, I learned allot by trial and error, but I made a promise to myself that when I made this project available to the public it should be presented in such a way that someone with no programming skills could also build one... Also came across some people who didn't want to share their code, which is kinda not done since everything is open-source and probably code they got from someone else on this forum...

So if you got questions about this device...Ask and you will receive. ;)

BillieBricks: 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...

In my case I was also worried about the pump burning out (I don't know how likely this actually is, but better safe than sorry) and so i placed my lower float switch slightly above the water level where the pump sucks air and use that float switch to turn on and off my pump.

One thing that i have been thinking about as a precautionary measure. Is to measure the amount of time it takes to top off my tank from its low position to full position when water is at its maximum pressure. So if it takes 5 minutes to fill tank say

if lower float switch is low turn on water reset timer to 0 start timer

else if higher float switch is high or time exceeds 5 minutes turn off water

Can you post your latest code? Are you still having problems with the calibration of your pH meter? Did you have to calibrate your temp/humidity sensor?

Hi! Very interested in your project. But can not download the sketch. please refresh

Here’s the latest version of my code…
Here’s a new link, because the forum gives me a 503 error when i try to download it…

Hydroponic_Controller_v1_1_2b.ino (38.8 KB)

hello,

this link does not work for me.

a chance to get one okay ;)

Retry a few times ( file download, not link ), it worked on the 2nd go for me.

I am trying to get this to run, but get the following errors:

Hydroponic_Controller_v1_1_2b.ino: In function 'void EepromRead()':
Hydroponic_Controller_v1_1_2b:146: error: 'EEPROM' was not declared in this scope
Hydroponic_Controller_v1_1_2b.ino: In function 'void graphLoop()':
Hydroponic_Controller_v1_1_2b:567: error: 'EEPROM' was not declared in this scope
Hydroponic_Controller_v1_1_2b:579: error: 'EEPROM' was not declared in this scope
Hydroponic_Controller_v1_1_2b:617: error: 'EEPROM' was not declared in this scope
Hydroponic_Controller_v1_1_2b:632: error: 'EEPROM' was not declared in this scope

Hello,

Which version of the Arduino IDE are you using? It should only be v.1.0 and no other Also, do you have the EEPROM and ExtendedEEPROM libraries installed? You need them...Al requirements are stated in the code. If that doesn't work try to download a new copy of v.1.0 and install the libraries you need for the project.

Hope this works out for you

First thank you for sharing, your set up is great.

But I see that you are in a bugget like my self and you are in need for EC and I found this link on how to make one for 15$ http://practicalmaker.com/ec/diy-ec-probe

I like to let you know so you can update your set up and I will be sharing my when is done

good luck Billie

Thank you for thinking with me...The probe isn't the problem. That one's easy. It's making the AC circuit for measuring the EC value. Ive found the [u]Eagle files[/u] for this shield, but don't understand them completely...Especially where the connections go is sometimes a mystery...The ground isn't always shown to be connected. Edit: Just found out how to show the GDN connections in Eagle. As for the parts. I've got almost everything I need to build the shield. Just the OPA 350 Opamp and the 01µf capacitors is what need to buy...

^_^ Good job Billie... I love it.

Now, I got a screen like that you used it, any recommendation before to start working with it or information that can help me?

Looks Really Cool. I tried to download the code but could not. I tried on a mac using safari, chrome, firefox and on windows using i.e… All with save target or save file as, or download file as.
Is there anywhere else you can post the code?

Also your temp humidity problem should be easy to fix by turning the fans on and off a few degrees apart instead of using one set point.
ex

float SetpointTwo;

if (CurrentTemp > Setpoint)
{
// Turn On Fans;
}

SetPointTwo = Setpoint - 3;

if (CurrentTemp < SetpointTwo)
{
//Turn Off Fans;
}

Fany_CA:
:slight_smile: Good job Billie… I love it.

Now, I got a screen like that you used it, any recommendation before to start working with it or information that can help me?

Thx! The first thing I do with everything I order is check if it works. Try the examples that are in the UTFT library from Henning’s site…If you get the examples to work i’d try to get the touch function to work, again with the library you find at Henning’s site and go from there…

Germ:
Looks Really Cool. I tried to download the code but could not. I tried on a mac using safari, chrome, firefox and on windows using i.e… All with save target or save file as, or download file as.
Is there anywhere else you can post the code?

Also your temp humidity problem should be easy to fix by turning the fans on and off a few degrees apart instead of using one set point.
ex

float SetpointTwo;

if (CurrentTemp > Setpoint)
{
// Turn On Fans;
}

SetPointTwo = Setpoint - 3;

if (CurrentTemp < SetpointTwo)
{
//Turn Off Fans;
}

Sometimes you can download it from the forum and sometimes you can’t. I suspect it has something to do with the download quota that the forum uses…
I’ll try to post the code on github or something…

Also thanks for thinking with me. I already thought of using a Hystery with the setpoint. Just like I did with the pH algorithm… This way one can also set the hystery instead of hard-coding it.

With kind regards,

Billie