• No results found

Using embedded systems to optimize the care of indoor plants

N/A
N/A
Protected

Academic year: 2021

Share "Using embedded systems to optimize the care of indoor plants"

Copied!
74
0
0

Loading.... (view fulltext now)

Full text

(1)

Using embedded systems to optimize the care of indoor plants

Användning av inbyggda system för att optimera skötseln av inomhusväxter

SIMON SALAS AMNÉR ANTON ÅBONDE

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

(2)

Abstract

Over the last few years the interest in indoor plants has increased. Whether they are used for decorating, as mood boosters or sometimes as food in cooking, people want to come closer to nature by bringing it into their homes.

However removing plants from their natural habitat could have negative implications on their well-being. In order to achieve an optimal environment, the current location for the plants need to emulate their native environment.

Taking sunlight and watering into consideration isn’t always enough: temperature, humidity, soil nutritional level and soil pH level are also factors that needs to be monitored.

This thesis covers the creation of a prototype that measures sunlight, temperature and humidity, compares the measurements to a database of plant needs, and then displays the result on a website. The aim is to enable a more effective care of indoor plants.

In the end a system was created that can take measurements, are capable of comparing the two sets of data and then visualize the result on a website for the user.

Keywords

Internet of Things, Embedded Systems, Sensors, Indoor Environment

(3)
(4)

Sammanfattning

Under de senaste åren har intresset för inomhusväxter ökat. Oavsett om de används för att dekorera, som humörförstärkare eller ibland i matlagning vill människor komma närmare naturen genom att föra den in i sina hem.

Att ta bort växter från deras naturliga livsmiljö kan dock ha negativa konsekvenser för deras välbefinnande. För att uppnå en optimal miljö måste den nuvarande platsen för växterna emulera deras ursprungliga miljö. Att tänka på solljus och vattning är inte alltid tillräckligt utan temperatur, luft- fuktighet, jordens näringsnivå och jordens pH-nivå är andra faktorer som också behöver ses över.

Det här examensarbetet omfattar skapandet av en prototyp som mäter solljus, temperatur och luftfuktighet, jämför mätningarna med en databas över växtbehov och sedan visar resultatet på en webbplats. Syftet är att göra det möjligt för användaren att effektivisera skötseln av inomhusväxter för växternas välbefinnande såväl som för sitt egna.

I slutändan skapades ett system som kan utföra mätningarna och är kapabelt att jämföra dessa två samlingar data som sedan visar resultatet på en webbplats för användaren.

Nyckelord

Sakernas internet, Inbyggda system, Sensorer, Inomhusmiljö

(5)
(6)

Acknowledgments

We would like to thank Cybercom Sweden AB, an IT consulting firm in Kista, for the given opportunity to do our bachelor thesis at their company.

Special thanks goes to our Cybercom supervisor Emma Larsson for having supported us during the whole period and discussing problems and solutions with us, while encouraging us with our work. We would also like to thank Saul R. Duenas for giving excellent guidance and feedback as our examiner and supervisor.

Stockholm, June 2020

Simon Salas Amnér and Anton Åbonde

(7)
(8)

Contents

1 Introduction 1

1.1 Background . . . 1

1.2 Problem . . . 2

1.3 Purpose . . . 2

1.4 Goals . . . 2

1.5 Research Methodology . . . 3

1.6 Delimitations . . . 3

1.7 Social Benefits and Ethics . . . 4

1.7.1 Social Benefits . . . 4

1.7.2 Ethics . . . 4

1.8 Structure of the Thesis . . . 4

2 Background 7 2.1 Indoor Environmental Conditions . . . 7

2.2 Effects of Indoor Plants On Human Health . . . 8

2.3 Related Work . . . 9

2.3.1 FYTA Beam . . . 9

2.3.2 Black & Decker PCS10 . . . 10

2.3.3 Insights . . . 10

2.4 Summary . . . 10

3 Methods 13 3.1 The Chosen Method . . . 13

3.2 Testing . . . 15

3.3 Reliability and Validity . . . 15

3.3.1 Data Reliability . . . 15

3.3.2 Data Validity . . . 16

3.4 System Documentation . . . 16

(9)

4 Implementation 17

4.1 Hardware . . . 17

4.1.1 Choice of Components . . . 17

4.1.2 Design . . . 20

4.1.3 Firmware . . . 24

4.2 Software Presentation . . . 26

4.2.1 Design . . . 26

4.2.2 Database . . . 28

4.2.3 Server . . . 29

4.2.4 Client . . . 30

4.2.5 AWS . . . 32

5 Results and Discussion 35 5.1 Result . . . 35

5.1.1 Embedded System . . . 35

5.1.2 Database . . . 39

5.1.3 Website . . . 40

5.2 Discussion . . . 42

5.2.1 Embedded System . . . 42

5.2.2 Database . . . 45

5.2.3 Website . . . 45

5.2.4 Testing . . . 46

6 Conclusions and Future Work 47 6.1 Conclusions . . . 47

6.2 Limitations . . . 48

6.3 Future Work . . . 48

6.3.1 What Has Been Left Undone? . . . 48

6.3.2 Website Security . . . 49

6.3.3 Communication Technology . . . 49

6.3.4 New Functionality and Features . . . 49

References 53

(10)

List of Figures

2.1 The FYTA Beam and application. . . . 9

2.2 The Black & Decker PCS10. . . . 10

3.1 Top-down approach. . . . 14

4.1 Schematic created using Diptrace. . . . 21

4.2 Front PCB layout created using Diptrace. . . . 21

4.3 Back PCB layout created using Diptrace. . . . 22

4.4 Front of the finished PCB. . . . 23

4.5 Table for calculating the lux level. . . . 25

4.6 Software diagram over the website. . . . 27

5.1 Lux level comparison indoors. . . . 36

5.2 Lux level comparison outdoors. . . . 36

5.3 Humidity comparison. . . . 36

5.4 Temperature comparison indoors. . . . 37

5.5 Temperature comparison outdoors. . . . 37

5.6 Frontside of the casing containing the PCB. . . . 38

5.7 Backside of the casing containing the PCB. . . . 39

5.8 Format of the data being transmitted from the sensor. . . . 39

5.9 All gathered data for a Monstera Deliciosa. . . . 40

5.10 Shows the website before an item is selected. . . . 40

5.11 A plant is selected and these graphs become visible under the text. . . . 41

5.12 Relative Radiant Sensitivity vs Angular Displacement for VEML7700. . . . 43

6.1 Soil pH and nutrient availability - Illinois Agronomy Handbook

[37]. . . . 50

(11)
(12)

List of Tables

4.1 Comparison of light sensors. . . . 18

4.2 Comparison of combined temperature and humidity sensors. . 19

