Child drowning prevention: GPS and LoRa based emergency alert system

Equirectangular approximation method calculates the distance between children's positions from risky areas. Additionally, the transmitter and receiver may communicate encrypted messages using AES 128-bit symmetric encryption technology compatible with Arduino Nano controller. Thus, our emergency alert system can save children from drowning in the home environment

this research examined the individual energy consumption of each GPS tracker component and then developed a revolutionary, tiny, energy-efficient wristband by fusing the most recent LoRa communication and GPS duty cycling technology [11]. The study creates a Haversine approach for localization-restricted distance measuring and estimate. For the implementation model to pinpoint the exact location for the human presence system, signal measurements are combined with wifi position and GPS readings [12]. With the use of the user's device, this study will locate the closest laundry kiosks. Searching for the closest location is made possible by computing the distance between two points of location [13]. The Haversine approach is used to locate the closest recreational area based on the user's location. The findings of this research are intended to assist users in locating the closest tourist attraction to their location and to rank the places according to distance [14]. Instead of locations, the distance from the student residence destination's address is scrutinized. It gives a more accurate picture of the marketing for the following year. The Haversine formula can be used to determine distance [15]. This study compared the two most often used symmetric algorithms, DES (Data Encryption Standard) and AES (Advanced Encryption Standard). A comparison analysis was performed utilizing performance evaluation metrics for each method based on input size [16]. DES, 3DES, AES, RC2, RC6 and Blowfish encryption algorithms were compared with different block size to measure power usage, data transmission throughput and time required for encryption or decryption in the wireless network [17]. AES algorithms were examined, noting their key advantages and disadvantages, as well as the memory utilization of various algorithms.The goal of this research is compatibility of AES with available Ardruino controller with low memory [18].
In our research, the emergency alert system is designed to be cost-effective and user-friendly for village communities in Bangladesh. The system is divided into two components: the kid is equipped with the transmitter, and the receiver is placed at home. The transmitter and receiver both use a LoRa transmission module that can communicate accurately within a 300-meter range (coverage up to 10 Kilometers) and can transmit 256 bytes of data. The transmitter collects geolocation data using a GPS module and sends the data to the receiver using the LoRa module. The receiver module is configured by setting up the geolocation of risky places. The receiver will send SMS or buzzing the receiver to alert the parents when the transmitter or kid is nearby risky places. The Equirectangular approximation method calculates the distance between children's positions from risky areas. Additionally, the transmitter and receiver may communicate encrypted messages using AES 128-bit symmetric encryption technology compatible with Arduino Nano controller. Thus, our emergency alert system can save children from drowning in the home environment.

