Welcome to Longer Life For Drivers
Because of the high accident rates in countries like Colombia, this tutorial talks about how can be made an smart equipment for drivers, increasing the possibilities to survive and get better medical care by sending information about what is going on the driver's body while he/she drives, specially when takes place an accident.
In summary, the wearable equipment consist in
- A vest that provides data from the magnitude of a force applied to the thorax - A helmet that allows to know the severity of a head injury
- Data from heart rate
- Alerts from deformation in the vehicle
- GPS by Web
Next, we describe each one of the parts of the equipment based in the development board LinkIt One.
1. Making the LLFD-Vest
For this, you will need the pressure sensors, some meters of medical hose, glue and of course a vest.
The LLFD vest operates using the relation between pressure and force, as you know pressure is equal to the force applied in a determined area, then if we distribute the force in a constant area, knowing the pressure we can also know the force that is being applied. In this way, we can establish that a hit could have taken place.
To measure the pressure at the vest you can use the medical hose, which must be distributed along the more critical parts of the thorax.
Investigating medical theory, we concluded that these parts are all around the ribs, as this provide protection to the principal organs. Then, the purpose of measure the force is finding when a rib could be broken and hurting a vital organ.
So, the first step to improve a regular vest is pasting the hose along those critical parts.
For the chest the hose should be covering the medium ribs, where also are lungs and heart.
Inside the hose there are air, which exerts a nominal pressure while there is no force applied, and a higher pressure when there is some force.
You may think ¿What if the hit occurs between the hose?, Well, in an accident hits are not so precise, and they occurs from falls and strokes with large surfaces.
To measure the pressure, was used the MPX5010 sensor, placing it at the hose end.
This sensor has six pins, of which three are for adjustments and the rest are the more important ones. As the image, the first pin is the output voltage, the next is ground and the third is the input voltage, that must be +5V.
At this moment the vest is ready to start coding, the pins in the LinkIt One to work are, 5V, gnd and A0 y A1, which have the value of voltage from the sensors.
The code commented is at the end of the tutorial.
If we have already the values from the two sensors, the next step is converting them to an useful magnitude, to do this, we need to do a characterization.
The characterization consist in proving different forces and comparing to the voltage read by the LinkIt One, so, we can describe completely the behaviour for any force we could apply.
We used three different masses generating a force equals to mass*acceleration, in this case the acceleration is the same as gravity.
The forces' magnitude must be now printed in the serial monitor, but our objective is to have this information remotely, then, we use Ubidots.
Ubidots allows the exchange of data between the LinkIt One and Ubidots webpage with some options to see the information.
First, the previous code need some additional lines to get the connection using the Wi-Fi antenna, and send it out. The code is at the end.
In Ubidots, create a variable, in Sources>Add Data Source>Add Variable.
Next, in the Dashboard, add a Widget>Multi-line Chart
At the moment we upload the code to the board, in Ubidots, there will be something like this
2. Preparing the LLFD-Bike
The motorcycle is well known to be an widely used vehicle around the world, that can provide practical solutions to daily problems.
However, the motorcycles have a great dissadvantage, the low security they offer to the driver.
Due to the massive use of motorbikes, the great speed they can reach, the recklessness of drivers and many other factors, are the cause of the main number of deaths on the road.
LLFD proposes a “motorcycle” prototype, which is able to provide information in the moment when an accident has happened.
In this tutorial, it is exposed the use of one of many parameters that can determine if an accident happened, it is the deflexion of the covers.
In order to accomplish this tutorial, you will need mainly some flex sensors, a plastic bottle and something to attach the sensors to the bottle.
How was it made?
For accomplish this tutorial you may need:
By putting these sensors on a motorcycle, it can detect which side of the bike touched the ground.
If we know that the motorbike fell down on its right side, we can generate a better diagnostic, because it's highly possible that the greatest injuries of the driver, are on it's right side, so the authorities can take that information and be ready to provide a better care to the wounded one.
3. Making the LLFD-Helmet
The helmet is a fundamental piece for every motorcyclist, because it protects the head in case of impact.
Although being mandatory its use, in many countries, the motorcyclists drive with helmets that don't accomplish the security rules and are used in a wrong way, so if an accident occurs, the most possible case of death is by cranial trauma.
LLFD proposes the adaptation of a helmet that accomplishes the standart security rules, but also gives a sensor system, which is able to provide valuable information of the variables related to the helmet, especially when it is hit.
For that, two linear vibration sensors were used, with the purpose of detecting serious shocks in the head.
How was it made?
For this tutorial you may need:
This helmet works by using the data taken by the analog read of the sensor vibration, and doing a relationship with force, area of impact and other parameters.
The characterization of the sensors was made by field tests, so we wanted to filter the vibrations caused by normal driving conditions, so we can ignore that data in order to get the real hits without mistake.
It was made by taking the data that sensors provide, with the a motorcyclist using the helmet and accelerating his bike at a maximum of 12.000 rpm. Also by moving its suspension we emulated some irregular road conditions.
Some of the collected data, are this ones:
As we can see, the sensors didn't report high vibrations, so it is possible to use a filter that may ignore them. The sensor are in the safest place of the helmet, so it's logical to think that it's necessary a bigger amount of force to reach them.
The codes used to this proves, are at the bottom of this tutorial.
To test the measurement the sensors give with a specific force applied to it, we drop a weight on the helmet, releasing it from a specific height and hitting a certain point of the helmet.
By physics we know that it is only needed the height and the weight to determine the force of a falling object on a specific point and depending on surface's texture, we have for example:
Height = 1m, Mass = 1.5 Kg, Force received and that point= 147N
Comparing the vibration with the result the sensors give, with a known force, we're sure it is able to detect a real accident.
4. Getting data from the body
When a motorcyclist is involved in a serious accident and needs prompt attention, regularly dies because the authorities take a long time to get to the accident place and also because they don't have a previous diagnosis so the proper care lasts a long and vital time.
Pulse-oximetry is a technique for the hemoglobin oxygen transported measurement , which travels through blood vessels, this data is obtained by a non-invasive device, known as pulse-oximeter.
According to the philosophy of the project, it allows us to get an idea of whether the driver is alive or not through the heart rate, further enables us to obtain an idea of the respiratory status of the user through obtaining oxygen saturation, where health professional can observe and interpret it to generate a series of diagnostics.
So we used a pulse-oximeter, with a shield upon an Arduino, connected to the Linkit One, in order to send some data to Ubidots.
How was it made?
For this tutorial you may need... It is not necessary to have the same device, any similar device that provides digital data of at least heart rate, should be ok.
The shield needs some libraries in order to work, those can be found on
When removing the contents of this file,which is compressed into a zip file and copy the folder arduino libraries can create a sketch for biomedical data from sensors connected to the shield. The path where it should be copied these libraries is:
C:\Program Files (x86)\Arduino\libraries (Windows 64 bits)
or in C:\Users\xxxxx\Documents\Arduino\libraries.
For monitoring pulse-oximeter data should be acquired sensor compatible with the shield. From this point you can write some code to acquire the information of oxygen saturation and heart rate.
5. Mixing some parameters
In order to put the pulse-oximeter information on Ubidots, there's something that need attention. The pulse-oximeter we used, can not be directly connected to the LinkIt ONE, but with Arduino. That's why a small coupling is necessary in order to use serial communication between both devices.
As it is being used two different boards, the Arduino One that receives data from the pulse-oximeter and the LinkIt One that receives and process different analog sensors, also it communicates with Ubidots to save and show the obtained data; it is necessary to realize a communication between both development boards. As this, the development boards have different pins to make communication protocols as UART, I2C.
The Linkit One’s pins D0 and D1 are used for UART communication and for this, it must declare the following libraries at the beginning of this sketch.
In the Arduino Uno’s case, it uses the library SoftwareSerial.h, but, in order to get it to work it is necessary to do some modifications, as this has problems with the PinChageInt.h library, these modifications there will be listed next:
- Add the line #define NO_PORT2_PINCHANGES inside the file PinChangeInt.cpp
- Comment /#if defined(PCINT2_vect)
#endif in the file SoftwareSerial.cpp
Because of pulse-oximeter functionalities, we can use the 4 and 5 Arduino Uno’s pins to do the serial communication, after realizing these changes.
Now we can connect the pulse-oximeter with the Link It ONE y a proper way, here it's a more detailed explanation from the code's point of view.
By accomplishing it, we can slowly add the other sensors we used and make an integral system for future works; and the possibilities are getting higher and higher, now you can see the last example we provided with the pulse-oximeter in real time, geo-localization and the motorcycle's flex detection:
Now, we have each system working as previously thought, but you may think we have only data. It is not. Currently, there are four parameters known. To come to a conclusion, we think, two parameters in alert is enough, so with all these data we can make a diagnosis about what is really taking place with the driver.
For example, it is known that a force of about 3500 Newton can break a rib, what allow us to suppose a serious injury when the pressure sensor is saturated. For the helmet we have some levels of gravity, (despising normal vibration from the motorcycle). When the level is above the medium, it indicates that the driver suffered a head strike.
In addition, if the blood pressure is higher than the normal rate, it is possible to suppose something is happening, and if there is no blood pressure, the driver can be dead.
These and another affirmations are part of the general diagnosis, which will be send besides the GPS coordinates, to a relative or the medical or traffic authorities.