Nice product line! Back when I started this project, I used to look at all the high end controllers on the market and drool at how easy and fun growing would be if all the choreography of devices worked seamlessly allowing me to focus on my plants only. Unfortunately though, my finances are lacking and those products were just out of my reach, so I started book worming and quickly found Arduino. There is an extensive community of users, so there’s plenty of support and it was a great product to learn how to write code with.
That said, the way my pumps work is that upon completion of the circuits, I ran each pump till each produced 100ml, and I repeated this test on each pump 3 times to get some base averages. Because Arduino counts in milliseconds, I was able to find a fairly accurate average per each pump, and I used each of these 8 averages in the code. For example, if Pump C produced 1ml for every 847 milliseconds, I can simply have the Arduino multiply or divide to accurately dose Pump C to the desired amount of ml. However, my dosers are not yet operational as I still need to plumb each nutrient into the bloom plumbing system. I also will need to recalibrate each dosing head b/c my base numbers were derived using Kool Aid (water), and water is way less viscous than nutrient concentrates. All of this is currently on the back burner until I finish building and tweaking my bloom rooms.
HERE and HERE are links to my youtube vids of the pumps being tested the first time with actual nutes instead of water. My grow is at a different location than where I build my circuits and write the code, so quick adjustments are not a reality for me ATM.
PH and EC are still tested with handheld pens. My plan is to get Atlas Scientific probes and circuits (PH, EC, TMP, DO) as they are built to work with Arduino and already have code written so I would only need to do some copy and paste and some reworking, and that will be an easy, but expensive upgrade. After that, all that remains is automated valves so I can do a complete res change remotely. To do this, I would need to have full control of which water supply goes where, and when. Here are some pictorials to help build a mental picture.
Plumbing circuit representations;
green circle = the plant
blue circle = RO reservoir
white square = water pump
yellow square = bloom reservoirs
red lines = valve positions in the circuit, all are in closed position
I was able to get a lot done today so hopefully in the next few days, I will be able to finish tying my dosing pump tubes into the manifold and begin honing in on the exact amount of milliseconds each pump needs to run to produce a single ml. One would think that because all 8 motors are 12 volts that they would each consume the exact amount of power and produce exactly the same as the others, but I assure you this is not the case, at least for these cheap things. I presume of the winding of each motor differ in length or thickness in the slightest variance, the outcome will be different and because of this, each pump turns differently.
@ r-man, here is the function that handles the dosing in it’s current (inaccurate) state, but should still serve as an adequate example.
//-Digital Pins - Peristaltic Pump Variables - 00 Series Pins
int pumpPin[8] = { 2, 3, 4, 5, 6, 7, 8, 9 };
uint32_t multiplier[8] = { 858, 827, 872, 865, 887, 895, 913, 843 }; //ms per ml
uint32_t startPump = 0;
uint32_t runCount;
bool pumpRunning = false;
const char *nuteType[8] = { "GH Armor Si", "GH Flora Blend", "GH CALiMAGic", "GH Kool Bloom",
"GH Flora Gro", "GH Flora Micro", "GH Flora Bloom", "GH pH Down"
}; //Text Printed to Terminal Widget^^
float DOSEml; //Step Widget (0.25 per step, send step/NO, loop values ON)
int button = 0; //Button Widget set to Switch
int x; //Correlates Array Positions with Pump Motor Pins
BLYNK_WRITE(V4) {
x = param.asInt() - 1;
}
BLYNK_WRITE(V5) {
DOSEml = param.asFloat();
}
BLYNK_WRITE(V6) {
button = param.asInt();
}
void dosingPumps()
{
if (button == 1 && pumpRunning == false)
{
Blynk.virtualWrite(V4, 0);
Blynk.virtualWrite(V5, 0);
Blynk.virtualWrite(V6, 0);
pumpRunning = true;
digitalWrite(pumpPin[x], HIGH);
startPump = millis();
runCount = DOSEml * multiplier[x];
terminal.print("Dosing in: ");
terminal.print(DOSEml);
terminal.print(" milliliters of ");
terminal.println(nuteType[x]);
}
if (millis() - startPump > runCount)
{
digitalWrite(pumpPin[x], LOW);
pumpRunning = false;
button = 0;
}
terminal.flush();
}