Go to Top

Arduino Controlled Dosing Pumps

Aquarium controllers can make your life easier.. especially when it comes to remembering to dose your aquarium.  I recently started a new planted tank and realized how bad my lax dosing schedule was… to fix this i decided to build an arduino based dosing system. Yes it may be overkill.. but I do love automation and building so this seemed like the perfect project! They dosing shield consists of an RTC DS1307. I searched the web for countless hours researching how to build this project… I found lots of bits of information but no complete guides so i decided to do this write up as a step by step guide for the beginner arduino builder.

Arduino Auto Doser

Shopping list:

DS1307 RTC  $3.50
Arduino Uno ATmega 328 $15
Arduino Prototype Shield $5.50  (optional but recommended)3x 1k Resistor
3x IRFZ44N (or any other N channel transistor)
3x Diodes
1x l7805cv   – 5V regulator
3x Dosing pump (ebay)

arduino dosing pump controller IMG_3398

Find a box to mount your project in… This lovely tea box was a whopping $3  and makes a perfect project box.  IMG_3406

Drill some holes yo mount the motors. IMG_3408

Paint your box if desired them mount your components.
IMG_3418 IMG_3433

Update: I finally got a proper tube holder!

tube-holder-aquarium-doser

The Schematic:

arduino controlled dosing pumps

arduino controlled dosing pumps

Arduino Sketch

// Deven Rich   12-5-2013
// This project was built on the Arduino Uno - ATmega328P
// I would also like to give credit to Maurice Ribble for providing chunks of the RTC code
// This code sets up the DS1307 Real Time clock on the Arduino board to controll 3 dosing pumps
// The RTC keeps track of time, the code checks it and turns on the pumps at a specified time
// to dose your aquarium

#include "Wire.h"
#define DS1307_I2C_ADDRESS 0x68

// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
return ( (val/10*16) + (val%10) );
}

// Convert binary coded decimal to normal decimal numbers
byte bcdToDec(byte val)
{
return ( (val/16*10) + (val%16) );
}

// Stops the DS1307, but it has the side effect of setting seconds to 0
// Probably only want to use this for testing
/*void stopDs1307()
{
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.write(0);
Wire.writeWire.writeWire.write(0x80);
Wire.endTransmission();
}*/

// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock
// Assumes you're passing in valid numbers
void setDateDs1307(byte second,        // 0-59
byte minute,        // 0-59
byte hour,          // 1-23
byte dayOfWeek,     // 1-7
byte dayOfMonth,    // 1-28/29/30/31
byte month,         // 1-12
byte year)          // 0-99
{
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.write(0);
Wire.write(decToBcd(second));    // 0 to bit 7 starts the clock
Wire.write(decToBcd(minute));
Wire.write(decToBcd(hour));      // If you want 12 hour am/pm you need to set
// bit 6 (also need to change readDateDs1307)
Wire.write(decToBcd(dayOfWeek));
Wire.write(decToBcd(dayOfMonth));
Wire.write(decToBcd(month));
Wire.write(decToBcd(year));
Wire.endTransmission();
}

// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
// Reset the register pointer
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.write(0);
Wire.endTransmission();

Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

// A few of these need masks because certain bits are control bits
*second     = bcdToDec(Wire.read() & 0x7f);
*minute     = bcdToDec(Wire.read());
*hour       = bcdToDec(Wire.read() & 0x3f);  // Need to change this if 12 hour am/pm
*dayOfWeek  = bcdToDec(Wire.read());
*dayOfMonth = bcdToDec(Wire.read());
*month      = bcdToDec(Wire.read());
*year       = bcdToDec(Wire.read());
}

//define pins
int motorPin1 = 9;
int motorPin2 = 10;
int motorPin3 = 11;

void setup()  // run once, when the sketch starts
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
pinMode(motorPin1, OUTPUT);
pinMode(motorPin2, OUTPUT);
pinMode(motorPin3, OUTPUT);

Wire.begin();
Serial.begin(9600);

// Change these values to what you want to set your clock to.
// You only need to run this the first time you setup your RTC.
// Set the correct value below and un comment it to run it.

