Translate

Wednesday, May 30, 2012

The Rain Barrel project - intro

Arkansas is a nice place to live, but is HOT !
It means that a lot of water is used just to water plants, grass and .. vegetables !
Sure is possible to do a lot in this area, thus the idea to deploy a rain barrel for at least some "important" plants.
The project is modular and mostly will depends about the available resources.

Here some basic ideas and practical notes about the project.

The idea 


The idea is to buy a rain barrel and attach it to the gutter spout for the main water supply.
Then attach a low pressure drip irrigation system controlled by a valve and an electronic circuit.

The problem

In order to attach a low pressure  drip irrigation system, it is necessary to put in the system a specific amount of water pressure.
Gravity controlled rain barrels can work, but it necessary to have at least 10 meters (35 feet) of  difference in height between the sprinkler and the rain barrel.
It is necessary a more sophisticated system in order to bring water to the sprinkler system.
For example a pump is necessary.

The project

This project is about to build a low cost/high efficient  system, using a rain barrel as main tank, filled by rain via a spout.
There are different problems to address :

  • bring the water to the plants using a drop irrigation system
    This is necessary in order  to bring the right amount of water where is needed, without dispersing water on unused soil. To do so :
  • a pump is necessary, since the water coming out from the barrel, has not enough pressure to correctly drive a drop irrigation system
  • this imply to have a way to detect if there is water on the rain barrel and eventually connect to the main water grid to continue the watering
  • in order to use the right amount of water, sensors needs to be deployed in the places where the plants are
  • eventually a solar panel and a battery can be used to power the system, making it autonomous.

First test

In order to experiment and better define the project requirements, it is necessary to start  to have at least a rain barrel and start to monitor some basic data, like how much water can be collected on average, how much water is used by a drop irrigation system, how much water is needed by some plants, and so on.
The first "brick" is of course the rain barrel and the water collection system.

Installing the rain barrel

The first rain barrel used for the plant and for the tests, is a 76 gallons foldable one, found on-sale on the Improvements catalog .

After put it together, it is necessary to found a level spot close to the gutter, where to place it.
In my case, under the deck, just close to a gutter, there is enough flat space where to install it.

Impressions

Easy to put together. The plastic is very thick. 
Seems quite stable on the final place. Easy access to the spigot that is threaded and with also an adapter to connet a "bare" rubber hose.
The spigot and adapter are in plastic, not sure how long they can survive the hot conditions.
No leaking so far.

Execution

The rain barrel needs to stay on a flat surface. It MUST not tilt so a flat surface is mandatory.
Under the deck there is a nice flat area, but is too far from the gutter and thus it will be too far from the rain diverter.
The rain barrel needs to stay no more than 2 feet from the gutter and there the area is not flat.
Even worse there is a piece of  concrete slab close to the house wall, so  it is necessary to build a retainer wall in order to raise the soil over the concrete slab and finally level it !
So the first thing to do, is to create a level terrain big enough to support the rain barrel.


This is the area where to place the rain barrel
Marking the place where to put the rain barrel.

Close to the gutter there is a concrete slab, so it is mandatory to raise the terrain in order to create a solid and flat space for the rain barrel.  


Above, building the retainer wall with some "left over" blocks used for the frontyard  retainer walls.


Here how the rain barrel is placed on it's new base.

Next step, connecting it to the gutter via a rain diverter.





Installation rain diverter

The second task to do, is to buy and install a "rain diverter" for the gutter, in order to bring the water coming from the roof, into the rain barrel.

Choosing the rain diverter 

After some searches, I choose the Fiskars Diverter Pro .

Two main reasons to choose this diverter :

  1. The availability from a place where I had some credit
  2. Good feedback from other users
  3. The dimensions of the gutters
    My gutters are actually 3" x 4" and the standard residential should be 3" x 2"
    This one is natively a 3" x 4" with adapters for the the smaller ones, so I should be covered.   

Installing the rain diverter

The rain diverter must be placed so that the pipe going in the rain barrel, remains horizontal.
This is necessary because when the rain barrel is full, the backflow force the extra rain to go  back into the gutter, preventing flooding from the rain barrel.

