Wiznet makers


Published August 29, 2022 ©

21 UCC


0 Contests


0 Following

Original Link

Real Time Monitoring and Irrigation Control websocket

To monitor a device by sitting at home using wiznet device integrating it with front end application using Websockets

COMPONENTS Hardware components

Arduino - Arduino LilyPad Main Board

x 1

WIZnet - W6100

x 1


The development of the Internet of Things (IOT) device is now increasingly mushrooming throughout the region, especially those that are currently incessantly applying the smart city concept. Internet of things is a global infrastructure for the information society, enabling sophisticated services, connecting physical and virtual objects based on current information exchange technology and the development and communication technology [1] The IoT device itself is a concept that aims to expand the benefits of internet . connectivity that is connected continuously. As for its capabilities such as data sharing, remote control, data monitoring and so on. To be able to do capabilities like on an IoT device, it certainly requires an internet access connectivity to connect from the device to other devices. This is also closely related to the data transmission protocol that will be used to transmit data. The growing number of IoT technologies has led to the creation of various application layer protocols that can be used on IoT. The number of protocols causes different applications used on IoT, this is ca lled the "one device one app" [2] . To solve this probl em, a web of things (WOT) concept was conceived. This concept uses a web protocol that is universal so that various devices can be controlled or monitored with just one website application. On IoT devices, there are several devices that require real time c onnection to run optimally as a data transmission communication medium. One of the web protocols that can support connections in real time is websocket. Web socket is different from http protocol where HTTP protocol requires request ICSTI 2018, October 19-20, Yogyakarta, Indonesia Copyright © 2019 EAI DOI 10.4108/eai.19-10-2018.2282548and response every time the communication process occurs. Websocket supports full duplex est connections where communication between the server and client requires only one requ process and response only [3] . In communicating data transmission over the internet, communication implements an internet connection using Ethernet Shield installed on an Arduino device. Ethernet Shield is chosen because it belongs to a large and stable data transmis sion power. Based on the background that the author has explained, a conclusion emerged about the system, namely the application of the IoT concept connected to the website application. Where the website uses the websocket protocol to support data communic ation in real time. 2  Related Research 2.1  Websocket Websocket is one protocol that runs on the application layer or on layer 7 in the layer layer. websocket supports full duplex communication where communication occurs in two directions between the client and the server is different from the protocol that we know today, HTTP. HTTP is a protocol that runs on port 80 and works with the concept of request and respone or what is commonly called half duplex. By using a single TCP connection mechanism, web socket can build one connection path between server and client. Where websocket uses the handshaking method to make an open connection between server and client. The first process is that the client sends the handshake to the server then the server replies to the handshake and creates a single TCP connection between the server and the client. This single TCP connection supports bidirectional communication between server and client until the connection is disconne cted by the client or server 2.2  Javascript Javascript is one of the programming languages[4] . used for the world of networking where the programming language is classified as reliable and fast in processing commands due to non blocking properties. Javascript is also easy in its language because the language used is very similar to English. Javascr ipt is widely used for client side programming and is also used as a widgets program, but javascript development is very fast even now javascript can be used for server side programming where the programming runs on the server side and javascript is also u sed for network programming like the Node.js javascript framework 2.3  Node.js [5] . Node.js is a framework of javascript that is widely used to do server programming or network programming. Node.js is built on Chrome's V8 Javascript Engine. Chrome's V8 Javascript Engine is an open source high performance javascript engine written in C ++. Nodejs can be used as a programming language framework that organizes events from user input and node.js can be very fast and light in managing I / O models because node.js uses javascript as the programming language so that it is framework. One of the ad vantages of node.js is the completion of the deadlock process where every process that is done without a thread will occur deadlock but threading programing is relatively inefficient and difficult to implement. Because node.js is nonblocking, there is no deadlock process. Then the user can easily develop a system with a large scale within the node. Js. (www.nodejs.org/en/about) [6] . 2.4   Socket.IO Socket.io is one of the libraries used in node.js. Socke system that is real time. Socket.io uses websocket as the application layer mechanism. t.io is used to create a Gambar 1 2.5  Arduino Uno + Ethernet Shield . Socket.IO listen port 1337 Arduino Uno is a microcontroller board based on the ATmega328P (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset bu tton. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a ACtoDC adapter or battery to get started. "Uno" means one in Italian and was chosen to mark the release of Arduino Sof tware (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the reference model for the Arduino platform; for an extensive list of current, past or outdated boards see the Arduino index of boards.The Arduino Ethernet Shield 2 board to connect to the internet using the Ethernet library allows an Arduino and to read and write an SD card using the SD library [4]Gambar 2. Arduino with Ethernet Shield 2.6  Sensor Soil Moisture YL69 The soil moisture sensor of the YL set of humidity sensors type YL-- 69 is a humidity sensor that detects soil moisture. A 69 consists of YL conditioning module. Moisture sensor type YL-- 69 as a sensor probe and YL39 as a signal 69 there is a module which includes IC LM393 which serves to offset offs precise [7] YL..300     : et lace which is lower than 5mV which is stable and 69 moisture sensor can read water content which has 3 conditions, namely: 0 dry soil or free air 300700 : moist soil 700950 : wet soil (in wa ter)Gambar 3. 2.7  Sensor Ultrasonic Sensor YL69 Ultrasonic sensor is a sensor that works based on the principle of sound wave reflection and is used to detect the presence of an object or certain object in front of the working frequency in the area above the sound wave from 20 kHz to 2 MHz. The ultrasonic sensor consists of two units, namely the transmitter unit and the receiver structure of the transmitter and receiver units. It is very simple that a piezoelectric crystal is connected to the mechan ical anchor and is only connected with an alternating voltage vibrating diaphragm that has a working frequency of 20 kHz to 2 MHz. The atomic structure of piezoelectric crystals causes contracting to expand or shrink, a given voltage polarity and this is c alled the piezoelectric effect on ultrasonic sensors 2.8  [8] . Gambar 4 Motor Penggerak Valve . Sensor ultrasonicGambar 5 3   Research method . Motor Penggerak Valve The purpose of this study is to create a websitebased monitoring and control system. Where the website uses the websocket protocol to determine soil moisture conditions including soil moisture and water level in the field, and can be used to control the opening and closing of the irigas water gate by using the websocket protocol. 3.1  Feature Soil moisture sensor measures soil moisture level Ultrasonic sensors measure water level / water level in rice fields Powering switches are used to adjust open and close irrigation gates3.2  Functioning Software and Hardware The above system features can be achieved by using the application of Internet of Things and developing hardware and website software systems with the protocol websock et. Below is a brief description of hardware and software systems used to build monitoring tools and control of rice field irrigation. 1) 2) 3) 4) 5) 6) 7) Arduino as a microcontroller board Ethernet Shield as communication via the internet YL69 as a soil moisture sensor (soi l moisture) Ultrasonic sensor as a water level detector in the rice field Relay as a power switch for servo motors to open and close the irrigation door Nodejs as a websocket proxy server webserver Socket.IO as a support framework for websocket Gambar6 . Functional flowchart4 4.1  Result and analysis Implement Server.js API interfacing script Implementasi coding pada server.js dengan menggunakan socket.IO yang kemudian dijalankan pada server Ubuntu google compute engine . Gambar 7 . Script server.js Endpoint script for the Arduino Ethernet Shield post method Gambar 8 . Emit_test.php4.2  Data Upload using API After the data is uploaded using the emit test endpoint the data will be received by server.js which can then be viewe d using the logging console cloud conectivty 4.3  Reading Value from API To read value from API on website we need to create another script. In that script also we need to provide data.temp, data.ultra, and data.soil. By using socket we can update the data on cloud continuously. Gambar 9. Reading value 4.4  Display logging sensor on Website Gambar 10. Logging sensor Website sensor In this study several tests were carried out, namely the transmission testing of the system and the system reliability t esting served the requestGambar 11. Network Bytes Gambar 12 .  Network Packet Conclusion The development of a system for smart agriculture can greatly benefit from the knowledge of the soil and water dynamics. Besides the soil moisture monitoring, to assess the plants water needs for its proper and healthy development, it was also important to assess the possibility of natural resources’ usage optimization. Experimental tests on a real case scenario at a farm allowed the identification of some limitat ions, mainly related to energy consumption. Ongoing developments address the storage of historical information on the cloud concerning an agriculture field. The availability of a large amount of valuable data on the cloud enables the creation of intelligen t services with very high potential, such as data correlation between different cultures and/or fields, plant disease estimation through the application of machine learning techniques, or determination of the most appropriate land cultivation according to soil conditions. In this research we are able to send data on cloud by using google cloud compute engine socket protocol as server.js as a gateway with realtime connection

Comments Write