**3. Implemented system**

#### **3.1 Electronic device**

As mentioned above, two of the objectives proposed in the design and development of the device were the low power consumption and miniaturization. To achieve these objectives, *Bluetooth low energy (BLE)* technology was chosen, due to its widespread availability on the market, the easy connectivity to a mobile phone, its reduced dimensions, and low power consumption. The core component of the electronic device is the nRF51822 *System on Chip (SoC)*, from Nordic Semiconductor's nRF51 series [26]. The devices of the nRF51 family have a wide supply voltage range (1.8 V–3.6 V) and can be programmed in different ways from C code to Python, Mbed system, or Arduino kernel. In this design, it was decided to develop the code in C language as it is the most robust solution in terms of power consumption.

The firmware of the device is based on the central-peripheral paradigm of the Bluetooth protocol assigning, in this case, the role of peripheral to the device. In this configuration, to be able to connect the device to the mobile phone and subsequently carry out the synchronization, the device must first be in the state called "advertising" in which it sends messages globally so that the rest of the Bluetooth receivers can have access to them. The mobile phone can then detect the device and connect to it, then the message is no longer sent and the communication between devices is determined by the so-called connection parameters, which, among other settings, allows energy consumption to be adjusted. Once the device and mobile phone are paired, two features based on key functionalities of the Bluetooth protocol, services and their characteristics, are used:


The **battery service** allows all receivers that have access to the device to read the battery level. This is a representation of the battery capacity as a percentage, although the value provided by the chip is in a different format. The reading is carried out *via* an analog pin and is expressed in millivolts. Therefore, it is necessary to carry out a conversion by applying the necessary scaling factor so that 3.3 V (maximum value of the battery) corresponds to 100% and the minimum voltage, approximately 1.7 V refers to 0%, as at this voltage value the *SoC* would not operate properly. It is important to note that the battery value is read every 5 minutes and is only notified by the service characteristic if it changes from the previous value.

The **customer service** has its own characteristic without a predefined *UUID*, and its value can be read by any device. The values read consist of two bytes of information: one is for the alarm value and the other for additional information. In this characteristic, the state of the alert that the victim activates *via* the panic button is monitored. Three possible states have been defined:


Finally, the **FALSE ALARM** procedure is a mechanism that has been programmed to allow the victim to deactivate the alarm in case of accidental activation. This is done by simply pressing the panic button 10 times.

Since one of the key objectives of this design is to achieve a very small size so that it can be camouflaged in everyday objects worn by the victim, the *Wafer Level Chip Scale Package (WLCSP)* nRF51822 circuit has been used. It has its terminals arranged in the lower plane, making it the smallest in size of the series. The choice of this type of package also influences the choice of the balun. As can be seen in **Figure 5**, showing the schematic of the designed circuit, the ultraminiature balun BAL-NRF02D3 by ST Microelectronics is used, as recommended by the manufacturer [27]. The circuit also includes 16 MHz and 32 kHz quartz crystals and filters that attenuate noise in the controller.

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

**Figure 5.** *Schematic of the designed circuit.*

The *printed circuit board (PCB)* has been designed with a shape that is similar to that of the nRF51822-beacon kit [28]. As a power supply, the device uses a CR1632 button cell battery. To increase the camouflage options of the device, two contacts have been added in which battery holders with different characteristics can be soldered to provide the device with greater autonomy or other necessary features. The antenna has been designed on the *PCB*, matching the impedance to the controller output by means of the balun. About the panic button, a model that slightly sacrifices the miniaturization of the design but achieves greater robustness is used. This prevents this element from breaking easily in stressful situations to which the victim may be exposed. For its placement, several contacts have been additionally included so that the panic button can be placed in another position or on the side of the device. The tab on the *PCB* has an essential role in the initial operation of the device and becomes irrelevant once the device has been programmed. It includes the contacts necessary for loading the executable file into the *SoC*, but once done and tested, it can be removed. Small holes have been included to facilitate the removal of the *PCB* tab.

**Figure 6a** shows the photograph of the assembled device where the panic button can be seen enclosed by a red line. Purple color has been chosen for the *PCB* because it is the color most associated with non-violence against women. The 3D-printed case that holds and allows the manipulation of the electronic device is shown in **Figure 6b**.

One of the main requirements of the device is that it can be hidden in different accessories of the victims, such as brooches, pendants, necklaces, earrings, watches, bracelets, and belts. The idea was that the device could be customized according to the victim's personal preferences in such a way that it could be incorporated into the victim's daily life and remain completely unnoticed by the aggressor. Because special attention must be paid to the coating materials of the device, as some problems have been reported with those with a high metal content, the designs have been made with this in mind. For example, the design of the pendant shown in **Figure 7** has been handmade by a designer who uses metal-free salt paste in her work.