Following the instructions come with the rain diverter, I cut out a piece of gutter and then inserted the rain diverter.
The job was relatively easy but not too much easy.
Good idea to wear thick working gloves when handling gutters and trying to push the two end of the rain diverter in it ! :)
Here a sequence of pictures showing the installation of the rain diverter.

Cutting the gutter


The diverter inserted


Some tests


There are some small leaking areas that I will fix with some silicon as soon as the weather allows to do so, but generally speaking it works nice.
Now I can start to monitor if is working properly and how long can take to fill up the rain barrel.


Quick update (June 5, 2012)

We had finally some rain so I was eager to check if everything was working.
I noticed that not too much water was entering in the barrel and I discovered the cause.
The rain diverter need to be screwed to the gutter in 4 places.
2 screws in the upper part and 2 in the bottom. If the screws in the bottom part are too tight, the plastic body of the rain diverter deform itself a little. But is enough to have it bent in the wrong direction !
The solution was to unscrew and screw back with less force, in order to don't deform the diverter.
The transparent plastic cover is a good indicator of deformation. If the body is not deformed, the transparent plastic cover is covering the hole uniformly.
Another important thing to do, is to add some mosquito killer drug in the rain barrel.

Quick update (June 12, 2012)

We had finally some more rain !
This time everything worked like a charm ! The rain barrel is full, no leaking and the overflow worked perfectly ! 

Quick update (June 14, 2012)

First test.
Connected an hose to the rain barrel "as is". With the rain barrel full there was enough pressure (downhill) to have some water coming out. Of course absolutely now way to be able to connect any sprinkler or drop irrigation system.  It was enough to have some plants watered.
Because the impossibility to control the amount of water, this is a really inefficient way to use the water. 

Quick update (June 16, 2012)

First test with the pump.
In order to connect a drop irrigation system to the rain barrel, it is necessary to use a pump since it is necessary to have at least 20 psi of pressure.
A Shurflo pump (2088-488 model) was temporary connected to the rain barrel, with adapters GHT->NPT and NPT->GHT.
The garden hose was connected to the pump.
Limiting the output of the hose was possible to increase the pressure.
The next test is to create a drop irrigation system and see if the pump can correctly drive it.
Problems to solve :
  • the spigot is really poor quality. There are leaking all over the place after the spigot.
  • the water need to be treated with some chemicals.
    The anti mosquito seems working but the very hot weather allows for algae to grow.
    The water starts to smell.
  • with the average rain we are having, 76 gallons are totally insufficient to water the plants more than 3 days ! 

Quick update (June 8, 2014)

The barrel survived so far two winters.
The dirt in the water seems stabilized, i.e. it is a lot but is not a problem to use the water.
It is always necessary to add chemical for the mosquitos.
Honestly the rain pattern on the long run, prevent a real useful use of the rain barrel.
It is always necessary to integrate with the faucet so unless to expand it A LOT, is quite impractical and not beneficial.

Stay tuned !


Thursday, May 3, 2012

YAAA - Yet Another Android Article




Android, the platform to develop mobile applications.
Is time to start to play with that.

It is assumed starting knowing  nothing  about Android.

The first thing is to have some documentation about Android in order to learn about it.
There are a lot of books and documentation out there, so I just started to grab something, possibly free (no resources to invest in that :) ).
As introduction, also if is an old book, this PDF book  can be useful, at least to have some basics idea about Android.
Of course there is the official updated Google documentation where to start, but I have to admit sometime a book is better as starting point. 

Basically to start to develop for Android, at least three things are needed :  

  • The Android SDK  
  • Java SDK
  • Eclipse plus Android plugins
Eclipse is actually suggested, is not mandatory, but since many examples and documentation assume Eclipse to be used, so it is :)
This article assumes the development host to be a Linux one (Ubuntu 10.04 and 12.04)

Installation

First of course download the latest versions of the software to be installed.
The system I used to install Android the first time, documented in this article, is a quad processor Dell computer, with Ubuntu 10.04 installed.
I was able to install the Android development software over a Kubuntu 12.04 following the procedure described on this article.


Java JDK

Java can be the critical part of the system and MUST BE present before to install the rest of the environment.
Probably Java already exists on the development machine, but it is possible is an old one or incompatible one with the Android SDK.
So the first thing to do is to verify if :

  • Java already exists on the machine
  • if the installed version is a JDK version (the JRE version is not enough)
  • if the installed version is compatible with Android SDK 
  • eventually remove it and install the latest one
