Hardware and software project that is used to collect, log and display agricultural data.
Kernels are small battery powered / solar charged sensor nodes that are placed in a remote location such as a farmers field, strapped to a cherry tree or placed in a chicken coop. A Kernel consists of an Intel Edison and supporting hardware for the Edison to read sensors and store their data.
The Kernel broadcasts its own WiFi Access Point where a user can connect to it with a personal device (phone, ipad or laptop) and navigate a local website that the Kernel hosts. This site has a number of different options in terms of interacting with the data that the Kernel has collected.
The Kernel system is designed to be scaleable to a farmers / scientists needs and designed to be self suficient through being super low power and leveraging solar battery charging technology. There is no limit on the number of Kernels that can be deployed in this system beyond expense.
Harvesters are similar to Kernels, but do not have any onboard sensors or are solar powered. The Harvester essentially is searching for a Kernels access point and when it finds on it connects to it and downloads its most current log of data. It then deletes that log from the Kernel and creates a new one. Once the AP is no longer in range the Harvester looks for another one to connect to.
When a Harvester returns "Home" (Finds its WiFi AP at the barn or in the office) it connects to the internet and uploads all of the logs that it has collected to Google Drive.
All of the hardware for both a Kernel and Harvest should consist of off the shelf hardware found from a hardware store and minimal hardware from SparkFun.
The Edison uses/communicates with the Arduino Block through a communication protocal called Firmata, which is pretty prevelant in the hardware world. It allows a "Master" computer to control and read a "slave" microcontroller. Firmata needs to be installed on the Arudino block before we can use the block with the Edison. Here are the installation instructions for getting StandardFirmataPlus onto the Arduino Block. (Standard firmata plus has access to certain subsets of hardware control that we need to communicate with the GPS)
Open StandardFirmataPlus from Arduino Open up the Arduino IDE and navigate to __File>Examples>Firmata>StandardFirmataPus
Hook up the FTDI Breakout Using a USB to mini USB cable Hookup the FTDI breakout to your computer.
Select Board and Port The Arduino Block is the same as an Arduino Pro-Mini. From the Tools menu in Arduino, set the board by selecting __Tools> Board...> Arduino Pro/Promini
Then set your port by selecting Tools> Port> COM##. You want to select the highest numbered COM port that shows up
** Insert Image here **
Next insert the pins and FTDI into the FTDI header into the Arduino Block as shown below. Make sure that you are lining the FTDI pins up with the header pins so that the names match! Make sure that the pins are in constant contact by lightly leveraging the pins against the sides of the vias (holes) in the circuit board.
** Insert Imager Here **
You will be interacting with your edison through a serial terminal, not programming it in Arduino. To get started, use this the SparkFun Getting Started Guide from this point on. This should get you setup with using a serial console, updating the firmware on the edison, getting it connected to your local wifi (for development, we will put it in access point mode later).
about getting started with the console... more to come.
The FarmNode software can be installed through NPM on your Edison. To install FarmNode type the following.
npm install farm_kernal -g
This command installs farm_kernal globally which means that you can access its command line command from anywhere on your edison. You should now be able to run the farm_kernal script by typing the following in your console.
Note: What can be scripted and ran as a command vs instruct users to do mannually?
The farmNode Command Line tool would allow for ease of installation, setup and update for the FarmNode software. Example uses would be as follows:
farmNode enableAP- command to enable hostapd
farmNode disableAP- command to disable hostapd
farmNode name <name>- name the Kernel / harvester
farmNode test- blinks Arduino Block LED for 10 seconds
farmNode setup- command line interface to set logging intervals, etc
farmNode view- prints a list of logs more...
Host APD is a software package that comes natively on the Edison and enables you to turn the Edison into a WiFi AP. You control HostAPD through the command line tool called
To enable HostAPD on your edison type the following command.
systemctl hostapd enable
The console will return the following information:
info to copy and paste from the console
To disable HostAPD you can type the following:
systemctl hostapd disable
Once you have everything setup you shouldn't need to diable hostapd unless you are connecting your Kernel to the web for software updates / development. In that case you will need to disable HostAPD and then reconfigure your edisons wifi to connect your home/ business wifi by typing the following:
systemctl hostapd disable;configuure_edison --wifi
You will then use the edisons configure tool to search for a wifi address and connect to it to gain access to the internet again. When you are done with your connection you can re-enable hostapd.
The Edison is like any other computer, it can be turned on and off and sometimes it crashes. The problem here is that a person isn't always there to restart the software. So, what we need to do is enable FarmNode as what is called a service. Services are pieces of software that run in the background and are usually started on boot up of a computer.
NOTE: This may get wrapped into the FarmNode setup command functionality.
It's where your heart is! A menu page for selecting other pages / functions.
The history page shows the most current and live Log file in its entirity as a raw webpage.
Not a page but a button to manually downloads the current log as a csv file.
Opens a page with a warning that you are about to delete your current log and a button to confirm
The dashboard page is a display of data that is live and updates automatically using web sockets / socket.io.
List of all logs currently stored on the Kernel. In the future you should be able to navigate, download, view and delete them.
Setup is the page where you will be able to configure the Kernel through a form based interface by giving the Kernel a name, etc.