#### **Figure 6.**

*Photograph of the designed prototype and case: a) electronic device and b) thermoplastic structure made using a 3D printer.*

Other proposals compatible with the camouflage of the developed devices are collars that can be in line with market trends. For example, the left part of **Figure 8** shows a design with details that make them suitable for different preferences. **Figure 8b** illustrates the prototype made in thermoplastic as it can be seen the electronic device can be concealed.

However, other possibilities may be preferable for the woman, for example, the use of earrings or a belt. In the case of a belt, the design can be made with an outer circumference through which a ribbon can be threaded. This ribbon can also be of the user's choice. The designer's belt is shown in (**Figure 9a**) and the one made as a prototype in plastic in (**Figure 9b**) where the embedded electronic device can be seen. In this case, the nRF52832 Bluetooth® 5 *SoC* from Nordic Semiconductors has been used [29]. Among all its functionalities, the device can transmit sound to a mobile application using its microphone. This functionality has been exploited in this work in such a way that the audio signal is sent to the mobile phone, which starts recording and saving the conversation. For this purpose, two versions of the mobile phone application have been developed: one operating on Android and the other on IOs.

**Figure 7.**

*Pendant made of metal-free material: a) front side and b) back side where the device is placed.*

**Figure 8.**

*Appearance of the necklace: a) proposed design and b) thermoplastic prototype with the hidden device.*

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

**Figure 9.**

*Device hidden in a belt: a) design of the accessory and b) prototype made of plastic with the electronic device inserted.*

Other proposals to camouflage the device have been based on the use of analog clocks. To the best of our knowledge, the current alarm devices available on the market are based solely on the use of digital clocks without the possibility of customization, so another line of research has consisted of integrating the designed device into analog clocks. Several prototypes have been developed, such as a watch face made from a *double-sided PCB*, an adapter that can be placed inside the watch, and a *flexible PCB* that serves as a watch strap and can hold as many panic buttons as needed [30, 31]. The fact that *double-sided PCB* acts both as a support for the electronic components of a Bluetooth communications system and as a face for the watch and helps to reduce the dimensions to a minimum. **Figure 10** shows the portable device that has been designed so that it can be installed inside an analog watch without modifying its structure. In this way, its ability to go unnoticed is enhanced by the fact that it can be interchanged between different watches. It would thus be possible to have different watches in which to install the device that would be completely undetected by attackers. The mode of operation of these devices is like those described above, that is, in a situation of danger, and once the panic button inserted in the electronic device has been pressed, it sends a distress message to the control center. Similarly, other versions could be implemented in which the voice could be recorded in an internal storage memory, or the audio signal could be sent continuously (streaming) to the mobile phone for recording as possible legal evidence. The fundamental difference between the three versions lies in the battery life, which is maximum in the first version and minimum in the last one.

Regarding the device developed, as seen in **Figure 10**, the electronic components are distributed on a 0.4 mm thick *PCB*. The electronic circuitry, when the functionality is restricted to its use as a panic button, consists of the Fanstel's BlueNor BC832

**Figure 10.** *Photograph of the designed watch adapter.*

**Figure 11.** *Assembly of all parts of the watch including the adapter.*

Bluetooth module, responsible for the wireless connection with the mobile phone [32]. This module, includes the Nordic Semiconductors nRF52832 *SoC* with ARM Cortex M4F microprocessor, flash memory of 512 kB, and a RAM of 64 kB. The operating power supply voltage can be adjusted in the range from 1.7 V to 3.6 V. Other components are a 32 kHz quartz clock, a push button that assumes the function of a camouflaged panic button, zinc-air batteries for power supply, and battery measurement and management electronics for detailed control of battery consumption.

The shape of the designed device is circular, with a central cavity of identical dimensions to those of the watch movement, so that it can be easily placed inside it. In this case, it is a standard one with the shape described in the figure, which corresponds to the Miyota 2035 type [33]. The dimensions reserved for its location are 18.20 mm x 14.11 mm and its height is 3.15 mm. In addition, it has a linear lateral room reserved for the placement of the watch stem (see the left side of **Figure 10**) so that it can be handled without difficulty. **Figure 11** shows the assembly of all the parts of the watch described above.

#### **3.2 Mobile phone application**