4.3 List of components used on the PCB. . . . 22

(13)
(14)

Listings

3.1 Example template of measurement data. . . . 16

4.1 Calculating the lux level of the current illumination. . . . 25

4.2 Structure for the measured data. . . . 28

4.3 HTML code structure. . . . 30

4.4 External stylesheet. . . . 31

(15)
(16)

List of acronyms and abbreviations

API Application Programmable Interface AWS Amazon Web Services

CAD Computer-Aided Design

CMOS Complementary Metal Oxide Semiconductor CORS Cross-Origin Resource Sharing

CSS Cascading Style Sheets EC2 Elastic Compute Cloud

EDA Electronic Design Automation EMC Electromagnetic Compatibility HTML Hyper Text Markup Language IoT Internet of Things

IR InfraRed JS JavaScript

JSON JavaScript Object Notation LDO Low-Dropout

LoRa Long Range

LoRaWAN Long Range Wireless Area Network MCU Microcontroller Unit

MPA Multi-Page Application

PCB Printed Circuit Board

(17)

REACH Registration, Evaluation, Authorisation and Restriction of Chemical substances

RH Relative Humidity

RoHs Restriction of Use of Hazardous Substances RTC Real Time Clock

S3 Simple Storage Service

SDG Sustainable Development Goal SMD Surface Mounted Device

SMPS Switching Mode Power Supply SPA Single-Page Application

SPI Serial Peripheral Interface

TDD Test Driven Development

(18)

Chapter 1 Introduction

1.1 Background

The interest for possessing indoor plants in Sweden have increased during the last few years. In 2019 the amount of people interested in indoor plants were 46%, according to Plantagen’s yearly report on plant trends [1]. The notion of bringing the outdoors into our homes might stem from the fact that the average time spent in enclosed buildings is 87%. This comes from a study [2] performed by the National Human Activity Pattern Survey (NHAPS) based in the United States of America. When such a huge amount of time is spent indoors there is no wonder why creating a healthy and harmonious environment is of great concern for our well-being.

Plants improve the indoor air quality by reducing the amount of air pollutants, they also increases the relative humidity which usually is below the limit of what is good for us [3]. By doing so it is easier for humans to stay healthy. Plants also affect our psychological health by for example reducing our stress levels.

When an indoor plant dies it is hard to determine the exact cause. This could be because of over or under watering, too much or little sun, and wrong temperature might lead to burns or freeze damage to the plants. There are of course more reasons as to why plants might die or get damaged. If it were easier to care for plants and know exactly what they needed maybe more people would own plants.

This thesis aims to create a system to monitor the environment around

plants and give feedback about the current conditions, if they are optimal or

not. Gaining access to this information will enable a more analytical approach

to the care of indoor plants where cause and effect could be directly linked.

(19)

By knowing which parameter is out of bounds, the location can be changed instantly, by the user, to provide a more optimal location for each specific plant.

Here the user could refer to a private users, corporations, schools and most facilities and organisations that possess indoor plants. All for the purpose of a better working environment.

1.2 Problem

Bringing plants indoor changes the environment they are accustomed to.

Necessary precautions needs to be taken in order to create an indoor habitat in which they will thrive. Certain parameters, such as temperature, humidity and sunlight, decide how well the plant will grow and how healthy it will be.

Can an overseeing system be created in order to effectivize the care of indoor plants? By solving the question at hand, another one arises: If it can be created, will it be cost efficient?

1.3 Purpose

The purpose of this thesis is to create a system that actively monitors environment parameters such as temperature, relative humidity and light levels. The measured data will then be compared with a database, containing information about different popular indoor plants. This will enable the user to actively check on the plants and see if the location they are in is suitable for them or not.

Thus a choice can be made based on scientific information. Another purpose of the thesis is to create a source of information that is easily accessible to the user and improves their daily process of taking care of their plants.

1.4 Goals

The goal of this project is to create a wireless electronic solution to the

aforementioned problem, in section 1.2. An embedded system that can

measure sunlight, temperature and relative humidity using different sensors

needs to be created. In order to give the user easy access to the measured data,

either a display on the embedded system or a digital solution is needed. The

digital solution could be in the form of a website or a mobile application. The

medium will contain a database with reference data on plant needs which can

then be compared with the measured data. This makes it possible for the user

(20)

to improve the plants living conditions by placing them in the location that fit their individual needs the most.

1.5 Research Methodology

The choice of method was based on the type of project, the time constriction of the project and from experience. The following types of methods were considered: Quantitative/Qualitative, Scrum and Top-down. Due to this project needing a practical solution of an experimental nature, the most sound choice that could be made was that of the top-down method. Scrum is mostly used to develop and maintain complex products and are used when a bigger team is working towards the same goal. Quantitative/Qualitative is better suited for research and theoretical projects than practical, thus doesn’t fit perfectly [4]. Since there only will be two people working on this project the top-down method is sufficient and as mentioned earlier the project is of an experimental nature.

1.6 Delimitations

The focus of the thesis lies with the product itself. Designing and creating a product that works and performs to the laid out expectations. It should be able to measure the external parameters, sunlight, temperature and humidity, and not internal, soil moisture and nutritional level.

Not including the internal parameters was due to the idea of having the device measure for a location rather than a specific plant. By incorporating the internal parameters the device would be, in a sense, locked to that location by having it take those measurements for a particular plant. The time limit of the project also had a part in the decision not to include the internal parameters.

The database will be constricted to having a maximum of twenty of the most popular indoor plants, also due to the set time constraint of ten weeks.

As the purpose of the website was solely to show the result of the

measurements and comparison between the sets of the data, the complexity

of the website was low. As the first step an option to choose one plant or more

was needed and then showing the measurement for each parameter whenever

a plant was selected.

(21)

1.7 Social Benefits and Ethics

1.7.1 Social Benefits

Plants can provide us humans with essential materials such as pharmaceuticals, food, and fiber for everyday use, even if they are indoor plants. Not only do they provide us with physical material but they also affect the physiological and psychological health of people [3]. Thus increasing quality of life and the well-being of their caretakers. Which relates to the third global goal, "Good Health and well-being" [5]. And by enabling people the chance to increase the productivity of plants a more self-sufficient, to an extent, way of life can be achieved.

1.7.2 Ethics

The product itself needs to meet certain requirements that are deemed necessary for the technology market of today and the future. From this perspective number 12 of the global goals, "Responsible Consumption and Production"

[6], applies to the choice of components for the product due to their manufacturing process. Ensuring that the components upholds the standards of regulations such as Restriction of Use of Hazardous Substances (RoHs) [7], Registration, Evaluation, Authorisation and Restriction of Chemical substances (REACH) [8] and conflict minerals [9]. These regulations are examples that help govern the procurement of material and the manufacturing process to ensure that nothing or no one are affected negatively by the undertaking of it all.

