Inspiration:
Because my grandfather fell while walking last year, but because we didn't know it in time, it led to serious consequences. So this inspired me to make a device that can detect a fall in time for a person and send an alarm signal to his family and emergency contacts. Our equipment is designed to help the elderly to notify their family or friends as quick as possible when they fall on the floor. Help the family members of the elderly to get timely notice when the elderly fall, so that the elderly can receive timely treatment. When the elderly fall down, the device would detect the free fall and light the red led up on the Node-Red to indicate the falling. In the meantime, the device will send a message including fall location and alerts to elderly family members and emergency contacts.
What it does:
Our device is able to track whether a person is falling or not using an accelerometer by read the essential data after the falling. The accelerometer and GPS sensor will continuously send data through MQTT to Node-Red. When the accelerometer detects a free fall, it will send a "1" to Node-Red and the red led will be lighted up to indicate free fall.
How it works:
- Starting ideas and problems encountered: When we first started designing the project, our first goal was to allow the sensor data to be continuously transmitted to node red, so that users can read the sensor data in real time. The initial idea is to use the "inject" node of node red to make the intercommunication of data. Because we know that by transmitting data to the specified topic through node red, the topic can respond accordingly and give feedback. So we used the built-in script of "inject" at the beginning, that is, I set it to transmit a signal every five seconds, and then after the topic was accepted, the latest sensor data at this time was transmitted back to node red. When we try to manually inject the signal again and again, the topic can successfully receive the signal and then transmit the sensor data back to node red, but when the inject signal is set to be transmitted every five seconds, the sensor will be unknowingly stuck, preventing successful data transfer. After many code improvements and attempts, we gave up on this approach and started elsewhere.
- Solution: After careful looking at the codes and many attempts, we found that we can create a new task to let the MCU execute this task all the time, so as to continuously transmit sensor data to node red. After creating the task, we successfully made the sensor data transfer uninterrupted.
- Use of sensor:
- Accelerometer: Since the data we let it transmit at the beginning is only the most basic X, Y, Z spatial coordinate data, and we need the accelerometer to detect the behavior of free fall, and then let the MCU get the signal of free fall. So we start with the datasheet of the accelerometer. At the beginning, we knew that we could use the basic X, Y, Z data and then use some algorithms to determine whether a free fall behavior occurred, but after reading its datasheet carefully, we found that this accelerometer can directly determine whether there is a free fall behavior, which makes us happy. Therefore, we carefully studied the driver of the accelerometer according to the settings of the datasheet. After many attempts, we finally successfully turned on its free fall function. After setting the duration and threshold of free fall monitoring, our sensor will not trigger the interrupt of free fall in the case of free movement and normal sitting, but start the interrupt when it really falls. At this point, the main part of our project is completed.
- GPS sensor: Under normal circumstances, after obtaining the GPS data, we can use node red's "map all the things" to display the specific location. But when using a GPS sensor, we can't find a driver that can make it work. Many drivers can be used on Arduino, but we can't get it to work properly on Atmel studio after many attempts. In addition, the time is relatively limited, so we gave up the use of GPS sensor. The GPS data displayed on the dashboard of node red is also simulated by us. When we have the opportunity, we will definitely improve our project, make GPS work, and achieve our original purpose.
Challenges we ran into:
- Challenge on how to continuously transfer data from accelerometer to Node-Red.
- Challenge on how to use the accelerometer to detect if the person is free falling or not.
- Challenge on how to make GPS sensor starts working.
What we Learned with the prototype:
- We could understand the accelerometer driver deeply.
- We could make the accelerometer working properly by looking at the datasheet.
- We learned how to make a new task on FreeRTOS that sensors could automatically send the data repletely to Node-Red.
- We learned how to send SMS message and make a phone call that controlled by Node-Red.
What we learned:
- We learned how to design a new product from making Altium Designer, BOM, order the PCB, develop the product from dev-board, and use the PCB to test the code.
- We learned how to make a bootloader for MCU.
- We learned how to update the bootloader from Internet.
- We learned how to further use FreeRTOS.
- We learned how to communicate with teammates and how to distribute tasks reasonably.
What's next for Falling Detection Device:
- Let the GPS sensor start working and could show the precise position on Node-Red.
- Further test our PCB board and make the functions of our project perfectly.
Log in or sign up for Devpost to join the conversation.