The complete assistance system includes the use of mobile phone applications, which have been developed for both Android and iOS operating systems. These applications are designed to be used by the victim and thus must be implemented to work in the background so that their operation is completely unnoticed by the aggressor.

The flowchart of the mobile application's mode of operation is illustrated in **Figure 12**. As can be seen, the routine starts with the device in "advertising" mode trying to establish a connection with the mobile phone.

This procedure can be seen in **Figure 13**, where the screenshot of the mobile phone with the icon of the application developed for Android is shown (**Figure 13a**), as well as the one (**Figure 13b**) during the search for devices. Once they are located, it displays their Bluetooth identifier and the option to pair the device. If this option is selected, the application indicates on its screen that the connection was successful, as shown in **Figure 13c**. If the device fails to pair with the mobile phone, it sends an error message to the control center alerting about it and continuing the pairing process.

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

**Figure 12.** *Flowchart of the mobile phone application.*

The device is initiated in the normal state, that is, no alert. Three configurable time parameters have been defined within the application: *TN*, *TW*, and *TA*. These parameters correspond to the time intervals in which the application notifies the **NOTHING**, **WARNING,** and **ALARM** status, respectively, together with the location of the victim, to the control center. That is, in the normal operating state the electronic device sends a message to the control center every certain *TN* time. These time parameters can be adjusted in the settings menu of the configuration

#### **Figure 13.**

*Screenshot of the Android mobile phone application: a) application icon, b) searching for devices during the process of pairing and c) connection successfully established.*

#### **Figure 14.**

*Screenshots showing the configuration options of the Android application: a) configuration screen and b) configurable time parameters.*

screen shown in **Figure 14a**. Specifically, **Figure 14b** shows the settings display where the time interval in minutes for different device status notifications can be selected. Other configurable parameters have also been included for debugging purposes.

Furthermore, as can be seen in **Figure 14a**, the application provides for the possibility that, if the alarm state is active, sound recordings are made in the telephone that can be sent to the control center. This facilitates, on the one hand, to evaluate the degree of danger of the victim so that a decision on how to proceed can be taken and, on the other hand, they can be provided, if necessary, as evidence in legal proceedings.

If, for any reason, the electronic device loses the connection with the mobile phone, then it automatically switches to "advertising" mode to be reconnected. The application would detect this fact and send a disconnection warning message to the control center. Once both devices are again paired, the status of the device is read and, if there has not been a change during the disconnection time, it returns to the normal operating state. If during the disconnection time the device is in any other state due to a warning or alarm, the application will recognize this new state and will proceed to send the respective warning messages to the control center every *TW* or *TA* time interval.

In the case of the victim activating the **WARNING** or **ALARM** states by mistake, these states could be reversed by pressing the panic button for 10 times. Thus, the **FALSE ALARM** would be detected, and the sequence would start again in a normal mode.

#### **3.3 Control and monitoring center**

Another essential element for comprehensive and effective care for victims of gender violence is the control and monitoring center, which is responsible for managing the operations to be carried out once the alert call is received. Its mission is to coordinate the actions established in the protocols of action referring to the police forces. For this purpose, a web platform has been developed to manage victims' information, locate them in the event of an alarm, and continuously monitor the different alert devices. Additionally, it is also used to carry out the activation and

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

deactivation of the devices in use, to obtain reports on their operation and to manage alerts and alarms.

The home page of the website is illustrated in **Figure 15** where, as can be seen, access is requested through an e-mail address and a password and is restricted to website administrators only.

Once logged in, the web administrator has access to the following options, as shown in **Figure 16**.


**Figure 15.** *Home page of the website.*

**Figure 16.** *Website administration panel.*

The first two options are reserved for system administration and include information related to the control center contact details, system backups, system log files, and website access data. On the other hand, the victim's section includes a listing of victims and the options to activate and deactivate them. The listing provides information on the victim's data, the telephone number to which the electronic device is associated, the information on the last connection, as well as the status of the connection. The platform also allows downloading the information from the list of victims in different formats (CSV, Excel, or PDF).

#### **4. Experimental results**

The circuitry has been designed using low-power consumption techniques to allow for a long battery life. Given the high-stress situations experienced by the victims, it is very important that the stress is not increased by the possibility of the alarm device losing its functionality due to battery discharge. Since the electronic warning device is continuously sending packets of information to the mobile phone to check and record its correct functioning, the wireless modules have been programmed to operate in ultra-low power (*deep sleep*) mode to achieve considerable energy savings.

