{"id":144639,"date":"2024-08-06T16:13:25","date_gmt":"2024-08-06T10:43:25","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=144639"},"modified":"2025-03-18T12:04:56","modified_gmt":"2025-03-18T06:34:56","slug":"fall-detection-using-indusboard","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/fall-detection-using-indusboard","title":{"rendered":"Fall Detection Device"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"152\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2016\/12\/Screen-Shot-2016-12-24-at-15.19.33-e1644389186872.png\" alt=\"\" class=\"wp-image-28226\"\/><figcaption class=\"wp-element-caption\">Comment errors or corrections found for this circuit, and get the chance to win big!<\/figcaption><\/figure><\/div>\n\n\n<p>Fall detection involves monitoring the accelerometer data to detect when a person falls. Upon detecting a fall, the system activates a blue LED to visually indicate the fall event. <\/p>\n\n\n\n<p>Simultaneously, a message is printed to the serial monitor, notifying caregivers or monitoring systems that a fall has been detected, prompting them to check on the individual.<\/p>\n\n\n\n<p>After some time, the accelerometer senses that the person is no longer moving significantly, indicating that they are at rest. At this point, the system switches the blue LED off and activates a red LED. The red LED serves as a secondary visual indicator that the person is now at rest. Another message is sent to the serial monitor, confirming that the person is now in a stable state.<\/p>\n\n\n\n<p>This dual-LED system and serial communication ensure that caregivers or monitoring systems are continuously updated about the person&#8217;s status, facilitating timely responses to fall incidents and providing reassurance when the person is resting peacefully.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Applications of Fall Detection System<\/strong><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Elderly Care:<\/strong> Ensures rapid response to falls among seniors, reducing the risk of injuries and ensuring timely medical attention.<\/li>\n\n\n\n<li><strong>Home Monitoring:<\/strong> Provides peace of mind to family members by alerting them to falls or emergencies when they occur.<\/li>\n\n\n\n<li><strong>Hospital Settings:<\/strong> Enhances patient safety by alerting healthcare providers to falls in real time, facilitating swift intervention.<\/li>\n\n\n\n<li><strong>Remote Monitoring:<\/strong> Allows for continuous monitoring of individuals in remote or isolated locations, ensuring assistance is dispatched promptly.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Bill of Materials (BoM)<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Components<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Quantity<\/strong><\/td><\/tr><tr><td><a href=\"https:\/\/shop.electronicsforu.com\/product\/indusboard-iot-development-board\/\" target=\"_blank\" rel=\"noreferrer noopener\">IndusBoard<\/a><\/td><td>3cm sized dev board<\/td><td>1<\/td><\/tr><tr><td>LED<\/td><td>5mm LED<\/td><td>2<\/td><\/tr><tr><td>Resistor<\/td><td>1Kohm<\/td><td>2<\/td><\/tr><tr><td>Zumper wires<\/td><td><br><\/td><td>As required<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Code for Fall Detection System<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;LSM303AGR_ACC_Sensor.h&gt;\n#include &lt;LSM303AGR_MAG_Sensor.h&gt;\n\n#if defined(ARDUINO_SAM_DUE)\n#define DEV_I2C Wire1   \/\/Define which I2C bus is used. Wire1 for the Arduino Due\n#define SerialPort Serial\n#else\n#define DEV_I2C Wire    \/\/Or Wire\n#define SerialPort Serial\n#endif\n\n\/\/ Components.\nLSM303AGR_ACC_Sensor Acc(&amp;DEV_I2C);\nLSM303AGR_MAG_Sensor Mag(&amp;DEV_I2C);\n\nint fall=7;\nint rest=6;\n\n\/\/ Threshold values for fall detection (can be adjusted)\nconst float fallThreshold = 2.5; \/\/ Adjust this threshold based on testing\nconst float restThreshold = 0.5;\n\nvoid setup() {\n  \/\/ Led.\n  pinMode(fall, OUTPUT);\n  pinMode(rest, OUTPUT);\n  \/\/ Initialize serial for output.\n  SerialPort.begin(9600);\n \n  \/\/ Initialize I2C bus.\n  DEV_I2C.begin();\n\n  \/\/ Initlialize components.\n  Acc.begin();\n  Acc.Enable();\n  Acc.EnableTemperatureSensor();\n  Mag.begin();\n  Mag.Enable();\n}\n\nvoid loop() {\n  \/\/ Read accelerometer LSM303AGR.\n  int32_t accelerometer&#91;3];\n  Acc.GetAxes(accelerometer);\n\n  \/\/ Calculate the magnitude of the acceleration vector\n  float magnitude = sqrt(sq(accelerometer&#91;0]) + sq(accelerometer&#91;1]) + sq(accelerometer&#91;2])) \/ 1000.0; \/\/ Convert to g\n  \/\/ Check for fall detection\n  if (magnitude &gt; fallThreshold) {\n    SerialPort.println(\"Fall detected!\");\n    digitalWrite(fall, HIGH);\n    delay(5000);\n    digitalWrite(fall, LOW);\n    delay(5000);\n\n    \/\/ Wait until the sensor detects the person is at rest\n    while (magnitude &gt; restThreshold) {\n      Acc.GetAxes(accelerometer);\n      magnitude = sqrt(sq(accelerometer&#91;0]) + sq(accelerometer&#91;1]) + sq(accelerometer&#91;2])) \/ 1000.0;\n      delay(100);\n    }\n    SerialPort.println(\"Person is at rest.\");\n    digitalWrite(rest, HIGH);\n    delay(1000);\n    digitalWrite(rest, LOW);\n    delay(1000);\n  }\n  \/\/ Output data.\n  SerialPort.print(\"| Acc&#91;mg]: \");\n  SerialPort.print(accelerometer&#91;0]);\n  SerialPort.print(\" \");\n  SerialPort.print(accelerometer&#91;1]);\n  SerialPort.print(\" \");\n  SerialPort.print(accelerometer&#91;2]);\n  SerialPort.println(\" |\");\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Connection<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"591\" height=\"406\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/connection.png\" alt=\"Fall Detection Circuit\" class=\"wp-image-144643\" style=\"width:403px;height:auto\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/connection.png 591w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/connection-500x343.png 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/connection-218x150.png 218w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Testing Fall Detection System<\/strong><\/h2>\n\n\n\n<p>Connect the indusBoard with the USB and upload the code. And open the serial monitor to see the output. Hold the IndusBoard in your hand and check the fall detection system. If you fall then the blue LED is \u201cON\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" data-id=\"144645\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-1024x1024.jpg\" alt=\"Fall Detection Device\" class=\"wp-image-144645\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-1024x1024.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-500x500.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-150x150.jpg 150w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-420x420.jpg 420w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard-696x696.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/breadboard.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"852\" data-id=\"144644\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Coding.png\" alt=\"Fall Detection System\" class=\"wp-image-144644\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Coding.png 519w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Coding-305x500.png 305w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2024\/07\/Coding-256x420.png 256w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><\/figure>\n<\/figure>\n\n\n\n<p><strong>Recommended:<\/strong> We also have one <a href=\"https:\/\/www.electronicsforu.com\/electronics-projects\/fall-detection-system\">Advanced Fall Detection Project using IoT<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><em>Author(s): Manjeet Vishwakarma, &nbsp;Abhay Verma and Satywanti Kundu are B.Tech ECE students at GJUS&amp;T HISAR<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fall detection involves monitoring the accelerometer data to detect when a person falls. Upon detecting a fall, the system activates a blue LED to visually indicate the fall event. Simultaneously, a message is printed to the serial monitor, notifying caregivers or monitoring systems that a fall has been detected, prompting them to check on the [&hellip;]<\/p>\n","protected":false},"author":55758,"featured_media":144643,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,776,11851],"tags":[1985,1911,110],"class_list":{"0":"post-144639","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-prototypes","10":"category-super-innovative-projects","11":"tag-diy-projects","12":"tag-do-it-yourself","13":"tag-electronics-projects"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/144639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/55758"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=144639"}],"version-history":[{"count":2,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/144639\/revisions"}],"predecessor-version":[{"id":159646,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/144639\/revisions\/159646"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/144643"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=144639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=144639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=144639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}