Introduction: SmartHoodie and App: Automatically Send Distress Messages Through Bluetooth/SMS Upon Impact. (Under $10)

About: "Creativity is contagious, pass it on" -Albert Einstein

Accidents happen. They are all part of life. Some of them are deadly. Some of them are not. Whenever you have an accident, no matter how minor it is, the first step is to visit the hospital or call for help. What happens when you are incapacitated or unconscious? And alone? How do you call for help? Well, you can't. But an app and a modified hoodie can do that for you.

Innovations are fascinating. They are even more so when their purpose is to save lives. That's what compelled me to build this--the prospect that something this cheap could save lives. It uses no arduino boards or complicated sensors. At a cost below $10, (even less if you use old electronic materials), this life saving device can be made at home easily.

The head is very delicate because it houses the brain. Blows or impacts delivered unto the skull could lead to concussions, unconsciousness and eventually death. Death could happen if the victim is unconscious in a remote area with no medical help. That's where the SmartHoodie (I chose to call it this) and the ImpactsafetyApp come in.

The hoodie detects when an impact is delivered unto the head. This info is fed to the app. It automatically sends a distress message to an earlier registered recipient through Bluetooth. In case where long-distance messaging is required, it uses SMS. In addition, the app automatically retrieves the location of the victim and sends this location along with a distress message to someone so that this person can know of the victim's location and bring help.

Step 1: Sample Problems

The usage of the SmartHoodie and the accompanying app can be used in numerous circumstances. Below are some sample problems to help you understand some more and to show just how important these will be for the society.

Imagine you are out cycling with some friends. You may be at the back and you fall without anyone noticing. You hit your head and black out and can't call for help. The hoodie detects the head impact and feeds this to the ImpactsafetyApp (the name I chose to call this app) Using Bluetooth, the app automatically sends a distress message for help such as 'I need help' plus the GPS coordinates of your location.

On the other hand, you may suffer from a car crash in a remote location. You lose consciousness. In addition, you are bleeding fast. The SmartHoodie detects impact to the head. The app then uses SMS to send a distress message and GPS coordinates of your location.

Also, you make get attacked. Or may be even kidnapped. On your own accord, you could hit your head to trigger the SmartHoodie which in effect will trigger the app. Without the knowledge of your attacker/ kidnapper, you could automatically have a distress message sent to someone. The attacker/kidnappers won't even realize this. They won't see the police coming!

There are people with disabilities. Especially for the blind or handicap, a kit like this will help them get help when necessary. This could also be important for the sick or/and the aging population.

Step 2: You'll Need...

This instructable may sound complicated but it isn't. Because it uses few materials, it is easy to make. Well, it will be easy to turn the hoodie into a SmartHoodie. Writing the lines of code with constitute the app will be the hard part. At least, it was for me. (I'm a still beginner at programming)

Here is what you need:

For the hoodie:

1--A hoodie. (You may have one in your closet. This is simply a sweater with a hood. Can be bought at the supermarket or online stores. If you lack one, you can simply combine a pullover with a beanie to make one. )

