11.1-DIYAqua-4

Lots of creative aquaponics systems are being developed for raising fish and vegetables together in small spaces. Unfortunately — for you and the fish — most of these systems fail to address a number of common problems and so they end up on Craigslist or in the trash. And none of them are automated effectively at an affordable price.

whydoaquaponicsI set out to build something better: a smart, small-footprint DIY aquaponic system controlled by an Arduino and built with parts from your local big box store or Amazon — OK, except the valve, that’s from eBay.

The Aquaponic Balcony Garden can be fully automated, with relay-controlled pumps, and sensors to detect humidity, temperature, soil moisture, and water level in the fish tank. It’s got a backup air pump to save your fish if the power goes out, and a master system kill relay in case anything goes wrong. You can even operate it via the internet. I’m developing kits for sale, but I’m also sharing the complete DIY instructions and Arduino code, so that anyone can build their own.

Notably, this garden uses no bell siphons, which are prone to failure. Instead, the grow bed is watered by a motorized ball valve that allows for gravity feed pressures. This gives you precise control over water cycles so you can schedule them into a grow plan to accommodate a large range of plants.

Rules of Aquaponics

Three basic rules in aquaponics are important to the health of the system:
» 1:1 Relationship — between fish tank volume and grow bed volume.
» Fish Stocking Density — 1 pound (500g) of fish for every 5–10 gallons (20–40 liters) of fish tank water.
» Feeding Fish — Only feed the amount they can eat in 5 minutes.

Most small systems (and their owners) break all three rules, causing the system to fail or never reach a balance.

I designed the Aquaponic Balcony Garden with a buffer — the DIY bio-reactor — so it will still work even for newbies who are breaking rules. Inside the bio-reactor, small plastic pieces called “moving bed media” provide maximum surface area for the growth of beneficial bacteria that remove ammonia and nitrites from the water. Your fish will thank you.

spots_aquaponics_MB

Three Ways to Play

You can configure the Balcony Garden three ways, depending on your experience level:
» Basic: A simple timer performs all functions needed for a stand-alone aquaponic garden.
» Local microcontroller: An Arduino Uno microcontroller provides precise control of cycle times, and collects sensor data to show you what’s taking place in the growing environment.
» IoT (Internet of Things): An Arduino Yún microcontroller lets you control your garden anywhere in the world. Receive text messages (say, when the grow bed is being filled), do data streaming and logging, and more.

aquaponics-diagram

The Aquaponic Balcony Garden — How it Works

aqua-noteGrow bed, 27 gallons ((1) in the above diagram) — holds soil or other growth media for plants. It’s also got:

  • Moisture probe — DIY analog probe made from 2 stainless screws
  • DS18B20 temperature probe
  • Water inlet / overflow preventer (2) — delivers filtered and bio-treated water to the grow bed, and prevents overflow if the bed is overfilled
  • Water drain / root clogging preventer (3) — covers the outlet, and admits water but not roots. (This is a major problem in aquaponics — roots clog everything unless you design for the problem.) It’s a perforated 1″ pipe inside a slitted 2″ pipe — just twist to snap off invading roots.

Fish tank, 27 gallons (4) — can be painted white with a food-safe rubberized coating for appearance or heat reflection. It also supports the grow bed platform and houses the following elements:

  • Ultrasonic distance sensor (5) — measures water level at all times
  • DS18B20 temperature probe — measures water temperature
  • Float switch — an analog backup to the ultrasonic sensor
  • Water outlet — Add a screen to protect small fish from pump suction.
  • Water inlet — from grow bed drain valve
  • Water pump — A submersible pump is operated in inline mode to pass water to the grow bed from the bio-reactor, not from the fish tank — it’s just mounted in here to keep the footprint small.

Fish tank cover (6) — Keeps out unwanted items like leaves and hungry raccoons, while allowing light to pass through. Fish can sense day and night, and it’s important to their health.
Grow platform (7) — supports grow bed, routes all the wiring, and houses the all-important drain valve
Electric drain valve (8) — delivers grow bed water back to the fish tank on command, for complete automation. It also opens in the event of power failure, delivering maximum water (and oxygen) to your fish.

Double leg support (9) — The heart and brain of the garden, it supports the grow platform and houses the microcontroller and electrical connections.
In a see-through box, a lighted “pilot switch” (9a) controls 120V AC mains power, so the entire system is easily switched off (before you put your hands in water). You can also control it with a relay.
In the AC outlets housing (9b), 4 relay-switched outlets power the air and water pumps, optional heater, and battery-backup air pump. The opto-isolated relays are controlled by your Arduino, based on data from the sensors and probes, and they’re configurable — normally open or normally closed — depending on your needs.
In the DC converter housing (9c), a transformer steps down 120V AC to 12V DC, then 9V and 5V converters regulate it for your microcontrollers and sensors. This 12V conversion also lets you use the garden off-grid, or connect solar backup power.
Finally, in the sensor/microcontroller housing (9d), DC power is distributed with independent terminal blocks: 9V to the Arduino, 5V to sensors. A humidity/temp sensor helps you understand the environment your plants are growing in.

