#LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass article \begin_preamble \usepackage[long]{datetime} \usepackage{setspace} \usepackage[labelfont=bf,justification=raggedright]{caption} \captionsetup{font={normal,stretch=.85}} \usepackage[toc]{multitoc} \renewcommand\tableofcontents{% \@starttoc{toc}% } \end_preamble \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman lmodern \font_sans lmss \font_typewriter lmtt \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize 11 \spacing single \use_hyperref true \pdf_bookmarks true \pdf_bookmarksnumbered false \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks false \pdf_pdfborder true \pdf_colorlinks false \pdf_backref false \pdf_pdfusetitle true \papersize default \use_geometry true \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \leftmargin 2in \topmargin 2cm \rightmargin 2in \bottommargin 2cm \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Title Sensisplicity Sensor System \begin_inset Newline newline \end_inset Invention Description \end_layout \begin_layout Author Nick Ames \begin_inset script superscript \begin_layout Plain Layout 1,2 \end_layout \end_inset , Christopher M. Sullivan \begin_inset script superscript \begin_layout Plain Layout 2 \end_layout \end_inset , Eli Perez \begin_inset script superscript \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Newline newline \end_inset Austin Meier \begin_inset script superscript \begin_layout Plain Layout 1 \end_layout \end_inset , Justin Elser \begin_inset script superscript \begin_layout Plain Layout 1 \end_layout \end_inset , Felipe Arredondo \begin_inset script superscript \begin_layout Plain Layout 1 \end_layout \end_inset \begin_inset Newline newline \end_inset Brett M. Tyler \begin_inset script superscript \begin_layout Plain Layout 1,2 \end_layout \end_inset , Pankaj Jaiswal \begin_inset script superscript \begin_layout Plain Layout 1 \end_layout \end_inset \end_layout \begin_layout Standard \noindent \begin_inset Box Frameless position "t" hor_pos "c" has_inner_box 1 inner_pos "t" use_parbox 0 use_makebox 0 width "100col%" special "none" height "1in" height_special "totalheight" status collapsed \begin_layout Plain Layout \size footnotesize \begin_inset CommandInset toc LatexCommand tableofcontents \end_inset \end_layout \end_inset \end_layout \begin_layout Section Functionality \end_layout \begin_layout Subsection Summary \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \begin_inset space \hfill{} \end_inset \begin_inset Graphics filename images/soil sensor.png display false width 8cm \end_inset \begin_inset space \hfill{} \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Plant Sensor (Single Moisture Zone Prototype) \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard The Sensiplicity sensor system is a low-cost solution for environmental and plant sensing. It includes a variety of sensors and a control box providing an easy-to-use web interface. Currently, a plant science sensor, thermometer, thermocouple, and emergency alarm switch are available. New sensor types can be easily created. Sensors are connected to the controller with inexpensive telephone cable, which carries power and data. Up to 300 plant sensors or 30 other sensors can be connected to a single controller. Data gathered by the control box can be stored locally (on a removable flash drive) or automatically uploaded to an external server. \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash footnotetext[1]{Department of Botany and Plant Pathology} \end_layout \end_inset \end_layout \begin_layout Standard \begin_inset ERT status open \begin_layout Plain Layout \backslash footnotetext[2]{Center for Genome Research and Biocomputing} \end_layout \end_inset \end_layout \begin_layout Subsection Plant Science Sensor \end_layout \begin_layout Standard Current plant sensing systems are very expensive and provide only a small amount of data. This leaves researchers wondering: \begin_inset Quotes eld \end_inset Is that outlier caused by extra watering? \begin_inset Quotes erd \end_inset \begin_inset Quotes eld \end_inset Could these variations be explained by non-uniform temperature in the growth chamber? \begin_inset Quotes erd \end_inset \end_layout \begin_layout Standard To answer these questions, each Sensiplicity plant sensor measures many variables: soil moisture (at multiple depths), soil temperature (at multiple depths), ambient humidity, ambient temperature, and ambient light. Measurements can be taken at a high rate (up to once every five seconds). \end_layout \begin_layout Standard Physically, the plant science sensor resembles a small stake. The lower end (containing the moisture sensors) is inserted into the soil, while the upper end protrudes for data connection and to elevate the humidity sensor above the soil. Two jacks, facing opposite directions, are mounted on the upper end, allowing the sensors to be easily connected in a chain. (In the future, we plan to move to a design with a single cable coming from the upper end, for more thorough waterproofing.) \end_layout \begin_layout Subsection Environmental Monitoring \end_layout \begin_layout Standard Samples stored in lab freezers and refrigerators represent a huge investment in money and time. To guard against freezer failure, the Sensiplicity system includes a thermomete r (usable from -40°C to 75°C) and a thermocouple sensor (-200°C to 1250°C). The controller monitors the temperature of all connected sensors, sending out alerts via email and text message if the temperature exceeds a defined range. \end_layout \begin_layout Standard Entrapment in walk-in freezers and refrigerators is a serious hazard. Some walk-ins include alarm buzzers, but these are not helpful in noisy lab environments or after hours. The Sensiplicity system includes an emergency alert switch that, when pressed, causes the controller to send messages to emergency contacts via email and text message. The absence of the emergency switch can be also detected, providing an alert if protection is compromised. \end_layout \begin_layout Subsection Controller & Web Interface \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \begin_inset space \hfill{} \end_inset \begin_inset Graphics filename images/family.jpg display false width 10cm groupId standard \end_inset \begin_inset space \hfill{} \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Sensiplicity controller and environmental sensors. Clockwise from top: controller, alarm switch, temperature sensor without case, temperature sensor. Center top: controller interface PCB. Center bottom: thermocouple sensor without case. \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Standard A self-contained controller gathers data from Sensiplicity sensors. Each controller provides a convenient web interface, with data logging, plot generation, automatic data upload, and administration functions for up to 300 plant sensors and 30 other sensors. (The maximum number of other sensors on a controller is not yet known, but we believe it to be at least 30.) Users interact with the controller using ordinary web browsers, and the controller connects to the network via Ethernet or WiFi. \end_layout \begin_layout Standard Additionally, an LCD on the front of the controller gives the current system status, with the backlight color providing an at-a-glance notification of system state. (When all is well, the LCD is green. If something is wrong, it turns red.) Alerts are sent via email and text message if a problem occurs. Emergency contacts can be set on a per-sensor basis. \end_layout \begin_layout Section Implementation \end_layout \begin_layout Subsection Plant Science Sensor \end_layout \begin_layout Standard The plant sensor measures soil moisture (at multiple depths), soil temperature (at multiple depths), ambient humidity, ambient temperature, and light. Measurements are associated with a sensor based on that sensor's unique ID, baked into the microcontroller by its manufacturer. Temperature and humidity are measured with COTS semiconductor sensors. Light is measured by counting the time required for a photodiode to charge a capacitor. \end_layout \begin_layout Standard Soil moisture is determined by the soil dielectric constant, measured with a trace capacitor on the PCB. The microcontroller's 2Mhz clock is fed into a voltage divider formed by a 100k resistor and the capacitor. The output of the voltage divider is fed through a diode into another capacitor , creating a peak detector. The peak detector is connected to an analog-to-digital converter input of the microcontroller. To avoid compromising accuracy, the peak detector does not include a discharge resistor. Instead, the microcontroller discharges the peak detector each measurement cycle by connecting its ADC pin to ground momentarily. Moisture at multiple depths is measured with separate identical voltage divider/peak detector circuits. \end_layout \begin_layout Standard The plant sensor PCB is both a carrier for the circuit and the main body of the device. The PCB is inserted into the soil to measure moisture and temperature. Corrosion is prevented by covering all exposed copper with soldermask and epoxy. A depth scale is printed on the soil insertion region of the plant sensor. \end_layout \begin_layout Standard In the middle of the plant sensor, the circuitry is protected by a multi-layer envelope. First, a layer of Kapton tape, then copper tape (connected to ground), a label, and finally clear, adhesive-lined heat-shrink tubing. The humidity sensor, status LED, and photodiode on top of the plant sensor are protected with epoxy. \end_layout \begin_layout Standard Inspiration for the form-factor and moisture sensing method comes from the \begin_inset Quotes eld \end_inset chirp! watering alarm \begin_inset Quotes erd \end_inset ( \begin_inset Flex URL status collapsed \begin_layout Plain Layout http://wemakethings.net/chirp/ \end_layout \end_inset ). However, the \begin_inset Quotes eld \end_inset chirp! \begin_inset Quotes erd \end_inset is not patented, and our design was created from scratch. \end_layout \begin_layout Subsection Other sensors \end_layout \begin_layout Standard All Sensiplicity sensors besides the plant sensor are implemented using integrated circuits that communicate over the 1-wire protocol. The circuitry of these sensors is very straightforward and duplicates applicati on circuits from the device datasheets. These sensors are enclosed in 3D-printed plastic cases. \end_layout \begin_layout Subsection Communication Protocols \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status collapsed \begin_layout Plain Layout \begin_inset space \hfill{} \end_inset \begin_inset Graphics filename images/topology_diagram.eps display false width 10cm groupId standard \end_inset \begin_inset space \hfill{} \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Some possible bus topologies \end_layout \end_inset \end_layout \begin_layout Plain Layout \end_layout \end_inset \end_layout \begin_layout Standard Power and data are transferred over four or six wire cable terminated in RJ\SpecialChar \nobreakdash- 11 or RJ\SpecialChar \nobreakdash- 12 connectors. Sensors connected to the cable appear on the bus in parallel, allowing them to be connected in arbitrary topologies. (However, a linear topology should be used when the bus must cover long distances.) When used over long distances, a terminator can be connected to the end of the bus to prevent signal reflections from disrupting communicati on. \end_layout \begin_layout Standard Two different protocols are used to retrieve data from sensors: standard 1-Wire (as promulgated by Maxim Integrated), and a custom serial protocol based on RS-485. Only the plant sensor uses the custom protocol; the others use 1-Wire. Currently, these protocols are carried on separate wires in a six-wire cable. In the future, we plan to carry both protocols on the same wires in a four-wire cable, with the controller detecting the attached devices and selecting the appropriate protocol automatically. \end_layout \begin_layout Standard The custom RS-485-based protocol used by the plant sensors is designed to have the advantages of 1-Wire (unique IDs and automatic discovery of sensors) while covering longer distances. Two types of entities exist in the protocol: controllers and nodes. Each bus has a single controller and one or more nodes. \end_layout \begin_layout Standard Communication is initiated when the controller sends a data packet to a node. Once a packet has been received, a node can optionally reply to the controller with a packet of its own. Each packet includes a header, zero or more bytes of data, and a CRC16\SpecialChar \nobreakdash- CCITT code (covering both the header and data). Packets with invalid CRCs are discarded. The packet header gives the direction of transfer (controller to node or node to controller), the node involved in the transfer, and a command/response code. (The header includes a command code when addressing a node or a response code when addressing the controller.) \end_layout \begin_layout Standard The exception to this normal mode of operation is bus enumeration. (Enumeration is the process by which the controller learns the IDs and types of all nodes connected to the bus.) During enumeration, the controller sends a packet containing an enumeration command to an arbitrary node. (When an enumeration command is detected, nodes do not check to see if a packet is addressed to them. However, the CRC must match the address in the packet.) Each node then selects a random time slot up to two seconds in the future. When its time slot arrives, a node sends its ID and type code to the controller. If a node detects that its transmission will overlap with a message already in progress on the bus, it reschedules its time slot to a random time in the near future. \end_layout \begin_layout Standard \begin_inset Float figure wide false sideways false status open \begin_layout Plain Layout \begin_inset space \hfill{} \end_inset \begin_inset Graphics filename images/soil sensor plant.jpg display false width 10cm groupId standard \end_inset \begin_inset space \hfill{} \end_inset \end_layout \begin_layout Plain Layout \begin_inset Caption \begin_layout Plain Layout Plant sensor connected to controller. \end_layout \end_inset \end_layout \end_inset \end_layout \begin_layout Subsection Controller \end_layout \begin_layout Standard A controller based on a Raspberry Pi single-board computer is used to gather data from Sensiplicity sensors. It gathers data from connected sensors and provides an easy-to-use web interface. The interface can be accessed over the network from any web browser, and allows the user to retrieve sensor data and administer sensors. Data is continuously gathered from sensors and either logged on the controller or uploaded to an external server. In the process, the controller monitors each sensor. If a parameter exceeds a defined range, emergency contacts are notified by email and text message. A character LCD with a colored backlight on the controller front panel shows status information. \end_layout \begin_layout Standard To connect the Raspberry Pi to the sensors and LCD, a custom interface board is attached to the RPi expansion header. It provides three sensor ports, each with its own RS-485 transceiver. All sensor ports share the same 1-Wire bus. These transceivers are multiplexed to the expansion header UART. An I \begin_inset script superscript \begin_layout Plain Layout 2 \end_layout \end_inset C general-purpose IO chip provides additional signal lines to drive the parallel interface of the LCD. \end_layout \end_body \end_document