Does this project spark your interest?

Become a member to follow this project and don't miss any updates

Smart Aquaponics

Harnessing Nature, Linux And A Phone To Feed Ourselves

Similar projects worth following

This project was created on 07/12/2014 and last updated 3 months ago.

Mimicking and modeling natural processes that sustain life on earth is critical for humanity to colonize new frontiers. The biggest challenge is that natures processes take like forever while humans live for a limited short time – so people take shortcuts leading to most sustainability issues facing the earth today.
Smart aquaponic systems can autonomously mimic the earths water cycle and model nitrogen cycles, oxygen cycles etc. to grow healthy organic produce for feeding new and existing colonies
This smart aquaponics project involves using modern fabrication technologies to build an aquaponic garden, establishing biological life balances in the garden, assemble the electronics kit and sensors, software programming and finally remote database configuration for monitoring and visualization.
We will hack a wr703n router into an Openwrt Linux microcomputer, build a standalone arduino compatible board and connect the two for a powerful IoT smart controller application

Energy can neither be created nor destroyed, it can only change form. The source of earth's energy is the Sun. 71% of planet earth is water, which stores the Sun's energy. Water changes it's state into gas when hot and into a solid when cold. Water in the oceans vaporizes and evaporates on sunny days. Wind blows the vapors inland and rises up when it reaches land. This causes condensation, and this moisture turns into clouds. Precipitation occurs and the moisture falls as rain. Water runoff causes rivers to flow back to the oceans with minerals. Infiltration makes underground rivers flow to the ocean as well. Plankton and other plants start growing in the ocean. As well as plants grow on land. And the oceans and land evolve and fill with life. Bacteria evolved cleaning the ocean & keeping the balance. This balanced model is what we mimic with smart aquaponics 

 We start the model using a fish tank. In the tank, water and fish mimic the ocean. A gravel filled bed mimics the land. Recirculating water between the tank and grow-bed recreates the watercycle. Flora grows on gravel in the grow-bed. Bacteria colonizes the gravel, composting & filtering waste. Balance & sustainability is attained … until ...…Humans come into the picture. Humans farmed the land to create food . Nutrient runoff from human farms break the ocean's ecosytem. Similarly, our models break as soon as we add human elements to it. Smart aquaponics turn physical gardens into data... Mitigating many issues.

A functional overview of a smart aquaponics systems is shown below:

linux makes it very easy to control the arduino. rather than write scary firmware, we abstract the arduino code as much as possible so it only reads sensors and reports the values while accepting basic commands for flipping bits or voltages.. ie. sensor and relay driver logic only. all decisions are made using higher level code. eg. turn on lights and reports how bright they are. linux decides when or why or how to respond next. further, running openwrt on the $20 tp-link router replace like 50 shields. wifi, ntp, sdcards, webservers usb - video, audio, cellular links not to mention linux tools like crond, sshd, grep, awk, sed etc and fun ones like python, nodejs, javascript etc.  oh is it also so cheap as compared to raspberry pi, beaglebone, dun etc. based solutions.

the micro controller part in this project is a standalone arduino compatible board using the atmega328. the function of this is to read sensors and drive actuators.  it handles sensor logic and reports the status of the connected sensor through a json. string object in the serial line uart0. ie. turn on lights command is issued, light sensors reports lights are on.,

the linux computer sees the atmega part as a serial device, similar to a printer or keyboard connected to it. the linux micro uses the 'serial to  network' ser2net utility to convert the atmega serial device into a network socket. so the sensors and relays on the atmega board can easily be accessed in linux using regular tcp/ip tools or as a device file /dev/ath0.

the data is then sent to a remote database application for data logging, monitoring, visualization, alerting, sharing and remote control.

Smart Controller Functional Overview

functional  parts of the smart controller overview and some data flow is shown above. the two pcb boards show above are the atmega based smart controller board and the linux microcomputer board.  the following stages will dig deeper into each individual block. 

The Atemga Microcontroller Functional Block

there are three main functional blocks, the atmega328 standalone brains, the input section consisting of pullup/pulldown resistors chains and an open collector output stage. there is also a uart section for connecting with the linux microcomputer and a power indicator section.

