building the physical garden
we will need a safe and well thought out design, especially for the things you cannot see – the bacteria. that means correctly sized aquaculture components, proper mechanical and biological filtration, and sufficiently sized hydroponic garden. we will be using a media based reciprocating system with a 1:1 ratio – this is relatively safe from mistakes. gravel will be used for the mechanical filter and as hydroponic media. the grow bed is designed to function as a trickle filter meaning gravel is again used as biological filtration media ie. bacteria colonies will culture on the gravel.
the garden dimensions and assembly process are shown below:
more detailed instructions on how to build such an aquaponics garden can be found here. of course the smart part of the project will work with any other aquaponics or hydroponics garden (or any control application)
adding sensors to the garden
we will now look at how the sensors connect to the physical garden. later on we will connect these to the v2 smart controller for data collection and remote control. the choice of basic sensors is based on monitoring what we consider the heartbeat of the system. we are more interested in how things interrelate with one another as compared to absolute values/
the 8 basic sensors we will use are shown below
- flow rate sensor: the suns energy through the pump makes it possible to create a water cycle in the garden system., it is the input energy that sustains the system heartbeat in the gardens ebb(flood) and flow(drain) cycles. catastrophic failure or degradation issues from bio-slime building can not be allowed on the pump or irrigation lines. the flow rate sensor allows for monitoring of pump performance. the flow rate sensors goes inline in the pipes or tubes connecting the pump with the irrigation. this type of sensor specifically connects to an interrupt pin. to read hall effect sensors, we keep everything quite for a second and count the pulses received on the interrupt line then use this to figure the flowrate in gpm.
- temperature sensor:,a 1-wire water proof probe for monitoring the goes inside the fish tank temperature goes inside the fish tank, or outside for ambient temperature. I think 2 or more is better. since 1-wire devices are addressable, all the temperature sensors are connected in parallel to the same pin with the same connections. The v2 controller software will distinguish between multiple 1-wire sensors. this sensor specifically connects to pins configured for 1-wire operation
- growbed level sensor: the growbed is like the lungs for an ebb(flood) and flow(drain) garden. water raising in the growbed pushes out stale air out whereas water draining in the growbed sucks in fresh air oxygenating fish, plants and bacteria. using infra-red distance sensors embedded in a pvc pipe we can measure the water depth inside the grrowbed. The sensor pvc pipe can reset inside the drainage gravel guard or buried directly inside the gravel. this is an analogue sensor
- photocell ldr sensor: plants need light to make food through photosynthesis. monitoring this is especially important if you are using indoor grow lights for your garden. i think it is also fun monitoring ambient light levels for gardens without grow lights. i put is on the pole holding the grow lights upright. this is an analogue sensor
- flow switch sensor: this is used to monitor the grow bed drainage back into the fish tank. The flow switch goes in-line on the grow bed drainage plumbing underneath the growbed. I monitor the drainage because my choice of basic sensors is based on what I consider an input or output to the garden. this is a digital sensor
- tank level sensor: we don’t want our fish to die so make sure they have enough water. this sensor is a float switch can detect the level of water in the fish tank. If this drops below a certain point we can refill the tank automatically using the v2 controller. I put the float switch in the fish tank using a wire of suction cup about 6″ from the top of the fish tank.. This is the minimum amount of water i need left in the fish tank when the grow bed is full of water. You can experiment with your tank/pump settings. this is a digital sensor
- reservoir level sensor: the one task i have never liked is refilling water. using a water reservoir system allows me to treat the fish water and refill the fish tank on demand. This is a float switch goes in the bottom of reservoir container so i can know when to add more fish tank backup water. This process can also be used say control a reverse osmosis water system for refilling. the amount of water being used from the reservoir system is one of the ways i can tell how much water is being used by the garden. this is a digital sensor
- leak sensor: leaks are no fun so the sensor sits on the floor somewhere suitable next to the garden. leak detection allows the system to be shut down if leaks are detected before fish die or property is damaged. this is an analogue sensor.
v2 smart controller
the v2 smart controller is a linux/arduino based board designed for interacting and controlling physical environments from anywhere in the world. originally designed for smart aquaponics it can be used for any industrial grade supervisory control application. the v2 board comes with enough onboard hardware to replace numerous shields. a typical v2 smart controller board is shown below:
some v2 basic specs include
- microcomputer -linux ar9331
- microcontroller - atmega 2560
- ~50 sensors (digital, analogue, i2c, 1-wire etc with onboard interface circuitry)
- 12 2A open collect outputs
- wifi
- 3 serial ports
- 3 hardware watchdogs including a dedicated mpu supervisory watchdog with power reset capability
- real time clock with 10 year battery
- micro sdcard
- usb
- 3.3-48vdc
. It also comes with all the software required to get most real life monitoring and control applications up and running in no time. including
- firmware that handles almost any sensor connected on any pin
- linux kernel builds, control/monitoring applications and tools
- backend api's for data storage, visualization, alerting, remote control
- video streaming/timelapse etc.
All that is required is to connect sensors and relays, assign a unique device name and wifi password to visualize and control your application remotely.