Creating a Two-Way Anti-Loss Device Based on Arduino

This article is sourced from “Invention and Innovation” March 2024 issue

Creating a Two-Way Anti-Loss Device Based on Arduino

At home, my mom often can’t find her phone. Every time, I have to use the search function on my dad’s phone to locate her phone and make it sound. Whenever she can’t find the TV remote, she always says, “If only the remote could be located like a phone.” My mom’s idea inspired me, and I decided to design a two-way anti-loss device.

1. Function Design

(1) Item Finding Function

1. Find items via mobile app: By clicking the function button on the app, the two-way anti-loss device will beep or flash lights, making it easier for the owner to determine its location.

2. Find the phone by operating the two-way anti-loss device: Long press the button on the two-way anti-loss device, and the phone will sound an alarm to determine its location.

(2) Anti-Loss Function

When the two-way anti-loss device is connected to the phone via Bluetooth, if the distance between them exceeds the set value, both the phone and the two-way anti-loss device will beep. The beeping stops when the distance is within the set value.

(3) Voice Broadcast

The app detects the language of the phone and then broadcasts corresponding voice notifications, including the remaining battery level of the two-way anti-loss device and alarm prompts.

(4) Remaining Battery Query

By pressing the current battery button on the app, you can get the remaining battery level of the two-way anti-loss device.

2. Key Technologies and Implementation

I adopted a modular approach to implement the relevant functional modules, making it easier to locate and troubleshoot issues when they arise.

(1) Step One: Wireless Connection Between Phone and Bluetooth

To achieve communication between the phone and the Nano main control board, a wireless connection between the phone and Bluetooth must be established to transmit control commands via Bluetooth. I started by trying the simplest data read/write transmission.

(2) Step Two: Programming to Control External Devices (LED Lights, Switches)

To comprehensively test support for external devices, I envisioned controlling other external devices by connecting them to the Arduino board, specifically controlling the on/off states of LED lights, making sounds with buzzers, etc.

(3) Step Three: Arduino Side Reverse Control of the Phone

On the Arduino hardware platform, I continuously read the level of the digital switch; if it is high, it indicates that the switch has been pressed. Specific control characters are written to the serial port via Bluetooth. On the phone side, after reading the Bluetooth serial data and determining that the data corresponds to the agreed control character, the phone side controls the sound component to play an alarm sound and pops up a prompt box. The alarm sound continues until the prompt box is dismissed.

(4) Step Four: Module Integration and Overall Assembly

1. Related Work on the Arduino Side

The Arduino hardware platform continuously reads the Bluetooth interface, controlling the Arduino peripherals based on different received command codes to achieve functions like light flashing, turning off lights, sounding alarms, and silencing sounds, while also monitoring the digital button. When the button is pressed, it sends a command to the phone to achieve the function of remotely locating the phone.

2. Related Work on the Phone Side

(1) Establish Wireless Bluetooth Connection

Read the Bluetooth device list, select a specific Bluetooth signal, and establish a wireless connection to start the timer.

(2) Construct Timer to Read Bluetooth Data and RSSI Values

Within the timer’s interval, continuously send requests to read the Bluetooth serial port. If relevant data is read, it is considered a query request from the Arduino main control board. The app plays an alarm sound using the sound component and pops up a prompt box, indicating that the phone is being searched.

Within the timer’s interval, continuously send requests to read the RSSI values of the connected Bluetooth device, calculating the distance between the phone and the Bluetooth module. If the distance exceeds 8 meters (the specific distance can be set as needed), the phone will play an alarm sound, and the buzzer will emit a prompt sound.

(3) Remote Control of Bluetooth Module Peripherals from the Phone Side

The four operation buttons on the phone correspond to four operations: light search, turn off lights, sound search, and silence. To streamline the code, I defined the “click action” process in App Inventor.

After module integration and overall assembly, the combination of the mobile app and the “Location Device” can basically realize the predefined major functions.

The Author Speaks:

Creating a Two-Way Anti-Loss Device Based on ArduinoFigure 1 Test Device Effect

