Dosing pumps - development discussion

It’s been some time when I started to develop Growduino - an enviromemt control system . And that would be incomplete, if dosing pumps module would have not been developed also.

So I started to study and observe which parts and functionalities are important and must have, and what is “cosmetics” - nice to have.

Also the price must be directly proportional to what you get - we do not want it expensive, but quality build and reliable :slight_smile:

Please welcome to development topic for dosing pumps. Any projects and thoughts and ideas how to do it properly will be here…

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
  x = param.asInt() - 1;
  DOSEml = param.asFloat();
  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(" milliliters of ");
  if (millis() - startPump > runCount)
    digitalWrite(pumpPin[x], LOW);
    pumpRunning = false;
    button = 0;

@r-man, you’ll need to account for which is to be used with Blynk and simply adjust it for your project’s network settings.

Wow, this looks amazing!!! For me - EtherMega and AtlasScientific shield+sensors are very expensive, so I will be looking for much cheaper solution. Standard Arduino 2560 with Wiznet5100 shield is as low as 12,50 USD and EC +pH sensors is in my (my friend) development right now.

Yes - this is something what I’m thinking about for some time. How to fully automate nutrients and water dosing with pH control, how to calculate amounts accordingly to barrel size, how to flush the system (for not mixnig old and newly mixed water)…how to dose and measure pH and EC properly (after mechanical mixing and wait some time?) …questions, questions everywhere :slight_smile:


Air compressors (here in the states) do this in their advertising by calculating the cylinder size, motor RPM and pulley reduction to derive a figure that in real world applications fall very short of the advertised volume and pressure output. That said, I believe it will be safer to calculate actual output of a large volume, then divide the volume by itself to know how much time is needed to generate the unit itself, albeit gallons, liters or ml. Heck even teaspoons and tablespoons.

My approach is to go about res building and correcting the same way till I can view the data and begin writing down important variables and such. It is my goal to code into the sketch actual manufacturer recipes, of course at 1/3 or half strength, or as needed. It would be awesome to leave this thing with my people in the event I die. Perhaps I took a few too many pulls on the pipe with that one, but the sentiment is real.

Do you have any ideas or leads on some good plastic valves with minimal cracking torque? I’d like to pair it with a servo and get the party started!

1 Like

Back when I started my project, I did a lot of research on DIY PH and EC probes and circuits and learned that these circuits are very sensitive to electric noise. This had me greatly concerned as I’m just a newb hobbyist and had great doubt I would ever be able to isolate the circuitry well enough to get viable readings from any of the probes. I presume you’ve also encountered similar information in your development. That said, consider what Whitebox Labs did on their Tentacle and Tentacle Mini shield to galvanically isolate their circuits and try to reverse engineer. Having little to no confidence in my skills, I am definitely gonna save up for the shields, and circuits and probes. I saw THIS youtube video of a guy that used them for his reef/aquarium.

Regarding the $15 Mega w/ Ethernet Shield, I found the pair on fleabay for $30 from China and purchased them, but I’m seeing mixed reviews about extremely cheap Chinese tech, and when considering the gravity of what we’re doing this for, that’s one area I didn’t feel comfortable entrusting my grow to the cheapest one I could find. Don’t get me wrong, I know the Chinese name is catching a bad rep regarding lower quality craftsmanship and engineering, but when comparing to American made prices, the better savings is with the cheap Chinese products, that is until I get rolling and producing. Then of course I can shop for higher end gear. If I didn’t go with the Freetronics Ethermega, I likely would have got an Italian made Arduino.

1 Like

Yes, they are. That’s the reason why measure circuit has to be galvanically separated. I have both EC and pH done this way. The black block is a DC-DC charge pump(converter), like this one.

OK, let’s do some summary:
Shield - 115,-
pH module+probe - 149,-
EC module+probe 217,-
EtherMega 119,-

600,- USD
WOW! That’s a huge investment for me, when I consider that comes with no code and not assembled (power source, box, etc.). For that money I can build Growduino with four sockets(relays) and full set of sensors (also with CO2), internal UPS and all the code finished with integrated webserver- AllInOne.
But OK, I understand the principle - to develop a prototype and then in the second stage of a “project” to lower the costs for next production.

About “Chinese build quality” - I’ve compared italian and chinese Arduinos and ethernet shields many times and there is no diference in quality, stability, even in return rates.