1.8 Structure of the Thesis

The outline of this thesis is as follows:

• Chapter 2. Background - Why this work is important and what have been done earlier.

• Chapter 3. Method - Further explanation of the methodology.

• Chapter 4. Implementation - How this prototype was created and what it consist of.

• Chapter 5. Results and Discussion - The result and how reliable the

work is. What could have been done differently and was there a better

way of doing this?

(22)

• Chapter 6. Conclusions and Future work - Conclusions of our work

and how can this product be developed further?

(23)
(24)

Chapter 2 Background

This chapter provides basic background information about what needs to be taken into consideration when bringing plants inside such as: sunlight, water, temperature and humidity. Additionally, this chapter describes the effects of indoor plants on human health. The chapter also describes related work of similar products on the market. To understand this project, one needs to have a basic understanding of embedded systems and programming.

2.1 Indoor Environmental Conditions

When bringing plants indoor one also has to bring in the climate indoors in which they thrive. Creating such an environment for all possible plants you want to have indoors is quite a challenge. The main parameters to consider are a source of light, stable temperature, correct humidity, nutritional soil, watering and pest control. However as stated in section 1.6 Delimitations, the only parameters that are taken into consideration in this thesis are light, temperature and humidity.

As is widely known, plants use light in order to perform photosynthesis

which is their primary source of energy. However, when given a certain

color of light within the full spectrum plants react differently. For instance

blue/ultraviolet light have been documented to increase the colouring of leaves

and plant growth, stem elongation, due to it containing more energy then

per say, red/infrared light [10]. Since red/infrared light contain less energy

plants need to develop larger leaves to allow them to absorb as much energy

as possible from this light too. Sunlight contains the full spectrum of light

and is hard to replace with light bulbs. When bringing plants indoors they

might not get enough light to grow. Partly because light intensity is reduced

(25)

when passing through windows and the direction of windows may affect the growth. Therefore the placement is very important and additional light sources might be needed in the form of grow lights. The placement will affect the light intensity which in turn affects the temperature.

For the most part indoor temperatures are stable and can be controlled down to the C . Temperature is an important aspect when it comes to plant growth. Aside from the fact that extreme temperatures both low and high cause serious and irreversible damage to the plant, Went [11] discusses how most processes function normally within the range of 0 to 40 . Obviously depending on the type of plant where different temperatures aid different aspects of the maturing of a plant. When the conditions of sunlight and temperature have been set it is time to enable the plants to effectively breath, which is done by controlling the humidity in the room.

Humidity is harder to control and is generally below what plants require in order to function properly, which can add to a decline in indoor plants health during seasonal changes into colder and darker seasons. Two things to consider are transpiration and stomatal regulation. Transpiration [12] is the movement of water throughout the plant and the evaporation from its areal parts, such as the leafs. The dryer the air the more evaporation from the plants will occur in order to increase humidity, which in turn increases need of water. The stomata of the plants are directly connected to transpiration and water intake in the root zone. The stomata are small pores on the surface of the leaves that control the intake of gas for photosynthesis.

2.2 Effects of Indoor Plants On Human Health

The first thing that might come to mind is that when you come home to someone who owns many plants the air feels very fresh. This is because air pollutants can be reduced by plants and bacteria on the plants. CO and CO 2

are two of the air pollutants which decrease productivity, focus and may make you feel tired. It is proven that plants can reduce the amount of them in the air indoors up to 25% [13]. There have also been studies showing that the mere presence of plants can increase productivity and reduce stress symptoms.

You don’t have to pay attention to the plants, it’s enough that they are in your peripheral vision to get results [14].

One amazing thing about plants is that they, to some extent, can regulate the

relative humidity in the air through transpiration. The amount of evaporated

water from the plants decrease when the relative humidity in the air is

increased, meaning there is a limit to how high the humidity can get. As

(26)

mentioned earlier the normal humidity indoors is usually low and not good for plants or humans. A common misconception is that when it’s cold outside we are more likely to catch a cold or the flu. But it doesn’t have anything to do with temperature, it’s all about humidity where less humidity increases the risk of getting a cold. Why we are more likely to get a cold in the winter is because we spend more time indoors where the humidity is usually lower [15]. So getting more plants (some are more effective than others) increases the humidity and increases our chance of staying healthy.

2.3 Related Work

2.3.1 FYTA Beam

The FYTA Beam is a kickstarter project which is similar to our idea of an IoT device for plants. It can measure temperature, light intensity, nutrition levels and moisture in the soil. There is also a database containing lots of data about different plants and their needs.

Figure 2.1: The FYTA Beam and application.

The communication protocol is bluetooth and there is a basestation which can be connected to the internet to get readings even when you’re not at home.

The only thing missing from this device is the function to read humidity which

we think is important since it helps plants to thrive.

(27)

2.3.2 Black & Decker PCS10

Similar to the FYTA Beam, Black & Decker have a flowerlike garden sensor called PSC10. This one is for outdoors and measure the same things as the FYTA Beam. The biggest difference is that to gather data from this one you need to connect it to a computer via a USB cable. It is also missing the option to connect several units with each other.

Figure 2.2: The Black & Decker PCS10.

2.3.3 Insights

The specific information about these products and how they operate are unfortunately limited. The public information is written at a very high abstraction level which covers aspects such as what they measure, which type of wireless connection and what the app does, if there is one. No information is available regarding as to what components were used in the design, datasheets or other schematics.

Given the available information the decision to use a wireless solution was only strengthened by seeing some products needing to physically connect to a computer and how inconvenient it is.

2.4 Summary

Photosynthesis is the source of energy for plants and the source for O 2 in the

atmosphere. In order for the plants to have a positive impact on peoples live

(28)

they need to be healthy and perform photosynthesis at an optimal rate. This means that certain conditions have to be met for this to happen when they are taken from their natural habitat. The parameters: sunlight, temperature, and humidity are the easiest ones to measure and can all have a negative or positive impact on the photosynthesis process. Controlling these parameters without a great deal of effort could yield promising results for ones indoor plants and oneself.

Plants have many positive effects on human health. These include stress reduction, higher productivity and better air quality which reduces physical symptoms such as coughing, sore throat and fatigue. In essence they help people to stay healthy.

Currently, there are few or close to none commercial Internet of Things (IoT) devices which measure these parameters for plants, especially humidity, which is curious because many sources of information that write about plant care says that humidity is important. Is it because it’s too hard to regulate?

Temperature can be changed via radiators which every home or office has.

Sunlight can be regulated with changing position in windows or adding light

sources that are specially designed for your plants. For changing the humidity,

in an efficient way, you need an air humidifier which can be quite costly if you

