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.
- Intel Edison - used for central computing
- Edison Console Block - access for initial development and setup / Hard link into the Edison console
- Edison Battery Block - Battery / Power
- Edison Arduino Block - Slave Arduino for easier I/0 Control with the Edison
- BME280 Barometric Pressure Sensor - Barometeric Pressure, Alititude, Temperature and Humidity Sensor
- GPS Module - GPS...Location and time
- Edison Hardware Pack - Nuts and bolts to hold the Edison stack together
- Sunny Buddy Solar Charger - Solar charing circuit
- LiPo Battery - Its a battery
- Solar Pannel - Capture the sun's rays!
- External Antenna - Broadcasting the wifi AP outside of the enclosure
- U.FL Antenna Extension - Get the antenna connection to outside the enclosure
- _ _" Drill bit
- _ _" Drill bit
- Construction Adhesive
- Phillips Screw Driver or Bit for Drill
- Needle Nose Plier
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
- Plugin FTDI into Arduino Block Isert a set of X male pins into the FTDI as shown in the image
** 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 **
- Upload Firmata Click the Upload button. Once the Arduino sketch has compiled it should upload and the red and yellow leds on the FTDI should blink rapidly. You should also see the Arduino block LED blink a bit as well. When the upload is complete you can remove the FTDI and the Block is ready to use with the Edison. You will no longer need the Arduino IDE!
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.