A Intel Edison based smart helmet that:
- Changes In-Helmet temperature using Peltier based cooling system
- The cooling is based on temperature sensing
- Triggers indicator automatically when user moves his head in left or right direction
- Detects accident and notifies about the accident using Gmail and over Mqtt
- Completely battery driven and working prototype
Motivation
In many places, like Kalaburagi in INDIA, people tend to avoid helmets due to excessive heat and severe irritation and discomfort, resulting from the heat. The country also suffers from rash driving & negligence. Many a time, such negligence by the riders for not using dippers and indicators results in road mishaps. Further, we do not have a great accident support system. Hence many a times, a rider loses his life because he remains unattended for a long time even after the accident. The major motivation for the work is to address a solution that can keep riders' head cool, trigger the indicators automatically when he turns and notify any authority or relative when rider meets with an accident. Our main goal is to save millions of lives that have been lost every year, due to not using the helmet or not using the indicators.
Introduction
Street car/bike accidents take the lives of about 1.3 million consistently and harm 20-50 million more on the planet. Refusal to utilize legitimate cruiser protective caps is among the fundamental variable adding to pass from street crashes - WHO said this in its report on 'Decade of Action for Road Safety '2010-2011'. All the more exasperatingly, an extensive number of passing from street mischances are borne by helpless Street clients, for example, people on foot, cyclists and motorcyclists.
Around 13% of the casualties from street related passing are people on foot in India when contrasted with 15% of mischances from traveller cars, autos and taxis and 27% from riders of mechanized two-or-three wheelers. So in the event that it can be made required to make the general people wear the protective cap when they ride the bike, the rates of these mishaps can be relied upon to fall. Overall, most governments have officially made stringent laws with respect to wear the protective cap. In any case, regardless of the laws, such cases are still on an ascent due to the absence of legitimate execution. As of recently, just the laws have been shaped, however no mechanical work has been done in such a manner.
This is a circumstance we see in our everyday life, considering discovering some answer for determination of this issue, we concocted this thought of giving the data about the mishap at the earliest opportunity and in TIME….!! Because after record-breaking matters a great deal, if everything is done in time, at any rate, we can spare a large portion of the lives that are lost because of bike mischances.
Considering three main considerations for keeping away from the mishap causes, for example:
- Make wearing the protective cap mandatory.
- Avoid drinking and driving.
- If an individual is met with a mischance and if nobody is there to help him. Rather than basically leaving or overlooking the individual, he may bite the dust (die). In such circumstance, advising to an emergency vehicle or relatives through smart phone to safeguard him to a degree.
In this work, we exhibit the configuration of the model we redesigned the head protector cap with Peltier module and GPS. With stock incorporated into head protector, agreeable temperature can be kept up in the cap by utilizing the Peltier module which deals with the premise of thermoelectric impact. In the event of street mishaps, the exact area of the rider can be followed out utilizing GPS framework and gives the message to crisis vehicle. Also, if any draining of blood happens, it can be coagulated by the thermoelectric module with the goal that individual can be safeguarded from basic conditions.
Problem
Few of the past works have proposed various embedded based solutions for helmets. Most of the past solutions adapt GPRS for generating the notification. One of the major problems with SMS (GSM) and web (GPRS) based notification is that the messaging is costly and secondly the web protocol is multitudes of times slower in comparison to M2M protocols being offered by IoT. Also, most of the past works are based on microcontroller architecture which has a serious limitation as far as parallel programming is concerned. Therefore, parallel monitoring and controlling of the temperature, accident and indicators becomes very slow in the context of real time scenario. This problem can be addressed by replacing GPRS with IoT gateway, microcontroller with powerful microprocessors and using low latency sensors over conventional sensors.
The challenge of fast communication, scalable messaging, channelling of the messages and alarm and better event trigger is solved by the proposed solution. We use Intel Edison with Arduino compatible extension board to increase the speed of prototyping. We used Wi-fi connectivity to connect the IoT board with internet. We have used I2C based Accelerometer sensor, which has got significant performance improvement over serial communication based on conventional Accelerometers. The notification system puts the data into Google cloud through which it can be channelled to other platforms like Facebook, Twitter through IFTTT’s cloud based event and message routing. We have also used MQTT protocol which betters the response time of both web services and http. As MQTT from core offers QOAS support, the delivery of every packet with optimal latency is guaranteed. The detailed architecture of the proposed system is explained in detail in the methodology section.
Highlights
The objective of the work is to offer cutting edge near real time solution for road safety, head comfort, riding assistance to a rider through a smart helmet powered by new generation IoT processors and protocol structures. The overall objective can be summarized into below specifics.
- Maintaining a comfortable temperature for the rider and in case of head injury due to an accident, to accelerate the blood clotting process by rapidly reducing the temperature of the Peltier module.
- Besides this locating the precise location (civic address) of the rider in case of an accident and at the same time intimating it to a preset mobile number and also since the data is collected through the cloud via MQTT, the real time civic address will be broadcasted to social media applications like Facebook, Twitter, Gmail, etc. via an IFTTT application to address it to the family members.
- Based on the movement of the head of a rider for certain duration, this device actuates indicators placed on helmet sensed by the Groove accelerometer sensor.
Specifications
-
Hardware Specifications
- Intel Edison
- Arduino Compatible Breakout board for Intel Edison
- Sensors (Vibration, Accelerometer)
- Peltier module with Heat Sink
- 12v External power supply/ Mobile Power Bank
- Internet Connectivity (Wi-Fi), 3G
- Android Mobile (Android version 4.0 and above)
- SeedStudio Groove Kit
-
Software Specifications
- Linux Yocto Operating System for Edison
- Node.js
- IDE: Intel XDK IoT edition
- Language: JavaScript ( Node.js)
- PuTTY
- IP Gateway: IFTTT
- protocols: MQTT.SMTP
- Client IDE: Android Studio
Components
In this section, we will elaborate about the sensors and other components being used in this project:
In my work, the use of Grove relay is to switch on the Peltier module or the fan when the value of the temperature rises above some threshold value set. It will be triggered by the MCU.
Following are the specifications of the sensor:
- Grove Peizo Vibration Sensor - For Accident detection
You can learn more about the sensor in this wiki link.
- Grove temperature Sensor - For temperature detection and triggering cooling unit
Grove temperature sensor is an electronic grove device that is basically used to sense the temperature changes in the surrounding.
The Grove-Temperature Sensor utilizes a thermistor to identify the encompassing temperature. The resistance of a thermistor will be increment when the encompassing temperature diminishes. It's this trademark we use to compute the surrounding temperature. The recognizable scope of this sensor is -40 - 125ºc, and the precision is ±1.5ºc
- Voltage: 3.3 ~ 5v
- Max power rating at 25 ºc:300mW
- Zero power resistance: 10KΩ
- Operating temperature range:-40 to 125 ºc
- 3-Axis Accelerometer - For Head movement detection and automatic indication
The 3-axis Accelerometer grove device basically uses a MMA7660FC and Digital Output I2C. This Grove device is basically applied for sensing the changes in the data, production direction and motion recognition via an interrupt pin (INT). This module uses less power and has a lower profile capacitive MEMS sensing element.
Following are the features of the 3-axis accelerometer sensor:
- Grove compatible interface
- Axis motion/orientation sensing
- Digital Output (I2C)
- 10,000g shock survival
- RoHS/WEEE lead-free compliant
- 5V DC input
- Grove Relay - For switching the Peltier module, the Grove-Relay module is a computerized typically open switch. Through it, we can control circuit of high voltage with low voltage, say 5V on the controller. There is a pointer LED on the board, which will illuminate when the controlled terminals get shut.
- Specifications
- Operating voltage: 3.3V~5V
- Operating current:100mA
- Relay Life:100,000 Cycle
- Max switching voltage:250VAC/30VDC
- Max switching current:5A
- Grove RGB LCD Backlight - For display (Ok, IoT device doesn't look good without a display. :) )
This Grove empowers you to set the shading to whatever you like by means of the basic and compact Grove interface. It takes I2C as specialized strategy for the microcontroller. So the number of pins required for information trade and backdrop illumination control contracts from ~10 to 2, diminishing IOs for other testing errands. Moreover, Grove - LCD RGB Backlight underpins user characterized characters.
In my work, it is basically used to display the live temperature information with the green colour and once when the temperature rises above the threshold value, it changes its colour to red and starts blinking. Similarly, it displays the state of the rider. In case the rider meets with an accident, it changes its colour to red and starts blinking.
-
Specifications
- Vcc Voltage: 5V
- I/O Voltage: 3.3/5V
- Operating Current<60mA
- CGROM: 10880 bit
- CGRAM: 64*8 bit
- Colorful RGB Backlight
- Built-in English and Japanese fonts
- I2C communication, uses only two IOs
- Automatic power-on reset
-
Peltier Module
Peltier is a thermoelectric effect (TEE) device where thermal properties can be controlled using electrical signal.
- Basically, there are two effects - they are:
- Peltier effect
- Seebeck effect
TE coolers, TE heaters and heat pumpers are all the devices that work on TEE and all these devices are referred to as the Peltier Effect. Peltier device is not a heat absorber. Rather, it’s a heat driver. The heat that is driven out from the cooler side is accumulated on the hotter side of the device and it has to be debauched in one or the other way. Otherwise, the device may tend to stop working and it may tend to increase the temperature at the cooler side which is practically not feasible.[Wiki]
Heat Sink
The heat dropper has to be taken as an essential part of the pettier device for cooling purpose. All its performance distinctiveness of the Peltier module change as the utility of the heat dropper temperature. Hence, the ultimate heat droppers should have a capability of sponging in unlimited quantity of heat exclusive of increasing the device temperature. In general, we need to consider a heat dropper that can soak up the entire residual heat of the device and help in not increasing the temperature above the acceptable point. Hence in practice, we can use a heat dropper that can increase the temperature of the device in the series of 5 to 15 ºC higher than the bearable temperature that is sensible.
- Operating Voltage: Utmost 13.5V
- Voltage can be in both the directions. The only change is that the face that will rise in temperature or cool in temperature.
- Rating: Utmost 4.4 amps
- Power: Utmost 36 watts
- Temperature change: Utmost 59ºC at the normal temperature of 30ºC and with no stack.
- Number of p-n junctions: 127
- Footprint: 4 cm x 4 cm
- Thickness: 4mm
- Weight: 28 grams
- Module Factory Number: TEC1-12704
- The ground of the Peltier module is connected to one contact of the relay. When the temperature sensor reaches the threshold value set say 30ºC, then the sensor will trigger the MCU to supply power to the grove relay switch and hence completing the circuit and allowing the base current to flow and hence switching the Peltier module to start cooling inside the helmet and hence providing the comfortable temperature for the rider.
Design
Block Diagram
- Intel Edison will be connected with a pelting module through transistor as a switch.
- Peter is a temperature cooling solution that is driven by a 12v power supply. The supply will be given by a 12v battery pack. The ground of the poultice will be connected to one of the input of the grove relay. When the MCU provides supply to the relay and triggers it. This will activate pettier and trigger cooling.
- MCU will keep monitoring temperature through Grove temperature measurement sensor. When the inside temperature is high, the poultice will be activated using the method mentioned in step2.
- MCU will be integrated with Cloud through MQTT IoT gateway. Rider’s mobility will be integrated with the cloud using MQTT gateway. The mobile will keep on tracking the GPS data which will be sent back to Google cloud to obtain Civic Address for the latitude, longitude GPS data.
- MCU will keep tracking of the impact through Grove vibration sensor. In case of an accident, the sensor will generate a signal which will trigger a notification.GPS civic address with this notification will be pushed to the cloud. This can then mitigate the notification to Facebook/Twitter or any other channel through IFTTT gateway.
- Accelerometer will monitor the movement of the head. When the rider is looking at right/left for a long time, in helmet indicator can be triggered.
Circuit Schematic
Sequence Diagram
Algorithm
Actor Edison
participant Vibration
loop
(Till Ride Completes)
Vibration -> Edison: Vibration Value
participant MqTT
Activate MqTT
alt Vibration Value gt 1000
Edison -> LCD : RED
Edison -> Buzzer : ON
Edison -> MqTT: Accident Message
else Normal
Edison -> Edison: Keep Monitoring
end
Deactivate MqTT
Accelerometer -> Edison : (x,y,z)
alt x gt +5
Edison -> Buzzer : ON
Edison -> LeftIndicator: ON
else
alt x lt -5
Edison -> RightIndicator: ON
Edison -> Buzzer : ON
Else Edison->RightIndicator: OFF
Edison -> Buzzer : OFF
end
Edison -> LeftIndicator : OFF
Edison -> Buzzer : OFF
end
TemperatureSensor -> Edison : Temparature
alt Temperature gt 40
Edison -> LCD : RED
Edison -> Relay_Peltier: ON
Edison -> Buzzer : ON
else Normal
Edison -> LCD : GREEN
Edison -> Relay_Peltier: OFF
Edison -> Buzzer: OFF
end
Edison -> LCD : Display Temperature
end
Using the Code
Having understood the entire concept of design and the components, it is finally time to code our Intel Edison board. Recall that we need to develop code for:
- Accident Detection Using Vibration Sensor
- Generate a Gmail Notification on Accident
- Detect Left and Right Movement of the Head using Accelerometer
- Trigger Left and Right Indicator using based on the accelerometer data
- Measure temperature
- Swicth on the Peltier when temperature crosses threshold
- Turn off Peltier when temperature comes to normalcy
- Display the data in LCD
- Trigger a buzzer for certain interval upon an even occurrence
Let us first look at the entire code which is divided into segments:
var digitalAccelerometer = require('jsupm_mma7660');
var myDigitalAccelerometer = new digitalAccelerometer.MMA7660(
digitalAccelerometer.MMA7660_I2C_BUS,
digitalAccelerometer.MMA7660_DEFAULT_I2C_ADDR);
myDigitalAccelerometer.setModeStandby();
myDigitalAccelerometer.setSampleRate(digitalAccelerometer.MMA7660.AUTOSLEEP_64);
myDigitalAccelerometer.setModeActive();
var x, y, z;
x = digitalAccelerometer.new_intp();
y = digitalAccelerometer.new_intp();
z = digitalAccelerometer.new_intp();
var ax, ay, az;
ax = digitalAccelerometer.new_floatp();
ay = digitalAccelerometer.new_floatp();
az = digitalAccelerometer.new_floatp();
var outputStr;
var myInterval = setInterval(function()
{
myDigitalAccelerometer.getRawValues(x, y, z);
outputStr = "Raw values: x = " + digitalAccelerometer.intp_value(x) +
" y = " + digitalAccelerometer.intp_value(y) +
" z = " + digitalAccelerometer.intp_value(z);
var X= digitalAccelerometer.intp_value(x);
if(X<0)
{
if(Math.abs(X)>5)
{
buzzPin.write(1);
console.log("LEFT.................");
lPin.write(1);
rPin.write(0);
}
else
{
buzzPin.write(0);
lPin.write(0);
}
}
if(X>0)
{
if(X>5)
{
rPin.write(1);
lPin.write(0);
buzzPin.write(1);
console.log("RIGHT..........");
}
else
{
rPin.write(0);
buzzPin.write(0);
}
}
}, 500);
function roundNum(num, decimalPlaces)
{
var extraNum = (1 / (Math.pow(10, decimalPlaces) * 1000));
return (Math.round((num + extraNum)
* (Math.pow(10, decimalPlaces))) / Math.pow(10, decimalPlaces));
}
var mraa=require('mraa');
var nodemailer = require('nodemailer');
var smtpConfig = {
host: 'smtp.gmail.com',
port: 465,
secure: true,
auth: {
user: 'yourmailId@gmail.com',
pass: 'your_gamil_password'
}
};
var transporter = nodemailer.createTransport(smtpConfig);
var mailOptions = {
from: '"Your Name"<yournames@gmail.com>',
to: 'receiver1smail@gmail.com','receiver2smail@gmail.com'
subject: 'Helmet Project Accident Notification',
text: 'Accident Happened ',
html: '<b>Accident </b>'
};
var vibSensor=new mraa.Aio(1);
var tempPin = new mraa.Aio(0);
var buzzPin=new mraa.Gpio(7);
buzzPin.dir(mraa.DIR_OUT);
var fanPin=new mraa.Gpio(6);
fanPin.dir(mraa.DIR_OUT);
var lPin=new mraa.Gpio(4);
var rPin=new mraa.Gpio(2);
rPin.dir(mraa.DIR_OUT);
lPin.dir(mraa.DIR_OUT);
fanPin.write(0);
var at=0;
var mqtt = require('mqtt');
var client = mqtt.connect('mqtt://iot.eclipse.org');
var LCD = require('jsupm_i2clcd');
var myLCD = new LCD.Jhd1313m1(6, 0x3E, 0x62);
var B=3975;
Loop();
var avgTemp=0;
var n=1;
function Loop()
{
var tempValue=tempPin.read();
var resistance=(1023.0-tempValue)*10000.0/tempValue;
var temperature=1/(Math.log(resistance/10000.0)/B+1/298.15)-273.15;
temperature=Math.floor((temperature )* 100) / 100;
avgTemp=avgTemp+temperature;
n=n+1;
var vibVal=vibSensor.read();
if(vibVal>800 )
{
console.log("\n==========\nAccident Trigger: "+vibVal+"\n==========\n");
myLCD.setColor(255,0,0);
myLCD.setCursor(1,0);
myLCD.write("Accident");
buzzPin.write(1);
at=10;
client.publish('rupam/Accident', 'Accident Happened....');
transporter.sendMail(mailOptions, function(error, info){
if(error){
return console.log(error);
}
console.log('Message sent: ' + info.response);
});
myLCD.setColor(0,255,0);
}
if(n>=10)
{
myLCD.clear();
myLCD.setCursor(0,0);
myLCD.write("Temp: ");
if(at==0)
{
buzzPin.write(0);
myLCD.setColor(0,255,0);
}
else
{
if(at>0)
{
myLCD.setColor(255,0,0);
at--;
}
}
myLCD.setCursor(0,6);
avgTemp=avgTemp/n;
avgTemp=Math.floor((avgTemp )* 100) / 100;
myLCD.write(""+avgTemp);
myLCD.setCursor(1,0);
if(avgTemp>=30)
{
at=10;
fanPin.write(1);
myLCD.setCursor(1,0);
myLCD.setColor(255,0,0);
myLCD.write("HOT");
}
else
{
fanPin.write(0);
myLCD.setColor(0,255,0);
myLCD.setCursor(1,0);
myLCD.write("Normal");
}
n=1;
console.log("Temperature="+avgTemp+" 'C");
avgTemp=0;
}
setTimeout(Loop,1000);
}
Results
Vibration Sensor
Temperature Sensor
LED Indication for Temperature
| |
Hot
| Normal
|
Accelerometer Based Indicator Trigger
| |
Left Indicator
| Right Indicator
|
Co-Author Wearing the Smart Helmet
Conclusion
This is our effort towards creating better and smarter helmets that are connected to cloud. The helmet can be improved with better battery and power unit design to make it more sleek. We can add a GPS sensor or can use an Android companion app to collect corrent GPS address to notify the relative about an accident scenario along with the exact address of the accident. We plan to continue to develop this project. Do let us know about your thoughts and valuable suggestions.
History
- 7th August, 2016: Initial version