Blue281
New Member
Simple Automatic Watering System.
What you'll need:
1 - Arduino UNO rev 3
1 - USB cable
1 - 12v 1000mA DC power supply
1 - 1N4001 diode
1 - PN2222A transistor
1 - 220 ohm resistor
1 - peristaltic pump
1 - tubing that fits your peristaltic pump (not pictured)
2 - wire (not pictured)
jug, glass, vase, or any other vessel that can contain water (not pictured)
Tools: wire snippers, soldering iron + solder (not pictured)
Step one protect the motor, solder the 1N4001 diode between the two connection on the motor. The end with the silver band on the diode should be facing towards the positive side of the motor as shown in the photo below.
Step two protect the Arduino board, solder the 220 ohm resistor onto the centre pin of the PN2222A transistor as shown in the photo below.
Step three wire up the transistor to the board. The emitter pin goes to the GND, the base pin with the resistor soldered too goes into the A0.
Step four solder your two pieces of wire to the motor. As shown below
Step 5 connect the motor. The positive wire goes to the Vin and the negative wire goes to the final pin on the transistor. As shown below.
Step 6 Connect the Arduino to your PC using the USB cable. Download the correct software from Arduino's website. A quick google and you can find this easily. Once you have the software running, you can copy this code across. You can edit the numbers 5 and 60 at the top to your desired times.
int motorPin = A0; // pin that turns on the motor
int watertime = 5; // how long to water in seconds
int waittime = 60; // how long to wait between watering, in minutes
void setup()
{
pinMode(motorPin, OUTPUT); // set A0 to an output so we can use it to turn on the transistor
}
void loop()
{
digitalWrite(motorPin, HIGH); // turn on the motor
delay(watertime*1000); // multiply by 1000 to translate seconds to milliseconds
digitalWrite(motorPin, LOW); // turn off the motor
delay(waittime*60000); // multiply by 60000 to translate minutes to milliseconds
}
Final step connect the tubing to the pump. I have mine coming from a Oasis watering system as my water sources but you can just place the Inlet tube into a bottle or glass of water. Then run the outlet tube from the pump to your plant.
If you have any questions please ask, thanks
What you'll need:
1 - Arduino UNO rev 3
1 - USB cable
1 - 12v 1000mA DC power supply
1 - 1N4001 diode
1 - PN2222A transistor
1 - 220 ohm resistor
1 - peristaltic pump
1 - tubing that fits your peristaltic pump (not pictured)
2 - wire (not pictured)
jug, glass, vase, or any other vessel that can contain water (not pictured)
Tools: wire snippers, soldering iron + solder (not pictured)
Step one protect the motor, solder the 1N4001 diode between the two connection on the motor. The end with the silver band on the diode should be facing towards the positive side of the motor as shown in the photo below.
Step two protect the Arduino board, solder the 220 ohm resistor onto the centre pin of the PN2222A transistor as shown in the photo below.
Step three wire up the transistor to the board. The emitter pin goes to the GND, the base pin with the resistor soldered too goes into the A0.
Step four solder your two pieces of wire to the motor. As shown below
Step 5 connect the motor. The positive wire goes to the Vin and the negative wire goes to the final pin on the transistor. As shown below.
Step 6 Connect the Arduino to your PC using the USB cable. Download the correct software from Arduino's website. A quick google and you can find this easily. Once you have the software running, you can copy this code across. You can edit the numbers 5 and 60 at the top to your desired times.
int motorPin = A0; // pin that turns on the motor
int watertime = 5; // how long to water in seconds
int waittime = 60; // how long to wait between watering, in minutes
void setup()
{
pinMode(motorPin, OUTPUT); // set A0 to an output so we can use it to turn on the transistor
}
void loop()
{
digitalWrite(motorPin, HIGH); // turn on the motor
delay(watertime*1000); // multiply by 1000 to translate seconds to milliseconds
digitalWrite(motorPin, LOW); // turn off the motor
delay(waittime*60000); // multiply by 60000 to translate minutes to milliseconds
}
Final step connect the tubing to the pump. I have mine coming from a Oasis watering system as my water sources but you can just place the Inlet tube into a bottle or glass of water. Then run the outlet tube from the pump to your plant.
If you have any questions please ask, thanks