LoRa TECHNOLOGY
LoRa is a low-power wireless module based on chirp spread spectrum (CSS) technology. It is a long-range, low-bitrate wireless telecommunications system that connects to the Internet and provides a common solution for the Internet of Things [19]. It can also communicate or convey data from a receiver to a transmitter in line of sight. To connect the receiver to the transmitter device, an upgraded LoRa SX1278 Long Range RF Wireless Module was used in this project. Semtech created the LoRa physical layer, which enables long-range, low-power, and low-throughput communications. Depending on where it is deployed, it uses the ISM bands at 433 MHz, 868 MHz, or 915 MHz. When channel aggregation is used, the payload of each transmission can have a range of 2-255 octets, and the data rate can be as high as 50 Kbps. Semtech's unique technology underlies the modulation method. With the help of LoRaWAN's medium access control mechanism, numerous end devices can connect to a gateway and communicate using the LoRa modulation. The LoRa Alliance is developing the LoRaWAN, an open standard, even if the LoRa modulation is a proprietary technology. LoRa is a type of spread spectrum modulation that uses frequency chirps with a linear variation in frequency over time to encode data. Since frequency offsets between the transmitter and receiver are equal to timing offsets in the decoder due to the linearity of the chirp pulses, they may be simply removed. Consequently, this modulation, which is comparable to a frequency offset, is likewise resistant to the Doppler effect. The decoding performance is unaffected by a frequency offset of up to 20% between the transmitter and the receiver. Due to the fact that the crystals inside LoRa transmitters do not need to be made with exceptional accuracy, this helps to lower the price of the transmitters [20]. With a sensitivity of around 130 dBm, LoRa receivers are able to lock on to the frequency chirps received. Forward Error-correction Codes (FECs) are a simple method for correcting interferencerelated mistakes because the LoRa symbol duration is greater than the typical bursts of AMinterference produced by Frequency Hopping Spread Spectrum (FHSS) systems. The typical co-channel rejection (highest ratio of power between an interferer in the same channel and the LoRa signal) and out-of-channel selectivity (maximum ratio of power between an interferer in a nearby band and the LoRa signal) of LoRa receivers are 90 dB and 20 dB, respectively. As a result, LoRa performs better than conventional modulation techniques like Frequency-Shift Keying (FSK) and is well suited for low-power and long-distance transmissions [20]. The LoRa modulation can be customized using the following parameters: Bandwidth (BW), Spreading Factor (SF), and Code Rate (CR). A forward error correcting code is part of LoRa. These parameters affect the modulation's effective bitrate, resistance to interference noise, and simplicity of decoding. Given that the symbol rate and bit rate are related to the frequency bandwidth at a particular spreading factor, doubling the bandwidth will effectively twice the transmission rate. This is converted into Equation (1), which connects the spreading factor and bandwidth to the length of a symbol ( ) [20]. (1) Code Rate (CR) = and SF bits of information are transmitted per symbol. The Equation (2) calculates bit rate ( ) [20].

GPS AND LoRa BASED DROWNING PREVENTION SYSTEM HARDWARE
The hardware components required for building the "drowning prevention system" LoRa transmitter and LoRa receiver to share GPS location of the children in shown in Table 1. Arduino (Fig.1) Nano is a small breadboard-friendly board which makes based on an AT-mega328 microcontroller. LoRa (Fig.2) is a Low power wireless module which makes based on spread spectrum mod-ulation techniques derived from chirp spread spectrum (CSS) technology. The NEO-6M GPS module (Fig.3) is a well-performing complete GPS receiver with a built-in ceramic patch antenna which is cost-effective and has high sensitivity. SIM800L Mini GPRS GSM Module is a miniature cellular module used for GPRS transmission, sending and receiving SMS and voice calls. Capacitor -1000uF 1 7 Capacitor -220uF 1 8 Potentiometer -103, 10k 1 9 LCD Display/Monitor 1

GPS AND LoRa BASED DROWNING PREVENTION SYSTEM CIRCUIT DESIGN
There are two main parts to this project: one's Transmitter and another one is the Receiver. The Fig. 4 shows a physical diagram of LoRa transmitter how to connect the GPS Module and LoRa Module with Arduino Nano V3.The second  major part of this project is the LoRa Receiver which makes a combination of Arduino Nano, LoRa Module, and SIM Module shown in Fig. 5. In Fig. 6 the location of the LoRa transmitter is viewed as Latitude and Longitude values in LCD display of the LoRa receiver. Point-to-point communication topology is used to connect the LoRa transmitter and receiver in this system. Therefore, the LoRa receiver can receive signals from multiple transmitters if they are transmitting at different time intervals.
The important component of LoRa modules is Antenna. Lora module transmits in specific frequency ranges. The license-free megahertz radio frequency bands are: 433MHz in Asia, 868MHz in Europe and 915MHz in North America. While setting up the LoRa transmission in the application we have selected the frequency 433E6 instead of 866E6 and 915E6 since our system will work in Bangladesh.