The following are the electronic components used to build the smart controller boards.

a larger list is shown below....

Read more »

  • 1 × v1.3 smart controller pcb board
  • 1 × tplink wr703n router
  • 1 × atmega 328p chip
  • 1 × 28 pin dil ic socket
  • 4 × bjt transistors
  • 4 × green led diodes
  • 1 × red led diode
  • 1 × 16 mhz crystal
  • 6 × 10k resistors
  • 2 × 22pf ceramic capacitors

See all components

Project logs
  • v2 testing and debugging is coming along

    3 months ago • 0 comments

    always takes longer than originally anticipated.. fixed hardware bugs and waiting on new updated boards from the east.

    working on software platform ... this is fun - a different kind from electronics ...

    see updated video 3 for more information

  • debugging v2 bootloader issues

    5 months ago • 0 comments

    debug software can be frustrating. debugging hardware can drive you crazy. debugging hardware combined with software is not for those faint at heart. debugging, software, hardware combined with a real life problem that takes at least 60 mins before you can see the results of your debugging efforts is fun to say the least.

    spend all day trying to figure bootloader issues on the atmega 2560. my day seems to be filled with  fuses and lock bytes. the bootloader and program seem to be stepping on one another. i am using an arduino as an in circuit programmer.

  • kijarduino - an interpretation of arduino, pi and beaglebone

    5 months ago • 0 comments

    what would you make if you had a chance to build your own computer from scratch... we came up with the kijarduino  ... an atheros linux atmega 2560 combination. we finally got our first prototypes back from shenzhen. this is the next step in the evolution of our boards. we will talk more about this and others over the next couple of weeks ... back to my debugger for now.

View all 5 project logs

Build instructions
  • 1

    Soldering is an acquired skill

  • 2

    We start with the components that have the lowest physical profile going up.

  • 3

See all instructions


kijani grows wrote 2 months ago null point
i started adding more information at the knowledge base section on our site.

Are you sure? [yes] / [no]

Ben Ahrens wrote 5 months ago null point
Your LED current limiting resistor size calculation Vcc/If neglects the fact that the voltage across the resistor will not be the full 5V. Your power calculation, on the other hand, assumes Vcc - Vf volts across the resistor. Why the difference?

Are you sure? [yes] / [no]

kijani grows wrote 5 months ago null point
just me being a goof ball. the doc's are for explaining design considerations. given the voltage and current ratings most preferred components with values close by will most likely work. but yes, i should consider all potential drops in my calculations.

Are you sure? [yes] / [no]

sbrulais wrote 6 months ago null point
Power dissipated by the resistor: (5-2.1)*0.02= 0.058W assuming 20mA is going through the LED (which is not true now). When you don't know the current P=V²/R=2.9²/220=0.038W
So 1/4W resistor are ok ;-)

Are you sure? [yes] / [no]

Gareth Coleman wrote 6 months ago null point
Hey - great project! I've tried the Atlas pH probe and I was disappointed, to be honest. Their support forum seems of limited value and their stuff is expensive. Also the probe was completely destroyed after only a couple of months continuous use. We had much better results with a cheap probe (£7 vs £50 for the Atlas one) and a circuit from Sparky's Widgets - it's open source and Ryan is responsive if you have questions or issues. Good luck!

Are you sure? [yes] / [no]

zakqwy wrote 7 months ago null point
How do you plan to measure DO? In my experience, getting that value accurately can get a bit spendy, and the sensors often need regular maintenance.

Are you sure? [yes] / [no]

kijani grows wrote 7 months ago null point
nature does not dependent on absolute values ... rather how the different variables relate to one another ... which is one of the objectives for this project, to model after nature. dissolved oxygen in water depends on many things including, temperature, time of day, water quality, biological mass etc. there are many ways to monitor and respond to oxygenation issues without instrumentation. that said, i like the devices from ... their probes are relatively professional, stable and they have replacement membranes for their dissolved oxygen probes.

Are you sure? [yes] / [no]

zakqwy wrote 7 months ago null point
Great call--if you're looking for relative values, a galvanic device will probably work well. That probe from Atlas isn't too expensive either, which is nice. Good luck!

Are you sure? [yes] / [no]

Similar projects