Friday 16 September 2016

Hydra - Your Plant Care Companion Part 2

So the last post left us with the question of how to deliver different amounts of water reliably to multiple pots of plants, given that gravity plays a major role in how water flows through a network of tubes. There are a few indoor watering systems out there that try to solve the gravity problem in different ways:

1. Capillary Action Systems:
  • Very simple.
  • Low cost.
  • No electricity required.
  • Usually requires one water source per pot (messy, not good for many plants).
  • Soil is kept moist around the clock (plants prefer a wet-dry-wet-dry cycle).
  • Size of water source is limited (most of these systems come with the water container attached).
2. Gravity Drip Systems:
  • Water source needs to be installed on top of the plants (not discreet, refill & maintenance troublesome).
  • Size of water source somewhat limited (how much water are you going to put up there?)
  • Systems on the market ran on batteries and gave the same amount of water to each plant.
3. Pressure Drip Systems:
  • Requires powerful pump or connection to the water mains.
  • Some systems had trouble with the tubing popping out.
  • Watering volume is controlled by varying the aperture size of the outlet, which is not very precise.
So how do we create an indoor watering system that can deliver varying amounts of water accurately to multiple potted plants? The only solution was to either have a separate pump for each plant or a solenoid or pinch valve array to control the water flow from one pump.

After a lot of digging, I found a manufacturer of (relatively) cheap, but strong pumps. I won't reveal exactly what pumps they are, but despite their small size and price, these pumps could:
  • Prime themselves,
  • Draw water up to over 2.25m in height,
  • Ingest small particles,
  • Survive 2 accelerated life tests (5 & 10 years) with no problems.
Best of all, the pumps used common aquarium air tubing that is small, discreet, cheap and readily available. In comparison, a solenoid array system would have cost slightly more and is prone to failure if the sole pump breaks down. These beauties were definitely the way to go!

Now, the pumps need to be controlled, and for that, I decided to employ an Arduino based system. Arduino is an open source electronic prototyping platform based on a microcontroller and a simplified programming language. Although the platform is simple enough to be understood by children, it is very powerful when taken to its full potential. The electronics it is based on is also solid technology.

An Arduino Uno

To give a brief overview of how an Arduino works, the microcontroller has multiple 'pins'. These pins can either act as 'input' or 'output' pins. An input pin can 'measure' the voltage it is 'receiving' (which is then interpreted by the program to mean something, e.g. a button press) whiles an output pin can be instructed by the program to deliver a specific voltage (which may then trigger something else, e.g. an LED turning on). By using these two types of pins as 'building blocks', one can create complex systems to do a wide variety of tasks.

Since the pumps required much more energy than the Arduino pins could supply, the prototype utilized mechanical relays to control the pumps. The switches basically have small electromagnets (controlled by the Arduino) that close the main circuit when activated, thus turning the pumps on. However, these made quite a bit of noise, so the decision was made to switch to a silent alternative for the final product (which I won't reveal).

Mechanical Relay Array (Prototype)

A custom printed circuit board (PCB) was designed for the final product. It was based off the Arduino microcontroller and incorporated the microcontroller chip, buttons, a 16x2 LCD screen, electronic switches for the pumps, protective circuits and the ICSP all on one board.

Electronic Circuit Prototyping - The Messy Truth!
A standard Arduino Uno board is not that hard to understand if you break it down into sections:
  1. Power Input - Contains protection components such as decoupling capacitors, a diode for polarity protection and a resettable fuse for overcurrent protection (the Hydra PCB contains all of these components) as well as a MOSFET to regulate the voltage coming in.
  2. Microcontroller to USB - Enables the microcontroller to communicate via USB. This involves a separate controller chip to mediate and a few resistors in between.
  3. Microcontroller to ICSP - Enables the microcontroller to be programmed via In Circuit Serial Programming (ICSP). This is basically a simple 6-pin connection that is an alternative to the USB. Think of the USB as a grand entrance to a building and the ICSP as a backdoor.
  4. Microcontroller Circuit - Contains the actual microcontroller and its crystal (a separate component which the microcontroller uses to measure time).
  5. LED - All Arduino boards come with a controllable on-board LED.
An Arduino Uno being programmed via ICSP

I won't go into details about the actual PCB design here, but for those of you who want to try your hand at it, there are two great programs out there, EAGLE and KiCad. I built the circuit in EAGLE at first, but had to switch over to KiCad as the PCB was too large for EAGLE - I had to pay for a premium version of EAGLE to work on a larger PCB; KiCad on the other hand is totally free.

Hydra's Custom PCB
That will be all for this post, look out for the next one on injection molding and supplier sourcing :)

1 comment:

  1. Are you using 8 diaphragm pumps to get the right amount for each output?

    ReplyDelete