need to change the humidity for large rooms or areas.

(29)
(30)

Chapter 3 Methods

This chapter will discuss the approach on a solution to the question: How could an overseeing system be created in order to effectivize the placement of indoor plants? How will the implementation be done and why that way?

Section 3.1 describes the chosen method and why it was selected. Section 3.3 describes the reliability and validity of both the method and the gathered data.

Finally, section 3.4 describes in what ways the project will be documented.

3.1 The Chosen Method

The chosen method to achieve the goal of the project was the top-down approach. The idea behind the top-down approach is to start from the big picture and then identify the different elements that it consists of and then successively break it down into smaller blocks. This enables easy compartmentalization of the elements and will simplify the implementation of each block into a finished product. Top-down approach is commonly used when there is a comprehensive picture of what the system should be or how it should perform when finished. In figure 3.1 the thought out top-down approach to the problem is described.

The system overview will act as the starting point for the project where the purpose of the product is defined. Using the initial line of questioning and information from the literature review, a conclusion to the functionality of the product could be reached. This functionality will be the deciding factor of what type of result that can be expected at the end of the project. What do plants need to thrive and how can the envisioned system help to create such an environment?

When the system architecture has been defined it has to be decided how it

(31)

Figure 3.1: Top-down approach.

should be implemented in reality and then divided into smaller blocks. These smaller blocks represent different essential parts of the system, when placed together they achieve a final product. The system has been divided into three blocks:

• Measurements of the environment variables

• Storage and analysis of the data

• Showing the result

After the process of defining each block is complete, specific components

can then be determined to fulfill each block’s purpose. The specific sensors

need to take all desired measurements. An existing database of plant information

has to be chosen and if there are no databases with complete information we

have to gather data on our own. The data that are needed is what range in

temperature and humidity each plant need and what light level they require to

flourish. The final block is how to present the result from the comparison of

measured data and the plant needs. This can be done directly on the embedded

system, on a website or a mobile application.

(32)

3.2 Testing

In order to confirm that the product is working as intended and to replicate the results, it has to be tested. The focus will be on the sensors and that the product can be connected to the internet and communicate with the chosen medium. The product will be tested both indoors and even outdoors to see how it handles more rapid changes of sunlight, temperature and humidity.

The most critical thing to take into consideration when testing the light sensor is the Relative Radiant Sensitivity vs Angular Displacement. This is the loss of light intake based on the angle between the light sensor and the light source. When comparing the two different sensors, the same angle need to be used to get two sets of data of which a valid comparison and analysis can be performed.

Testing the sensor/sensors for temperature and humidity is not as specific as a light sensor would be. The requirements here should simply be that they are in close proximity of each other, which means that they would measure the same location.

A controlled indoor environment where temperature, Relative Humidity (RH) and light level can be adjusted is optimal for testing the sensors.

Otherwise the sensors need to be compared towards a thermo-, a hygro- and a light meter to confirm the accuracy of the measurements. To see if the device is successfully connected to the internet and transmits the measurements, it’s sufficient to check the stored elements in the database since the device will transmit data when it is connected.

3.3 Reliability and Validity

3.3.1 Data Reliability

To check the data reliability other devices that measure sunlight, temperature and humidity will be used to compare and see if the values are the same.

Taking measurements in a different indoor location would be preferable to

see if the instruments have the same difference despite the change of location

and environmental conditions. The reliability will also be ensured by using

authentication between the sensor device and the medium. Either in the form

of specifying MAC addresses or with an encryption protocol. Which option

depends on the selected type of medium.

(33)

3.3.2 Data Validity

To ensure that sent data is of the correct format, a template that describes what kind of data and how it should be formatted is necessary. This is to ensure that all transmissions contain the correct data and that it has not been tampered with. If the data would, for example, not contain any data regarding sunlight all of the data from that transmission will be discarded. The same goes if the data is not of the right format.

An example of a template of data could be the following:

{ t e m p e r a t u r e : F l o a t , s u n l i g h t : F l o a t , humidity : F l o a t , time : hh :mm: s s }

Listing 3.1: Example template of measurement data.

3.4 System Documentation

For version control a GitHub repository [16] was created and will be used in

this project, both for the design of the PCB and the coding of the system. Git

will be used locally while developing new functions and when testing. Once

they are working it will be pushed to the master branch. By doing this it’s easy

to roll back to a stable version in case of errors and the master branch stays

clean. The firmware will be documented using Doxygen [17], a tool which

autogenerates documentation from comments.

(34)

Chapter 4

Implementation

The chapter implementation will follow up questions that were stated in the previous chapter. It will be divided into two sections: hardware and software implementation. Hardware refers to the physical part of the thesis i.e the Printed Circuit Board (PCB), Surface Mounted Device (SMD) and firmware of the circuit board. Whereas software will discuss the choice of medium, design of the client, the server, and the database.

4.1 Hardware

Since the purpose of the project was to create a working product, the need to design the PCB from scratch was deemed necessary. Thus this section means to inform the reader of how the work for the various parts of the system was done. From choosing the different components, designing and routing the PCB, and writing the firmware of the product.

4.1.1 Choice of Components

All components that were considered and then chosen fulfil the RoHS- directive [7]. This means that the amount of hazardous substances in them are limited and facilitates a sustainable recycling process. Another thing was to keep the price down to make the prototype cost efficient since there was no need to spend all money from the given budget. But in order to make the whole project possible, ease of use has to be prioritized over cost efficiency for this first prototype.

The goal was from the start to use as few components as possible to keep

the size small but more were added to gain additional functionality. In the

(35)

beginning there was only two sensors, a WiFi IoT device, a voltage regulator, resistors and decoupling capacitors. Quite few components but it seemed like enough, until one more risk came to mind. What if the device disconnects from internet under a short period of time? Then data will be missing and the analysis for that day will be incorrect. A memory card is needed to store offline data and a battery holder to keep the Real Time Clock (RTC) ticking even when the device isn’t powered via the USB.

When choosing components there are many factors that need to be taken into account, such as price, measurement range, accuracy and energy efficiency.

The light sensor needed to be able to measure in a range of 0 lux to 107527 lux [18] to catch full sunlight and complete darkness. Many sensors had lower ranges or didn’t go down to 0 but of the cheap ones VEML7700 and APDS-9253-001 stood out. Both covered almost the entire range and had good accuracy, see table 4.1. The lower lux levels aren’t as important since that’s only at night time when plants don’t need light anyways. VEML7700 has a better resolution and are more energy efficient than the other one, it’s also a bit cheaper. The size differs a lot but without access to all necessary tools to solder the smaller components it was an easy choice to go with VEML7700.

VEML7700 APDS-9253-001

Lux range 0 to 120 k 0.5 to 143 k

