0% found this document useful (0 votes)
84 views10 pages

TWS - GreenHouse Monitoring System Chapter 2

Uploaded by

StudentsHeart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views10 pages

TWS - GreenHouse Monitoring System Chapter 2

Uploaded by

StudentsHeart
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

CHAPTER 2

HARDWARE DESIGN

The objective of this chapter is to define and develop hardware design for Greenhouse

Monitoring System over IOT.

2.1 Background

In the smart system design, 8051 Microcontroller was used as the development platform. An

8051 Microcontroller compatible temperature sensor was used to measure soil temperature. An

8051uc compatible soil moisture sensor module was used to measure soil moisture. An 8051

Microcontroller CO2 sensor, temperature and humidity sensor were used for soil CO2 level, air

temperature and air humidity measurement. The following sections contain information on the

sensors and actuators used in the smart system design.

2.1.1 The Microcontroller Unit:

An Intel 8051 microcontroller is used as the main decision making processor in the system. It is a

low cost, Harvard architecture, CISC instruction set single chip Microcontroller [1]. Its

architecture includes CPU, RAM, ROM, I/O, Interrupt logic, timer, etc in a single processor. It

has a 8 bit accumulator and 8 bit ALU thus making it an 8 bit processor. This unit also uses a

crystal to generate clock frequency. This crystal has been specifically chosen to have

11.0593MHz of frequency and the timer and delay programs have been generated taking this into

consideration.
Figure 2.1: Block Diagram 8051 Mircocontroller

2.1.2 Features of 8051:

Table No.1 Features of 8051[2]


Fig 2: 8051 microcontroller[3]

2.1.2 Keil IDE

Keil software is used in green house monitoring system. This software was introduced in 1992

by two people Gunter and Reinhard Keil [4]. This tool is used to compile and this being helpful

in programming assembly code for 8051-Microcontroller. It consists of ANSI C compiler, macro

assembler, debuggers, simulators, linkers. ISP- In system programming. Also called as in-circuit

serial programming. It allows to involve both programming and testing in a single phase and

helps reduce the cost. It helps one to change the program as required by the user than getting
already programmed chips that does not have an advantage of editing them.

Figure 2.2: µVision Keil IDE [5]

2.2 Peripheral circuits

2.2.1 Registers:

Registers are used to store information temporarily. The vast majority of 8051 registers are 8- bit

registers. With an 8 bit data type, any data larger than 8 bits must be broken into 8-bits chunks

before it is processed. Commonly used registers of the 8051 are A(accumulator), B, R0, R1, R3,

R4, R5, R6, R7, DPTR(data pointer), PC(program counter).


Some special purpose registers are:

 Program Status Word(PSW)

 Stack Pointer(SP)

 Data Pointer(DPTR)

 Accumulator(ACC)

 B Register(B)

 Timer/Counter mode control(TMOD)

 Timer/Counter control(TCON)

 Serial Control(SCON)

 Power Control(PCON)

2.2.2 Pin Description of 8051:

8051 microcontroller has 40 pins which perform functions such as input/output, read/write,

address, data interrupts. Out of the 40 pins, 32 pins are for the four ports namely: P0, P1, P2, P3.

VCC, GND, XTAL1, XTAL2, , , ALE and RST are the other 8 pins available on microcontroller

chip.

 VCC (Pin 40) Voltage input is +5V, purpose of VCC is to supply voltage to

microcontroller.

 GND(Pin 20) Ground is also provided in 8051.

 XTAL1 AND XTAL 2 (Pins 18 and 19): An external clock is required to run 8051. Two

capacitors of 33pF are connected in addition to a quartz crystal oscillator to XTAL1 and

XTAL2. The crystal oscillator used in our circuit has been set at 11.0592 MHz.

 RST(Pin 9) 4 It is normally low, when a high pulse is applied to this pin, microcontroller
will terminate all activities and reset all register values.

 ALE(Pin 30) It is an output pin and stands for Address Latch Enable.

 P0(Port 0)(Pins 32 to 39) Port 0 can be used for address as well as data. If ALE=1, P0

has address A0-A7 and if ALE=0, P0 provides data D0-D7. Port 0 needs pull-up resistors

of value 10K-ohm to be connected externally because P0 has no inbuilt pull-up resistors

like P1, P2 and P3.

 P1(Port1)(Pins 1 to 9) and P2(Port2)(Pins 21 to 28) They are used as input/output pins.

 P3(Port3)(Pins 10 to 17): It is used as input as well as output port. No pull-up resistors

are required in P3. Apart from input/output it also provides interrupts.

2.3 Principle of sensors

