Before we begin, we would like to thank the following amazing classmates and teacher for providing support while we worked on this project:
- Ms W
- Luca C
- Leon V
- Harvey B
- Riley T
- Robbie B
- Alister H
Introduction:
FarmBOX is an IoT device designed to enable AI powered sustainable monitoring and growing of plants. FarmBOX has sustainable and advantageous applications for both everyday consumers and agricultural Farmers.
The main features of FarmBOX are the ability to automatically adjust plant watering based on sensor readings and the ability to run an AI model to send alerts regarding plant ripeness and overall plant health. The AI model can be a standard model provided by FarmBOX or a self-trained model implemented by the user. FarmBOX devices have a companion Android App that can be used to manage the device, for example sending new or pre-set settings to the FarmBOX, viewing a live feed from its camera, receiving alerts and managing automatic firmware updates.
Unlike most other Farm-related IoT Devices, FarmBOX doesn't just take sensor readings, it has the ability to interpret sensor readings and to decide when best to water the plant or when to save water when the plant doesn't require watering. Another unique feature of FarmBOX is that it is also an open platform, which means that it can be easily extended by end users. One example is in relatation to it's AI functionality, users can either use one of our pre-trained AI models, or easily train their own.
FarmBOX Key Features:
· Automatically adjusted plant/crop watering based on sensor readings – withhold watering if rain is indicated based on configurable parameters
· Automatically adjusted plant/crop watering based on sensor readings – provide additional watering if temperature exceeds a configurable temperature value
· Live Camera Feed – allows anytime monitoring of plants/crops without site visit
· AI Model Alerts – Plant Ripeness
· AI Model Alerts – Plant Health and Disease Status
· AI Model Alerts – Standard Model or self-trained model implemented by the user
· Android App – General Management, change settings, view the live feed, receive alerts
· Mains Power and Solar Power variants available/supported
· Variant available that is compatible with Helium Platform (via additional Wio Terminal device)
· Track soil moisture on Helium, using a scaled rating system (via additional Wio Terminal Device). This enables insight (and adjustment if required) into the configurable watering settings.
FarmBOX Components and Variants:
A FarmBOX consists of a Raspberry Pi Zero2 W, a camera, PiicoDev Atmospheric Sensor (temperature, atmospheric pressure and humidity), a motor and motor driver to enable watering systems. The software consists of Ubuntu Server and our custom FarmBOX firmware. The connected PiicoDev Sensors enable environmental sensing, and the connected motor enables the watering of plants (details are discussed in a later section). The camera provides input to the Live Feed and AI Analysis.
There are four different variants of FarmBOX, each suited to different requirements:
· FarmBOX Essential
· FarmBOX Essential Gas
· FarmBOX Eco
· FarmBOX Eco Gas
FarmBOX Essential is the mains power variant and is supplied with a USB to mains power adapter.
FarmBOX Eco is the solar powered variant and is supplied with a monocrystalline 5V solar panel and PowerBank.
A FarmBOX variant with ‘Gas’ at the end of the name also contains a SEEED Bazar Wio Terminal device, with the Grove LoRaWAN model. This is connected to the Raspberry Pi using a USB Port to allow information exchange. The ‘Gas’ FarmBOXes thus contain support for the Helium Platform.
Section 2 - FarmBOX Detailed DescriptionThis section describes the FarmBOX in more details, including the Software and the Hardware.
FarmBOX Software - Purpose:
All FarmBOX variants run ‘FarmBOX Firmware’, which is a collection of Python and Shell Script code designed to allow the following functions:
- Communicate with an Android App using Google Cloud Firestore through Google Firebase Communication involves:
- Settings and pre-sets requested by the user
- AI Analysis Results
- Requested Updates
- Use TensorFlow to run AI Analysis on the camera feed every 24 hours. This can help detect and notify the user through the app of:
- Plant Ripeness
- If the plant is infected with disease and the type of disease
- The AI feature is designed to allow the user to use our pre-set AI models or users can provide their own model for unique investigations.
- Determine when to water the plant depending on the following factors:
- Temperature (if it is very hot the plant might become stressed)
- Barometer Readings (will it rain soon)
- FarmBOX allows users within the LAN to log in at the address *connection-id*.local/stream.jpg to see a live feed of their plant(s). Every individual FarmBOX has a unique Connection ID which is randomly allocated at the time SD Cards are bulk flashed.
- Keep the system up to date by automatically updating the following when an update is released by the FarmBOX Team on Cloud Firestore:
- Ubuntu Distribution (e.g., Hirsute Hippo -> Jammy Jellyfish)
- Packages installed through apt like python3
- Packages installed through pip in the main system like firebase_admin and grpcio
- Packages installed through pip in the dedicated Python Virtual Environment for TensorFlow like TensorFlow and TensorBoard
- The actual FarmBOX Firmware packages
- Keep the system in-sync with the database after setup by refreshing the data every 15 minutes and applying requested changes:
- Modifying the WiFi SSID and Password (if WiFi is the desired connection method)
- Changing the data files with the latest pre-sets
The code is too long to include directly here; however, you can grab the source at: https://github.com/Kotin-for-win/FarmBOX-Firmware-Latest
Please note that their are certain sensitive files, such as 'secret keys' to access our central production database which have been excluded from the Git Repository. Instructions have been included in a later section on how to generate your own 'secret keys' for DIY Users. These 'secret keys' will come preinstalled on production FarmBOXes to reduce the setup efforts, so thus must be access-controlled.
How are the sensitive files access-controlled on production devices?
- The Entire FB-Folder/farmbox, FB-Folder/fb-upgrade directories and all containing files are setup so that only the root ‘sudo’ user can access them. All other users are prevented from viewing the files.
- All FarmBOX daemons start as the root ‘sudo’ user, so they have permission to run the files, however for an end user to elevate to the root ‘sudo’ level, the user must know the password for the default account (which automatically signs in!). This password is maintained by the FarmBOX Team for security.
- According to Canonical, Ubuntu Server has the install-time option for Full Disk Encryption (FDE), meaning that a user simply cannot remove the SD card from the FarmBOX and read it using another Linux PC, as the data will appear like Gibberish.
FarmBOX Variants and Hardware Schematics:
There are four different variants of FarmBOX, each suited to different requirements:
- FarmBOX Essential
- FarmBOX Essential Gas
- FarmBOX Eco
- FarmBOX Eco Gas
A FarmBOX consists of a Raspberry Pi Zero2 W, a camera, PiicoDev Atmospheric Sensor (temperature, atmospheric pressure and humidity), a motor and motor driver to enable watering systems plus relevant accessories (e.g., SD Card, protective case) and relevant cables.
You can find the schematic (block/box) diagrams of each FarmBOX variant in the 'schematics' section.
FarmBOX ‘Gas’ Detailed Description
A FarmBOX Model with ‘gas’ at the end means that it is compatible with Helium. These devices use an additional Wio terminal alongside the Raspberry Pi. The FarmBOX team followed this tutorial: https://wiki.seeedstudio.com/Wio-Terminal-Reading-Raspberry-Pi/ to make the Raspberry Pi communicate the AI Analysis results to the Wio Terminal. The Wio Terminal then sends the AI Analysis results to Helium.
The FarmBOX team made the decision that we would allow users sign up for Helium Console and connect their FarmBOX themselves (using connection details included in their manual) if they wished to use Helium as in production it can get very expensive paying for everyone’s transfers. The FarmBOX Team have produced a PDF quick start guide (attached in the schematics section) to help guide users through the Helium process.
The FarmBOX Team added a WebView (like a mini-chrome inside our app) to the Helium Console in our Android App, making the setup process seamless, as everything is in one place.
FarmBOX models with 'Gas' at the end also give users the unique ability to track soil moisture on the Helium Dashboard using our tiered rating system:
- EMERGENCY - Too Dry
- Dry
- Okay
- Wet (desired value)
- Too Wet
- EMERGENCY - Too Wet
This feature is powered by the Wio Terminal Soil Moisture sensor, and allows the monitoring of how the pre-set watering values are performing. Users can then adjust the watering values if necessary thanks to the insight provided by the Moisture sensor.
FarmBOX Variants – Power Details:
The Raspberry Pi, Wio Terminal and Motor H-Bridge Drivers all require a power source.
The four AA batteries will keep the Motor H-Bridge Drivers satisfied for up to a year (maybe longer).
The Raspberry Pi and Wio Terminal (only in Gas models) both require USB-C power. This is where the different variants come into play.
The FarmBOX Essential and FarmBOX Essential Gas require Mains Power to USB-C connection which is given to the Raspberry Pi. The Raspberry Pi connects via USB the the Wio, thus providing power to it as well.
The FarmBOX Eco and FarmBOX Eco Gas have a 1 Monocrystalline Solar Panels (https://core-electronics.com.au/monocrystalline-solar-panel-5v-1a.html?gclid=EAIaIQobChMIy4Wem9qi-gIVn5lmAh1I6QEYEAQYAiABEgK85vD_BwE). These have a USB connector port so can be used to power both the Wio and Raspberry Pi Zero2 W. The Raspberry Pi 4B+ uses 3.4 Watts at idle, and so the much more lightweight Pi Zero2 W must fall well under the 6W output of one solar panel. All Raspberry Pis require at least 5 volts to turn on, and the solar panel provides this. The Wio uses 120mA when the screen is off (it will be off in all FarmBOX Gas Models), so again falls well under the 1A output of the Monocrystalline Solar Panels.
To store power when the sun is not shining, a 20000mAh PowerBank is used, that will provide the required power.
FarmBOX Component Cost:
As mentioned previously, the FarmBOX consists of common devices (e.g. Raspberry Pi Zero) and common electrical components (MicroSD Cards, etc.) to ensure the cost of building a FarmBOX is relatively economical. One FarmBOX can be connected to an entire watering system so these prices are quite reasonable.
Below is an example of the cost of sourcing the components from a couple of example electronics retailer Core Electronics in NSW Australia and Officeworks in Australia.
FarmBOX Essential
- > Core Electronics - Raspberry Pi Zero2 WH AUD$22.95
- > Core Electronics - Raspberry Pi Camera Board v2 - 8 Megapixels AUD$38.95
- > Core Electronics - Raspberry Pi Zero Camera Adapter – AUD$6.55
- > Officeworks - SD Card 16GB - AUD$8.00
- > Core Electronics - Official Raspberry Pi 12.5W Micro USB Power Supply (to connect to mains power) - AUD$15.55
- > Core Electronics - PiicoDev Adapter for Breadboards – AUD$2.95
- > Core Electronics - PiicoDev Atmospheric Sensor BME280 – AUD$17.90
- > Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board – AUD$4.95
- > Core Electronics – 4x AA Battery – AUD$5.40
- > Core Electronics - 4-AA Battery Holder – AUD$3.45
- > Tro Pacific - POLYCARBONATE ENCLOSURE CLEAR LID IP66 240H X 160W X 100D – AUD$22.70
Total Cost: $150
FarmBOX Essential Gas
- > Core Electronics - Raspberry Pi Zero2 W AUD$22.95
- > Core Electronics - Raspberry Pi Zero2 WH AUD$22.95
- > Core Electronics - Raspberry Pi Camera Board v2 - 8 Megapixels AUD$38.95
- > Core Electronics - Raspberry Pi Zero Camera Adapter – AUD$6.55
- > Officeworks - SD Card 16GB - AUD$8.00
- > Core Electronics - Official Raspberry Pi 12.5W Micro USB Power Supply (to connect to mains power) - AUD$15.55
- > Core Electronics - PiicoDev Adapter for Breadboards – AUD$2.95
- > Core Electronics - PiicoDev Atmospheric Sensor BME280 – AUD$17.90
- > Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board – AUD$4.95
- > Core Electronics – 4x AA Battery – AUD$5.40
- > Core Electronics - 4-AA Battery Holder – AUD$3.45
- > SEEED – Wio Terminal AUD$36.50
- > SEEED - Grove - Wio-E5 (STM32WLE5JC), for Long Range Application – AUD$16.90
- > Tro Pacific - POLYCARBONATE ENCLOSURE CLEAR LID IP66 240H X 160W X 100D – AUD$22.70
- > SEEED - Sensor Module, Grove, Soil Moisture Sensor, 3.3 V to 5 V / 35 mA Supply - AUD$4.72
Total Cost: $208.12
FarmBOX Eco
- > Core Electronics - Raspberry Pi Zero2 WH AUD$22.95
- > Core Electronics - Raspberry Pi Camera Board v2 - 8 Megapixels AUD$38.95
- > Core Electronics - Raspberry Pi Zero Camera Adapter – AUD$6.55
- > Officeworks - SD Card 16GB - AUD$8.00
- > Core Electronics - PiicoDev Adapter for Breadboards – AUD$2.95
- > Core Electronics - PiicoDev Atmospheric Sensor BME280 – AUD$17.90
- > Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board – AUD$4.95
- > Core Electronics – 4x AA Battery – AUD$5.40
- > Core Electronics - 4-AA Battery Holder – AUD$3.45
- > Tro Pacific - POLYCARBONATE ENCLOSURE CLEAR LID IP66 240H X 160W X 100D – AUD$22.70
- > Core Electronics - Monocrystalline Solar Panel (5V 1A) - AUD $19.50
- > PD Pioneer 20000mAh 60W Portable Charger 2-Port Power Bank with Pass Through Charging - $69.99
Total Cost: $223.94
FarmBOX Eco Gas
- > Core Electronics - Raspberry Pi Zero2 WH AUD$22.95
- > Core Electronics - Raspberry Pi Camera Board v2 - 8 Megapixels AUD$38.95
- > Core Electronics - Raspberry Pi Zero Camera Adapter – AUD$6.55
- > Officeworks - SD Card 16GB - AUD$8.00
- > Core Electronics - PiicoDev Adapter for Breadboards – AUD$2.95
- >Core Electronics - PiicoDev Atmospheric Sensor BME280 – AUD$17.90
- > Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board – AUD$4.95
- > Core Electronics – 4x AA Battery – AUD$5.40
- > Core Electronics - 4-AA Battery Holder – AUD$3.45
- > Tro Pacific - POLYCARBONATE ENCLOSURE CLEAR LID IP66 240H X 160W X 100D – AUD$22.70
- > Core Electronics - Monocrystalline Solar Panel (5V 1A) - AUD $19.50
- > PD Pioneer 20000mAh 60W Portable Charger 2-Port Power Bank with Pass Through Charging - $69.99
- > SEEED – Wio Terminal AUD$36.50
- > SEEED - Grove - Wio-E5 (STM32WLE5JC), for Long Range Application – AUD$16.90
- > SEEED - Sensor Module, Grove, Soil Moisture Sensor, 3.3 V to 5 V / 35 mA Supply - AUD$4.72
Total Cost: $282.06
Section 3 – The Problem, and how we address the judging criteria of ImpactFarmBOX doesn't just solely focus on one challenge or subtopic. FarmBOX is designed with all the challenges in mind, so that it has a wide variety of flow on effects, in all areas of sustainability.
Challenge 1: Climate Crisis Prevention/Mitigation – Subtopics 1 and 2 - Global warming and Carbon neutrality
and
Challenge 3: Marine Conservation – Subtopics 1 and 2 -Sea level rise and Melting glaciers, ice, snow:
FarmBOX has sustainable and advantageous applications for both everyday consumers and agricultural Farmers.
Firstly, FarmBOX can encourage consumers to grow their own plants in their private backyards or community gardens through making the overall process easier and simpler. Our solution makes it significantly easier for individuals to grow their own plants to utilize as a sustainable food source because the AI helps guide them through the difficult process to determine when the crop is ripe or when it may be diseased. The promotion of self-grown local food sources greatly assists to reduce food-miles, reducing 20% of the total food-system emissions (Li, M, Jia, N, Lenzen, M, Malik, A, Wei, L, Jin, Y & Raubenheimer, D 2022, ‘Global food-miles account for nearly 20% of total food-systems emissions’, Nature Food, vol. 3, no. 6, pp. 445–453.) This would significantly decrease the carbon emissions of the world, preventing global warming and leading us to a carbon neutral future.
For commercial agricultural applications, the remote monitoring feature of FarmBOX allows commercial farmers to reduce the frequency they have to go out to the field to physically monitor their crops. The FarmBOX’s on-board sensors allow for automatic watering and the on-board camera allows farmers to check on their crops remotely. The included FarmBOX AI Platform allows farmers to use either our AI models or apply their own. The AI will determine automatically when plants are ripe or have certain diseases (it can tell you the specific disease!). Tests on a validation dataset demonstrated a 95% accuracy using tomato models. Our proposal for commercial agriculture is that each individual plant does not require an individual FarmBOX, but rather farmers can utilize a set of FarmBOXs to monitor plants in different locations in the crop field that can then be considered representative of the entire crop. The FarmBOX can also be connected to a larger watering system to water the entire crop or components of the crop as appropriate.
Even if Farmers don’t fully utilize the AI, they can still see a live camera feed of their plants, meaning they don’t have to make the time (and fossil fuel) consuming journey around their farmland. The FarmBOX Eco and FarmBOX Eco Gas can stay out in the field for almost a year thanks to their Solar Panels. However, they require a yearly service to replace the AA batteries which power the Motor Driver.
Overall, our FarmBOX solution reduces carbon emissions both in the transport of food to consumers and the transport of farmers around their land. This takes humanity closer to a carbon neutral world, which would prevent global warming, and reduce melting ice caps, which lead to the sea level rising.
Challenge 2 – Subtopic 4 - Human-wildlife conflict prevention/mitigation
The FamBOX automatic watering system is dependent upon indications of rainfall and thus the plant watering is automatically adjusted.
The FarmBOX uses atmospheric sensors to detect when rain is due because a drop in atmospheric pressure signals coming rain. Once the atmospheric pressure drops below a pre-set level (customizable by each user), watering will be cancelled until the next watering interval (also customizable). This is much more intelligent than the typical automatic watering systems which indiscriminately water at a set time, even when the plants may have already been watered due to rain. This feature will save a significant amount of water, which according to slate.com, reduces the strain put on the habitats of freshwater wildlife due to over water use, meaning that the impact put on freshwater life due to the human wastage of water in agriculture will be mitigated. This water saving initiative could also be applied to urban, metropolitan and city plant infrastructure, for example parks and sporting ovals etc.
A key advantage is that the pressure threshold is customizable. Some plants may require more water and the threshold can be set lower, so that a larger predicted rainfall is required to trigger a cancellation of the automatic watering system.
In addition, the Wio Terminal Soil Moisture sensor allows the monitoring of how the pre-set watering values are performing. Users can then remotely adjust the watering values if necessary thanks to the insight provided by the Moisture sensor and the feedback it provides.
Challenge 2 – Subtopic 3 - Environmental habitat monitoring AND Challenge 4 – Open Science.
FarmBOX lends itself particularly well to environmental habitat monitoring and Open Science due to our AI enabled features.
The FarmBOX AI Platform is easy for anyone to learn about AI and train their own AI models for easy use with FarmBOX. This means that both Scientists and Citizen Scientists studying a certain species of plant in an ecosystem can program an AI (even if they haven’t heard of python!) to detect certain changes in plant appearance or diseases and FarmBOX will send them notifications when a change in appearance or disease occurs. This has many applications for all types of environmental habitat monitoring. For example, a certain type of endangered plant can be monitored for general condition or disease, or key locations could be monitored for the appearance of noxious weeds or invasive plant species.
Challenge 5 – Subtopic 2 - Precision farming
One of the key applications of FarmBOX is precision farming and agricultural applications. FarmBOX uses on-board atmospheric sensors to only water when the conditions require it, meaning the water is used in a more precise and efficient way in agriculture. The AI will also notify farmers when fruit is ripe or when a disease develops providing even greater precision. In addition, the on-board camera feed can be accessed remotely, meaning that unnecessary and wasteful trips out the farming plot or fields are not needed.
Challenge 5 – Subtopic 4 – Autonomous Greenhouse
FarmBOX has several autonomous greenhouse features. Firstly, FarmBOX uses its on-board sensors to detect the ideal time to water plants. The barometer detects when atmospheric pressure is low, signally coming rain and delays or refrains from watering until the next interval. Secondly, there is also an integrated temperature sensor that is utilized to adjust the watering schedule as well. For example, when the temperature exceeds a customizable level, the plant(s) will be given additional water to reduce stress and strain and increase potential yield and viability. The additional watering is also customizable depending on the plant requirements.
Challenge 5 – Subtopic 5 – Local Food Production
FarmBOX can potentially be a key enabler for local food production. FarmBOX’s AI encourages and empowers consumers who don’t usually have a green thumb (or keep forgetting to water plants!) to easily produce their own local produce food source in their private backyard or community gardens or roof tops over apartments and so on. As described for the agricultural applications, FarmBOX can automatically water plants and also utilize AI to provide indications of ripeness and disease.
FarmBOX is a well thought-out IoT device designed to enable AI powered sustainable monitoring and growing of plants that has applications in all competition challenges and most subtopics, making it extremely impactful across a variety of domains.
Section 4 - Typical End User Setup WorkflowThe below section describes the typical set-up for an End user once FarmBOX is in production.
Step 1 – Receive your FarmBOX after ordering it from our theoretical website.
Step 2 – Remove the FarmBOX and the User Manual from the packaging. Please recycle the packaging. Note: all packaging will be recyclable and biodegradable.
Step 3 - Connect the FarmBOX into mains power (FarmBOX Essential or FarmBOX Essential Gas) or put it out in the sun to charge (FarmBOX Eco or FarmBOX Eco Gas)
Step 4 – On an Android device, download the FarmBOX Android App from the Google Play Store and install. Please note the App is not on the Play store at present, but the app can be side-loaded using Android Debug Bridge. In production, the app will be available in the store. The App has been designed to be in compliance with the Google Play Policy and by extension the Google Designed for Families Policy.
Step 5 – Plug your Android Device into the USB Port of your FarmBOX. On the Android device enable USB Tethering in Settings > Connections > Mobile Hotspot and Tethering
Step 6 – On the Android device, open the FarmBOX App and input your connection ID (your connection ID can be found in your User Manual located in the package). To display to the connection ID screen, you will need to press “Start the Adventure” if this is your first FarmBOX or “Add next” to FarmBOX 2 if this is your second FarmBOX.
Step 7 – On the Android device, Press next.
Select the method your FarmBOX will use connect to the Internet (either ‘WiFi’, ‘Ethernet or USB’ or ‘Helium’).
- If you select ‘WiFi’, you will be prompted to enter your WiFi details (SSID and Password).
- If you select ‘Ethernet or USB’, please plug in your Ethernet or USB (carrying internet) cable.
- If you select ‘Helium’ you will be prompted to set-up Helium following the FarmBOX set-up. Please note that the ‘Helium’ option only works with FarmBOX Gas models.
Step 8 – On the Android device, select the initial environmental settings for your FarmBOX.
Here is a high-level explanation of FarmBOX environmental settings.
- Water Threshold – The temperature threshold in degrees Celsius. When the FarmBOX temperature sensor reaches this value, additional water will be provided to the plants because it is hot. The recommended value is 35.
- Bar Threshold – BarometerThreshold in hPa. When the FarmBOX Barometer senor reaches this value, the scheduled watering will be cancelled because the Barometer is indicating rain is coming. The recommended value is 1000.
- Interval – The Interval is the time between watering sets measured in seconds. The FarmBOX will wait this interval before providing your plant with more water. Please the table is the User Manuel for examples to set your value. The initial recommended value is 86400 (once per day, 24 hours X 60 minutes X 60 seconds).
- Length – The Length is the time in seconds for the duration of the watering. Please the table is the User Manuel for examples to set your value. The initial recommended value is 30 seconds.
- Nickname – The nickname is the name for your FarmBOX. The user will see this name in the FarmBOX Dashboard and notifications.
Step 9 – On the Android device, Press Submit. You will then be presented with a series of predefined plants that the FarmBOX Team have trained AI models for and a custom button. If you have followed the steps in Section 6 (below) to make your AI own model, press ‘Custom’ and when prompted enter your Model Prefix. Otherwise, please select one of our pre-trained AIs, or if you do not wish to use FarmBOX AI Platform, press ‘Custom’ and type none.
Step 10a [Ethernet/USB or WiFi] – The user will now be sent to the FarmBOX dashboard where you have the ability to change your initial settings or view the Camera Feed. If you have plugged in your Ethernet/USB cable or entered the correct WiFi details, you may now disconnect your Android device from the FarmBOX by removing the USB cable.
Step 10b [Helium] – The user will now be sent to the Helium Dashboard website. Please use the attached PDF, ‘Helium x FarmBOX Quickstart’ in the schematics section to set up Helium. Once done you many disconnect your Android device from the FarmBOX by removing the USB cable.
Step11 - Connect the FarmBOX in the field.
- Hole at the top marked "WATER IN", connect to a water source via a hose.
- Hole at the bottom marked "WATER OUT", see below for connection options:
Option 1 - Do not connect the WATER OUT hole to anything. Place the FarmBOX vertically above a plant and allow the water to gravity flow down onto the plant. This is not efficient as it can only water a single plant or small amount of plants.
Option 2 - Connect the WATER OUT to a Sprinkler or other mass irrigation system via a hose. Then theoretically an unlimited number of plants can be watered by the one FarmBOX.
Section 5 – Typical End User for Education Setup WorkflowThe below section describes how to build your own FarmBOX from scratch, including Hardware required, connection procedures and software set-up. The purpose of this section is to allow others to build competence and experience in IOT through following this guide and building their own operational FarmBOX from scratch.
Please note, these steps are not required for production FarmBOX systems ordered from the FarmBOX Team.
Stage 1 – Hardware Components
Step 1 – Order and obtain the hardware components.
Order and obtain the hardware components from a suitable electronics retailer. Core Electronics in Australia is used an as example for this document.
To determine the components and an approximate cost, review Section 2 -> ‘How much does a FarmBOX cost?’ Please note hardware resources required will vary depending upon the FarmBOX variant model you wish to replicate.
Step 2 – Prepare your resources for hardware setup: Raspberry Pi Camera
Locate the Raspberry Pi Zero2 WH.
Locate the Raspberry Pi Camera.
Connect the Raspberry Pi Camera into the Camera Port of the Raspberry Pi Zero2 WH.
For details, please refer to this helpful guide: https://picamera.readthedocs.io/en/release-1.13/quickstart.html#pi-zero
Step 3 – Prepare your resources for hardware setup: PiicoDev Atmospheric Sensor Connection
Locate the Raspberry Pi Zero2 WH.
Locate the PiicoDev jumper cable.
Locate the PiicoDev Atmospheric Sensor.
Locate the PiicoDev Adapter for Breadboards.
Locate the Breadboard.
Locate the Male-to-Female jumper wires (X four)
Firstly, using the PiicoDev jumper cable connect the PiicoDev Atmospheric Sensor into the PiicoDev Adapter for breadboards.
Secondly, connect the pins on the PiicoDev Adapter for Breadboards into the Breadboard (any location is acceptable).
Thirdly, using four Male-to-Female jumper wires (one for each connection), connect the following:
- The PiicoDev pin marked ‘SCL’ to the Raspberry Pi pin marked ‘GPIO3’
- The PiicoDev pin marked ‘SDA’ to the Raspberry Pi pin marked ‘GPIO2’
- The PiicoDev pin marked ‘3v3’ to any Raspberry Pi pin marked ‘3v3’
- The PiicoDev pin marked ‘GND’ to any Raspberry Pi pin marked ‘GND’.
Step 4 – Prepare your resources for hardware setup: Set-up the Motors
Locate AA batteries (four required)
Locate the battery holder
Locate theAdafruit TB6612 Motor Driver
Firstly, place the four AA batteries inside their holder ensuring the battery polarity (+, -) ends are correct. The battery holder has markings to indicate the correct polarity ends for the batteries.
Secondly, on the Adafruit TB6612 Motor Driver, connect the red AA battery holder wire to Vmotor+ and the black AA battery holder wire to Vmotor-.
Thirdly, make the following connections between the TB6612 Motor Driver and the Raspberry Pi:
- Connect the TB6612 pin ‘Vcc’ to any Raspberry Pi pin labelled ‘5V’.
- Connect the TB6612 ‘GND’ Pin (the one next to Vcc) to any Raspberry Pi pin labelled ‘GND’.
- Connect the TB6612 STBY Pin, to the Raspberry Pi pin ‘GPIO25’.
- Connect the TB6612 ‘AIN1’ and ‘AIN2’ to the Raspberry Pi pins GPIO27 and GPIO22 respectively (although the order is not significant, unless you want to specify direction which is not required for our application).
Fourthly make the following connections:
- Connect the Red wire on your DC Hobby Motor to the MOTORA pin closest to the fruit flower logo (Adafruit logo)
- Connect the Blue wire on your DC Hobby Motor to the MOTORA pin furthest away from the fruit flower logo (Adafruit logo)
Step 5 – Prepare your resources for hardware setup: Connect FarmBOX to power source
Connecting the FarmBOX to the power source differs depending upon the FarmBOX variant you are replicating.
[FarmBOX Essential] - Connect the Raspberry Pi (FarmBOX) to the electrical mains power using the Raspberry Pi MicroUSB Power Adapter.
[FarmBOX Eco] - Connect the USB end of the USB-To-MicroUSB cable to the power source on the bottom of the Monocrystalline Solar Panel. Connect the MicroUSB end of the USB-To-MicroUSB cable to the Passthrough Powerbank. Next connect the OUT cable of the Passthrough Powerbank to the Raspberry Pi (FarmBOX).
[Gas Models] - Connect the Wio Terminal (with LoRaWAN Grove Chip) to a computer with the Arduino IDE via the USB Type-C Cable. Connect the Grove E5 LoRaWAN Chip to the Wio Terminal via the Grove Connector. Also connect the Grove Soil Moisture sensor to the Wio Terminal.
Step 6 - Prepare your resources for hardware setup: Connect to the Wio (Gas Models only)
[Gas Models] - Plug the Wio Terminal into your computer via USB. Please clone the following Git Repository: https://github.com/Kotin-for-win/FarmBOX-Wio-Code Using the Adurino IDE, install the code onto your Wio. If you need some help, please consult this tutorial on how to get started with Adurino IDE: https://gurgleapps.com/learn/coding/how-to-get-your-seeed-studio-wio-terminal-working-with-the-adruino-ide
[FarmBOX Essential Gas and Eco Gas] - Disconnect the Wio Terminal from your computer. Connect the Wio Terminal to the Raspberry Pi’s USB ports using a USB cable.
Step 7 - Create a device that looks like the attached CAD 'FarmBOX Water Wheel'. Plug the DC Motor into the designated socket on the water wheel.
Step 8, Place the FarmBOX into the enclosure, ensuring the Camera is pointing towards the clear plastic. Using any means possible, ensure that the water wheel is separated from the electronic components as highlighted in our PowerPoint schematics.
Step 9. Using a Hole Saw Cutter Kit, in the enclosure in the spot designated by Water IN and Water OUT in the picture above.
Stage 2a – Software Components Firebase
The below section provides step-by-step instructions to set-up the software components of the FarmBOX.
In production, these steps do not need to be undertaken. This is because the Firestore account needs to be set up only once. The Android App will be available on the Google Play Store and require no special configuration. In addition, a ‘FarmBOX’ SD card.iso image that has all the required firmware files and setup is supplied with the FarmBOX. This.iso image can be bulk flashed and therefore no special configuration is required.
Please follow the guide in the attached.pdf 'DIY Software Walkthrough' to setup the FarmBOX Firmware, you can find it in the Schematics section.
Section 6 – How to add your own AI models to FarmBOXPlease see the attached PDF in the 'Schematics' section - 'How to add your own AI models to FarmBOX'.
Section 7 – Why is our solution scalable?We have shown through above sections how our project can be easily recreated, and minimal assembly is required, components utilised are standardized and can be easily plugged into one another, no detailed knowledge of electronics is required. Creating the whole FarmBOX Essential setup only will take only five minutes. There is a complete Bill of Materials (BOM) for each model in Section 2.
There is however a lot of software setup to do. This only needs to happen initially. In production, a .ISO file for the desired FarmBOX image can be easily created using the following command once an SD from a working FarmBOX is placed into a Ubuntu Desktop PC
sudo dd if=/mountpointfosd of=/home/michael/FB-Image.iso bs=1M
This file can then be used to flash the FarmBOX image in bulk using a tool such as balenaEtcher without having to worry about having to running all the environment setup commands. The path /mouthpointofsd will need to be determined, however this needs to only configured once.
A shell script like the one below can automatically assign a connection id once run from the flashing Ubuntu Desktop PC:
#!/bin/bash
RANDOM=$$
cd /mountpointofsd/home/michael/FB-Folder/data
echo $RANDOM > UUID.txt
Priced between $150 and $277.34 depending on the model, this is a very feasible device, considering one FarmBOX can be connected to a whole watering system. Even if consumers do not presently have an Android device, we have deliberately selected Android for the initial version of the App as there exists a wider range of Android devices available at many different price points from approximately USD $100 to USD $1500 and thus price is not a large inhibitor to entering the world of FarmBOX. The consumer can select the Android device that best suits their budget.
Section 8 – Why bonus points are applicable to the FarmBOX projectHow do we help other community members?
Our complete code has been posted to the GitHub page, and our experiences and have been shared through the README file, including our solutions to problems others are likely to experience. This repository is public and has been shared on the ‘Discussion’ page on the competition website.
We have also been careful in selecting the license to put our code under so it can be of the greatest possible use to other community members. Our code is licensed under the LGPL v2.1 and GPL v3.0, which benefits other community members in the following ways:
- It makes sure we are not liable for damages, so we can make the best possible code to share without worrying about being sued.
- It ensures that Patent Trolls can’t steal our work and make it Proprietary, meaning it will be open forever.
- It ensures that all derivative works must also be open source, meaning that the Open-Source community gets even more great software to view.
- It allows our work to be called from closed source work, making it of the greatest possible use to the community.
Sponsorship usage:
SEEED – The Wio Terminal is used in FarmBOX Gas models.
Microsoft – Microsoft Bing is used in the ‘Make your own model for use with FarmBOX tutorial’ to find high-quality images for AI Training. Microsoft Edge is the browser used for all web browser requiring activities.
Helium - The FarmBOX communicates data over the Helium Platform
Section 9 – Why FarmBOX should be considered for the Helium AwardWe feel that we should be considered for the Helium Award for a number of reasons.
Firstly, FarmBOX empowers students in schools (see our End User for Education Workflow) to learn about a whole variety of technologies including Helium and LoRaWAN. FarmBOX empowers students to change the world using Helium by giving them hands-on experience with LoRaWAN skills, which, in Australia, is not commonly taught even in school Digi Tech programs (the Australian Curriculum just calls for teaching about “computer networks”, and our school, like most schools just teachers about WiFi).
Secondly, FarmBOX will expand the Helium Network. Farmers often don’t have Helium reception, so in our ‘Helium x FarmBOX Guide’ Farmers are encouraged to start their own Helium Hotspots, creating reception for themselves and the neighbouring farms around them. This will expand Helium into regional areas where even in the US, there is presently, little or even no coverage, according to the Helium Explorer (please see the figure below for an indication).
The Helium Explorer coverage gaps in Australia is shown below:
Regional Victoria, highlighted in Orange, has absolutely no Helium Coverage, aside from the occasional small location. This is a problem that FarmBOX will resolve as farmers will put up new hotspots improving coverage.
Therefore, our FarmBOX project will assist to bring IoT to regional areas, allowing farmers and residents in regional areas to access the full range of IoT devices beyond just FarmBOX to make their world a better place 😊.
FarmBOX Future ImprovementsThe FarmBOX team has the following improvements and new features planned for future FarmBOX models:
- Enhance camera feed security and access: Make the camera feed more secure and allow it to be accessed from anywhere in the world (at present users must be in the same LAN as the FarmBOX). This can be achieved by using Google Firebase Cloud Storage, which would upgrade the connection from HTTP to HTTPS (making it encrypted), and allow for viewing anywhere in the world. It would be easy to implement as Firebase APIs are already in use on the FarmBOX and Android App
- iOS App Version: Create an iOS version of the App for users with iPhones and iPads (this will be feasible as iOS is compatible with Google Firebase)
- Upgrade the watering system: Move from a simple water wheel powering the conditional watering, to a solenoid valve. This will improve the system as a greater water pressure can be achieved, thus enabling more plants to be watered from the one FarmBOX. An impeller flow-through meter can also be installed, this will allow for precise measuring in Milliliters of how much watering is being done. The flow-on effect from installing this device will be that users can have greater control over how much their plants are watered (it will no longer be "Watering time in seconds", and "Watering amount in milliliters").
- Enable Two-Way Serial Communication: This will allow the Wio to send data to the Raspberry Pi. The Wio can then send the soil humidity data to the Raspberry Pi, meaning that these readings can be used in Firebase alongside Helium. This will also allow for notifications such as 'your soil is too dry' that would be built on top of the existing FarmBOX Notification Service that allows AI Analysis notifications. Another application for the soil humidity data within the Raspberry Pi is that the soil humidity data can then be used as an input to appropriately alter the automatic watering schedules. For example, increase watering if soil is dry and decrease watering if soil is moist enough already.
Thank you so much for reading through our sustainable project!
Comments