Resolution (lux/step) 0.0036 0.548 Typical supply current (uA) 45 118

Price (SEK) 17.07 17.03

Size LxWxH (mm) 6.8x2.35x3.0 1.7x1.3x0.6 Table 4.1: Comparison of light sensors.

The next sensors needed for this project was a temperature sensor and a

humidity sensor, or a combination of the two. What to consider here is mostly

the range of RH which needs to be at least from 20% to 80% because some

plants like really low RH and other thrive when it’s very high. So a wide

range and a high accuracy are preferable when it comes to humidity. For the

temperature sensor it’s desirable to have high accuracy above a wide range

since temperatures in homes usually are between 20-25 C. In a window when

the sun is shining temperatures will rise but these sensors will be able to handle

it without a problem. The two best candidates that were found were SHTC3

and Si7021-A20. The latter is the better one in all aspects, as seen in table 4.2

and therefore the chosen one. It’s more accurate, have a wider range for both

RH and temperature and has a very low energy consumption.

(36)

Si7021-A20 SHTC3 Temperature range ( C) -10 to 85 5 to 60

Temperature accuracy ( C) ±0.4 ±0.4

Humidity range 0 to 80% 20 to 80%

Humidity accuracy ±3% ±3%

Maximum energy consumption (µA) 180 570 Energy consumption sleep (nA) 60 to 620 300 to 600

Price (SEK) 31.92 30.10

Size LxWxH (mm) 3x3x0.75 2x2x0.75

Table 4.2: Comparison of combined temperature and humidity sensors.

The chosen communication technology is WiFi because it is available indoors in most places and it allows us to send data to a database in an easy way. A commonly used WiFi-module is the ESP8266 and both authors have used it before which is why this were our first choice. But then a colleague at Cybercom recommended Particle Photon and after looking into it this seemed like a good way to go because it is very user friendly. The Photon is more than just a WiFi-module, it contains an MCU, antennas, voltage regulator, micro USB as power supply and more (for a complete list see the datasheet [19]).

Unfortunately the cost of the Photon is 194, 39 SEK which is more than the separate modules would cost. But the ease of use weighs up for the price in this prototype.

Particle has an online console with event tracking, connection status and speed, web IDE where you also can flash the device wirelessly and a function called Webhooks which allows events to easily be published to other services.

This was used to send the measured data as an event which in turn were inserted to the database via the publishing functionality.

Since the Photon has a switching voltage regulator as an output to the 3v3 pin, a Low-Dropout (LDO) regulator was needed to minimize the noise since the data lines in the sensors are sensitive. LDK320ADU30R was chosen since it’s cheap (7, 21 SEK), has a low drop out voltage and a high accuracy.

The smallest kind of memory card available is a micro-SD card and a

holder for such card was needed to store offline measurement data. There are

three different kind of SMD memory card holders, push-push, push-pull and

hinge. The hinge wasn’t an option since it would be in the way of the protective

casing for the PCB. Between push-push and push-pull the difference is small

but there are more moving parts in the push-push holder meaning more things

that can break. Therefore the choice was quite simple, a push-pull was chosen

(37)

and a Molex 504077-1891 fitted perfectly since it’s cheap (20, 44 SEK) and there is good documentation.

When deciding which battery holder to use the desired properties was that a small button cell battery, like CR1220 or CR1225, should fit and it should be easy to change battery when needed. Other than that there wasn’t much to consider and therefore we chose the first cheap (21, 39 SEK) holder that were found which is called 1072TR.

4.1.2 Design

The PCB was designed using Diptrace, which is a free to use Electronic Design Automation (EDA)/Computer-Aided Design (CAD) software program, that is used specifically to create PCBs and schematic diagrams. Other popular free to use EDA/CAD software programs are Altium Designer, KiCad, and OrCAD to name a few. The reason behind choosing Diptrace was due to the fact that both of the authors had previous experience using Diptrace thus time loss was prevented by not having to learn a new software, which in the end would have had the same outcome.

As mentioned in Electromagnetic Compatibility (EMC) for Product Designers, by Tim Williams [20], the first step in design is to partition the system.

Partitioning of a system is used to separate the system into critical and non- critical blocks from the perspective of EMC. Where critical blocks contain high radiating sources such as Microcontroller Unit (MCU), antennas and video circuitry that can cause noise which will interfere with functions on the PCB itself or other electrical appliances. Non-critical blocks are such that are not affected by noise or unable to cause it, e.g linear power supplies and non- clocked logic. Linear power supplies offer low levels of output noise and good stabilisation, although at the cost of efficiency and size, compared to Switching Mode Power Supply (SMPS). Non-clocked logic, as described in High Speed Complementary Metal Oxide Semiconductor (CMOS) Design Styles by Kerry Bernstein and others, is used in electronic design due to reasons such as: low power consumption and inherent reliability and noise immunity. This design however only touches the subject of linear power supplies and not non-clocked logic. This is due to the fact that the Particle Photon is being provided voltage via a SMPS which can cause the sensors to experience interference. To solve this problem a LDO was used to bring the output voltage from 3.3V SMPS to a stable 3V LDO. The components could now be partitioned and this is shown in the table 4.3, which also shows the used components.

All of these components communication are done with digital logic and

(38)

Figure 4.1: Schematic created using Diptrace.

Figure 4.2: Front PCB layout created using Diptrace.

(39)

Figure 4.3: Back PCB layout created using Diptrace.

not analog, which means that the designer only needs to consider the Particle Photon and the sensors as critical sections, although from two different perspectives. The Photon Particle is partitioned due to it having components which categorizes it as a critical section, components such as a MCU and an antenna. While the sensors are partitioned in an attempt to avoid any obstruction of their functionality, which touches the subject of the layout of the PCB. Now the system can be considered to be partitioned into three sections A, B, and C as shown in figure 4.4.

Nr Designation Component name

1 MCU/WiFi Particle Photon

2 Light sensor VEML7700

3 Temperature/Humidity sensor Si7021

4 Voltage regulator LDK320ADU30R

5 Memory card 504077-1891

6 Battery holder 1072TR

Table 4.3: List of components used on the PCB.

The layout of the components of the PCB depended on the sensors and the

Particle Photon. The sensors were placed far away from the Particle Photon,

so that the shear size of the Particle Photon would not obstruct the light

(40)

1 2

3

4 5

6

A B C

Figure 4.4: Front of the finished PCB.

sensor, VEML7700, in the form of shadowing, altering the measurements.

The temperature and humidity sensor, Si7021, was also placed along with VEML7700 on the other side of the board in order to avoid as much generated thermal heat as possible from the Particle Photon, which could alter the temperature readings.

After partitioning the system and when the layout is complete, the next step is grounding. When designing a PCB, grounding serves three important purposes:

