# The Design and Deployment of an End-To-End IoT Infrastructure for the Natural Environment
## 4 Design and Deployment  
### Architecture and Deployment Overview  
Our environmental Internet of Things architecture spans elements in the field and in the cloud, providing an end-to-end solution that is exposed as an Internet service. In designing the system, we had three goals: (i) to use off-the-shelf hardware and software as much as possible; (ii) to choose solutions that minimised the necessary amount of software development and system maintenance; and (iii) to provide a system that could be reused by the environmental science team without expert help.  
Our resulting architecture is shown in Figure 2. In the field, we use a micro-server as an Internet gateway (a Raspberry Pi) which is situated at a location with plentiful energy, either from a mains supply or from a large battery. This device is fitted with an Internet link technology, in our case 3G, as well as a long-range radio to communicate with the rest of the IoT deployment in the field. Our remaining IoT devices are then deployed into the actual field of study, which may be several kilometres away from the Raspberry Pi. One of these IoT devices (\(I_{A}\)) is itself equipped with a long-range radio and communicates with the Raspberry Pi; the remaining IoT devices have short-range radios and communicate only with \(I_{A}\). This design has two major benefits: (i) the use of a separate Internet link node, which can be at a distant location, provides high flexibility because a wide area coverage (i.e., 3G) may be sporadic or nonexistent in the actual area of study, and (ii) the use of just one long-range radio \"pair\" reduces the cost of the overall deployment, as this higher class of radio is more expensive to buy and also draws more power, needing more expensive energy harvesting and storage technology at \(I_{A}\). On the cloud side, we then have one main server which receives data from the deployment, storing that data into a database. Other cloud servers (or end users) use web services to extract data from this machine and feed it into models or visualisation systems.  
In our particular case study, our system architecture is projected onto the deployment area shown in Figure 3, providing both a geographical view and a detailed hydrology view. The Raspberry Pi is located in a small utility shed offered by a local farmer; our field of study is then 1.5 km away from this location. The terrain between the Pi and the field of study also involves significant elevation changes and dense tree lines. Besides the long-range IoT node, which communicates with the Pi, we then have two types of node deployed in the field: fixed nodes, measuring soil moisture levels, air temperature and humidity, and ground flow, and mobile nodes attached to livestock, measuring animal location and behaviour via GPS and accelerometers. Together, these nodes provide an unprecedented real-time insight into multiple facets of the natural environment and their interrelationships.  
On the cloud side, data has been stored on Mongodb and is available for analysis by the stakeholders involved. The fast and easy availability of the data through the cloud means that the scientists can draw early insight from the data and can make appropriate decisions. The other benefit of this is that it can stimulate conversations and possibly collaborations among environmental scientists. The data has also been used in a follow-on project around the semantic enrichment of data in order to tag the provenance of the data and also to enable spatiotemporal queries.  
In the remainder of this section, we discuss the details of the nodes used in our deployment, the cloud infrastructure, and the user-facing elements of our architecture.  
Figure 2: The architecture of our IoT system: Further Internet services connect to the cloud server, providing scientific modelling or lightweight applications to visualise data.