Vous êtes sur la page 1sur 37

let's make

Explore (/tag/type-id/)

Classes (/classes/) NEW!


what you make
Featured: share (/tag/type-id/category-craft/channel-leather/)
Leather (/tag/type-id/category-craft/channel-leather/)
(/)
(/tag/type-id/category-outside/channel-camping/) Camping (/tag/type-id/category-outside/channel-camping/)
(/id/Fusion/) Fusion 360 (/id/Fusion/)

Publish (/about/create.jsp)

You

(/id/intel/) Intel IoT (/id/intel/)

(/you/)

(/le/F4O536ZHUBWU0WB/)

Have you ever wanted a little plant to brighten up your desk or home, but
you're afraid that you'll forget to water it? Fear no longer! Using an Arduino, a
scavenged wall-wart, and a peristaltic pump, you can set up your plant to be
watered as often as you like, from a jug or any other vessel. To be as accessible
to as many people as possible, this tutorial can be done without soldering. That
being said, the advantage of soldering is increased robustness and reliability.

About This Instructable

8 125,852 views
504 favorites

Posted:
Apr 23, 2014
License:

Step 1: What you'll need

License:

504 favorites

osmithy
(/member/osmithy/)
(https://plus.google.com/+OwenSmithyman)

Follow
(/member/osmithy/)

33

More by osmithy:

(/id/Automatically-

water-your-small-indoor-plant-using-/)
Tags:

arduino (/howto/arduino/)

automatic (/howto/automatic/)
water (/howto/water/)

(/le/FKV67W9HUBWUT7W/)

plant (/howto/plant/)

Add instructable to:

; Group
What you'll need:

Related
(x1) Arduino UNO rev 3 (http://adafru.it/50 (http://adafru.it/50))
(x1) USB cable (http://adafru.it/62 (http://adafru.it/62))
(x1) 1N4001 diode (http://adafru.it/755 (http://adafru.it/755))
(x1) PN2222A transistor (http://adafru.it/756 (http://adafru.it/756))

Arduino Automatic Watering


System (/id/ArduinoAutomatic-Watering(/id/Arduino-

(x1) 12v 1000mA DC power supply (http://adafru.it/798 (http://adafru.it/798))


(x1) peristaltic pump (http://adafru.it/1150 (http://adafru.it/1150))
(x2) alligator clip test leads (http://adafru.it/1008 (http://adafru.it/1008))
(x1) 1k resistor
(x1) jug, glass, vase, or any other vessel that can contain water (not pictured)
(x1) a piece of scotch or electric tape (not pictured)
Tools: wire snippers, soldering iron + solder (not pictured)

Step 2: Understand your transistor

DIY Thirsty Plant Water


Balloon (/id/Thirsty-PlantWater-Balloon/)
by techwillsaveus
Arduino water system to wet
your plant (/id/Arduinowater-system-to-wet-yourplant/)
(/id/Arduino- by jackbell16
No Pump Automatic
Watering! (/id/No-PumpAutomatic-Watering/)
by Sverd Industries
(/id/No(/member/Sverd+Industries/)
Automatic Plant Watering
and Soil Moisture Sensing
(/id/Automatic-PlantWatering-and-Soil-Moisture(/id/Automatic-Sensing/)

(/le/FVDCAECHUBWUPQB/)

(/le/FSE13ZNHUBWUSO1/)

First, gure out what the dierent pins are on your transistor. The diagram from
the datasheet shows you which pins are the base, collector, and emitter. The
second picture shows how the pins match up to the circuit diagram. This
transistor is awesome because it will allow us to use 5v from the arduino to
switch the much higher 12v required by the motor, which would destroy our
Arduino if we connected it directly to the pins that we can control with our

Arduino code. The PN2222A transistor is great for this purpose because it can
handle 5v from the Arduino and then switch the 12v and much higher current
drawn by the motor.

Step 3: Protect From The Motor

(/le/FUGE732HUBWUU9O/)

(/le/FVOYSFDHUBWUYQK/)

Clip a small (1/2") piece of wire from one end of your diode (if you have other
similar wire, use that instead) and put it aside for the next step.
Attach your diode in reverse across your motor pins. Reverse means that the
negative lead (indicated by the silver band on the diode) connects to the
positive pin on the motor, and the positive diode lead connects to the negative
pin on the motor. I've done it here by soldering, but if you don't have a
soldering iron, you can wrap the diode leads very rmly around/into the holes in
the motor pins. This will prevent any potential damage from energy released
when the motor is switched o.

Step 4: Wire It Up!

(/le/FQDETGEHUBWUYLG/)

(/le/FMORGK1HUBWUYK3/)

(/le/FASUF7QHUBWV5NC/)

(/le/FOOAVCFHUBWV6JP/)

Now wire everything up. Conveniently, we can just stick the transistor directly
into the Arduino.
The emitter pin goes to GND, and the base pin (in the middle) goes to Analog
Pin 0 but with a 1k resistor in series between them. You'll need to solder or
otherwise attach the 1k resistor to the base pin, and then stick the other end of
the resistor into Analog Pin 0. If you don't use the resistor, it may shorten the
life of your Arduino.
Bend the collector pin out so it won't touch the Arduino, and attach an alligator
clip to it. This pin will receive the electricity coming through the motor and allow
it to keep owing. Connect the clip on the other end to the negative pin on the
motor.
Take the little piece of wire we cut and set aside in the previous step and stick it
into the VIN pin hole. Bend it a little so it doesn't touch the transistor.
Connect a clip to the positive pin on the motor, and connect the other end to
the piece of wire in VIN. Tape this clip to the board or otherwise secure it so it
doesn't move around and touch the transistor pins.

A word of warning: it is possible to destroy the chip in your Arduino if you


connect the circuit wrong. Luckily, you can order a new chip
(http://www.adafruit.com/product/123) for $6 (or much less if you get them in
bulk), rather than paying $30 for a whole new Arduino board. But you're more
likely to destroy the transistor, which isn't too bad if you got the 10-pack.
Once you're sure you've got it right (check the picture one more time!!), connect
the power from your 12v adapter to your Arduino. If you've done it right,
nothing will happen. If you've connected it backwards (reversed the collector
and emitter) the motor will weakly spin. If that happens, your transistor is
probably now dead. You can try using it again, but it may not work properly. I
would just get another one.

Step 5: Program your Arduino


Conveniently, the code is incredibly simple. Copy and paste the code into your
Arduino code editor, choose how long you want to water, and how long you
want to wait between watering. If you're in an air-conditioned oce, the air is
usually very dry, which causes the soil to dry out quickly. In that case, you may
want to water a little bit several times throughout the day. The only thing to
remember is that you're using milliseconds, so one hour is 3,600,000
milliseconds.
Unplug your 12v cable and connect the USB cable between your Arduino and
your computer.
Upload your code, then disconnect the USB cable.
Connect the 12v cable to your Arduino, and the motor should immediately run
for 5 seconds.

This code also turns on the built-in LED during watering. If your LED is on but
the motor isn't, you may have missed something.
int motorPin = A0;
int blinkPin = 13;
int watertime = 5000; // how long to water in miliseconds
int waittime = 3600000; // how long to wait between watering
void setup()
{
pinMode(motorPin, OUTPUT);
pinMode(blinkPin, OUTPUT);
}
void loop()
{
digitalWrite(motorPin, HIGH);
digitalWrite(blinkPin, HIGH);
delay(watertime);
digitalWrite(motorPin, LOW);
digitalWrite(blinkPin, LOW);
delay(waittime);
}

Step 6: Implement

Automatically water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

.
I Made it!

Favorite

Share

(/le/FYIKJJUHUBWO4LV/)

So now that you've got a working setup, it's time to put it in place so your plant
can get its water.
Get a jug or glass or whatever you'd like, and put the input (the sucking end) of
Automatically
the pump hose in it.water your small indoor plant using Arduino

+ pump

by

osmithy (/member/osmithy/)

Put the output of the hose in your plant.


Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

Put the Arduino somewhere where it won't get wet.

7 Steps

Collection

.
I Made it!

Favorite

Share

As far as aesthetics are concerned, I kind of like the wires because people
come over and see them and say "What's with the wires... wait, is that some
kind of watering contraption?!" and then I get to tell them all about it and show
them how it works. If you prefer something more discreet, you can put
everything into a box and run the tubes through holes. You could even put the
box under the plant as a stand. Your imagination is the limit.

Step 7: Optimize
You're basically done, but the last thing you should do is check the soil
periodically and see if it's too wet or too dry, and adjust your code accordingly.
If it's too wet, go in and either decrease the 'watertime' variable (to water for
less time) or increase the 'waittime' variable (to water less often).
If the soil is too dry, do the opposite. Be patient, as it may take a few days to
see if your changes are optimal.
Thanks for reading! I plan on writing more Instructables, so please let me know
if you have any feedback. I love sharing what I'm working on, and it makes me
happy when something I've made can be useful to someone else.

Automatically water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

.
I Made it!

Favorite

Share

We have a be nice comment policy.


Please be positive and constructive.

w I Made it!

Add Images

mehmetsukru (/member/mehmetsukru)

Post Comment

2 months ago

Reply

good job!
Flag

Grumpy Mike (/member/Grumpy Mike)

a year ago

Reply

You said:The PN2222A transistor is great for this purpose because it can handle 5v from
the Arduino without any resistors.
This is total and utter rubbish and will result in the Arduino being damaged.
The Arduino has a pin limit of 40mA that is the limit of what it should supply,
not the limit of what it can supply. It is likely that the base current without a
resistor is being limited to about 80mA by the internal impedance of the
Arduino pin and that is stopping the transistor from frying. This current is twice
the level where damage to the Arduino is being done. You NEED a resistor, 1K
should be ne. No doubt you will say it works, but your Arduino will fail a lot
sooner that it otherwise would have.
Flag

X
8

osmithy (/member/osmithy) (author) . Grumpy Mike (/member/Grumpy Mike)

months ago
Reply
Automatically
water your small indoor plant 6using
Arduino
+ pump
I see that you live up to your name. But thanks for

by

osmithy (/member/osmithy/)

catching my mistake! I've updated the Instructable.

Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

Flag

I Made it!

Favorite

Share

FrancisM44 (/member/FrancisM44) . osmithy (/member/osmithy)

Reply

2 months ago

Hi!

Here, 1K prevented the pump to get enough current. I had to use a 220
resistor to make it work.
Flag

FrancisM44 (/member/FrancisM44)

3 months ago

Reply

I made this - thanks a lot for the inspiration! But with me, the 1k resistor was
too much, so it wasn't working. I changed to a 220, and then it worked. I hope
this won't fry my arduino...
Flag

JoshuaK47 (/member/JoshuaK47) made it!

4 months ago

Reply

I made this with a few other instructables, so mine has a soil moisture sensor
$3, connected to pin A5 and using an ethernet shield and set up a very simple
website to monitor the moisture status of my plant. code below,
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x00,0x1F,0xF3,0xD7,0x09,0x4C }; //physical mac address
byte ip[] = { 10, 0, 0, 253 }; // ip in lan (that's what you need to use in your
Automatically
water your small indoor plant using Arduino + pump
browser. ("192.168.0.178")
osmithy (/member/osmithy/)

byte gateway[]
= { 10, 0, 0, 1 }; // internet access via router
(/id/Automatically-water-your-small-indoor-plant-using-/)

Download

byte subnet[] = { 255, 255, 255, 0 }; //subnet mask


EthernetServer server(80); //server port

7 Steps

Collection

by

.
I Made it!

Favorite

Share

String readString;
int relay1 = 2; //relay1 on pin 2
int soil=0;
int motorPin = A0;
//00:1f:f3:d7:09:4c
void setup() {
// Open serial communications
Serial.begin(9600);
pinMode(relay1, OUTPUT);
// start the Ethernet connection and the server:
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
Serial.begin(9600);
pinMode(motorPin, OUTPUT);
}
void loop() {
/*========================================Soil sensor / pump
mechanism============================================

Automatically water your small indoor plant using Arduino + pump


using a 12v pump on 9v analog pin pump is triggered when moisture value falls
osmithy (/member/osmithy/)
within certain threshhold.and stops
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

immediately once it is satised.


*/

7 Steps

Collection

by

.
I Made it!

Favorite

Share

// read the input on analog pin 5:


int sensorValue = analogRead(A5);
sensorValue = constrain(sensorValue, 485, 1023);
// print out the value you read:
if (sensorValue > 900)
{
digitalWrite(motorPin,HIGH);
}
else digitalWrite(motorPin,LOW);
//map the value to a percentage
soil = map(sensorValue, 485, 1023, 100, 0);
// print out the soil water percentage you calculated:
//Serial.print(soil);
Serial.println("%");
delay(1000); // delay in between reads for stability
// Create a client connection
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
Automatically
water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
char c = client.read();
Download
//read char
by char HTTP request
h (/id/Automatically-water-your-small-indoor-plant-using-/)

if (readString.length() < 100) {

7 Steps

Collection

.
I Made it!

Favorite

Share

//store characters to string


readString += c;
//Serial.print(c);
}
//if HTTP request has ended
if (c == 'n') {
Serial.println(readString); //print to serial monitor for debuging
client.println("HTTP/1.1 200 OK"); //send new page
client.println("Content-Type: text/html");
client.println();
client.println("<HTML>");
client.println("<HEAD>");
client.println("<meta name='apple-mobile-web-app-capable' content='yes'
/>");
client.println("<meta name='apple-mobile-web-app-status-bar-style'
content='black-translucent' />");
client.println("<link rel='stylesheet' type='text/css'
href='http://randomnerdtutorials.com/ethernetcss.css' />");
client.println("<TITLE>SMART Home Control</TITLE>");
client.println("</HEAD>");
client.println("<BODY>");
Automatically
water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
client.println("<H1>VENUS CONTINGENCY home page</H1>");
Download
client.println("<hr
/>");
h (/id/Automatically-water-your-small-indoor-plant-using-/)

client.println("<br />");

7 Steps

Collection

.
I Made it!

Favorite

Share

client.println("<H2>home to the Arduino-Based Self-Regulating Venus


Flytrap</H2>");
client.println("<br />");
client.println("<a href="/?potmoisture"">Refresh pot% </a>");
if (readString.indexOf("?potmoisture") >0){
client.println("<H3>current soil level is ");
client.println(soil);
client.println("%</H3>");
}
client.println("<a href="/?waterlvl"">Refresh waterlvl% </a><br />");
client.println("<br />");
client.println("Created by Joshua Kiefer and Jacob Kiefer");
client.println("</BODY>");
client.println("</HTML>");
delay(1);
//stopping client
client.stop();
//controls the Arduino if you press the buttons
if (readString.indexOf("?potmoisture") >0){
digitalWrite(relay1, HIGH);

Automatically water your small indoor plant using Arduino + pump


}
osmithy (/member/osmithy/)

if (readString.indexOf("?lamp1o")
>0){
(/id/Automatically-water-your-small-indoor-plant-using-/)

Download

digitalWrite(relay1, LOW);
}

7 Steps

Collection

by

.
I Made it!

Favorite

Share

//clearing string for next read


readString="";
}
}
}
}
}

(https://cdn.instructables.com/F1P/XJRA/IO1OWXGE/F1PXJRAIO1OWXGE.LARGE.jpg)
Scan - 2016-05-10 20_28_33.pdf
(http://www.instructables.com/les/orig/F6D/X5BG/IO1OWXFZ/F6DX5BGIO1OWXFZ.pdf)
Flag

saurabhr2 (/member/saurabhr2)

4 months ago

Reply

I need a program which can start a 5v relay automatically daily in 4 pm of


arduino uno

Automatically water your small indoor plant using Arduino + pump


osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

mh2933 (/member/mh2933)

by

Flag

7 Steps

6 months
ago
Collection

.
Reply

I Made it!

Favorite

Share

I fried the board (cheep copy anyway), and now I know why as you can see in
the specs down below of max current the dierent pins can handle, and as a
couple of people have noted. This motor draws about 300mA. My projects has
to ll about half a liter of water and the time of running the motor is therefor
about 10 min.
http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations
I gonna try to switch a transistor on and of instead so the motor will work on a
separate circuit. Will share when I succeed.
Flag

X
8

osmithy (/member/osmithy) (author) . mh2933 (/member/mh2933)

Reply

6 months ago

Sorry you fried your board! You weren't trying to run the
motor directly o the board itself, right? This design already uses a
transistor. That being said, people more knowledgeable than myself are
saying to use a 1k resistor in series between the board and the base pin
of the transistor, so make sure you do that.

Flag

mh2933 (/member/mh2933) . osmithy (/member/osmithy)

6 months ago

Reply

No worries it cost me 10 bucks :), it was worth it. Yes I connected it as


described so the 12v 300mA if Im understanding it correct had to travel
thru the board, ground to collector and + to Vin. I red that post and put
the 1k resistor on. But I have seen schematics that are using the arduino
as a trigger
of the
base of
a transistor
which then
control
a bigger
load
Automatically
water
your
small
indoor
plant
using
Arduino
osmithy (/member/osmithy/)
and the ground is the only common place so to speak to somewhat
isolate the circuit.
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

+ pump

by

I had a timer on as well, in the wall and a transformer(12v)


going to the I Made it!
Collection
board, so when I started to ddle with the timer something sparked and it

Favorite

Share

smelled burned. May have something to do with BackEMF from the timer
Im guessing and the overload of the pin.
I need to control the pump so it pumps about a liter of water three times
a day. I gonna try another approach.
Flag

osmithy (/member/osmithy) (author) . mh2933 (/member/mh2933)

X
8

Reply

6 months ago

Ah, I see what you mean about the Vin pin. But with a
genuine Uno, the Vin pin appears to be connected directly to the
incoming power supply with nothing in between:
https://www.arduino.cc/en/uploads/Main/arduino-uno...
(https://www.arduino.cc/en/uploads/Main/arduino-uno-schematic.pdf)
But yeah, 3 liters per day is a lot. Best of luck!

Flag

TomGee (/member/TomGee)

a year ago

Reply

Hi
"The PN2222A transistor is great for this purpose because it can handle 5v
from the Arduino without any resistors."
Sorry that is wrong, the Veb is 6V, this is the reverse bias breakdown voltage of
the 2N2222A not the forward drop which is 0.6 to 0.7Vdc
Please!!!! Place
a 1K resistor
output ofplant
the arduino
and the
Automatically
water
your between
smallthe
indoor
using
Arduino + pump
transistor base, to limit base current.
osmithy (/member/osmithy/)

You are very


lucky if you do not have a base resistor to not have caused
Download
h (/id/Automatically-water-your-small-indoor-plant-using-/) 7 Steps
damage to your arduino and or 2N2222A.
Tom

Collection

by

.
I Made it!

Favorite

Share

Flag

osmithy (/member/osmithy) (author) . TomGee (/member/TomGee)

X
8

Thanks for the info, I've updated the Instructable to reect


the 1k resistor.

Reply

6 months ago

Flag

pallavip2 (/member/pallavip2)

a year ago

Reply

hello, rst of all i want to thank you for such a helpful information. Sir, i m from
computer faculty so i want to innovate this idea with mobile app. Can you help
me out for basic idea about what should i do for these.
Flag

osmithy (/member/osmithy) (author) . pallavip2 (/member/pallavip2)

X
8

Reply

a year ago

I would use a Particle Core or Particle Photon. They're


essentially wi-connected Arduinos that you can program and control via
the web. Once you understand their API, it should be no problem to
integrate it into an app.

Flag

vivek008 (/member/vivek008)

a year ago

Reply

Automatically
water
your
indoor
plant
Arduino
+ pump
alrite, i made
it. but what
can ismall
do to check
water level
in theusing
container.
am

by

osmithy (/member/osmithy/)
using a submersible pump that should not be used without it being completely

submerged.
so it helps to have some way to check if the water in the reservoir
h (/id/Automatically-water-your-small-indoor-plant-using-/) 7 Steps .
is getting depleted

Download

Collection

I Made it!
Flag

Favorite

Share

daugguy (/member/daugguy)

2 years ago

Reply

You have a great project, I like it when its simple. I have a problem with your
code though, I can't get wait time beyond about 30 seconds. I think its limited
to 32767 ms, but with the ()'s it should go farther. What version of Arduino are
you using.
Flag

rob.ert.7568 (/member/rob.ert.7568) . daugguy (/member/daugguy)

instead of just delay(waitTime) you can use:

Reply

2 years ago

int waitTime = 32000;


int cycle = 0;
void loop(){
...
while(cycle<1000){ //if you waited waitTime x Cycles you can go on
delay(waitTime); //wait 32 seconds
cycle+=1; //increase cycle by 1
}
cycle=0;
....
}
Automatically
water your small indoor plant using Arduino + pump
osmithy (/member/osmithy/)
Download

X
8

h (/id/Automatically-water-your-small-indoor-plant-using-/)

by

Flag

7 Steps

Collection
osmithy (/member/osmithy) (author) . daugguy (/member/daugguy)

.
Reply

I Made it!

2 years ago

Favorite

Share

Hmmmm good point, you may have to use a long instead of an


int.
Flag

billbillt (/member/billbillt)

2 years ago

Reply

I just love it when a GREAT project such as this is posted how all of the
"experts" pop up to give advice on how to "do it better"...
Flag

osmithy (/member/osmithy) (author) . billbillt (/member/billbillt)

X
8

Reply

2 years ago

I'm very glad you like it! I actually appreciate all the comments
on how it could be improved, because it opens my eyes to things I hadn't
thought of, and broadens my perspective.

Flag

yzerbeat (/member/yzerbeat)

2 years ago

Reply

Great project! Nice job.


I did not want to sacrice my arduino for it, and made one with these parts :
http://www.banggood.com/Soil-Hygrometer-Humidity-D...
(http://www.banggood.com/Soil-Hygrometer-Humidity-Detection-ModuleMoisture-Sensor-For-Arduino-p-79227.html)

Automatically
water your small indoor plant using Arduino + pump
http://www.banggood.com/1-Channel-5V-Relay-Module-...

by

osmithy (/member/osmithy/)
(http://www.banggood.com/1-Channel-5V-Relay-Module-Shield-Board-For-

Arduino-ARM-PIC-AVR-DSP-ARM-p-914846.html)
(/id/Automatically-water-your-small-indoor-plant-using-/)

Download

an aquaruim waterpump and a 5volt powersupply.


Let it grow !

7 Steps

Collection

.
I Made it!

Favorite

Share

Flag

X
8

osmithy (/member/osmithy) (author) . yzerbeat (/member/yzerbeat)

Reply

2 years ago

Great idea, and very cheap! I didn't realize that sensor could
operate without an arduino. Did you have any trouble calibrating it so the
soil had the right moisture level?

Flag

yzerbeat (/member/yzerbeat) . osmithy (/member/osmithy)

2 years ago

Reply

There is a little blue potentiometer on the board, it was very easy to


calibrate the relay.

Flag

dougstrickland (/member/dougstrickland) . yzerbeat (/member/yzerbeat)

You should consider writing an instructable for your


project!

2 years ago

Reply

Flag

hunsnowboarder (/member/hunsnowboarder)

2 years ago

Reply

Very nice and good tutorial! Congrats on it!

Automatically water your small indoor plant using Arduino + pump


However there is one thing of which I am concerned. I checked the data sheet
osmithy (/member/osmithy/)
of the pump and found out that the current of the pump motor is 200-300 mA.
Download
(/id/Automatically-water-your-small-indoor-plant-using-/)
Steps
.
Arduinoh
max
current output is 30 mA. Will not the motor destroy7Arduino?
Please explain if I am wrong (I would like to learn! :))
I Made it!
Collection
Thank you and congrats again!

by

Favorite

Share

Flag

imjosh (/member/imjosh) . hunsnowboarder (/member/hunsnowboarder)

Reply

2 years ago

The current limits for the Uno are 40mA from any one I/O pin or
200mA from all I/O pins combined, and 50mA from the 3.3V supply pin.

The only I/O pin he is using is A0 to drive the transistor which will be very
well under 40mA.
I'm not sure exactly what the current limit for the 5V supply pin is. I think
it might be 1.5amps, but it's at least 500mA which is the most that can
be drawn over a standard USB port.
However, he is not using the 5V supply pin to power the pump (which
would be bad because dropping 12-5=7volts @ 300mA would require
dissipating 2.1 watts of power which would denitely overheat the
voltage regulator)- he is using the Vin pin which he is supplying with 12V.
That is, the same 12V supply that is powering the Arduino through the 5V
regulator is directly connected to one side of the transistor. The pump is
connected to the other side and when A0 goes HIGH, the pump will draw
current directly from the 12V supply. More explanations:
http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/
(http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/)
Flag

X
8

osmithy (/member/osmithy) (author) . hunsnowboarder (/member/hunsnowboarder)

2 years ago
Reply
Automatically
water
yourif we
small
indoortheplant
You would
be correct
were powering
pump using Arduino + pump

by

osmithy (/member/osmithy/)
directly from the arduino. However, we are only using the arduinio to
Download

switch
on a transistor. The transistor can handle much higher current and
h (/id/Automatically-water-your-small-indoor-plant-using-/) 7 Steps .
voltage than the arduino.
Collection

I Made it!
Flag

Favorite

Share

hunsnowboarder (/member/hunsnowboarder) . osmithy (/member/osmithy)


2 years ago

Reply

Dear osmithy. Thank you for your reply. I don't


understand then. :) What is powering the pump? From the schematics I
see that the pump is powered from the arduino 5V pin and the transistor
is controlled by the A0 analog pin. I don't see any other power source. I
am confused. Please help.

Flag

diy_bloke (/member/diy_bloke)

X
|
8

2 years ago

Reply

Nice project. I think though that the container you are using might be empty
pretty soon :-)
Flag

X
8

osmithy (/member/osmithy) (author) . diy_bloke (/member/diy_bloke)

Thanks! The container runs out in about a week which is not


bad.

Reply

2 years ago

Flag

X
|
8

diy_bloke (/member/diy_bloke) . osmithy (/member/osmithy) 2 years ago

Reply

not too bad :-)

Automatically water your small indoor plant using Arduino


+ pump
Flag

by

osmithy (/member/osmithy/)

X
|
8

Download
h (/id/Automatically-water-your-small-indoor-plant-using-/) 7 Steps
Akin Yildiz (/member/Akin Yildiz)
2 years ago
Collection

Reply

I Made it!

Favorite

Share

very nice osmithy. you can easily add a sleek plant arm to the pot, so it has
light..! please check out my designs, i'm in the process of combining the two
technologies...
http://www.instructables.com/id/USB-powered-LED-pl...
(http://www.instructables.com/id/USB-powered-LED-plant-light-20/)
love & peace...

(https://cdn.instructables.com/F5H/DPGI/HUHFR13Z/F5HDPGIHUHFR13Z.LARGE.jpg)

(https://cdn.instructables.com/F5W/KRDP/HU842GEH/F5WKRDPHU842GEH.LARGE.jpg)
Flag

osmithy (/member/osmithy) (author) . Akin Yildiz (/member/Akin Yildiz)

X
8

Reply

Automatically water your small indoor plant using Arduino


+ pump
2 years ago
Really cool! I posted a comment on your project.
osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

proxyrat (/member/proxyrat)

by

Flag

I Made it!

Favorite

Share

I found a cheap plant waterer on indeigogo crowdfunding. 2 years ago


https://www.indiegogo.com/projects/daisy-si-smart-plantwaterer

Reply

Flag

osmithy (/member/osmithy) (author) . proxyrat (/member/proxyrat)

X
8

Reply

2 years ago

Wow, it looks like they don't even use a pump, just gravity. That
allows their device to run o AAA batteries for years instead of needing to
be plugged in. Pretty cool!

Flag

tmorsch (/member/tmorsch)

2 years ago

Reply

Great project! I have an arduino that is just collecting dust in my project box. I
wonder how dicult it would be to measure the moisture content of that water
and so make the unit almost autonomous. Here is a dirt cheap sensor:
http://goo.gl/5MXSyO Shipping is free but it can take between 4 to 6 weeks.

(https://cdn.instructables.com/FPS/XEEI/HUHT1RWE/FPSXEEIHUHT1RWE.LARGE.jpg)
Automatically
water your small indoor plant using Arduino + pump
osmithy (/member/osmithy/)
Download

X
|
8

h (/id/Automatically-water-your-small-indoor-plant-using-/)

by

Flag

7 Steps

diy_bloke (/member/diy_bloke) . tmorsch (/member/tmorsch)2 years


ago
Collection

.
Reply

I Made it!

Favorite

Share

Actually that is not really dicult tmorsch. All you need to do is make the
sensor part of a voltage divider and let the arduino measure the voltage
over that divider:
http://www.instructables.com/id/Watering-your-plan...
(http://www.instructables.com/id/Watering-your-plants-with-amicrocontroller)
In fact you dont even need an Arduino:
http://www.instructables.com/id/Irrigating-your-ga...
(http://www.instructables.com/id/Irrigating-your-garden-with-an-opampThe-circuit/)
In fact, the sensor that you mention has an Op amp as a comparator, on
that little companion board and in fact you dont need an Arduino to make
an automatic irrigator with that, only need to attach a relay to the board.
However, some of these cheap humidity sensor boards actually give a
HIGH signal when the resistance on the moisture sensor is LOW (i.e.
when the soil is wet), so a relay would do exactly the opposite of what
you want: irrigate when it is wet. In that case you either would have to
use the NC contact of the relay (but yr relay would be pulling power when
there is no irrigation) or you would need to switch the relay via an inverter
(e.g. a PNP transistor).
If you dont want to wait 4-6 weeks for ordering, just use two galvanized
nails with yr Arduino and grab the program I put in my instructable)
Flag

X
8

osmithy (/member/osmithy) (author) . tmorsch (/member/tmorsch)

Reply

2 years ago
Automatically
water
small
plant
using
Arduino
+ pump
Wowwwww
thatyour
is so cheap!
You indoor
could absolutely
make
it

by

osmithy (/member/osmithy/)
Download

autonomous if you used one of those, and it wouldn't be dicult at all. I


knew
about the one Adafruit sells but it's $50, so I didn't use
it.
7 Steps
h (/id/Automatically-water-your-small-indoor-plant-using-/)
.
Collection

Flag
I Made it!

Favorite

Share

BLR_RAVI (/member/BLR_RAVI)

2 years ago

Reply

good idea..but what you are doing is a on and o timer ...this you can do with
a 555 ..cost too less...so i expect a microcontroller to do some more complex
task...any way thanks for sharing
Flag

X
8

osmithy (/member/osmithy) (author) . BLR_RAVI (/member/BLR_RAVI)

Reply

2 years ago

There are denitely cheaper ways to do the same thing, but


555s are confusing to me. And also it's easier to upload new code than
to get new resistors and capacitors. But now I'm curious - what
component values would you use to make a 555 that turns on for 10
seconds every hour?

Flag

NoPinky (/member/NoPinky) . osmithy (/member/osmithy)

2 years ago

Reply

I think the use of the MCU is not an overkill as this would oer the
possibility to be upgraded with more featues if you want. And it also
oers a good reason to learn about sleep modes and other features of
the atmega.
I think if I would do this kind of projekt in that scale, I would use one of
those popular darlington arrays as the ULN2003 as a one chip solution.
You can use with higher load and it comes with protection against
reverse current spike when stopping the motor. It would minimize the
Automatically
water your small indoor plant using Arduino
possibility to fry the atmega.

+ pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

BLR_RAVI (/member/BLR_RAVI) . osmithy (/member/osmithy)

Flag

I Made it!

Favorite

Share

hi smith...i would use 4.7k good quality cap..if i need 2 years ago
timer of 1hr or so..but for large timer i prefer cd4060...
http://www.electroschematics.com/6189/time-delay-relay/

Reply

Flag

osmithy (/member/osmithy) (author) . BLR_RAVI (/member/BLR_RAVI)

X
8

Reply

2 years ago

The other thing you could do that would really use a


microcontroller's power is to incorporate a soil moisture sensor. Then you
would never have to worry about over- or under-watering.

Flag

bezo88 (/member/bezo88) . osmithy (/member/osmithy)

2 years ago

Reply

you could use two 555 , one to activate every hour which will activate the
second one for 10 seconds.
http://www.csgnetwork.com/ne555timer1calc.html
(http://www.csgnetwork.com/ne555timer1calc.html) this site might help
Flag

jfgilmore (/member/jfgilmore)

2 years ago

Reply

Really nice project, and well-presented for those of us who are just starting out
with Arduino. I've been looking to do something similar to maintain water levels
in egg incubatorsI'll probably connect a humidity sensor.

Automatically water your small indoor plant using Arduino


+ pump
Flag

by

osmithy (/member/osmithy/)
Download

X
8

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

osmithy (/member/osmithy) (author) . jfgilmore (/member/jfgilmore)


Reply
I Made it!
Collection
2 years ago

Favorite

Share

Thanks so much! I'm glad you found it useful. Humidity sensors are great
too. I used one to control an ultrasonic humidier, and it worked very
well. However, I had to hack one of those wireless outlet things because I
didn't want to mess around with relays and switching mains voltage. Now
that I think about it, that hack may be my next instructable.
Flag

thereyno (/member/thereyno)

2 years ago

Reply

hahaha its nice but not that practical project. :) but pls send me some of your
works sir.. cuz evrything is interesting! :) very nice.. hehe ty !
Flag

muddog15 (/member/muddog15)

|
8

2 years ago

Reply

Use a solid state relay with the arduino. Mine can switch 3v and up to turn on
12-240v
Flag

X
8

osmithy (/member/osmithy) (author) . muddog15 (/member/muddog15)

That sounds awesome. Do you have the model number?

Reply

2 years ago
Flag

Comments
I More
Automatically water your
small
indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

.
I Made it!

Favorite

Share

FEATURED CHANNELS

Woodworking

Paper

Kitchen Hacks

Puzzles

Space

Ice Cream

Homesteading

3D Printing

Sewing

(/tag/typeid/category-

(/tag/typeid/category-

(/tag/typeid/keyword-

(/tag/typeid/category-

(/tag/typeid/keyword-

(/tag/typeid/keyword-

(/tag/typeid/category-

(/tag/typeid/category-

(/tag/typeid/category-

workshop/channel-craft/channel- kitchen%20hacks/?play/channelastronomy/? ice%20cream/? home/channel- technology/channelcraft/channelwoodworking/)


paper/)
sort=FAVORITES)
puzzles/)
sort=FAVORITES)sort=FAVORITES) homesteading/) 3D-Printing/)
sewing/)

Newsletter

Join 2 million + to receive instant


DIY inspiration in your inbox.
enter email

I'm in!

Mobile
Download our apps!
Android (https://play.google.com/store/apps/details?id=com.adsk.instructables)
iOS (https://itunes.apple.com/app/instructables/id586765571)
Windows (http://apps.microsoft.com/windows/en-us/app/7afc8194-c771-441a-9590-54250d6a8300)

Automatically water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

.
I Made it!

Favorite

Share

About Us

Find Us

Who We Are (/about/)

Facebook (http://www.facebook.com/instructables)

Advertise (/advertise/)

Youtube (http://www.youtube.com/user/instructablestv)

Contact (/about/contact.jsp)

Twitter (http://www.twitter.com/instructables)

Jobs (/community/Positions-available-at-Instructables/)
Help (/id/how-to-write-a-great-instructable/)

Pinterest (http://www.pinterest.com/instructables)
Google+ (https://plus.google.com/+instructables)

Resources
For Teachers (/teachers/)
Artists in Residence (/air)
Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/)
Answers (/tag/type-question/?sort=RECENT)
Sitemap (/sitemap/)

Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |


Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (http://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2016 Autodesk, Inc.

Automatically water your small indoor plant using Arduino + pump

by

osmithy (/member/osmithy/)
Download

h (/id/Automatically-water-your-small-indoor-plant-using-/)

7 Steps

Collection

.
I Made it!

Favorite

Share

Vous aimerez peut-être aussi