• Voltage return.

• Signal return.

• Reduction of noise and interference.

Delving deeper into the design, from a strict PCB routing perspective, examples of followed rules can be seen in the list below:

• Keep net tracks as short as possible. The longer the track the greater the resistance, capacitance and inductance.

• Track angles should be 45 . Avoid angles 90 , which can have

manufacture implications.

(41)

• One decoupling capacitor per power pin in order to prevent power fluctuations.

• As big of an uninterrupted ground plane as possible. Minimizes ground loops and obstructions for returning signals.

When everything was set the PCB was ordered from Eurocircuits [21], which was one of few companies that could deliver to non essential companies (because of Covid-19). The price for the PCB was 283,01 SEK, shipping excluded.

4.1.3 Firmware

The code for the firmware is written in the web IDE, Particle Build[22], using the language C++ and is easily transferred via flashing wirelessly to the Particle Photon. The code consists of .ino, .cpp, and .h files which is just standard structure when it comes to coding. The .ino is the main file of the program from where all the functions in the .cpp files are called and of course then all the declarations are made in the .h files. All of the sensors were factory calibrated which meant no further calibrations were necessary.

The formulas, listed below, used to retrieve the different parameters were all taken from respective datasheet:

%RH = 125 · RH_Measured

65536 6

T emperature (C ) = 175.72 · T emp_Measured

65536 46.85

Calculating the lux level of the incoming light was more complex than the other two parameters. Using the following table, taken from the datasheet, the lux level could be calculated depending on the desired resolution. The desired illumination of 120 000 lux was chosen due to the fact that the lux level for sunlight reaches values of >100 000 lux. Then from the desired illumination the needed resolution can be derived from figure 4.5, which in turn will create the formula for calculating the lux level.

Light level (lx) = Illumination _Measured · 1.8432

Reading the lux levels is done in the function readLuxLevels which is

found in the class VEML7700. The process for retrieving the other parameters,

humidity and temperature, are done in the same way since all the sensors use

(42)

Figure 4.5: Table for calculating the lux level.

the synchronous, serial computer bus I 2 C. The following code examples shows how it is done:

void VEML7700 : : readLUXLevels ( ) { Wire . b e g i n T r a n s m i s s i o n ( addr ) ; Wire . w r i t e (MEASURELIGHT ) ; Wire . e n d T r a n s m i s s i o n ( f a l s e ) ; Wire . requestFrom ( addr , 2 ) ;

l i g h t = Wire . r e a d ( ) ; l i g h t | = Wire . r e a d () < <8;

Wire . e n d T r a n s m i s s i o n ( ) ; lux = l i g h t ⇤RESOLUTION;

}

Listing 4.1: Calculating the lux level of the current illumination.

Communication on the bus is done through the lines of code starting with Wire. First communication has to be initiated and a value has to be sent before ending the communication. Then the master requests data bytes from the slave which becomes available with the function read(), but first has to be shifted to get the right bytes, before terminating the transmission. After the whole process the formula for calculating the lux can be used.

The last hardware module to implement was the micro SD memory card

reader. It communicates via Serial Peripheral Interface (SPI) which is the

standard for this kind of modules. The SD card was used to store data for each

measurement when the product is disconnected from the internet. A file is

opened up and in which the measurements, date and time of day is stored in

a file called sensordata.txt. Once the connection is reestablished the data will

be read from the same file and sent in bulk, then all information left in the file

will be cleared. To initialize SPI and make the file handling easier a library

called SDFat [23] was used. The functions used for this project was first open()

(43)

which takes parameters as filename and how it should be interacted with, read- only, read-write or truncated. Then to write print() and println() were used and either just appends the text or appends and makes a new line at the end. At last close() was used to close the file which is important to be able to open and edit the file several times, otherwise it can’t be done.

4.2 Software Presentation

The website consist of three parts which are the client, the server and the database. They are all connected via Amazon Web Services (AWS) to have public availability and high up-time on the website.

4.2.1 Design

The chosen medium was a website since it is versatile and not limited to one platform. The different alternatives that were considered to display the result was mobile application, website or a display on the PCB. A website is very flexible and work on many devices such as computers, tablets and smartphones. It is easy to plot graphs of the results and fit much information.

Mobile applications are getting more common and in some cases replace websites completely. They can be used offline too and would be a good option but it isn’t necessary for a prototype. The application would also be limited to smartphones and tablets which everyone doesn’t have so it isn’t as available.

This also requires more resources since we have less experience with the development of a website. Even though they can replace websites it isn’t the way to go in this project.

A display directly on the PCB would make it easy to test and show information but this will limit the final product. It would be easy to see if plants need a change of environment and then move them directly since you are right next to them. But the information gathered from the measurements would not be available outside its immediate surrounding. One would physically have to go and look at the screen to gain the information. This idea was quickly discarded because a wireless solution would enable the user to access the information from any location that has an internet connection.

When creating a website there are two main types, Multi-Page Application

(MPA) and Single-Page Application (SPA). MPA is the traditional kind of

website with static pages and where you have to refresh the page to see the

new data in the plots or when a new object is loaded. It is good when there

(44)

is much static information and where data is updated slowly. This also makes the initial loading time faster since it is a set amount of data that needs to load.

The other type, SPA, is a newer and more modern kind of website. Using JavaScript it is possible to dynamically load new data and objects. This is great when the data is often being changed or updated and you don’t have to reload the page. But loading an SPA is more demanding and take more time than an MPA because of JavaScript. Since data from the sensors is transmitted regularly a dynamic website is preferred and it allows a live view of the current plant conditions.

Because this project aims to create a working product it isn’t adequate to have the website on localhost. A web host is needed and there are a plenitude of companies who provide such services. But the choice of web host was easy due to the fact that Cybercom use AWS and could assist if there would be any problems. Having a web host also adds additional security in the form of authentication.

Design of the website is as follows... Database mongoDB, server runs on node.js and is reachable via the EC2. The client holds the index and style sheet file and is stored in the bucket to give public access. The bucket makes http- requests to the server to get information about plants or the measured values.

The response contain a JSON body.

Figure 4.6: Software diagram over the website.

(45)

4.2.2 Database

The database consist of two collections, one with plant data and one with all the measurements. The plant data needed for this project was the name of each plant, the range in temperature and humidity where they thrive, and optimal sun conditions. When doing the literature study three existent databases were found, and they are called Trefle, Garden and The plant list [24, 25, 26].

But neither had complete data and they all missed information about weather conditions for indoor plants. Hence the need for creating our own database arose.