During the production process, I continuously optimized the functions, starting from the UNO board combined with Bluetooth 3.0 to the final BLUNO board combined with BLE Bluetooth 4.0, undergoing multiple improvements. I believe that technological innovation is a process of continuously discovering problems, constantly improving, and enhancing.

In the future, there is still significant room for improvement in UI design and aesthetics.

3. Innovations

The currently designed external device can provide functions such as alarm disconnection, remote positioning, and retrieval. In the future, it will also be equipped with various sensors, such as temperature sensors and smoke detectors, to send alarm information to the mobile phone in case of abnormal signals. Besides anti-loss, it can also serve as an alarm for emergencies like fires.

By analyzing the parameters in the RSSI distance measuring formula, I dynamically corrected the “environmental attenuation factor” parameter of the wireless Bluetooth distance algorithm based on different scenarios (indoor, outdoor, etc.). Experimental comparisons showed that it outperforms a single mean statistical model.

Creating a Two-Way Anti-Loss Device Based on ArduinoFigure 2 Zhang Leqi Testing

The Author Speaks:

This technological innovation activity has further familiarized me with knowledge and skills related to the Internet of Things and mobile development, prompting me to continuously learn and think, fully absorbing various knowledge in practice and transforming them into technological achievements.

Expert Review:

Zhang Leqi’s Arduino-based two-way anti-loss device is an innovative practical work. Many current smartphones can implement anti-loss and alarm functions for fires, floods, earthquakes, etc., and they are very convenient. What is commendable is that Zhang Leqi, as a high school student, has demonstrated good learning and application abilities in relevant technologies through the design of the anti-loss search, voice broadcast, and remaining battery query functions, as well as the realization of key technologies such as wireless connection between the phone and Bluetooth, programming control of peripherals (LED light switches), reverse control of the phone from the Arduino side, and module integration and overall assembly.

It should be noted that our guiding teachers should be clear that the relationship between innovative awareness, innovative thinking, and practical ability is very high in cultivating outstanding innovative talents. Among them, innovative awareness is the internal driving force, innovative thinking is a path or a way of thinking, or an external guarantee for continuous progress. Practical ability should be regarded as a medium through which students achieve innovation through practice, so all three are indispensable. Activities without innovative awareness are merely mechanical repetitions. (Review Expert: Tan Diaow, First Expert Consultant of the Chinese Invention Association’s Expert Advisory Committee, President of the Chinese Invention Association’s Primary and Secondary School Creation Education Branch, Special Teacher of Science and Technology Innovation Education, Expert in the Ministry of Education’s National Training Program Expert Database.)

Creating a Two-Way Anti-Loss Device Based on Arduino
Creating a Two-Way Anti-Loss Device Based on Arduino
Creating a Two-Way Anti-Loss Device Based on Arduino
Creating a Two-Way Anti-Loss Device Based on Arduino
<Swipe Left and Right to See More>
More Highlights

Innovation is the most distinctive quality of this era.

Innovation is the most prominent mark of this magazine.

As the times change, only innovation leads the direction!

As education moves towards dual reduction, innovation accompanies our growth!

Welcome to subscribe to the national excellent science and technology journal,

Top ten self-science journals in Hunan Province,

Excellent science and technology journals in Hunan Province,

World-class Hunan version science and technology journal construction project selected journal

——“Invention and Innovation”.

Click the image below to subscribe online directly!

Creating a Two-Way Anti-Loss Device Based on Arduino
Exquisite
Colorful
Recommended
1

Recommended Magazine | “Invention and Innovation” grows with you

2

40 Years of Publication | Here is a letter from “Invention and Innovation” to you

3

Can textbooks be read this way? This essay activity is so creative!

4

[Special Report] “Science and Innovation Mentor Group” Mentor – Wang Chong

5

[Special Report] “Science and Innovation Mentor Group” Mentor – Xiao Jun

Source: “Invention and Innovation” March 2024 issue

Editor: Qin Yinyin, Xia Yanhui

Review: Qin Yinyin

Final Review: Li Baichun

Leave a Comment