Single leg support (10) — supports the platform and houses the electrical control for the grow bed drain valve — either a relay or, for the Basic version, a digital timer.
DIY bio-reactor (11) — 
Provides maximum surface area for the growth of bacteria that convert toxic fish waste to nontoxic plant fertilizer, using an aquarium bubbler and moving bed media. This is a “big system” component not seen in other small systems.
DIY solids filter (12) — 
Another “big system” feature, this 3-stage filter captures solid waste for bacterial breakdown and settles out heavier material for removal.
Air pump (13) — 
Ordinary aquarium bubbler pump supplies air to the bio-reactor.
Connection plumbing (14) — 
to hook it all up. Your site and configuration will vary — just make sure it’s all watertight.

For ready-to-build kits, check out my store at AGponics. I’ll continue to update the design as needed, so check back for updates and improvements. 

aquaponics_MB_Make_03.13.2015

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Project Steps

Build the solids filter

The solids filter not only captures and breaks down fish excrement, but catches any excess food that results from potential overfeeding.

As these sources are captured and pulled through the filter system, they are broken down into smaller units that can be digested by bacteria and converted into plant nutrients.

See complete instructions for building the solids filter on Instructables.

Build the bio-reactor

Trace the 4″ PVC adapter on top of a 6″ PVC end cap, cut out the circle, and glue the adapter in. Seal the joint with Lexel.

Drill a 5/32″ hole in the 4″ PVC cleanout plug, then insert a #8-32 screw. You’ll loosen it to bleed air out of the bio-reactor.

Glue together the base: a 6″ end cap, a 15cm length of 6″ pipe, and the 6″ coupler. Drill 1¾” holes through opposite sides, 2¼” from the bottom, and install the 1″ Uniseal bulkheads. Insert inlet and outlet pipes of 1″ PVC, then glue a 90° elbow and a ball valve on each. Inside, slip a perforated 1″ cap onto the outlet as a coarse screen (first photo).

Now glue another 15cm pipe into the top of the base, and finally your modified cap.

To make a visual water gauge, drill and tap two 27/64″ holes near the top and bottom, and mount 2 of the watertight cable glands. Connect these with ¼” clear tubing and elbow barb fittings. Now the tubing will show you the water level inside (second photo).

Mount a cable gland on top, pass the air hose through, and put the aquarium bubbler inside on the bottom.

Finally, add 200 pieces of the K-3 moving bed media (third photo), and fill with purified water (or cycled water; see Step 10). They’ll float until they develop a healthy bacterial film, then they’ll sink. They’re self-cleaning as they bounce around in the water.

Build the grow bed

The grow bed houses soil and plants as well as two sensors — a media probe and a DS18B20 Temperature Probe. The grow bed also contains mechanisms to prevent root clogging and water overflow.

See the full instructions for this part of the project on Instructables.

Prepare the fish tank

In addition to housing fish and fish water, the fish tank has three automated elements: an ultrasonic distance sensor, a DS18B20 Temperature Probe, and an analog float switch.

See the full instructions for this part of the project on Instructables.

Install the sensors

Wire each sensor to a DIY CAT-5 cable and its appropriate resistor as shown on the project page. Install the humidity/temp sensor (first photo) in the microcontroller housing.

Mount a cable gland in the side of the fish tank, and one in the grow bed. Route a temperature probe (second photo) through each.

Drill holes to fit your ultrasonic sensor’s “eyes” in the back of an ABS “test plate” pipe cap, then adhere the sensor with epoxy putty. Mount the cap in a 2″ hole in the stationary fish tank lid, so the sensor can watch the water. On top, add a slice of 2″ ABS pipe and mount a cable gland (third photo), then waterproof it all with rubberizing compound, and seal it with a second cap.

Mount the old-school float switch in the wall of the fish tank, 4″–5″ below the top. Mount the media moisture probe — really old-school, it’s just 2 stainless steel screws and a resistor — in the wall of the grow bed, 3″ from the top.

For more photos and tips, see additional instructions on Instructables.

Connect and test your Arduino

