โครงงาน Helmet Hero : หมวกกันน็อกช่วยชีวิต
ที่มาและความสำคัญ
ประเทศไทยมีอัตราการตายจากการบาดเจ็บทางถนนสูงเป็นที่ 2 ของโลกและอันดับ 1
ในอาเซียน สถิติอุบัติเหตุการจราจรทางบกของไทยที่เกิดกับรถจักรยานยนต์ปี พ.ศ. 2558
สูงเป็นอันดันหนึ่งคิดเป็นร้อยละ 20 ของยอดอุบัติเหตุทั้งหมด ในช่วงสงกรานต์ พ.ศ.2560
มีจักรยานยนต์ประสบอุบัติเหตุถึง 3,290 คัน คิดเป็นร้อยละ 44 ของอุบัติเหตุทั้งหมด
ซึ่งโดยส่วนใหญ่แล้วการเข้าช่วยเหลือใช้เวลานานมากเกินไปท ำให้ผู้ประสบอุบัติเหตุอาจมีอาการสาหัสหรือเสียชีวิตได้ ทั้งนี้การแจ้งเหตุและการหาพิกัดต ำแหน่งที่เกิดอุบัติเหตุยังเป็นไปอย่างล่าช้า
ดังนั้นทางผู้จัดท ำจึงเกิดแนวคิด ที่จะออกแบบและสร้างหมวกกันน็อกช่วยชีวิตด้วย
Internet of Things ระบบจะท ำการแจ้งข้อความขอความช่วยเหลือเมื่อเกิดอุบัติเหตุพร้อมทั้งระบุพิกัดต ำแหน่งได้ซึ่งจะมีอุปกรณ์ท ำการส่งเสียงและส่งข้อความขอความช่วยเหลือไปยังโทรศัพท์มือถือของญาติรวมถึงสามารถแจ้งพิกัดต ำแหน่งของผู้เกิดอุบัติเหตุ ซึ่งจะท ำให้สามารถเข้าช่วยเหลือ ณ ต ำแหน่งที่เกิดอุบัติเหตุได้อย่างทันท่วงที
วัตถุประสงค์
- เพื่อออกแบบและสร้างหมวกกันน็อกช่วยชีวิตด้วย Internet of Things ให้ทำงานตามเงื่อนไขที่กำหนด
วัสดุอุปกรณ์
1.เซนเซอร์วัดความเอียง
2.Arduino
3.Speaker
4.หลอด LED
5.GPRS/GSM Module
6.บอร์ดทดลอง
7.GPS
8.Batterry
9. สายไฟจัมเปอร์
10.Switch On-off
11.หมวกกันน็อก
ผังโครงสร้าง
หลักการทำงาน
ถ้าดินแห้งเกินไประบบจะทำการรดน้ำโดยอัตโนมัติ แต่ในช่วงเวลา 6 โมงเช้า และ 6 โมงเย็น ระบบจะเพิ่มคำสั่งเป็นรดน้ำ 15 นาที โดยมั้ยสนใจดินชื้นดินแห้ง
CODE คำสั่งการทำงาน
#include <Sim800l.h>
#include <SoftwareSerial.h> //is necesary for the library!!
Sim800l Sim800l; //to declare the library
#include <TinyGPS.h>
TinyGPS gps;
SoftwareSerial ss(4, 3);
static void smartdelay(unsigned long ms);
static String Get_Location();
String text; // to storage the text of the sms
uint8_t index; // to indicate the message to read.
int sensor1 = 0;
int sensor2 = 0;
int count = 0;
int messagesend = 0;
void setup() {
// put your setup code here, to run once:
pinMode(7, INPUT);
//pinMode(1, INPUT);
Serial.begin(115200);
pinMode(9, OUTPUT);
Serial.println(“Start”);
ss.begin(9600); // Serial Connect GPS
//Sim800l.begin(); // initializate the library.
//index=1; // first position in the prefered memory storage.
//text=Sim800l.readSms(index);
//Serial.println(text);
/* String str = Sim800l.activateBearerProfile();
Serial.println(str);
delay(5000);
text = Sim800l.gsm_location();
Serial.println(text);
Sim800l.deactivateBearerProfile();
*/
/*text = Sim800l._gsm_location();
Serial.println(text);*/
}
void loop() {
text = “Alert !\r\n”;
// text+= locate;
// text+= Sim800l.engineering_info();
String locate;
smartdelay(1000);
locate = Get_Location();
Serial.println(“Location = “+locate);
sensor1 = digitalRead(7);
//sensor2 = digitalRead(1);
Serial.print(“Sensor1 : “);
Serial.print(sensor1);
//Serial.print(” “);
//Serial.print(“Sensor2 : “);
//Serial.print(sensor2);
Serial.print(“\n”);
// delay(1000);
if(sensor1==1)
{
count = count + 1;
} else
{
count = 0;
// led off here
// ….
}
Serial.print(“Conunt : “);
Serial.print(count);
Serial.print(“\n”);
if(count>=2)
{
// led on here
// …..
Serial.print(” Alert!!!”);
Serial.print(“\n”);
tone(9, 1000);
delay(1000);
noTone(9);
delay(1000);
if(locate !=”NULL”){
//text+= “\nMaps: https://www.google.com/maps/@” + locate + “,16z”;
text+= “\nMaps: https://maps.google.com/maps?q=loc:” + locate;
if ( count % 16 == 0 or count == 2){
char buf[text.length()];
Sim800l.begin();
text.toCharArray(buf,text.length());
Serial.println(“Send SMS”);
// Sim800l.sendSms(“0611065018”,buf);
Sim800l.sendSms(“0817492153″,buf);
Sim800l.reset();
delay(1000);
ss.begin(9600);
}
}
}
}
// Function GPS Find location
static String Get_Location()
{
float flat, flon;
unsigned long age, date, time, chars = 0;
unsigned short sentences = 0, failed = 0;
static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;
String location;
int sate = 255;
sate = gps.satellites();
gps.f_get_position(&flat, &flon, &age);
if(sate < 255){
location = String(flat,6) +”,” + String(flon,6);
}else{
location = “NULL”;
}
return location;
}
static void smartdelay(unsigned long ms)
{
unsigned long start = millis();
do
{
while (ss.available())
gps.encode(ss.read());
} while (millis() – start < ms);
}
ผลของการทดสอบ
สามารถทำงานได้เงื่อนไขที่กำหนด
รูปการทำงาน
1. หาข้อมูลและศึกษาการทำงานของอุปกรณ์
2. ต่อวงจร พร้อมเขียนโปรแกรมควบคุม
3. ต่อวงจรเรียบร้อย และทำการทดสอบ
คณะผู้จัดทำโครงงาน
- นายณรงค์ศักดิ์ โวหารลึก
- นางสาวพวงผกา ผิวทอง
- นางสาวจันทกานต์ ไตรยวงค์
อาจารย์ที่ปรึกษา
-
- นายคมกริช บุตรอุดม สอนวิชา คอมพิวเตอร์
- นางสาวฐิติมา ผ่องแผ้ว สอนวิชา คอมพิวเตอร์
- นายภีศเดช วิชัด สอนวิชา คอมพิวเตอร์
โรงเรียนศึกษาสงเคราะห์ธวัชบุรี
ที่อยู่ของโรงเรียน โรงเรียนศึกษาสงเคราะห์ธวัชบุรี ต.นิเวศน์ อ.ธวัชบุรี จ.ร้อยเอ็ด