But back to Dosing pumps - my idea is some automation based on user inputs - for example:
I have Solution A, B and C and I know, that they must be mixed with exact amount of water depending on grow stage, plants size, EC…

So the user will put theese data into a web page/form like:
Solution A per 100 l : 150ml
Solution B per 100 l : 80ml
Solution C per 100 l : 40ml
Solution n…
Amount of water : 50L
Minimum EC
Maximum EC
Minimum pH
Maximum pH

(100L = 100 litres)

The machine will be able to mix a new full barrel of water with fertilizers and desired pH and EC, switch the valve to stop using old water in the system and use this new one, and keep desired pH for the whole period until a new mix is needed (based on water level sensor and maybe user defined time (because of organic solutions). In the mean time it will flush the old barrel with clean water and it’s prepared to mix a new fertilizers into it and start a cycle again. And also user can dose into running system any amount of any solution manually any time.

I will call it “two barrels and one machine” way :slight_smile:

The question is - is it suitable for hydro, aero, and even soil grow? Can it be done this way?

1 Like

ATM, I only have the Ethermega, relays, RTC, dosing pumps and DHTs. The Atlas stuff is on my wish list. The dosing pumps cost about as much as the rest combined. I get that the EC and PH circuits and probes can be DIYed, however, this goes well beyond my understanding of circuitry and IMO, I need to leave that depth of involvement to engineers. TBH, I’m surprised I was able to produce a functional 8 channel motor controller in only 3 tries, but those circuits are small in nature, and there is plenty of well documented tutorials on the web to build a typical TIP120 circuit. That aside, I am learning new things everyday in code and in circuitry. I’d definitely like to elevate to that skill level one day, but I’m nowhere near there yet. Also, it will be months before I can begin to invest in any Atlas stuff, so who knows, maybe I’ll advance before then.

As far as the topic of this thread is concerned, I have the dosing pumps part covered in both hardware and code. The only changes that remain to be made are changing constant variable values in the code. I spent roughly $135 to acquire all 8 pumps, and maybe an additional $50 on components and 3 solderable breadboards, (I ruined two of them). But with all things I build from an idea, I always vastly overspend due to not having the best knowledge of what to buy and what not to buy. That said, I think the 8 dosing pumps thing could’ve been built for est $80 excluding power supply. All that’s needed are any 12 volt motor and a peristaltic dosing pump head. These heads merely press onto the motor shaft and the 3 little drums in each pump simply press against the motor shaft so the pump is passively driven by the motor. The Peristaltic Heads are only $4, and last I checked 12 volt motors are relatively cheap. Have you begun building your doser, or are you still doing research?

1 Like

I’m still developing Growduino, this time it’s V2 - completely rewritten code for OrangePi (we need encrypted communication and sql database for much higher reliability). But in the mean time I’m doing a research and think about how to do software logic model properly for dosing pumps module. That’s why I created this topic :slight_smile:

And of course, I would like to connect it with Growduino, so users will see everything on one screen (web browser).

1 Like

I tried that a little over a year ago. That was my vision to have my own website, to forward all data feeds to it, and also configure the site to send commands back to the hardware, but my lack of coding knowledge and browser knowledge left me twiddling my thumbs. I had a wordpress domain through hostGator, but I just couldn’t find anything descriptive enough to help me link my hardware to my website. I’ve since taken down the site and gave up trying to network my hardware that way as it was simply too advanced for me. TBH, I hope one day, these canna forums will be able to receive these streams and be able to link them to our journals. It would be soooooo much easier if other growers could look at all of my room stats and water stats when trying to help me diagnose different things. When you get your SQL setup and the like, I hope you’ll give me some clarity how to reproduce the result, I’d love to reopen my site. In the meantime though, I will continue to use Blynk. If you ever get bored, you should give Blynk a shot. It works with all of the popular hardware out there, and basic project can be made for free, and server interaction is always 100% free. I would have to read more in their DOCS section, but I think their server could be used to reformat the data to be sent out again to another server. This might give you another means to achieve the same end result. If it’s not for you, that’s cool too, but I wanted to share with you anyway.

Hi guys.
Very interesting discussion.
What do you think about stepper motor dosings pomps ? they appear to be very accurate and therefore adequate for our needs.

Didn’t think about that yet. But yes - accuracy is crucial in dosing. I think that we need sometning as low as 1 ml of dosage as minimum amount. And we need it accurate - not 0,8 or 1,2 but 1ml exactly. (or gallon units equivalent for nonmetric systems).

Question is - can non stepper motors on already completed dosing pumps be accurate enough? Or do we need perfect stepper motor dosing pumps, which can be more expensive?

Yes stepper motor pumps can be more expensive but may be not that much compared to another pump that would be as accurate. And as skybound mentioned it is possible to assemble a stepper motor with a peristaltic head for not too much.
But you are right, the question is whether a “normal” pump can be accurate enough for our needs. The fact that skybound measured different volumes on each of its pumps would tend to show that this is not the case (at least for this type of pumps).


The motors in my pumps are Chinese brushed motors, and I doubt much thought went into precision of winding wires, so it is likely this reason my pumps produced differently. None the less, I’ve found something of a work around that is getting me much closer to perfect dosing. I’ve found that the static multipliers I used previously in code were very incorrect and lead to inaccuracy. It turns out, that the multiplier variable needs recalibration depending the requested dose volume. Like 0-10ml I set the multiplier to 1005 ms, 10-20ml = 960-940ms and it continues to curve until about 40ml doses, then it plateaus at 900ms. So let’s say I wanted a dose of 64ml of anything, I tell Arduino through Blynk that the multiplier to be used in the math is 900 milliseconds and the Arduino keeps the pump active for 64ml x 900ms = 57.6 seconds the pump is powered on for. Of course there are other factors such as viscosity, tubing size, length and rigidity, available current and voltage. I’ve seen videos of people running 12v motors upwards of 18 volts for increased output, but likely will greatly shorten motor life.

Brushless motors and also stepper motors look like better options in terms of accuracy, but first there’s the increased cost per motor, but also in my situation, added I/O per motor are required and my project is already nearing the max point. I have unused I/O pins earmarked for PH, EC, water temp and dissolved O2, 13 valves, 8 more relays, two CO2 sensors. All of the I/O budgeting aside though, it might even be wise to assign the dosing module it’s very own Arduino and monitor and control that via I2C, but this is beyond my budget ATM, but after a few chops, who knows, the sky is the limit!

Video update of the pumps progress


This thread is bookmarked im very interested in full automation and it seem you hold the good way plz post more picture of your setup

Stay safe and grow hard

Hi guys! What is the status of the nutrient doser? Also how far is the update to the OrangePi?

Hi Max, the development goes very slow due to developer free time. Growduino OrPi version changed a few times and we had to start from scratch, but now it looks good. We have switched to , which has wi-fi and also - and this is most important - onboard eMMC flash memory. This memory is much more reliable than microSD cards, and has also much faster read/write.

About dosing pumps - this development has not started yet, Growduino V2 has a priority.

My dosers are still on the back burner. Some new developments have kept me from getting back to them, but I do have a 3d printable 4 pump design that will hold an ESP8266 and 2 -L298N motor drivers, 4 pumps and inlet 12V, so all I’ll need to add is 12 volts running power and the ESP will get it’s power from the motor drivers. I’m also in the process of migrating my project over to several ESP boards so everything can communicate wirelessly. When all’s said and done, I plan to run 12-16 dosers. I’m also looking to see if I can build everything to sell on eBay or Amazon for about $100, maybe less for each bank of 4 pumps, code and wireless connectivity.

1 Like

Hello Skybound,
I’ve been looking again to your schematics and maybe it’s time to start thinking about developing my own dosing system. I have to realize how the water is flowing, maybe the system can be much more simpler, because the water do not need to be dosed permanently. Let’s think about steps:

  1. Put a new water in tank 2.
  2. Insert pH+ or - for set desired pH, spin the water enough to stabilize.
  3. Insert nutritients according to user settings, spin the water enough to stabilize.
  4. Measure pH and aditionally set + or - again, spin the water enough to stabilize.
  5. Pump nutrified and pH stabilized water into tank 1, from where plants are watered. Flush tank 2 a bit clean water into waste.
  6. When there’s not enough water in tank 1, flush the rest into waste, flush with clean water a bit, repeat from step 1.

Is it OK?

And if You want, You can see my project Growduino V2 - it’s finished and can be manufactured!

1 Like