2.3.1 Soil Moisture

The soil moisture sensor consists of 2 parts: Humidity meter probes and voltage comparison

board. Figure 2.3 shows soil moisture sensor. Moisture measurement is carried out by immersing

the probes in the soil. The resistance between the probes immersed in the soil causes a voltage

difference between the probes [6]. Soil moisture can be measured with this voltage difference.

Adjustable resistance (trim pot) in the voltage comparison board can be used to adjust the

sensitivity. The voltage comparison board has a digital and analog output to which the value of

the humidity can be transferred. 8051 is compatible with Analog output. The value readable from

the analog output is in the range 0-1023 [7]. The properties of the soil moisture sensor are shown

in Table 2.2.
Table 2.2: Soil moisture sensor properties [7]

Figure 2.3: Soil moisture sensor [7]

2.3.2 Soil Temperature Sensor

The DS18B20 humidity sensor is used to measure the soil temperature [8]. Figure 2.4 shows soil

moisture sensor. This sensor is the waterproof version of the DS18B20 sensor. It’s a digital

sensor. Nine or configurable 12-bit reads can be performed via the single-wire interface. The

properties of DS18B20 are shown in Table 2.3 [9].


Table 2.3: Soil temperature sensor properties [9]

Figure 2.4: Soil temperature sensor [10]

2.3.2 Air Humidity and Temperature Sensor

The DHT11 temperature and humidity sensor includes a resistance-type component for

measuring moisture and an NTC temperature measurement component for measuring

temperature. Figure 2.3 shows air humidity and temperature sensor. DHT11 can transmit

measured values up to 20 meters, has low energy consumption and is small in size. The

temperature sensivitiy is between 2% and 5% [11]. For use with 8051, the output pin must be

connected to a 10 kΩ resistor. The DHT11 library needs to be added to 8051 such that 8051
acquire measurement results from DHT11.

Figure 2.5: Air humidity and temperature sensor

2.4 Connection of RS485 Bus

RS232 to RS485 converter is used for data transmission. RS232 to RS485 is mainly used for

communication between end to end or end to ends of main electronic controllers. The converter

works between the main controller and submachine station to complete System Industrial

automatic control, universal card system, system access control, parking system, banking system

self-served, bus system tickets, restaurant menu system, personal care system, and road toll

system, etc. RS232-485 converter can transfer the TXD and RDX signals of RS-232 serial port

to parallel half-duplex RS-485 signals without external power source because it can collect

electricity supply Pin 3 RS-232 port and also, after the request to send RTS to pin 7, the Ready

DTR pin 4 help supply the converter this process control presented makes the easy application of

the hardware configuration and software.


References:

[1] M.A Mazidi, J.G mazidi, R.D Mckinlay, “The 8051 Microcontroller and its embedded

systems”, 13th Edition, Pearson Publications, 2008 Dorlings Kindersley (India) Pvt. Ltd.

[2] Predko Myke., “Programming and Customizing the 8051 Microcontroller, TATA McGraw

Hill Production”, January 1999, Second Edition.

[3] Mazidi Muhammad Ali, “The 8051 Microcontroller And Embedded Systems Using

Assembly And C”, Pearson Education, September 2007, Second edition.

[4] Micro vision keil software. https://en.wikipedia.org/wiki/Keil_(company). [Online; accessed

14- 04-2021].

[5] µVision® IDE. https://www2.keil.com/mdk5/uvision/ [Online; accessed 14- 04-2021].

[6] ˙Ibrahim ˙Irdem. Toprak nem sensörü ve 8051. https: //medium.com/@ibrahimirdem/toprak-

nem-sens%C3%B6r% C3%BC-ve-8051-a9ebe8ccc203, 2016. [Online; accessed 14-04- 2021].

[7] F. S. Zazueta and J. Xin. Soil moisture sensors. Soil Sci, 73:391–401, 1994.

[8] D. P. Resolution. 1-wire digital thermometer. Maxim Integrated Products, 2008.

[9] D. Insturement. Multi-purpose temperature probe. http://www. davis-

tr.com/Downloads/6470_Specification_Sheet.pdf, 2017. [Online; accessed 14-04-2021].

[10] D. Insturement. Multi-purpose temperature probe. http://www. davis-tr.com/images/6470-

big.jpg, 2017. [Online; accessed 14- 04-2021].

[11] 8051Türkiye. Dht11 sıcaklık ve nem sensörünün 8051 ile kullanımı. http://8051turkiye.com/

dht11-sicaklik-ve-nem-sensorunun-8051-ile-kullanimi/, 2011. [Online; accessed 14-04-2021].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy