Free US Shipping on orders over $150 with discount code "FREESHIP" at checkout

Building a Plant Watering System with an Arduino- Setting Up a Real Time Clock

June 27, 2014

We are putting together a plant watering system to be powered by an Arduino.  We have some flower boxes that get no water even when it rains, so for years I have been watering them manually.  So I figured, why not automate it?

Last year I tried using a soil temperature and humidity sensor to make a feedback loop for plant watering, but it just didn't work.  So this time, we will start by running timers that turn on our pumps at set intervals.

The Arduino has built in timing capabilities, but we wanted a solution that would be robust to power interruptions.

Enter the DS1307 Real Time Clock kit from Adafruit.  For $9, you can get an easy to solder kit that will keep time for 5 years!

Adafruit has a great overview of the kit, so I won't detail how it goes together.  It took me about 10 minutes to put it together.

Hooking it  up to the Arduino is a breeze, and there is a great library of Arduino code to get you started.  We just loaded up RTCLib, hooked up 5V and GND to the Arduino 5V and GND pins, and then SDA (Data Pin) to A4 and SCL (Clock Pin) to A5.

Assuming your Real Time Clock has never been used, the latest version of the library actually loads the time from your computer right away!

At right is a picture showing everything hooked up 

 

Next step, add a motor shield and pump some water!

 

 

 

 




Leave a comment

Comments will be approved before showing up.


Also in News

Ways To Use Raspberry Pi in the Classroom
Ways To Use Raspberry Pi in the Classroom

September 21, 2020

Raspberry Pi computers are useful for teaching students about computers and electronics. Discover ways to use Raspberry Pi in the classroom here.

Continue Reading

How a Micro:Bit Works: Getting Started
How a Micro:Bit Works: Getting Started

September 02, 2020

A Micro:Bit is a small computer board that you can code and connect to other parts to create electronics. Here are the basics of how a Micro:Bit works.

Continue Reading

How To Build a Robot Using Raspberry Pi
How To Build a Robot Using Raspberry Pi

August 28, 2020

Many people would like to make robots but don’t know where to start. In this guide, we go over how to build a robot using a Raspberry Pi so you can get started.

Continue Reading