The power consumption testing and monitoring were conducted with two main objectives: to characterize the current consumption of the device—and therefore the battery life—and to know the range of the Bluetooth signal. The power consumption tests were performed using LabVIEW software [34]. The instruments used include the NI USB-6221 data acquisition card [35] and the Agilent 34401A digital multimeter [36]. The idle current was measured with the digital multimeter due to its low sampling frequency, which prevents the detection of the current peaks associated with the sending of Bluetooth data packets. The idle current measured was about 2.5 μA. On the other hand, a routine was implemented in LabVIEW to detect the sending of data packets and measure the peaks of current. The test was carried out using two digital inputs on the data acquisition board: one to measure the device's current consumption and the other to monitor the voltage of the battery. Both inputs were configured as fully differential. To measure the current consumption, a 10 Ω resistor was placed between the button cell and the circuit to determine the voltage and then calculate the current. **Figure 17** shows the oscilloscope screenshot corresponding to the voltage across the resistor. As can be derived from the measurement, the peak current is approximately 12 mA.

Similarly, battery life was also tested. **Figure 18** illustrates the discharge plot of the CR1632 coin cell voltage versus time as a function of the number of transmissions per second. As can be seen, if the number of transmissions is limited to one per second, the battery has almost full capacity even after more than two months of operation and loses completely its functionality after approximately four months. As for the Bluetooth signal range, measurements were 10–12 meters indoors and about 45–50 meters outdoors, which is enough for the proposed application of the device.

To validate the functionality of the entire implemented system, field tests were carried out with the assistance of the *ALMA Association*, which contacted some victims of gender-based violence. They volunteered to use both the camouflaged device and the mobile phone with the application developed to perform the tests. For this purpose, they were registered on the website that operates as a control center and included in a list of victims as shown in **Figure 19**. This screen also displays the telephone number to which the electronic device is associated, the data of the last

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

**Figure 17.** *Screenshot of the oscilloscope showing the demanded current peaks prior to sending information.*

#### **Figure 18.**

*Battery discharge voltage curve versus time and number of transmissions/s: blue: 1 transmission/s, red: 5 transmissions/s, green: 10 transmissions/s, and yellow: 15 transmissions/s.*


#### **Figure 19.**

*Screen with the information of the victims list.*

connection, as well as the current connection status. In this case, the color codes used on the connection status buttons are green for **NOTHING**, yellow for **WARNING**, red for **ALARM,** and light blue for **FALSE ALARM**.


#### **Figure 20.**

*Screen with a pop-up message of the victim in danger.*

On the other hand, the right column shows the different options that can be accessed on this screen. From left to right, these options are as follows: location, which provides the victim's last location; view and edit, which allows the victim's information to be edited; and, finally, the icon to delete the victim, where the victim's data is deleted.

In case an alarm is activated, a window will pop up on the upper right-hand side of the screen, indicating the name of the victim and offering the option to determine the location, as depicted in **Figure 20**. Clicking on this option, the screen shown in **Figure 21** will be displayed, where, in addition to the location of the victim, other information is included, such as the device's status history for the last 12 hours, the data corresponding to the level of mobile phone coverage, the charge level of its battery, and the battery level of the electronic device.

Additionally, two action buttons are displayed on the screen; one is intended to play the audio sent by the mobile phone application, and the other is used to contact the victim so that their level of distress can be determined.

The complete system is still in the testing phase, pending on the approval by all the responsible institutions of the state, autonomous communities, and local bodies involved in the subject of gender-based violence.

#### **5. Conclusions**

An integral assistance system for victims of gender-based violence has been designed. The system consists of a camouflaged electronic alarm device, which

*Comprehensive Assistance System for Victims of Gender-Based Violence DOI: http://dx.doi.org/10.5772/intechopen.110562*

connects *via Bluetooth Low Energy* to a mobile phone that sends an alarm message to a control center in charge of monitoring the victims registered on its website. Along with the alarm signal, the location of the victim and an audio record of the threatening, which can be used as evidence in legal proceedings, are also sent so that police forces can assist the victim. The system has been developed paying special attention to a minimum power consumption requirement, a reduced size so that the electronic device can easily be camouflaged in any accessory of the victim's jewelry, and the option of audio recording among its possible features. The system is intended to be used by victims who still live with the aggressor and therefore have no other governmental protection mechanisms. These victims account for approximately 65% of all gender-based violence deaths.

### **Thanks**

The authors are grateful to the *nonprofit association ALMA* for the invaluable assistance they provide to victims of gender-based violence and for supporting the development of this project. We would also like to thank the Government of Extremadura and the European Regional Development Fund *(Fondo Europeo de Desarrollo Regional, FEDER)* for financial help by project IB16211.
