Billie's Hydroponic Controller

Hello,

You are missing the EEPROMEx library...

Hi again, All fixed now after learning how to read the code it was easier to fix my mistakes :slight_smile:

I am having a devil of a time finding the EEPROM library. Also I can't get the sketch to compile as it says EEPROM not declared in this scope. Using 1.05 IDE.

Andrew

Antennas:
I am having a devil of a time finding the EEPROM library. Also I can't get the sketch to compile as it says EEPROM not declared in this scope. Using 1.05 IDE.

Andrew

Hi Andrew,

I haven't tested the code with the 1.05 IDE. I already mentioned that it will work with IDE version 1.0
Also the error you get would be the same one as other people here on this thread are having trouble with...Namely the EEPROMEx should also be installed. This is an extension to the EEPROM library which is already there... So please read the entire thread, because then you'll find the link to the EEPROMEx library...It's not that far away!... :wink:

I have the EEPROMex library installed. I will have to check to make sure it's in the right place or that it's named properly. Thanks.

So I found that the name of the library is EEPROMEx and as downloaded it was EEPROMex. So I changed the name in the code to the proper one but it still doesn't work. It says 'class EEPROMClass' has no member named 'readFloat'. This must be a library issue but unsure how to fix.
EDIT***
So I copied the files from github EEPROMBackupVar.h and EEPROMVar.h into the EEPROMEx folder and it worked after that. I had tried to add the EEPROM.h but I had to remove it to make it work.

So it seems to be functioning so far.

Andrew

That's very strange indeed. I have no such library installed... Probably the maker of the library upgraded the old one...
Still glad to hear that it's working now. :slight_smile:

Hello Billie,

Really nice project :slight_smile: that's exactly what I'm looking for

As I just started with all the arduino and the project is not really a beginner project I'm not sure about to handle things.

Can you explain me how to measure the ph plus the more important thing is to adjust it automatically if it goes over or under the set point ?

What will I need for this ?

Greetings

Hello Tonno,

Reading the pH is fairly simple as the Phidgets 1130 outputs an analog signal which can be converted to a pH. You just do an anologRead on the pin which connects to the Phidgets and run this calculation --> 0.0178 * sensorValue - 1.889
What outputs is the current pH value at a constant temperature of 25°C...

Dosing is not that easy. I work with a Setpoint and a Hysteris. The setpoint is the pH I would like to have and the hysteris is the amount the pH can deviate from this point.
Explaining how the code works is not that simple, but here goes...
I first check if the pH is above or below the setpoint. Then change a variable according to that so the program knows if it's a base or acid that needs to be added. Note: If your plants are healthy and absorbing nutrients the pH can only go up. That's because plants use the negative ions for nutrient absorption...
Let's assume the pH is above the setpoint. The program now checks if the pH is above the hysteris. If so, dosing will start (which is a small peristaltic pump) until the pH reaches the setpoint. If the setpoint is reached then dosing will stop and the variable is set to 0 again.
This repeats constantly...

I hope this helps :wink:

Great looking project, and some unusual measurements, Billie. Really appreciate you sharing so much detail and info from your project.

When it comes to plant "food", do you have different products (or chemical makeups) for different plants, or use a more generic style food?

In a closed water+nutrition loop (vs nature where it's pretty open), is it possible an element (say nitrogen) could become depleted and require an increase, or do you find this is not an issue?

Hello aarondc,

Thanks for the nice comment :wink:
To answer your first question...I make my own nutrient mix with the help of HydroBuddy. This program makes all sort of calculations and returns me a list of Macro and Micro nutrients and their weight in grams needed to make a predefined amount of nutrient mix...
If you understand Dutch, I've made a basic usage tutorial here
I have all sorts of recipes in HydroBuddie's database. So I can make a nutrient mix for almost every crop you can imagine...

You probably have some experience with hydroponics...Because of your second question :wink:
Yes, singular nutrients (macro or micro) can get depleted. To measure one single substance one would need fairly expensive probes and that's beyond my hobby budget :wink:
You could measure the EC value of a mix, but that still wouldn't tell you which substance is getting low. I do measure the EC value (with a pen for the moment, but I'm working on a improved version of my controller), but this is to know how much concentration of nutrients are in my 200L tank...
To make sure I always have the right amount of singular nutrients in my tank (read: the recipe is still as it should be...) I do a nutrient change every 14 to 30 days. The waste goes to my conifers and grapevines...They also like the readily available nutrients :wink:

Thanks again.

I know nothing of hydroponics, but I worked for a year in a lab developing a LIMS that extracted mass spectrometer data from plant, soil and water samples for determining optimum custom-made fertilizer (chelates?) for farmers and the like.

I was wondering if you could (or would) measure discrete elements - the lab worked on 3 macro (N,P,K) and 14 micro, from memory, including things like copper and cobalt, etc. It was fascinating. N,P,K ratios were critical, but the micro elements could have a major impact on yield and plant health as well. And each crop type was different.

When I looked at sensors for those sorts of things, you are right, they were off the scale in terms of costs vs what a hobbyist would spend on a discrete component. Crazy.

I had to google EC value - but of course that makes sense. Electrolytes. Nice.

Thanks for the hydrobuddy link too - that's great.

I have no garden here, nice sunny back yard but the garden space is full of bark and succulents, in a rental, so when I saw your project I immediately thought - hey, fresh veges!! I will be looking at this more closely in the coming weeks.

Hi Billie,

Thanks for the quick reply :slight_smile:

Is the pH Meter all the time into the water to measure the pH?

I had some information which sad that letting the ph probe all the time in the liquid will cause damage?

Perhaps this is wrong I only want to confirm it.

And second question : basically I only need one ph Probe and two peristaltic Pumps to setup a pH measure and adjustment station?
I have a Arduino UNO Board with max. 5V on the Digital Output with max. 30mA

I have found those two things now: http://www.aliexpress.com/item/Free-shipping-6V-DC-DIY-Dosing-pump-Peristaltic-dosing-Head-For-Aquarium-Lab-Analytical-water/1003369174.html
http://www.aliexpress.com/item/PH-Electrode-Probe-BNC-Connector-for-Aquarium-PH-Controller-Meter-Sensor-NI5L/938643629.html

Do I can connect them directly to the board or do I need a extra power supply ?

And as I have rad you divided the code so I can just take the part that fits?

And last but not least :grin: : Why do you use a DC 9V plug for your arduino ? I thought 5V is max

Greetings

BillieBricks:
Hello Tonno,

Reading the pH is fairly simple as the Phidgets 1130 outputs an analog signal which can be converted to a pH. You just do an anologRead on the pin which connects to the Phidgets and run this calculation --> 0.0178 * sensorValue - 1.889
What outputs is the current pH value at a constant temperature of 25°C...

Dosing is not that easy. I work with a Setpoint and a Hysteris. The setpoint is the pH I would like to have and the hysteris is the amount the pH can deviate from this point.
Explaining how the code works is not that simple, but here goes...
I first check if the pH is above or below the setpoint. Then change a variable according to that so the program knows if it's a base or acid that needs to be added. Note: If your plants are healthy and absorbing nutrients the pH can only go up. That's because plants use the negative ions for nutrient absorption...
Let's assume the pH is above the setpoint. The program now checks if the pH is above the hysteris. If so, dosing will start (which is a small peristaltic pump) until the pH reaches the setpoint. If the setpoint is reached then dosing will stop and the variable is set to 0 again.
This repeats constantly...

I hope this helps :wink:

Tonno:
Hi Billie,

Thanks for the quick reply :slight_smile:

Is the pH Meter all the time into the water to measure the pH?

I had some information which sad that letting the ph probe all the time in the liquid will cause damage?

Perhaps this is wrong I only want to confirm it.

The pH probe is constantly in the nutrient tank. I haven't seen no degradation on the probe...

Tonno:
And second question : basically I only need one ph Probe and two peristaltic Pumps to setup a pH measure and adjustment station?
I have a Arduino UNO Board with max. 5V on the Digital Output with max. 30mA

I think you will be able to get that on the Uno. I don't have one, but since you are not using the TFT display and touch I think it will work...

Tonno:
I have found those two things now: http://www.aliexpress.com/item/Free-shipping-6V-DC-DIY-Dosing-pump-Peristaltic-dosing-Head-For-Aquarium-Lab-Analytical-water/1003369174.html
http://www.aliexpress.com/item/PH-Electrode-Probe-BNC-Connector-for-Aquarium-PH-Controller-Meter-Sensor-NI5L/938643629.html

Those look ok to me. Another tip: When using silicone tubing (as in your pump) you have to use nitric acid instead of sulfuric acid. Because the latter will corrode the silicone tubing :wink:

Tonno:
Do I can connect them directly to the board or do I need a extra power supply ?

No don't connect the pumps directly to the Arduino. You'll need a relay for that...Something like this one --> 2 Kanal 5V Relay Relais Module Modul fur Arduino PIC DSP PLC TTL | eBay

Tonno:
And as I have rad you divided the code so I can just take the part that fits?

Yes, it is modular, but you still need to think and debug for yourself :wink:

Tonno:
And last but not least :grin: : Why do you use a DC 9V plug for your arduino ? I thought 5V is max

Greetings

The Arduino needs a power supply with a minimum of 6V and a maximum of 12V. So 9V is just in between :wink:

So another Time thanks for the reply

The relay inbetween the digital Output and the Pumps is only for the higher current right?

The 6V aren't still not supplied by the relay I think?

But anyway the pumps should also work without 6V , so 5V should be just fine you think?

The next few days I will look for a ph connection shield for the arduino and show it to you here in this thread to get the right piece :slight_smile:

BTW Wehre did you geht your pH shield to connect to Probe from? I also live in Europe , ans the Shopping Costs from the States are really High

Thanks a lot in advance you are rellay helping me out a lot

Greetings

The relay should have it's own power supply. Both grounds from the Arduino and the power supply from the relay should be connected. You can run the relay with the power from the Arduino, but the pH shield is so sensitive that the on/off action from the relay messes the measurements from the pH shield. Also the peristaltic pumps need their own power supply because they need more current then the Arduino can deliver...
So in total you would need three power supplies -->1x 5V (relay); 1x 9V (Arduino); 1x 12V (Peristaltic pumps)
I bought my Phidgets 1130 in Germany last year. Because of the soccer world cup (or something) the owner of the shop would send it free of charge :smiley:

Why not 6V for the pumps ?

6V power supplie can deliver 2 x times 6V or not?

12V could destroy the pumps or do I think wrong?

So basically i only have to care about the voltage the power supply can deliver ? Not about the current ?

My pumps where 12V, so that's why i needed a 12V power supply.
The relay and Arduino need two separate power supplies because when the relay switches on/off then a tiny current goes back to the Arduino and disrupts the pH reading the Phidgets 1130 makes...You'll see :wink:

Okay so now I think I have all together I need

1 x Arduino Mega
1 x 9V external Supply for they Arduino

1 x 5V 2 Modul Relay
1 x 9V external Supply for the relay

1 x pH Probe With BNC connector
1 x pH Shield for the connection between probe and arduino
2 x peristaltic pumps
1 x external supply for the pumps

The probe will be connected directly to the ph shield for the arduino and the shield goes also directly to the arduino

The pumps will be connected to the relay and also to the external supply

What I don't understand is the connection of the relay,because it need to be connected to the arduino - will it simply be connected to the digital in / out pin? - as well as to the external supply and needs connection to the pumps is this right ?

Can you perhaps describe the way the relay will be connected to all these parts ?

I'm sorry for all the questions ... I'm hoping that's not so disturbing for you, perhaps this is a bit to heavy for my first project but anyway I will try it :slight_smile:

Greetings

It's actually a 5V adapter for the relay module. I made a mistake before :wink:
You connect the VCC and GND from the relay to the + and - of the 5V adapter and the inputpin and GND from the relay to the Arduino GND and outputpin. That way your ground (GND) becomes what's called 'common'...
The output from the relay are 3 connectors per channel (NC and NO) and are isolated from the input circuit. So you can even switch 120/230V AC if you like (But be careful if you do. Electricity is dangerous :wink: )
You connect the peristaltic pumps to each channel per pump on the NO (normally open) connections together with the adapter in series... When you put your Arduino outputpin high the relay switches and current will flow making the pump turn...

Hey everybody,

It's been a while since my last update.
I was currently busy developing a shield for my controller. Since Eagly CAD doesn't agree with me it's taking quite some time...
In the meantime I found a cool website with lot's of information about the subject. He (Andrew) calls this the 'Arduarium Controller', but since this shield has everything my controller needs I'm trying to build it myself. You can buy the shield ready made, the bear PCB and Andrew even put the Eagle files on Github for people to use. The Eagle files are licensed under the TAPR Open Hardware License.

Meanwhile I have another short movie ready for you guys and gals to see the results from my controller. I foresee that the plants will reach the sealing within a month or so...