To gather all necessary data the first thing was to decide what plants should be in the database. The names of 20 common indoor plants were written down. The rest of the data was gathered from Plantagen, Blomsterlandet and Odla.nu. Temperature and humidity were easy to find but sunlight were a bit more vague. Sun conditions are often written as "full shade" or "part sun" but exact amount of hours and intensity had to be specified. To get this information a gardener at Blomsterlandet were contacted. She told us how many hours of sun each light condition correspond to and what time of day were best.

Generally mid day sunlight is optimal for plants and then the amount differ.

For example, when it says full shade it means less than 2 hours of sunlight and full sun correspond to at least 6 hours of direct sunlight.

MongoDB was selected as the database to go all in on JavaScript for the back-end, that is the server and the database. A schema was created for each collection to structure the database and to create additional security. It was used to limit what kind of data that can be inserted to the database and if there are specific fields that are required or not. When transmitting measured data to the measurements collection, 5 fields were required: temperature, humidity, lux level, date and time of day, as seen in listing 4.2. If any parameter is missing or the date/time is off it can’t be inserted. The same goes with the plant collection where all the previously mentioned parameters are needed in order to insert new plants.

l e t sensorDataSchema = mongoose . Schema ({

temp : {

t y p e : Number , r e q u i r e d : t r u e } , humidity : {

t y p e : Number ,

r e q u i r e d : t r u e

(46)

} , lux : {

t y p e : Number , r e q u i r e d : t r u e } , d a t e : {

t y p e : Number , r e q u i r e d : t r u e } , time : {

t y p e : S t r i n g , r e q u i r e d : t r u e

} , { c o l l e c t i o n : ’ S e n s o r d a t a ’ } ) ; }

Listing 4.2: Structure for the measured data.

4.2.3 Server

The server is built with Express which is a common NodeJS framework for web development [27]. It handles routing and is divided into a hierarchy of three parts where each part only knows the part below. This structure was chosen because of modularity in case one part of the website is changed only that module has to be changed and most of the code that exists can be reused.

• API

• Services

• Integrations and Models

API handles different HTTP requests such as PUT or GET and validates

the input. The plant API handles requests when searching for plants in the

database and is used to list all plants or get specific information about one

plant in the client. This can be done by appending for example ’/api/plants’ to

the URL when doing a GET request and the function that called the API will

get a JSON response with all of the requested plant information. There is also

an API handling measured data from the hardware. Both reading measured

data from the database but also inserting new measurements. The APIs are

written in a very general manner and rely on the services in the next part.

(47)

The services are the functions that for example can interact with different integrations like the database and can assure that all data inserted to the database is valid and follows the correct schema which were implemented as a model. There are functions to insert single measurements for when the device is online and also a function that handles multiple measurements when the device has been offline for a period. The latter function first maps the input to the correct schema and then insert all data at once. There are also functions to get specific data from the database in order to make the plots for the client.

4.2.4 Client

Having the goal of showing the measured data of sunlight, temperature, and humidity to the user the design took the shape of the following steps:

• Introductory text that explains the intended purpose of the website.

• A list of plants from which the user could choose a plant to monitor.

• Graphs for each parameter: sunlight, temperature, and humidity.

The fundamentals of a website, also know as the "triad of technologies for the World Wide Web", are: Hyper Text Markup Language (HTML), Cascading Style Sheets (CSS), and JavaScript (JS). HTML is the language in which most websites are written and is used to create pages and make them functional, e.g specify the content. CSS make these websites visually appealing and control how the HTML elements are displayed on the medium.

Whereas JS specifies the behavior of the website, like enabling interactivity through the use of functions.

HTML

As for any other standard website utilizing HTML, the structure is as follows:

< !DOCTYPE html>

<html>

<head>

< t i t l e > This i s a t i t l e < / t i t l e >

< / head>

<body>

<p> Text c o n t e n t of an element . < / p>

(48)

< / body>

< / html>

}

Listing 4.3: HTML code structure.

The main parts of the HTML code are the imported scripts and the classes.

Two libraries were added in order to complete the client and add the wanted functionality:

< s c r i p t src =" h t t p s : / / code . j q u e r y . com / jquery 2 . 1 . 3 . j s ">< \ s c r i p t >

This script imports the widely used jquery library [28] which is used to simplify common tasks for a webpage developer. These tasks include manipulation of the website, handling user events, acquiring data from servers, creating effects and animations and much more. Essentially with jquery these tasks can be done with fewer lines of code, to an extent.

< s c r i p t src =" h t t p s : / / c d n j s . c l o u d f l a r e . com / a j a x / l i b s / Chart . j s / 2 . 6 . 0 / Chart . min . j s ">< / s c r i p t >

Chart.js [29] is a community made and maintained project, open source HTML5. It offers simple charts that are easy to manipulate and offers extensive and detailed information on how to code them [30].

CSS

The styling of the of the website is, as mentioned, controlled by writing CSS code as shown in listing 4.4. It contains customized, global properties for how to display HTML elements.

. i n f o r m a t i o n { width : 700 px ; margin : 0 a u t o ; } # c h a r t s {

d i s p l a y : f l e x ; } . canvas {

max width : 600 px ; max h e i g h t : 300 px ; }

Listing 4.4: External stylesheet.

(49)

The information property centers all of the parts in the HTML <body>

that is of the class "information", which contains the paragraphs, the drop- down menu, and the reset button. A parent element also known as the flex container was created with the #charts property, which can manipulate wrapped elements that are called children. This is a single direction layout concept were the flex items (children) position can be manipulated, horizontally or vertically. For this client the default was used, "nowrap (default): all flex items will be on one line". The last property, .canvas, handles the maximum allowed height and width of the graphs using the unit px.

JavaScript

Within the javascript code are the functionalities of the interactive part of the webpage, the drop-down menu and the reset button. The webpage was designed so that the graphs, containing the result and optimal values, were only to be shown as long as a plant was chosen. Most of this was done inside the function onSelect(). It contains the request that is sent to the virtual server on AWS, which is the plant that was chosen, in order to retrieve the information regarding that particular plant. It also creates, when a plant is chosen from the menu, a graph for each parameter and appends them to the name of the plant which will be shown on the webpage as a single element. This is done by appending the charts onto a single chart container and from their append it to the plant name which in turn is appended to a single collective container. This is then displayed on the webpage using the imported library chart.js.

The dynamic functionality of the webpage was a prerequisite for this project and was added to ensure that the user would not have to refresh the webpage manually. The measurements that shows up on the graph is requested in the onSelect() function through getSensordata(). The function getSensorData() was then put in an interval function, setInterval(), together with sunlightChart-, temperatureChart- and humidityChart.update().

4.2.5 AWS

Amazon Web Services is a cloud platform for on-demand delivery of IT

resources across the internet. It is one of the biggest, if not the biggest, cloud-

provider in the world. It offers services within infrastructure technologies,

