CHAPTER 3 Local GH
CHAPTER 3 Local GH
Raspberry Raspberry
Pi 3 Model Pi 4 Model
Figure 3.1. Comparison of Raspberry Pi 3 B and Pi 4 B [14]
Video options which can be configured at config.txt are composite video mode
options, HDMI mode options, options for defining a custom CVT mode, LCD
display/ touchscreen options, generic display options and other options. An audio
option includes enabling or disabling of audio dithering, and setting bit depth for
PWM sampling. Camera options include enabling or disabling of camera LED signal.
Some boot options are specifying firmware files transferred to the Video core GPU
prior to booting, setting initial UART baud rate and clock frequency, adding boot
code delay, adding boot delay, and enabling or disabling of splash screen.
Configurations can be made for device trees, overlays and parameters. The GPIO
directive allows GPIO pins to be set to specific modes on boot [14].
Modes available for GPIOs are input, output, pull up, pull down, no pull,
driving high (for inputs), driving low (for inputs), selecting Alt0-Alt45 for pins. Some
over clocking options include setting CPU frequency, GPU frequency, frequency of
the hardware video block, frequency of the image sensor pipeline block, frequency of
the 3D block, frequency of the SDRAM (Synchronous Dynamic RAM), voltage
adjustment, setting minimum frequency value for dynamic frequency, overheat
protection setting, and throttling control settings. Conditional filter settings are
required if one Pi is swapped between different monitors, or if the SD card is swapped
between multiple Raspberry Pi. Settings for warning symbols are included in
miscellaneous options [14].
19
and it also has low graphics, but in the latest model there two mini HDMI ports that
can be used at the same time for multiple desktop views. Both ports give a 4K
ULTRA HD view to the user. Two ports have 2.0 supports only but the remaining two
are 3.0. Due to increase the usage of Raspberry Pi in IoT and other smart projects the
PoE Header has also come within the Pi. The device has camera support. It has a two-
lane MIPI CSI camera port which can be used to connect the pi directly with the
cameras and use them without any third interface. The Raspberry Pi 4 can be
connected to an external LCD. It doesn’t use the expansion header to communicate
with LCDs like other devices [15].
The audio data can be travel from pi to the display device through HDMI but
it has a separate 4 pole audio port that can be used to send and receive an audio signal.
The signal from the device can be used by the internal program or any other device at
the expansion header. Raspberry pi is credit card size computer and was developed in
United Kingdom by the raspberry pi foundation for improving the computer teaching
skills at basic levels in developing countries. It is basically also helpful for improving
the programming skills and hardware understanding skills at pre the university level.
It has a small size and accessible price for everyone but it is slower than modern desk
top computers or lap top. It is still completely Linux base computer and provides all
the expected abilities that a have simple low power computer. It also consists of IV
graphic processor which is linked with 1GB memory to read the board [15]. The
technical specifications of Raspberry Pi 4 Model B are described in Table 3.1.
21
PoE Yes
GPIO 40
communicate. It has a total of 40 pins from which 28 are GPIO pins and the rest of
them are power pins. GPIO pins don’t only perform the simple I/O functions. They
could give the UART, SPI, and I2C communications [16].
In Raspberry pi, there are two powers in method, one is from the USB-C
power port and the second one is from any 5V pin. The 5-volt pin is directly
connected to the USB-C adapter port. There are two types of power output pin in the
Raspberry pi 4 3V3 and 5V. 5V is directly connected to the USB port but 3V3 is
connected to through the regulator. There are multiple kinds of serial communication
and UART is one of them. It is quite popular because of its simple communication
system and dependence on most of the software. In Raspberry pi 4 there are multiple
SPI pins that can be used for SPI communication. Raspberry Pi 4 also supports the
I2C protocol. Raspberry Pi 4 has multiple ground pin which is connected internally
and any ground pin can be used by the power supply or external device to make the
common ground. Almost every device needs to input and output pins to communicate.
In this device there are 28 GPIO pins are available these pins can be used for any
digital input and output operating. The GPIO pins in the controller have some default
values. GPIO pins from 0-9 will be at a HIGH state and from 10 to above the pins will
be at a LOW state. All GPIO pins in Raspberry Pi 4 are not only for input-output
function. Each GPIO pin can be used as other functions, which will be specified
through programming. In Raspberry Pi 4 there is a slot for SD card but GPIO Pins
also support the SD card compatibility. SDIO pins on the device can be used for SD
card in case of requirement. These communications are specific to every pin and all
their function are discussed in below at Table 3.2.
23
From this terminal, the Python code can be typed line by line; each line is
executed as soon as it is typed, making this tool useful for quick testing and
debugging. To demonstrate this, type print "Hello, world!" and press Enter, it will
yield the result as in the following Figure 3.5.
25
When it is first opened, it will be in the interactive terminal mode and can be
used in the same way as the terminal ran from the command line, as shown in the
Figure 3.6. Simple hello world program can be test [17].
This precision sensor can measure relative humidity from 0 to 100% with ±3%
accuracy, barometric pressure from 300Pa to 1100 hPa with ±1 hPa absolute
accuracy, and temperature from -40°C to 85°C with ±1.0°C accuracy. The BME280
consumes less than 1mA during measurements and only 5μA during idle. This low
power consumption allows the implementation in battery driven devices such as
handsets, GPS modules or watches. The pressure measurements are so precise (low
altitude noise of 0.25m), can even use it as an altimeter with ±1 meter accuracy.
detects the obstacles in a range of about 200 - 400 cm. The distance of the obstacle is
determined based on the delay between the emission of sound and the arrival of an
echo. The distance of the obstacle can be measured as, :
Distance = Speed x Time (3.1)
where, time is the time duration for which the ultrasonic waves have travelled and
speed of sound in air is 340m/s.
The product of time and speed by 2 because the time is the total times it took
to reach the obstacle and return. Ultrasonic sensor is used to measure the distance of
the object it is attached to from the obstacle.
The Vcc pin powers the sensor, typically with +5V. Trigger pin is an Input
pin. This pin has to be kept high for 10us to initialize measurement by sending US
28
wave. Echo pin is a output pin. This pin goes high for a period of time which will be
equal to the time taken for US wave to return back to the sensor. This pin is connected
to the ground of the system [19].
In the dark, their resistance is very high, up to 1M, but when the LDR sensor
is exposed to light, the resistance drops, even down to a few ohms, depending on the
light intensity. LDRs have a sensitivity that varies with the wavelength of the light
applied and are nonlinear devices [20]. The technical specification of light intensity
sensor is as shown in Table 3.7.
Noise 50Hz/60Hz
The soil moisture sensor has 4-pin package: Vcc, GND, DO and AO. The pin
identification and configuration of soil moisture sensor is as shown in Table 3.10.
Table 3.10. Pin Identification and Configuration of Soil Moisture Meter Sensor [21]
3 DO Digital Output
4 AO Analog Output
An incandescent bulb becomes too hot to touch soon after turn it on. When
flick on a light with a regular incandescent bulb, electricity is converted to heat in the
tiny, tungsten wire inside. In a 75 watt bulb, the wire heats up to about 2538°C
(4600°F). At such a high temperature, the energy radiating from the wire includes
some visible light. Incandescent light bulbs are not the most efficient light source,
though, because 90% of the electricity they use produces heat, while a measly 10%
produces light. In 5 watt incandescent bulb, the wire heats up to about 152°C (306°F)
[22].
This completes the high voltage circuit. The spring is attached between the
coil and the armature. When the control signal is no longer sent to the circuit, the
spring pulls the armature back to its original position. The four-channel 5V relay
33
shield consists of four relays, which can be used to switch devices up to 250V AC
with up to 10A of current using 5V input signals from the Raspberry Pi [23].
3.10. Fan
A fan is a powered machine used to create flow within a fluid, typically a gas
such as air. A fan consists of a rotating arrangement of vanes or blades which act on
the air. The rotating assembly of blades and hub is known as an impeller, a rotor, or a
runner. Usually, it is contained within some form of housing or case. This may direct
the airflow or increase safety by preventing objects from contacting the fan blades.
Most fans are powered by electric motors, but other sources of power may be used,
including hydraulic motors, hand cranks, internal combustion engines, and solar
power. A light bulb is a device that produces light from electricity. In addition to
lighting a dark space, they can be used to show an electronic device is on, to direct
traffic, for heat, and many other purposes. Billions are in use, some even in outer
space [24].
Fan has become much more sophisticated in recent years, and it can now be
applied to both residential and industrial ceiling fans. Fans have motors that rely on
permanent, built-in magnets in order to attract and repel a rotor around an axis joined
with investors. DC technology is much newer than AC technology, which means there
are fewer options available.
Fans are widely regarded as the most efficient type of fan. They consume
significantly less power than AC fans. In fact, DC fans consume up to 70% less
energy to produce the same output as other fan types. For example, that means that a
25W DC-driven fan uses the same power as a 100W AC-driven fan. This is ideal for
commercial settings, like restaurants, allowing the user to keep fans running all day
34
without incurring astronomical electric bills [24]. The technical specifications of fan
are as shown in Table 3.11.
Voltage 6V ~ 13.8V
Speed 600RPM
One of the important issue in greenhouse is the sensing the value of water in
soil. If the soil dries less than desire volume, the water pump will be operate to flow
the water to soil from a water tank. Micro submersible pump was selected in this
35
Stepper motors operate differently from DC brush motors, which rotate when
voltage is applied to their terminals. Stepper motors, on the other hand, effectively
have multiple toothed electromagnets arranged around a central gear-shaped piece of
iron. The electromagnets are energized by an external control circuit, for example, a
microcontroller. Stepper motor control circuit is a simple and low-cost circuit, mainly
used in low power applications [26]. The technical specification of stepper motor is as
shown in Table 3.13.
3.14.Summary
In this chapter, the architecture and features of hardware components of this
system are mentioned. The next chapter will discuss about the system operation of
greenhouse control and experimental results of this research.