/*
second = 45;
minute = 55;
hour = 9;
dayOfWeek = 2;
dayOfMonth = 30;
month = 4;
year = 13;
setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);

*/

}
void loop() // run over and over again
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

// this prints the output to the serial window (tools > serial monitor in arduino) and is great for testing
getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
Serial.print(hour, DEC);
Serial.print(":");
Serial.print(minute, DEC);
Serial.print(":");
Serial.print(second, DEC);

// Set the time you want the motors to kick in
if((hour == 21)&&(minute == 23)&&(second==10)){
Serial.print(" TRUE");
Serial.println(" ");
Serial.println(" MP1");
analogWrite(motorPin1, 255);
delay(8500); // set how long you want the motor to run... 1000 = aprox 1ml

analogWrite(motorPin1, 0);
Serial.println(" MP2");
analogWrite(motorPin2, 255);
delay(9500); // set how long you want the motor to run... 1000 = aprox 1ml

analogWrite(motorPin2, 0);
Serial.println(" MP3");
analogWrite(motorPin3, 255);
delay(5500); // set how long you want the motor to run... 1000 = aprox 1ml
analogWrite(motorPin3, 0);

}
// we dont really need this since we set the pin to low above but just incase :) 
else{Serial.println(" false");
analogWrite(motorPin1, 0);
analogWrite(motorPin2, 0);
analogWrite(motorPin3, 0);
}

delay(1000);

}

Let me know if you have any questions and enjoy your new Arduino Dosing pumps!

As request I snapped a pic of the underside of the board

20140204-081636.jpg

, , , ,

40 Responses to "Arduino Controlled Dosing Pumps"

  • Arduino auto dosser - Page 3
    May 13, 2013 - 10:25 pm Reply

    [...] I fainlly got mine doser built and runing. For those included to build their own I posted the code and schematics at Arduino Controlled Dosing Pumps [...]

  • Andrew
    May 14, 2013 - 2:04 pm Reply

    Where u get ur motor?

  • admin
    May 14, 2013 - 9:11 pm Reply

    They were $20 each off ebay

  • Justin
    May 28, 2013 - 8:58 pm Reply

    What is the Arduino Prototype Shield supposed to be for? The link for that is missing.

  • Deven
    May 28, 2013 - 9:16 pm Reply

    Hey Justin, i fixed the link above for the Prototype shield.

    Its generally used with the mini breadboard but i soldered directly to it to create my final product.You could do this with a breadboard or one of the blank diy boards but the protosheild give you a nice clean pre-pinned board to build onto.

  • Shey
    June 3, 2013 - 2:17 am Reply

    Hi there, this is exactly what im looking for, but I want the pumps to turn on at different times, for example I want pump 1 to turn on at 1900 on Monday / Wed / Fri and pump 2 to turn on at 1900 on Tues and Thur and Sat. pump three isnt used at the moment, but will be eventually. Can you please help with the code? Cheers!!

  • Deven
    June 3, 2013 - 4:55 am Reply

    To do that you will have to break up the IF statement into a statment into one for day/time you want to run a specific pump.
    exmpale:

    //day 1 at 9:20 am for 8.5 seconds
    if((dayOfWeek=1) && (hour == 09) && (minute == 20) && (second==10)){
    analogWrite(motorPin1, 255);
    delay(8500); // set how long you want the motor to run… 1000 = aprox 1ml
    }
    analogWrite(motorPin1, 0); //turn off motor.

    //Day 3 4:20 pm turn on pump 2 for 10 seconds.
    if((dayOfWeek=3) && (hour == 16) && (minute == 20) && (second==10)){
    analogWrite(motorPin2, 255);
    delay(10000); // set how long you want the motor to run… 1000 = aprox 1ml
    }
    analogWrite(motorPin2, 0); //turn off motor.

    Hope that clears it up a bit :)

  • Automated aquarium fertilizer doser
    June 4, 2013 - 7:02 pm Reply

    [...] If you are using live plants in your aquarium you must remember to fertilize them at regular intervals. Being a bit forgetful, [Deven] automated the process by building this auto-doser. [...]

  • rndm(mod) » Automated aquarium fertilizer doser
    June 4, 2013 - 7:06 pm Reply

    [...] If you are using live plants in your aquarium you must remember to fertilize them at regular intervals. Being a bit forgetful, [Deven] automated the process by building this auto-doser. [...]

  • ozonejunkie
    June 5, 2013 - 6:09 am Reply

    How have you found the quality of the peristaltic pumps? I have found a number of references that indicate that these low price units from China are not worth the asking price, is that your experience?

    I’m keen to give this a go, have been accumulating parts for a while!

  • Deven
    June 5, 2013 - 6:14 am Reply

    So far they have been working awesome for me. there are higher grade (medical) dosing pumps out there but they also come with a higher prices tag. For any hobby project i would defiantly recommend them for the price…

  • David James Ryan
    June 5, 2013 - 7:42 am Reply

    What happens if during that delay 1000 at the end (and however many ms to check the time each loop, the rtc skips that exact second you’re looking for? I’d either lower/remove the last delay, or use something like if (seconds > x && seconds < x2) instead of (seconds = x)

    I'll be doing something like this eventually, will be sure to post back with my adventure :)

    Awesome project!

    • Tyler T
      August 16, 2013 - 2:52 pm Reply

      Mr. Ryan you are entirely correct, this is a race condition waiting to happen. The delay(1000) should be shorter. I’d use 500ms personally, but anything up to 900ms would probably work fine.

  • Tom
    June 5, 2013 - 3:40 pm Reply

    Great build, I too have been looking at the Chinese peristaltic pumps. Did yours come with the internal silicone tubing or was that a separate buy.

  • limel
    June 13, 2013 - 7:19 pm Reply

    Is there any particular reason why you did not use the 12V power for Arduino but the 5V across l7805cv ?
    Arduino can be also supplied with a voltage of 12V.

  • Deven
    June 13, 2013 - 8:10 pm Reply

    David James Ryan – There really is no point to that.. I think it was there from my initial testing/build and i never bothered removing it.. Be sure to post back with your progress and let me know if you have any questions. I just got a arduino mega and micro in the mail.. so I’m already brainstorming the next project :)

    Tom – The Pumps came with a small attached chunk of silicone tube. Conveniently (with a bit of work) fit inside of standard airline tubing which i slid the pump tubes into. It was a bit of a battle to slide them in so its a friction fit but in the past few weeks there has been no issues. you can get dosing pump tubing but i all of the ones i found were overly priced for silicone tube.

    limel – The arduino can accept 12V in but i don’t believe any of the pins output any higher then 5v. I wanted to build it all on to the add on board. In order to accept the 12V i believe i would have had to solder to the power jack pins on the uno.. (i may be wrong.. but i didn’t see a source for 12V on the board itself)

    • Nick
      February 19, 2014 - 9:06 pm Reply

      I think this can be done from the Vin pin? I just looked it up, and it seems that’s whatever the input voltage is. This would make it possible to use a wall wort direct into the arduino in lieu of the 7805v regulator.

  • Sage
    June 30, 2013 - 9:24 am Reply

    I am looking at the Peristaltic Pumps on Ebay and I am wondering which type I need or if it makes a difference. Do I need the 6v, 12v, or 24v pump?
    What is the life expectancy of these Ebay pumps from Hong Kong?
    If the pumps fail, will it overdose my tank and kill my fish, or will they just not dose at all?
    I have 2 large planted tanks sitting next to each other, would it be difficult to turn this into a 6 pump system that can handle both tanks at the same time?(same size tanks) Or would I be better off building two units?
    Also what type of probe/cable/tube holder are you using to keep the dosing lines near your circulation pump?

    Thank you for your time in putting together and posting this awesome project. I can see it making life much simpler, at an affordable price. Once I have this all figured out on the home tanks, I will likely build one for the big tank in my store as well. Thanks again!

    -Sage

  • Deven
    June 30, 2013 - 5:57 pm Reply

    Hey sage.
    If I were you I would do a single system with 4 pumps. You only really need 2 pumps per tank .. 1 for macros and 1 for micro nutrients.

    This could all be down from a single board. I went with 12v pumps but 6v would work as well(what ever is cheaper!) since the pumps are only on or say 5-10 seconds the the controller is providing power I wouldn’t ever worry about overdosing. The pump heads are a little gear box, the gears being stripped would be the only potential (and highly unlikely) possibility. So unless you tell your code to turn them on to long I wouldn’t worry about it.

  • Nick Powers
    July 19, 2013 - 1:47 pm Reply

    Deven,

    Great project! Thanks for sharing it with us. I’m looking into a similar application and wonder if you might be able to answer a few of my questions?

    How precise is the measurement of the dosing? I’m wondering what the minimum amount that could be dispensed at a time with this type of setup.

    Do you have to prime the unit initially to get the fluid into the line? When not pumping does it stop the fluid in the line from flowing (on both sides of the pump)?

    Thanks again,

    Nick

  • Deven
    July 19, 2013 - 4:40 pm Reply

    The pumps are fairly precise for the price. You can get higher precision but it comes with a higher price tag. you control the dosage by how many milliseconds you apply power to the pumps.. so i’m sure you could tweak/test it to fine tune your desired results.

    You would have to run the pumps for a few seconds initially to get the fluid through the lines

  • Mathias
    August 10, 2013 - 1:39 am Reply

    Hey, could you provide the info of the pumps?
    Model, etc…
    Thanks

  • josif
    August 11, 2013 - 9:20 am Reply

    A half year ago i was searching diy automatic doser too. My priority was inexpensive dosing system and i found this good page https://sites.google.com/site/yourcreativeautomation/diy-auto-dosing-system-for-the-aquarium-ii . Here were used the same or similar cheap peristaltic pumps from ebay, like you did. I recently made this doser, it has many functions. For example i liked that i dont need manually calculate time amount, for which pumps must stay on, it is done automatically.

  • MIchael
    August 13, 2013 - 10:46 pm Reply

    Just ordered my parts, and can’t wait to try this out on my reef tank! Thanks for the How-To, do you happen to have any more pictures of the way the board was wired together?

    Thanks

  • Robert
    August 14, 2013 - 6:43 pm Reply

    Hello

    Sorry for my poor English and I hope you can understand me :)

    Can you please send pictures from top and behind Prototype Shield board? And can i use and how to connect all of that on shield board:
    -20X4 Character LCD Module Display For Arduino
    -Matrix Array 4×4 16 Key Membrane Switch Keypad
    -DS3231 AT24C32 IIC Real Time Clock (i think that those pins are the same as on DS1307)
    Hope you can help me :)

    Kind regards
    Robert

  • Franklin Dattein
    September 7, 2013 - 12:20 am Reply

    Deven,

    I am trying to adapt your project to 6V pumps and a 6V power source, so I can power the pumps out of the Arduino 5V pin.
    This would save a voltage regulator and allow me to use the 6V pumps off eBay, which have a cooler looking compared to the 12V ones.

    However, it seems that the IRFZ44N transistor doesn’t get activated with 5V logic. Would you know what transistor would do the job? (I am pretty bad at reading electronic component datasheets)

    thanks and congrats for such a nice project.

  • Derek
    October 16, 2013 - 2:44 am Reply

    With the tubes left in the water of the aquarium, wont they continue to leach fertilizer throughout the day? I would think this would cause some real over dosing issues. Or maybe im wrong?

  • adham
    October 29, 2013 - 11:17 am Reply

    hi

    I working on project probably quite similar to this. I want to control EC level of water tank. The EC sensor will feed signal to arduino. If the EC too high, the arduino will operate Pump 1 that add water to the tank. If EC too low, the arduino will operate Pump 2 that add fertilizer solution to the tank.

    Can you explain what i need to create the circuit

    Thank you

  • SteveS
    January 12, 2014 - 5:21 am Reply

    what 12v power supply are you using? can you provide more concise info on how you wired it to the board?
    thanks!

  • Deven
    January 12, 2014 - 5:32 am Reply

    Mathias – I’m not sure of the model. but if you search for 12V dosing pump on ebay they will pop up.

    Robert – Do you still need a pic of the back of the board? I can take one if so :)

    Franklin Dattein – i’m not to sure off hand.. but do a search for 6V transistor. I’m sure you will find something.

    Derek- It possible that ferts may be leeching into the water since the tubs are submersed.. in theory I should be adding check valves close to the top.. i havent bother yet beacause if its happening it will be very minimal. – Future add on! :)

    adham – The only real addition would eb the EC sensor. You would have arduino constantly check the levels (or every so often) and have an if statement.. IF read EC sensor > 200 do this.. if < 100 do this. ect.

    SteveS – The 12V power supply goes directly to the voltage regulator. The Voltage Regulator has 3 pins +12V Ground and +5V The 12V goes connets to the power supply positive and the positive on the dosing pumps. the +5V pin on the Voltage reg goes to the +5v on the arduino board to power it.

  • Robert
    January 12, 2014 - 8:54 am Reply

    Deven thanks for help but my dosing pump is already finish :D. I will make the new one with ULN2003 for more pumps and Mega 2560 ATmega2560-16AU Board for arduino + 3.2″ TFT LCD with Ph meter and temp. sensor.

    • Robert
      January 12, 2014 - 8:58 am Reply

      I forgot to ask for what does 255 in this line analogWrite(motorPin1, 255) stand for? I have value 1 instead 255.

  • Deven
    January 12, 2014 - 2:51 pm Reply

    Nice work Robert! I have is waiting for a future project! (once i decide on what.. ).. i may have to add on to my doser :)

    255 is the PWM signal.. It can be anywhere 0-255.. where 0 is off 255 is the fully on. If you were using this to control an LED.. then this is how you would dim/control the brightness. 255 in the dosing situation just means fully on to the pumps. a lower value would slow it down (providing they can handle it)

  • Nick
    February 11, 2014 - 3:43 pm Reply

    OK so I got this working. Thank you for posting the pic of your shield underside. Is it normal that my timers reset when I unplug the system? I was under the assumption that the RTC would keep time using its battery should the whole system lose power.

    • Nick
      February 11, 2014 - 9:41 pm Reply

      Belay my last. This happens if you forget to comment back out the current clock time.

  • Nick
    February 18, 2014 - 8:27 pm Reply

    Just wanted to say thank you for making this tutorial. It helped inspire me to start playing with arduino and do something useful. I made a few small changes I thought you might find interesting. I had some extra parts laying around from some arcade stick mods and used .110 disconnects for the pump contacts. I also had a usb passthrough which I installed on the box so I don’t have to open the box to program should I want to mess around with the code. The last thing I did was install a small power pass through that matches the 12v power supply I chose.

    I was thinking it would be cool to add connectivity so it’ll tweet or something when it runs, or add led’s to the pumps that light up on the front of the case when one is running. I know its just eye candy but I think it’s cool.

    Also, what do you think about the code to run the pump being a function where you pass the motorpin and delay time?

  • Robert
    March 4, 2014 - 8:26 pm Reply

    Hi again :)

    I build a second arduino Leonardo R3 dosing pump. But I have some problem with fourth dosing pump at boot up Leonardo. I used digital pins 9, 10, 11 and 12 and the last one 12 is always ON and runing until Leonardo boot up this is about 5 sec. But when LCD turns ON pump turn off and the program is working normaly.

    Kind regards

  • Abel
    March 26, 2014 - 8:39 pm Reply

    thanks for the code. this is my sketch i made for a 2 pump doser.

    // Deven Rich 12-5-2013
    // This project was built on the Arduino Uno – ATmega328P
    // I would also like to give credit to Maurice Ribble for providing chunks of the RTC code
    // This code sets up the DS1307 Real Time clock on the Arduino board to controll 3 dosing pumps
    // The RTC keeps track of time, the code checks it and turns on the pumps at a specified time
    // to dose your aquarium

    #include
    #define DS1307_I2C_ADDRESS 0×68

    // Convert normal decimal numbers to binary coded decimal
    byte decToBcd(byte val)
    {
    return ( (val/10*16) + (val%10) );
    }

    // Convert binary coded decimal to normal decimal numbers
    byte bcdToDec(byte val)
    {
    return ( (val/16*10) + (val%16) );
    }

    // 1) Sets the date and time on the ds1307
    // 2) Starts the clock
    // 3) Sets hour mode to 24 hour clock
    // Assumes you’re passing in valid numbers
    void setDateDs1307(
    byte second, // 0-59
    byte minute, // 0-59
    byte hour, // 1-23
    byte dayOfWeek, // 1-7
    byte dayOfMonth, // 1-28/29/30/31
    byte month, // 1-12
    byte year) // 0-99
    {
    Wire.beginTransmission(DS1307_I2C_ADDRESS);
    Wire.write(0);
    Wire.write(decToBcd(second)); // 0 to bit 7 starts the clock
    Wire.write(decToBcd(minute));
    Wire.write(decToBcd(hour)); // If you want 12 hour am/pm you need to set
    // bit 6 (also need to change readDateDs1307)
    Wire.write(decToBcd(dayOfWeek));
    Wire.write(decToBcd(dayOfMonth));
    Wire.write(decToBcd(month));
    Wire.write(decToBcd(year));
    Wire.endTransmission();
    }

    // Gets the date and time from the ds1307
    void getDateDs1307(
    byte *second,
    byte *minute,
    byte *hour,
    byte *dayOfWeek,
    byte *dayOfMonth,
    byte *month,
    byte *year)
    {
    // Reset the register pointer
    Wire.beginTransmission(DS1307_I2C_ADDRESS);
    Wire.write(0);
    Wire.endTransmission();

    Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

    // A few of these need masks because certain bits are control bits
    *second = bcdToDec(Wire.read() & 0x7f);
    *minute = bcdToDec(Wire.read());
    *hour = bcdToDec(Wire.read() & 0x3f); // Need to change this if 12 hour am/pm
    *dayOfWeek = bcdToDec(Wire.read());
    *dayOfMonth = bcdToDec(Wire.read());
    *month = bcdToDec(Wire.read());
    *year = bcdToDec(Wire.read());
    }

    //define pins
    int ato = 9;
    int vinegar = 10;
    //int motorPin3 = 11;

    void setup() // run once, when the sketch starts
    {
    byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
    pinMode(ato, OUTPUT);
    pinMode(vinegar, OUTPUT);
    //pinMode(motorPin3, OUTPUT);

    Wire.begin();
    Serial.begin(9600);

    // Change these values to what you want to set your clock to.
    // You only need to run this the first time you setup your RTC.
    // Set the correct value below and un comment it to run it.

    /* remove line to set time on RTC
    second = 00;
    minute = 40;
    hour = 12;
    dayOfWeek = 2;
    dayOfMonth = 17;
    month = 3;
    year = 14;
    setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);

    */ //Remove Line to set time and Date

    }
    void loop() // run over and over again
    {
    byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

    // this prints the output to the serial window (tools > serial monitor in arduino) and is great for testing
    getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
    Serial.print(hour, DEC);
    Serial.print(“:”);
    Serial.print(minute, DEC);
    Serial.print(“:”);
    Serial.print(second, DEC);
    Serial.println();

    // Set the time you want the motors to kick in
    if((hour == 10)&(minute == 00)&(second==00)){
    Serial.print(“Dosing”);
    Serial.println(“:”);
    Serial.println(“ATO”);
    analogWrite(ato, 255);
    delay(300000); // =5min set how long you want the motor to run… 2000 = aprox 1ml 25ml/sec
    analogWrite(ato, 0);}

    if((hour == 10)&(minute == 15)&(second==00)){
    Serial.print(“Dosing”);
    Serial.println(“:”);
    Serial.println(“Vinegar”);
    analogWrite(vinegar, 255);
    delay(12000); // =6sec set how long you want the motor to run… 2000 = aprox 1ml 27ml/sec
    analogWrite(vinegar, 0);}

    /*
    if((hour == 10)&(minute == 05)&(second==00)){
    delay(10000); //Time between pump running
    Serial.println(“Vine”);
    analogWrite(motorPin3, 255);
    delay(60000); // set how long you want the motor to run… 1000 = aprox 1ml
    analogWrite(motorPin3, 0);}
    */
    }

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>