storage, data security, analytics and databases-to emerging technologies, like

machine learning and artificial intelligence, to name a few. Which is one of

the two reasons that AWS was chosen to host the website and database, while

the other one being that Cybercom uses AWS in their work.

(50)

Two services of the AWS were used to complete the website and database part of the project, Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage Service (S3). Amazon EC2 provides access to cloud-based servers which are easy to setup, use, scalable and where the cost depends on the computing power needed. Since the project does not have a need for a lot of computing power it makes the service free, thus even more reason to use it.

Amazon S3 is basically what the name suggests, a storage service. It allows for users to store great amounts of data (documents, videos, photographs etc.) in "buckets", which is the term for Amazon S3. As with EC2, S3 is highly scalable and you pay for what you use.

After creating an account on AWS the Amazon EC2 instance was setup using the AWS management console and then following the steps, given that the user knows what he/she needs. The main step for this type of project where a simple instance that can support a server is needed, is step 6 out of 7: Configure Security Group. This is where the control of the traffic for the instance is setup. An example being that if you want to allow unrestricted access to the HTTP and HTTPS ports, one simply adds a rule with: a type (SSH, HTTP etc.), which protocol it uses, the port number needed, and from what source one can access the instance. When created there is a description tab that contains the Public DNS (IPv4) and the IPv4 Public IP which are used to connect the instance with the client and the database. After completing the 7th step, the console prompts you to name and download a .pem file, privacy enhanced mail file, which is required in order to access the instance. It adds the layer of security that was previously mentioned.

When the instance has been setup, you can add extra storage for free by

creating the S3, a "bucket". This is also done via the AWS management

console and requires the user to name the bucket, following the rules for bucket

naming, choosing the region, and then adjust the public access boxes. Thus

creating storage for the virtual server.

(51)
(52)

Chapter 5

Results and Discussion

5.1 Result

The outcome of the project met the requirements that were set during the planning phase and written in the introduction chapter. An embedded system was designed and created which can measure: sunlight, temperature and humidity. The product is able to connect to the internet via a WiFi connection in order to send the sensor data as a JavaScript Object Notation (JSON) object to the chosen medium, a website. There the user can select between a fixed set of plants and herbs to see which parameters need to be changed or if they already have good conditions.

5.1.1 Embedded System

The end result of the PCB was the same as the one shown in chapter 4.

Measurements for sunlight, temperature and humidity were taken as intended by the sensors, however the results deviates from other equipment that has been designed to perform the same task. Indoor and outdoor measurements were taken with the PCB, they were then compared to other measurements taken by a digital light meter, UNI-T UT383 [31], and a digital hygrometer, Rubicson R [32]. The results can be seen in figures 5.1-5.3.

Tests were performed at different locations and different times, 3 times both

indoors and outdoors. Where the interest lies in the difference between the

PCB and the tools, the light meter and the hygrometer. The relation between

the measurements were the same for all tests, therefore only one test was

included. After getting the results from the first test a noticeable difference

in temperature between the PCB and the hygrometer was noticed. Therefore

(53)

1 2 3 4 5 6 7 500

750 1,000 1,250 1,500

Sample [Nr]

Light Le vel [lux] VEML7700

UT383

Figure 5.1: Lux level comparison indoors.

1 2 3 4 5 6 7

0.3 0.6 0.9

·10

5

Sample [Nr]

Light Le vel [lux] VEML7700

UT383

Figure 5.2: Lux level comparison outdoors.

1 2 3 4 5 6 7

20 25 30 35 40 45 50

Sample [Nr]

Relativ e Humidity [%] Indoor Si7021

Indoor Hygrometer

Figure 5.3: Humidity comparison.

(54)

1 2 3 4 5 6 7 20

25 30 35 40 45 50 55

Sample [Nr]

Temperature [ C] Si7021

Hygrometer

IR thermometer near Photon IR thermometer near Si7021

Figure 5.4: Temperature comparison indoors.

1 2 3 4 5 6 7

20 25 30 35 40 45 50 55

Sample [Nr]

Temperature [ C] Si7021

Hygrometer

IR thermometer near Photon IR thermometer near Si7021

Figure 5.5: Temperature comparison outdoors.

(55)

an InfraRed (IR) thermometer was used to measure the temperature of the PCB in an effort to try to determine the cause of the difference.

The indoor measurements were taken by placing the embedded system, a hygrometer and a light meter in a room with closed windows and one light source, in the form of a LED lamp. This was done in order to limit the affecting parameters and get steady readings. The LED light that was used as a light source was placed directly over the light sensor and light meter in order to minimize the angular loss. The hygrometer were place right next to the PCB to be as close as possible to the Si7021.

The outdoor measurements were conducted in the same fashion as the indoor tests with the only difference being that we had less control over the light, temperature and relative humidity. Values of the outdoor tests reached more extreme levels than that of the indoor measurements. Which can be considered to be a stress-test for the device.

For the embedded system a casing was 3D printed to enable easy adjustments of the PCB. When designing the casing, an error was made which led to a misalignment of the PCB and the casing resulting in an obstruction of the light intake.

Figure 5.6: Frontside of the casing containing the PCB.

(56)

Figure 5.7: Backside of the casing containing the PCB.

5.1.2 Database

There are two databases containing different information. One with the measured data that is transmitted to the website, following the same pattern as shown in figure 5.8. Where time and the measured values are used to plot the result as graphs whereas the date is used to filter the information on the website to only show one day at a time.

Figure 5.8: Format of the data being transmitted from the sensor.

The other database contain all plant information and to insert new data it is

required to contain all fields in figure 5.9. All values are used to compare the

measured data to see what plants fit the current condition or what parameters

that need to be adjusted. The name fields are used when selecting which plants

to show the plots for and to make it easy to get all data for that specific plant.

References

Related documents

Folkhälsoinstitut, 2012) att utföra träning i grupp. Att få träna med andra upplevdes mycket positivt och stärkande för självförtroendet. Sjuksköterskan skulle då kunna

S&amp;G (or other brands). Setting new user code.. Key Lock..

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

L. lPotentilkt 2rrluslris Scop.) as the host plant of Trio:e aculipennis, and on the basis of repeated personal observations concerning this common spe- cies I can

Future additions to ]PEG may allow different quality settings in different parts of the image, which would allow high quality (with no ripples) in areas with sharp

These suggestions focus on the education and knowledge is needed for all involved roles, how system and different technology needs to be redesigned, the need to investigate the

I want to open up for another kind of aesthetic, something sub- jective, self made, far from factory look- ing.. And I would not have felt that I had to open it up if it was

In the case of production and use of biogas in Rwanda, private sector (biogas companies, cooperatives and biogas appliance and component manufacturers) should be called for