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.
Step 1: What you'll need
What you'll need:
(x1) Arduino UNO rev 3 (http://adafru.it/50)
(x1) USB cable (http://adafru.it/62)
(x1) 1N4001 diode (http://adafru.it/755)
(x1) PN2222A transistor (http://adafru.it/756)
(x1) 12v 1000mA DC power supply (http://adafru.it/798)
(x1) peristaltic pump (http://adafru.it/1150)
(x2) alligator clip test leads (http://adafru.it/1008)
(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
First, figure out what the different 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 without any resistors.