Solder the extended headers onto the Proto Shield, then solder the terminal blocks and connect them to their respective pins as shown in the photos here. Connect all sensors and relays to their terminals on the shield, then plug the shield into your Arduino. Be sure to ground the shield to the ground terminal in the sensor/microcontroller housing.

Here are the shield connections:

Digital Pins:

  • PIN 0 — Not Used
  • PIN 1 — Main Switch RELAY
  • PIN 2 — Grow Bed Valve RELAY
  • PIN 3 — Not used
  • PIN 4 — Outlet 1 – top left of outlets
  • PIN 5 — Outlet 2 – bottom left of outlets
  • PIN 6 — Outlet 3 – top right of outlets
  • PIN 7 — Outlet 4 – bottom right of outlets
  • PIN 8 — DS18B20 Temperature probes
  • PIN 9 — DH-22 Humidity and Temperature Sensor
  • PIN 10 — Not used
  • PIN 11 — Trigger – Ultrasonic Distance Sensor
  • PIN 12 — Echo – Ultrasonic Distance Sensor
  • PIN 13 — Not used

Analog Pins:

  • PIN A0 — Float Switch
  • PIN A1 — Not used
  • PIN A2 — Not used
  • PIN A3 — Not used
  • PIN A4 — Not used
  • PIN A5 — Media Probe

    And here’s an overview diagram of how it all goes together (third image).

    Download the Arduino code here. Then upload each sensor’s test code to the Arduino, in turn, and test your sensors. Upload the relay code, and test your relays too.

  • Assemble your aquaponic garden

    Position the fish tank in a level, well-supported location with good access from all sides. Connect the solids filter to the fish tank outlet, and fill it completely with water. Place the bio-reactor behind the tank, connect it to the solids filter, and fill it too (first photo).

    Connect the water pump to its fitting inside the fish tank, centered beneath the pass-through hole in the lid. Connect the grow bed drain return hose now as well (second photo).

    For more photos and tips, see additional instructions on Instructables.

    Assemble your aquaponic garden (cont'd)

    Position the support legs on either side of the bio-reactor and set the grow platform on top of the tank. Now plug in all the electrical connectors (first photo). Don’t forget the drain valve connection in the single leg.

    Insert each leg into its socket in the platform, then slide the platform into place against the stops on the fish tank lid. Attach the backup air pump below with velcro.

    Put the grow bed on top, and connect it to the drain valve. Connect the drain return hose to the valve as well.

    Finally, twist the water inlet/overflow preventer stack, and the root-proof drain stack, into place inside the grow bed (second photo).

    Test the pump — you should now be successfully watering your grow bed!

    You can fill your grow bed with media now. The fish tank water will get dirty; just run the pump a few hours until it clears.

    Program your garden

    You’re ready to automate. Upload the sketch Balcony_Timer.ino sketch to your Arduino Uno, then plug everything in and test the entire garden. The code will run the water and air pumps continuously, and open the drain on your schedule to control the fill-flood cycle. Modify it to water more on hot days, or switch on a heater when the temperature drops.

    For the IoT version, upload the sketch Timer_SMS_Streaming.ino to your Arduino Yún. It will stream your garden data live to Microsoft Power BI, and it will send you SMS messages via your Temboo and Twilio accounts.

    These are very basic sketches, provided for reference and a starting point for people to use and develop on their own. As I build out the interface on the project, I’ll continue to post working code and sketches on my Aquaponic DIY Automation Blog.

    Cycle your garden

    That just means running it long enough for the beneficial bacteria colonies to become fully established. This can take 2 months with brand new water and media, or 2 weeks if you start with water and media from an already cycled system. (That’s why I’ll provide start-up water with my kits.)

    It’s best to start out with small “feeder” goldfish and feed them very lightly. Check the ammonia and nitrite levels with a test kit purchased at your local pet store.

    Get growing!

    Your completed Balcony Aquaponic Garden can grow all kinds of fish, as food or as pets, just watch your system temperatures and match fish that can live well within those values.

    Some good choices are:

    » Tilapia — you’ll need a heater in colder climates, and they’re illegal in some jurisdictions; check with your state’s agriculture or fish and wildlife department

    » Catfish — these get big, so don’t overload the tank — only a few 


    » Shubunkin goldfish — they can take just about all temperatures

    » Black moor goldfish — another hardy
 breed.

    Plants that will thrive in the garden include basil, cilantro, chives, peppers, strawberries, and tomatoes — just make sure you perform root maintenance.

    Maintaining your aquaponic garden

    Once a week or so, open the cap of the grow bed drain, check for root activity, and maintain as needed.

    When the pump draw going into the grow bed slows down, it’s time to clean the solids filter. The waste material can be deposited in other gardens or flowerpots.