To verify what version of Java is installed on the machine (Linux only) ope a terminal and digit :

$ java -version
In my case I had :
steve@Oliver3:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.13) (6b20-1.9.13-0ubuntu1~10.04.1)
OpenJDK Server VM (build 19.0-b09, mixed mode)
steve@Oliver3:~$ 
The documentation about Android specify to have Java 1.5 or 1.6 and the  JDK version, so I should be OK.
The latest JDK  is available at this URL.
The first choice, the Java JDK, must be chosen.
In my case I selected this one :
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html 
After downloaded it I exctracted it in the /home/steve/Android directory but NOT installed for the moment since I assume the one already installed is OK.

CAUTION !  In some distributions Java JDK from Sun/Oracle is not available anymore !
In this case the OpenJDK is the "official" release to use with Android ! 

 Android SDK

The Android SDK contains all the Java libraries to develop for Android plus tools to compile and debug the code, i.e. an Android simulator.  So in theory there is no need to have a specific hardware (see note) in order to install and develop under Android.

The latest  SDK can be download from the official Android  website.
Choose the SDK version for your system. In my case I choose the Linux one.
Create a directory somewhere on your disk where to exctract the tarball. I created :

 /home/steve/Android  and exctracted the tarball into  android-sdk-linux.

Tip
Can be useful to have the SDK tools in the path. Many sources suggest to create a system variable called ANDROID_SDK and add it to the main path.
Edit  the .profile file (in the main user home - for example in my case : /home/steve/.profile) and add :

export ANDROID_SDK="/home/steve/Android/android-sdk-linux"
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools"

Save the file. The next time the system starts the Android SDK path will be available, with also the system variable ANDROID_SDK. 
  
Then, after reading the  SDK Readme.txt file, I opened a terminal and run the android program under tool :
$ cd /home/steve/Android/android-sdk-linux/tools/./android   (or if the path is set, ./android)

The program is needed in order to "populate" the SDK. The SDK exctracted is moslty empty.
By default  is marked for installation the latest Andorid SDK, at the time of this article, the 4.0.3.
Follow the instructions and install it (select Accept all)
I choose to install also the documentation. The installation tooks few minutes and of course is necessary to be online since everything needed is downloaded from Google.
Here a screenshot after the installation :


Note : at the installation time I didn't have ANY Android hardware. Having a specific hardware it means to select the version of Android capable to run on a specific one, not necessarily the latest one will work on a specific hardware !!

It is possible to install more than one Android API version and actually is one thing necessary to have.
The project usually uses the correct version as defined in the project parameters.  
To select the correct API to use for a project, go in the Project menu', select Properties and then choose Android.

The API in use for the project is stored in the file project.properties in the project root. 

Eclipse

The last tool to have is Eclipse.
As said before is not mandatory, but since many examples and tools that simplify the life are based on Eclipse, I choose to install it and use it.
As suggested in the eBook, at the URL  is possible to download Eclipse.
There are many different choices. I choose the "basic" Java version called Eclipse Classic. 
After downloading it, I exctracted in the /home/steve/Android/eclipse directory.
To start it, is enough to go in the eclipse directory and start ... eclipse :)
The first thing to do is to create a workplace for Eclipse. I created mine in the /home/steve/Android/Workplace directory.

Configuration


There are some plug-ins for Eclipse that  integrate the Android SDK and facilitate to create Android applications.
The indications on the book are not exactly precise since the version of Eclipse is quite different.
So basically, from within Eclipse, go to the Help menu, select Install New Software.
A windows appears :


In the box Work with, digit the address of the repository for the Eclispe plug in for Android :
https://dl-ssl.google.com/android/eclipse/
In the box below (Name) will appears the possible plug-ins. Mark them all then click on Next and follows the instructions. 
After the installation Eclipse need to be restarted. After that it will asks for the Android SDK.


Since I already installed the SDK, I selected the Use existing SDKs and browse for the main directory of it.
Follows the instructions to complete the binding between Eclipse and Android SDK.
After this point, Eclipse is ready to be used to develop and debug Android applications.