• Tiada Hasil Ditemukan

The System as Whole

In document DECLARATION OF ORIGINALITY (halaman 112-122)

Chapter 5: System Specifications and Implementation

5.2 The Implementation and Results

5.2.5 The System as Whole

This section will implement the whole system to verify that the system is working as expected. Some general operational guidance on setting up the whole system will be given. Besides that, various test results will be demonstrated.

5.2.5.1 Remote site

First, the Arduino Micro/Nano (remote site) needs to be installed on the different parts of the bin as shown in the picture below.

Figure 5.62: The modules installed on the bin

From the graph above, one can see that the bin is installed with external power supply.

The remote site needs to have external power supply in order to work due to the fact that there won’t have any plug-in power source for the remote site. Besides that, the Arduino Micro/Nano is placed on the side of the bin together with the tilt sensor. On the cap, the Ultrasonic sensor is installed at the center position. One of the remote sites will then be set up after installed all these parts on the bin. The remote site will keep sending the data to the base station based on the data sending refresh rate defined.

5.2.5.2 Base station

The base station is responsible to receive all the data sent from remote sites and forward the data processed to RPi. The base station (Arduino UNO) need to have access to internet, in order to send the data to RPi. Hence, Arduino UNO needs to be connected to laptop/router to allow the laptop/router to share the internet access to Arduino UNO. In this project, the internet sharing device will be laptop. The connection of the Arduino UNO will be as shown.

Figure 5.63: Laptop sharing internet to Arduino UNO through Ethernet Shield via RJ45 cable As shown in figure above, Arduino Ethernet Shield is connected to the Ethernet Port of the laptop. Then the internet sharing through the port can be done by bridging the networks. The bridging of the networks can be done by selecting the local network (ex.

Local Area Network #1, with internet access) adapter and the cable connected network adapter (ex. Local Area Network #2), right click the mouse and click “Bridge Networks”, then the Arduino UNO will be able to access to the internet. After the base station have access to the internet, it is now ready to send the data to RPi.

The base station will keep receiving and searching for the data from remote sites. There is a status led showing the status (receiving or not receiving) at the base station. If the base

station receives the data, the led will goes greed, otherwise it will stays in blue. The picture below shows both of the statuses of the base station.

Figure 5.64: Base station receiving (left) and not receiving data (right)

5.2.5.3 Server Site

The server site is responsible for the data receiving from base station, and send the data to the Openhab 2 user interface for data visualization. Hence, the server site (RPi) need to be connected to the internet at all time, and it should be connected to the same network as the base station (otherwise network port forwarding will be needed to forward to different network). The image below shows that the Server Site (RPi) ) is up and running.

Figure 5.65: Server site (RPi) is up and running

Inside the server site, a program is designed to receive the data from base station as discussed in Section 5.2.3 “Raspberry Pi 3 Model B”. The program shall run itself at all time except that the user choose to abort the service. Hence, run the program from the Python IDLE and the server is then ready to receive the data from base station and serve the services to the users. The image belows shows that the RPi’s python program is running and constantly getting the data from base station.

Figure 5.66: RPi python program is getting data continuously

Finally, the Openhab should be able to display the data received from the server site via the MQTT protocol.

To verify that the server site is actually receiving and processing all the data from remote site. The following section will discuss the system testing and the results in the actual implementation. The following aspects will be inspected:

- The bin statuses (level and status) - The bin connectivity

- The bin battery level - The Google Map The bin statuses

The status of each bin shall be displayed on Openhab in real-time. The results below shows the transmission from remote site to Openhab is successful.

Figure 5.67: Openhab received filling level from Bin 1

Figure 5.68: Openhab received status from Bin 1

Figure 5.69: Openhab received filling level from Bin 2

Figure 5.70: Openhab received status from Bin 2

Figure 5.71: Openhab received filling level from Bin 3

Figure 5.72: Openhab received status from Bin 3

The bin connectivity

Bin connectivity status is implemented to identify whether the connection from the bin in remote is dropped. The images below show that the bin connectivity’s status is shown as

“OFF” (disconnected) when the bin is turned off, and shown as “ON” (Connected) when the bin is turned on.

Figure5.73: The bin connectivity demonstration The bin battery level

The battery level status is implemented to monitor the battery level of each garbage bin, so that the user can know when to replace the battery of the system in the remote site.

The image below shows the battery level of garbage bin 2.

Figure 5.74: Bin 2’s battery level

The Google Map

The google map shall update the status on the map while the status of the bins changed.

The map shall provide the user’s current location as well. The pictures below illustrated that the google map is working and the application automatically change the color of the markers to show different status of the bins.

Figure 5.75: The marker colors on map changes accordingly when the status of bin change (1)

Figure 5.76: The marker colors on map changes accordingly when the status of bin change (2)

The figures above show that the Google Map is pre-configured with some markers for representing the bins location and status. These markers will change its color accordingly and automatically based on the status of each bin. This will ease the user to track the status of each bin. In addition, the user’s current location will be shown to allow the user to know how far the distance between the current location and the bin that need to be collected or managed. This feature requires the users to allow the GPS tracking permission on their smartphones or tablet, otherwise, the current location of the user will not be shown.

Chapter 6: Conclusion

In document DECLARATION OF ORIGINALITY (halaman 112-122)