2--A phone charger cable head. (If you have old electronics, you can get this from them. I got my phone charger and cut of the part which plugs into the power source. The opposite end which connects to the phone is what we'll use )

3-- Piezoelectric disc(s). (The more you get, the better. Can be bought on online stores like amazon, alibaba or eBay.)

4--Batteries and batteries holder ( Can be bought from electronic stores or removed from old electronic devices.)

5--Fabric. (Any kind of fabric will do, as long as it's thickness doesn't exceed 3mm. If too thick, it will be bulky when attached.)

6--Wires. (This is optional and only necessary in case the wires of the piezoelectric discs are not long enough to reach the battery holder.

For the app:

1--A PC (Any operating system will do. If using windows, make sure you are using windows 7 or higher. )

2--Android Studio and Java development kit programs. (Both can be downloaded from the manufacturers' websites. Download Android Studio here)

3--A Smartphone to carry out testing.

Tools:

1--A soldering iron.

2--A knife.

3--Needle and thread.

4--A pair of scissors.

Step 3: The Hoodie: Markings and Schematics.

Like I mentioned earlier, I wouldn't be using any boards or sensors. Why? Because they are costly. Also because boards like the Arduino board is kind of bulky and will be too obvious if sewn unto any cloth. It is preferable when wearable technology looks less obvious.

The hood of the hoodie is worn over the head. The hood part is the part which should detect impact. I used an easy way to do this. I used a piezoelectric disc. Piezoelectric materials are materials which produce electricity when pressure is applied unto them. The piezoelectric disc will act like an impact-sensor. When a pressure it applied, electricity flows through it. The good thing about them is they are also thin.

Using the diagram above, emulate the markings on the inside part of your hoodie. This is the first step to turn an ordinary hoodie into a SmartHoodie.

Step 4: Batteries and Charging.

Check the battery of your phone? How much voltage does it need in order to begin charging? Mine required 3.7 volts. With this in mind, get two 1.5 volt batteries. These will produce a total of three volts. These three volts are not enough to charge a 3.7 V battery. That's where the piezoelectric disc(s) come in. They will be connected with the 3V batteries.

How it operates:

During impact on the head, these piezoelectric materials should be able to produce up to one volt. This one volt, when combined with that of the two AA batteries should produce 4V. This power is connected using cable which directly plugs into the phone.

In effect, this hoodie will turn electricity into a makeshift sensor. When pressure is applied to the head, the phone begins charging.

Note: The voltage output produced by piezoelectric disc is small. To increase output, you may either decide to increase the size or the number of piezoelectric discs or add an amplifier to increase voltage. Also, piezoelectric materials produce Alternating Current while the batteries produce direct current. The ac could be turned into direct current using a rectifier. This project is just to show proof of concept so I shall not be adding amplifiers or rectifiers. That shouldn't stop you from doing so in case you choose to try this.

Step 5: Cutting and Placing.

The components we are to be adding unto our hoodie should not be visible to the outside world. To ensure this, we shall be sewing the various components to the inside part of the hoodie. Assuming you have already done the markings showing the position and path of the various components, it is time to begin.

Cut up pieces from a fabric of your choice. These pieces should be shaped like the components we plan on attaching yo the hoodie. The should be a patch which would hold the piezoelectric materials in place. Another which will hold the battery case and batteries and wires. And then a pouch to hold the phone.

Step 6: Sewing

Cover the components with the pieces of fabric and sew carefully. You can either use a sewing machine or a simply hand-sew it. I find the running stitch as the easiest one to use. Don't know how to do the running stitch? Learn it here.

After sewing each part, solder immediately. The piezoelectric disc will be joined with the charging cable, so will the batteries/ battery holder. Sew around the materials, leaving only little gaps through which the charging cable's head shall fall out and an opening in the pouch where you will insert your phone.

Note: You can use as many piezoelectric discs as you wish. The more area they cover on the hood, the more efficient they will be.

Step 7: The App: Knowing How It'll Function.

The mobile application is built to work directly with the hoodie. Once the USB cable is plugged into the phone, nothing happens. When there is pressure on the head, the electricity becomes enough to begin charging the phone. This charging action shall be the trigger for the app. It will work in two main ways.

1-- The app detects the phone is charging. In response to this, it automatically checks if Bluetooth is on and connected with another device( the phone of the person you wish to send the distress call to). If connected and within range, it get a pre-written distress message. If GPS services are on, it gets your current location too. The message and your location will be automatically sent.

2-- In the presence of no Bluetooth connection, the SMS thread is activated. if GPS services are on, it gets your current location plus a distress message and sends to a pre-installed phone number( the number you had written you wish to contact in case of an emergency). With this information sent, the recipient could easily see your call for help and your location.

Using these two methods, you could always be sure help shall reach you in case of trouble, especially when you are unconscious.

Note: Since this app works automatically when charging begins, you will have to continually disable it during voluntary charging and then enable if when voluntary charging finishes.

Step 8: The App: Commencing.

Out of the many programming languages out there, I chose to use the Java programming language. It is a dynamic and powerful language. To get started, download the Java development kit and Android Studio bundle. You can download android studio here. With these installed, you can finally begin the coding.

This app contains literally hundreds of lines of code. Trying to put every single one on here will be difficult. And for the beginner programmers, it may get confusing fast. As confusing as it was for me to build it. To ease understanding, I shall be providing only the important lines of code. This way, I will be able to explain exactly what the code does.

Note: Guys,I am a beginner programmer. This app will probably contain tons of errors and bugs. In case you find any , please do point it out in the comment section or through a private message. I take corrections.

Step 9: The Manifest File

After launching Android Studio, start a new application. I decided to call my app the ImpactsafetyApp. Whichever name you choose to give is definitely up to you. That's the fun of building things. You get to name it as you like.

With the work area open, navigate to the Manifest file. This file holds certain permissions that your app must have in order for the android operating system of you mobile device to let the app function.

We shall be declaring permissions. Permissions which will let us know the charging status, the Bluetooth connectivity, to send SMS and to also get GPS coordinates. Open the manifest file and edit as shown in the above picture

Step 10: Activity_main.xml

If you didn't change the default name, the activity_main.xml is a file found under the layout directory. Like the name implies, it is the main activity. It is the first page the user will see once your app opens. You could easily customize it to show objects like buttons, text, images, videos and so on.

In this case, we will be putting some welcome words, a textbox which may hold a distress message for Bluetooth, another hand which will hold that for SMS and a phone number. Then a stop button. Every single object should have a unique Id. This way, we could 'call it back' later.

Step 11: MainActivity.java

In here, we shall be writing the functions. If you read the above steps, you should remember that this app will work when charging begins. (Except when disabled during voluntary charging) In this file, we shall be writing a simple code which checks if the phone is charging. If yes, it launches another fragment-- the Bluetooth fragment.

There are a lot of importations to carry out. Without importing the shown objects/ services, there will be bugs.

Step 12: Bluetooth Service

To make things easier, a new java file could be created. Right click on the Java directory and click new java class. Then give it a name of your chose. I named mine 'btservice'. This fragment searches if Bluetooth is on and if so, for the paired device. If gets the name of the paired device, connects with the app of the paired device. This way, the device can receive the sent message.

The app searches and tries to link with the sockets of another device. It either succeeds or fails. When it fails, an error message (shown as IOException) is displayed such as "Socket failed".

Step 13: Sending Bluetooth Message

Another fragment should be created. This fragment is dedicated to creating a message and sending it. In addition, you will also have to write codes which get the GPS coordinates, combine the coordinates with the message and the sends it automatically.

In the last lines of code, the app checks that there is actually something to send before attempting.( If the message length is greater than zero, it sends)

Step 14: SMS

In case where Bluetooth is unavailable, the SMS activity is launched. It gets the pre-entered number of a recipient and also gets the location. You will have to import the SMSManager. Also the SMS_SEND permission will be declared in the Manifest file.

*Note: This code in particular gave me a lot of trouble. The words in red show bugs/errors. I tried to debug it and just couldn't figure that out. If anyone with programming knowledge can help me out, that'll be great.

Step 15: Stopping the App

Notice that at the beginning, I had put a stop button. This is in case you're not harmed but the app initiates. The onClickListener line is meant to listen if the stop button has been clicked. When you click it, the app stops, This button is to ensure you don't accidentally send a false alarm.

Step 16: Future Work

Obviously, this method of sending distress messages isn't the best. This is because the piezoelectric disc(s) can't detect how much pressure exactly is applied. I'm currently working in a way and looking for a pressure sensor which could detect the amount of pressure applied on the head. This way, it could send an alarm if only the pressure is above the danger zone. This method will prevent false alarms.

Also, the app isn't very dynamic. The GUI isn't the best. With time, more customizations could be added to it to add more aesthetics.

Bluetooth Challenge

Participated in the
Bluetooth Challenge

Automation Contest 2017

Participated in the
Automation Contest 2017

Sew Cool Contest

Participated in the
Sew Cool Contest