GPS DISTANCE CALCULATION SYSTEM BETWEEN TWO LOCATIONS WITH LATITUDE AND LONGITUDE POINTS
The three primary methods for calculating geographic distances from latitude and longitude data are the Haversine formula, the spherical law of cosines, and the equirectangular approximation. The distance between the devices is determined using an equirectangular approximation because the GPS computation in this study is performed between the LoRa transmitter and LoRa receiver devices [21]. If two points located in a great-circle the Haversine formula may be used to calculate the distance. This implies that measurement of the two location point's shortest distance over the earth's surface. The Haversine formula is shown in Equation (3.1, 3.2, and 3.3). (3.1) The simpler spherical law of cosines method is a reasonable preference to the Haversine method because it can give results down to the smallest distances like a few meters. The Spherical Law of cosines formula is given in Equation (4).
(4) The Pythagorean theorem on Equirectangular approximation shown in Figure 7 and the formula given in Equation The spherical law of cosines is a bit slower than the haversine despite being simpler. Programming language, processor speed, coding context, accessible trigonometric functions, and whether an equirectangular approximation is better appropriate for extremely small distances may all influence the decision.   shows the comparative experimentation results of different GPS locations distance calculation systems.  Figure.8 shows the emergency alert operation process to save children from going to risky places in the village using the LoRa transmitter, GPS, and LoRa receiver devices. In this research, we have used Equirectangular approximation method to calculate the distance between the GPS position of the transmitter and GPS coordinates of dangerous places. If the distance is less than 10 meters, the alert system will send an alert to the parents. Fig.6 shows the longitude and latitude of the GPS location of the transmitter in the receiver LCD.

C. Result and Discussion
The receiver device is established outside the house in the open air. We have kept a record of the receiver's Received Signal Strength Indication (RSSI) values while the kid is wandering around with the transmitter device. The following Fig. 9 shows the RSSI values of the received signal measured in dBm to the distance between the transmitter and receiver.
If RSSI=-30dBm: signal is strong. If RSSI=-120dBm: the signal is weak. The LoRa based Drowning prevention system can be used efficiently for tracking the kids within maximum 300 meters area according to RSSI values shown in Table 3 and Figure 9. The Figure 10 shows the simulation experiment result of distance measurement by using Equirectangular approximation formula. The Proteus IoT builder is used to build the circuit design and simulation. The website called "The Engineering Projects" provides the Proteus Arduino UNO libraries. There are several rounds of testing by simulation to compare with different known distances between locations are done. The experimentation shows that the distances are calculated correctly in each round.  Figure 9. RSSI values to distance graph Figure 10. Simulation of Equirectangular approximation formula using GPS module Using NS3 simulator LoRAWan module, a lorawan topology is designed with 10 LoRA devices where 8 end nodes, 1 gateway connected with 1 network server using PPP protocol. RandomWalk2dMobilityModel is used to simulate the mobility of the end nodes. The spreading factor is changed in the range of 7 to 12. The effect of changing spreading factor (SF) on Time on Air Duration (Second) is linearly increasing beacuse the spreading factor increases number of Lora symbols hence the time on air duration; this is shown in Figure 11. According to Equation (2) the higher the spreading factor the lower the bit rate for a fixed bandwidth. This implies that SF 7 will provide higher bit rate than SF 10 and as such needs less Time-on-Air duration. As higher SF requires longer Time-on-Air which shortens the battery life of LoRA end nodes.

D. Conclusion
By combining a GPS and LoRa-based emergency alert system, this research intends to create community-driven surveillance service to protect kids from drowning in rivers. The system has been tested, which works properly for child security and will play an important role in reducing the drowning problem. The proposed system can accurately alert parents about children entering the risky area by sending SMS or buzzing the receiver device. The Equirectangular approximation method calculates the distance between children's positions from risky areas. The LoRa based Drowning prevention system can be used efficiently for tracking the kids within maximum 300 meters area. Different types of gps distance calculation systems are compared and experimented and it is found that Equirectangular approximation method is good for measuring small distance within less amount of time. Also, the LoRa transmitter and receiver can transmit strong signal in a longer range when they are kept in open areas. The LoRa technology provides strong penetrating ability, low power consumption for terminal devices, and interference-free signal transmission.