**7. Proposed system**

The proposed system alerts the client when the water level is a threat to the vehicle. This system includes a set of sensors that will perceive different measurements in water level and vehicle acceleration. If the water level increases to a threatening level, it will alert the client via web service through a text message which notifies about a sudden flood every 10 seconds. When for any reason there is no signal, the system has the option to send a notification so that the vehicle horn starts to go off; this functions as another alternative. In case that the car is in motion, it will notify the client by an audible notification. The collected data will be used to report flooded areas in real time through a web service.

The system is located inside the car, close to each of its four tires. The Arduino will receive data from the accelerometer, ultrasonic, and the GPS module. Once the data has been processed, the device will detect if the water level has risen to a threatening level. There are two forms of operation. In the first one, when the vehicle is moving, the client will be alerted by an audible notification located inside the car. And in the second one, if the vehicle is stationary, the client will receive a text message sent by the web service. The web service stores the information received in our database and will provide information that the client may see from their devices. **Figure 15** presents interaction of the system, client, and webpage.

This system consists of the following components: ultrasonic sensors, the GSM module, and the accelerometer. Each of these components plays an essential part in the contraction of this prototype. A breadboard is used as an intermediary for the connection from the Arduino mega to each component. An ultrasonic sensor is used to measure the distance between the ground or water and the sensor. It contains four pins: VCC, trig, echo, and GND. In order to function, it needs a power of 5 V which can be found in the Arduino. They emit and receive sound waves in order to detect how far the object is. It does not measure the distance, but rather the time of emission and receiving [17].

A GSM module's operating voltage is between 3.4 and 4.4 V, and an external battery must be used to supply the power to the module. This module includes an individual antenna called helical antenna that is connected such as a button and a net pin. In addition, at the back of the module is a micro SIM card slot. The module is used to connect to the cellular network in order to notify the owner of the vehicle via email, website, or text message. The module has an LED light that indicates the status of the cellular network. When blinking every 1 second, the module is running and looking for a network, when blinking every 2 seconds the GPRS data connection requested is active, and for every 3 seconds, the module has successfully connected to the network. To make the module work, it is necessary to connect the pins accordingly such as in **Figure 16** since the module only handles 3.4–4.4 V.

**193**

**Figure 17.**

*Devices schematic diagram and interactions.*

*Urban Heat Island Effects in Tropical Climate DOI: http://dx.doi.org/10.5772/intechopen.91253*

the data to store it in the database).

sudden rise.

**Figure 16.**

*Circuit assembly for GSM module.*

An accelerometer is used to detect if the car is in motion. It works by sensing the acceleration of gravity [18]. This sensor has several pins. For this case four were used: the VCC, which needs 3.3 V to be powered, GND, serial clock line (SCL), and serial data line (SDA). **Figure 17** shows the interaction of the devices. The car battery shall be connected to a voltage regulator next to the Arduino in order to protect it. The Arduino is connected to the sensors that are responsible for obtaining the readings for when the water level is rising. It will also have an accelerometer connected in order to know when the car is in movement. There will also be a GPS module (to recognize the coordinates of the vehicle), an alarm (to notify the client when the car is moving), and a GSM module (to be able to send a message of the coordinates to an email for the web service to extract its information and process

Once the accelerometer detects that the car is not in motion, the ultrasonic sensors start measuring the distance between the ground and itself. If there is a sudden rise in water level, using conditions established in the program, the ultrasonic sensors detect it, and the GSM module will send a warning message to notify of the

**Figure 15.** *Interaction of the system, client, and webpage.*

*Urban Heat Island Effects in Tropical Climate DOI: http://dx.doi.org/10.5772/intechopen.91253*

*Vortex Dynamics Theories and Applications*

emission and receiving [17].

The system is located inside the car, close to each of its four tires. The Arduino will receive data from the accelerometer, ultrasonic, and the GPS module. Once the data has been processed, the device will detect if the water level has risen to a threatening level. There are two forms of operation. In the first one, when the vehicle is moving, the client will be alerted by an audible notification located inside the car. And in the second one, if the vehicle is stationary, the client will receive a text message sent by the web service. The web service stores the information received in our database and will provide information that the client may see from their devices. **Figure 15** presents interaction of the system, client, and webpage. This system consists of the following components: ultrasonic sensors, the GSM module, and the accelerometer. Each of these components plays an essential part in the contraction of this prototype. A breadboard is used as an intermediary for the connection from the Arduino mega to each component. An ultrasonic sensor is used to measure the distance between the ground or water and the sensor. It contains four pins: VCC, trig, echo, and GND. In order to function, it needs a power of 5 V which can be found in the Arduino. They emit and receive sound waves in order to detect how far the object is. It does not measure the distance, but rather the time of

A GSM module's operating voltage is between 3.4 and 4.4 V, and an external battery must be used to supply the power to the module. This module includes an individual antenna called helical antenna that is connected such as a button and a net pin. In addition, at the back of the module is a micro SIM card slot. The module is used to connect to the cellular network in order to notify the owner of the vehicle via email, website, or text message. The module has an LED light that indicates the status of the cellular network. When blinking every 1 second, the module is running and looking for a network, when blinking every 2 seconds the GPRS data connection requested is active, and for every 3 seconds, the module has successfully connected to the network. To make the module work, it is necessary to connect the pins accordingly such as in **Figure 16** since the module only handles 3.4–4.4 V.

**192**

**Figure 15.**

*Interaction of the system, client, and webpage.*

**Figure 16.** *Circuit assembly for GSM module.*

An accelerometer is used to detect if the car is in motion. It works by sensing the acceleration of gravity [18]. This sensor has several pins. For this case four were used: the VCC, which needs 3.3 V to be powered, GND, serial clock line (SCL), and serial data line (SDA). **Figure 17** shows the interaction of the devices. The car battery shall be connected to a voltage regulator next to the Arduino in order to protect it. The Arduino is connected to the sensors that are responsible for obtaining the readings for when the water level is rising. It will also have an accelerometer connected in order to know when the car is in movement. There will also be a GPS module (to recognize the coordinates of the vehicle), an alarm (to notify the client when the car is moving), and a GSM module (to be able to send a message of the coordinates to an email for the web service to extract its information and process the data to store it in the database).

Once the accelerometer detects that the car is not in motion, the ultrasonic sensors start measuring the distance between the ground and itself. If there is a sudden rise in water level, using conditions established in the program, the ultrasonic sensors detect it, and the GSM module will send a warning message to notify of the sudden rise.

**Figure 17.** *Devices schematic diagram and interactions.*

**Figure 18.** *System work diagram.*

The software of the program consists of conditions based on thresholds, distances, and a counter. The first question is whether the vehicle is moving. This is where the accelerometer detects its movement using the Cartesian plane of *x*, *y*, and *z*. In the process diagram, in **Figure 18**, the first step is to detect if the water level is high. If the level is low, it shall keep checking if there is any change. If not, the vehicle shall proceed to check if the vehicle is in motion. If the car is in motion, then the text message alert will be disabled, and the client will be alerted through an audible notification. On the contrary, a text message will alert the client. Once the movement is detected, and the condition is established, a text message will be sent to the web server email containing the coordinates. The data is processed, and the web service extracts the coordinates from the email. After extracting the coordinates, a signal is made on the map shown on the web site where there are flooding areas.
