Chapter 4: Methodology and System Requirements
4.2 System Requirements
4.2.1 Hardware Requirements
Ultrasonic Sensor - Ultrasonic Sensor HC-SR04 is used to detect the level of the garbage in the container. According to (Alexnieva 2016), “Ultrasonic sensor has 2 operation modes, which are Reflection Mode and Direct Measurement Mode.” In this proposed project, the Reflection Mode will be used to get the distance between the sensor and the object.
These are the specifications for Ultrasonic HC-SR04 Sensor:
Table 4.1: Specifications for Ultrasonic Sensor HC-SR04 model
Figure 4.2: Ultrasonic Sensor HC-SR04 physical view
Trig pin is connected to output pin of Arduino Micro, trig is used to burst the microwave from the sensor to the target. Echo is connected to the input pin the microcontroller, it is used to receive the data that reflect from the other side. Vcc is connected to 5v power source and Gnd connected to ground respectively. Below shows the how the Ultrasonic sensor work in general.
Figure 4.3: Working principle of Ultrasonic Sensor
Another model of Ultrasonic Sensor has also been adopted, which is US-015 model. The US-015 model Ultrasonic Sensor is very similar to HC-SR04, in term of the functionalities and functions. The physical view of US-015 model is as shown below.
Figure 4.4: Ultrasonic Sensor HC-015 physical view
Tilt Sensor – Tilt Sensor is attached to the bottom of the garbage bin. It is used to detect whether the garbage bin has been collapsed. The tilt sensor has two stages which are ‘0’
stage and ‘1’ stage, where ‘0’ will be used to indicate the garbage is standing still and ‘1’
is used to indicate that the garbage bin is fallen and need attention. There is a rolling ball inside the tilt sensor, whenever the tilt sensor is move from one side to another, the rolling ball inside the tilt sensor will switch the circuit to become either closed or opened.
Below is the specification of Tilt Sensor (tilt switch/ angle sensor).
Figure 4.5: Angle required to ‘switch’ the state from one to another Table 4.2: Tilt Sensor specifications
The physical views of the tilt sensors that were used in the project were shown in below.
Figure 4.6: Tilt Switch Sensor
Figure 4.7: Tilt Sensor
Both tilt sensors as shown in the above section have been adopted. The main difference between the 2 sensors is that the Tilt Sensor has slightly a better sensitivity in detecting the tiltiness. However, the difference between the 2 can almost be ignored. Thus, these 2 sensors were used and treated as the same.
RF module – RF module consists of RF Transmitter Module and RF Receiver Module.
Transmitter Module is used to transmit the acquired data from sensor to Receiver Module side. Receiver Module is used to receive the date that was sent from the RF Transmitter Module. RF module that were used are only one way communication. Below show the specifications for both Receiver module and Transmitter module.
Table 4.3: Transmitter operating specification
Working Voltage 3V -12V
Working Current Max Less than 40mA max, and min 9mA
Transmission power 25mW
Table 4.4: Receiver operating specification
Working Voltage 5 V
Working Current <= 5.5mA max
Figure 4.8: Transmitter and Receiver module in physical view
Arduino Micro – Arduino Micro is placed on the cap of the smart garbage system (SGS). It is used to receive the data from sensors. It computes and processes data and then send the data to the base station. It was used as it is light-weighted and small in size.
Hence, the installation of the sensor will be easier. Below shows the pin descriptions and physical layout of Arduino Micro, the design will require this pin layout to map the connections of the components.
Figure 4.9: Arduino Micro pin descriptions and physical layout
Arduino Nano - Other than Arduino Micro, Arduino Nano is also been used to apply on the system. The functionalities and physical layout is almost identical to Arduino Micro.
The difference between the 2 is minor and can be ignored. Hence, Arduino Nano is used to have the same function which the Arduino Micro has and to be applied on the cap of the garbage bin. The reason being to use Arduino Nano as a alternative is mainly because of its cost, the cost is much more lower than Arduino Micro but the functionalities are almost identical. The pin layout below shows that it is very similar to Arduino Micro, and hence, can be used as an alternative.
Figure 4.10: Arduino Nano pin description and physical layout
Arduino Uno – Arduino Uno is used as a base station for the Smart Garbage System. It works as a base station to receive all the data collected from Arduino Micro/Nano. In Arduino Uno, it receives and processes the data, smoothen the sensor values to achieve a more readable and reliable data before forwarding/sending the data to the central server (Raspberry Pi 3 Model B). The main purpose of having Arduino UNO in the system is due to its ability to communicate with the internet with the help of Ethernet Shield, which will be discussed in the following section, hence, the communication between Arduino UNO and Raspberry Pi can be achieved through internet connection (using UDP protocol). The pin descriptions for Arduino Micro is provided below.
Figure 4.11: Arduino Uno pin descriptions and physical layout
Arduino Ethernet Shield – Arduino Ethernet Shield is used to enable the Arduino Uno to access internet. As Arduino Uno itself do not have internet capability, the Arduino Ethernet Shield need to be placed on top of the Arduino Uno in order to access the internet. The reason being for that is because Arduino UNO needs to have internet in order to be able to send its processed data to Raspberry Pi wirelessly using the internet protocol - UDP. In order to send the data through internet, Arduino UNO needs to have its own IP address and network settings, hence, the implementation of Ethernet Shield is necessary to enable this functionality. Below illustrate the pinouts of Ethernet shield.
Figure 4.12: Ethernet Shield pinouts
Raspberry Pi 3 Model B – Raspberry Pi 3 Model B has been used as a central server and database system to receive the processed data from Arduino Uno via Ethernet Shield and host the web monitoring application in real-time and provide a graphical user interface (GUI) for the user to monitor the condition of Smart Garbage Monitoring System (SGS).
Inside the Raspberry Pi, an IoT framework - Openhab 2 has been used to establish a web server that accept the data from the Raspberry Pi and send the data visually to user using various techniques such as Python and MQTT, such that, a simple GUI will be generated and displayed to the user with real-time information. Various libraries and packages need to be installed on RPi and each of them will be discussed and explained in the following section for how it works and why it is necessary.
Figure 4.13: Raspberry Pi 3 Model B Pinouts Descriptions