ถุงมืออัจฉริยะสำหรับผู้พิการทางสายตา
ทีมาและความสำคัญ
ไม้เท้า เป็น มิตรคู่มือ สื่อคู่เท้า สำหรับคนตาบอด ซึ่งถ้าท่านพบเห็นคนถือไม้เท้า ก็คือเป็นสัญลักษณ์
ที่บ่งบอกว่า เราคือคนตาบอด การใช้ไม้เท้าขาวของคนตาบอดนั้น จะต้องได้รับการฝึกฝน จนกระทั่งคนตาบอดสามารถใช้ อย่างเกิดทักษะ แล้วก็มีอิสระ แล้วก็มีความกล้าที่จะใช้ จากประสบการณ์ที่ผ่านมาพบว่า คนตาบอด
บางคน ไม่กล้าที่จะถือไม้เท้า แล้วก็ผู้ปกครองบางคน มีความรู้สึกลำบากใจ ที่จะให้บุตรหลานถือไม้เท้า ไม้เท้าขาว เป็นสัญลักษณ์ที่ผู้อื่นพบเห็นแล้วจะเข้าใจ แล้วก็จะสามารถช่วยเหลือได้ แต่จากการศึกษาพบว่าแม้แต่ในเมืองใหญ่
ที่มีความเจริญและความพร้อมด้านเทคโนโลยี ระบบการคมนาคมขนส่ง และระบบการสาธารณูปโภคที่ครบครันเพียงใดก็ตาม ก็ยังขาดอุปกรณ์ช่วยเหลือและอำนวยความสะดวกแก่คนพิการทางสายตา ที่เพียงพอและทั่วถึง
คณะผู้จัดทำจึงมีแนวคิดที่จะออกแบบถุงมืออัจฉริยะสำหรับผู้พิการทางสายตาด้วยเปลี่ยนจาก
การใช้ไม้เท้ามาเป็นถุงมือที่สามารถบอกได้ล่วงหน้าว่ามีวัตถุและนำเทคโนโลยีระบบสมองกลฝังตัว
ความก้าวหน้าของสมาร์ทโฟน ระบบทำทาง (GPS) นำเซนเซอร์อินฟราเรด แล้วนำมาเขียนโปรแกรมควบคุมการทำงานผ่านบอร์ด WeMos D1 มีการนำเอา Servo Motor มาเพื่อให้รับรู้ว่ามีวัตถุอยู่ด้านหน้า
ซึ่งจะช่วยอำนวยความสะดวกและรักษาความปลอดภัยได้เป็นอย่างดี
วัตถุประสงค์
เพื่อออกแบบและสร้างอุปกรณ์อำนวยความสะดวกแก่ผู้พิการตาทางสายตา
วัสดุอุปกรณ์
1. WeMos D1
2. Infrared sensors
3. GPS Module
4. GMS/GPRS Module
5. Switch on/off
6. Servo Motor
7. สายแพร์
8. ถ่าน 9v
9. ถุงมือ
ผังโครงสร้าง
หลักการทำงาน
หลักการทำงานของถุงมืออัจฉริยะสำหรับผู้พิการทางสายตาคณะผู้จัดทำได้นำอุปกรณ์ WeMos D1 เป็นอุปกรณ์ควบคุมการทำงานจากการเขียนโปแกรมภาษา C เพื่อสั่งการให้อุปกรณ์ทำงานตามเงื่อนไขที่กำหนดมีดังต่อไปนี้
3.1 เริ่มต้นการทำงานเซ็นเซอร์ทุกตัวเริ่มการตรวจเช็คคำสั่งที่กำหนด และ จีพีเอส (GPS) เริ่มระบุตำแหน่ของอุปกรณ์
3.2 เมื่อ Infrared sensors มีการตรวจพบสิ่งกีดขวางในระยะทาง น้อยกว่าหรือเท่ากับ 120 เซนติเมตร เซ็นเซอร์จะส่งข้อมูลไปที่ WeMos D1 จากนั้น WeMos D1 จะสั่งงานไปยัง
Servo Motor ให้ทำงาน
3.3 เช็คตำแหน่องของอุปกรณ์ได้ด้วยดูผ่าน APP INVENTOR ในสมาร์ทโฟน
CODE คำสั่งการทำงาน
#include <Servo.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
#include <ESP8266WiFi.h>
#include <MicroGear.h>
const char* ssid = “COM3”;
const char* password = “123456789”;
#define APPID “gps”
#define KEY “54qHudYtXHbJSzl”
#define SECRET “rCzodAuLCnoW0Mkq9Br6JOF6U”
#define ALIAS “esp8266”
TinyGPS gps;
SoftwareSerial ss(15, 13);
Servo myservo;
int ledPin = 13; //LED anode connected to digital pin 13
int inputPin = 5; //infrared proximity switch connected to digital pin 2
int val = 0; //this variable will read the value from the sensor
int pos = 0;
int roundmax = 30;
int qround = 0;
WiFiClient client;
int timer = 0;
MicroGear microgear(client);
static void smartdelay(unsigned long ms);
static String Get_Location();
void onMsghandler(char *topic, uint8_t* msg, unsigned int msglen) {
Serial.print(“Incoming message –> “);
msg[msglen] = ‘\0’;
Serial.println((char *)msg);
}
void onFoundgear(char *attribute, uint8_t* msg, unsigned int msglen) {
Serial.print(“Found new member –> “);
for (int i = 0; i < msglen; i++)
Serial.print((char)msg[i]);
Serial.println();
}
void onLostgear(char *attribute, uint8_t* msg, unsigned int msglen) {
Serial.print(“Lost member –> “);
for (int i = 0; i < msglen; i++)
Serial.print((char)msg[i]);
Serial.println();
}
/* When a microgear is connected, do this */
void onConnected(char *attribute, uint8_t* msg, unsigned int msglen) {
Serial.println(“Connected to NETPIE…”);
/* Set the alias of this microgear ALIAS */
microgear.setAlias(ALIAS);
microgear.subscribe(“/location”);
}
//*****************************************************************
//*****************************************************************
//*****************************************************************
//*****************************************************************
void setup()
{
Serial.begin(115200);
Serial.print(“Testing TinyGPS library v. “); Serial.println(TinyGPS::library_version());
ss.begin(9600);
myservo.attach(0); // ต่อ Servo กับ Digital Pin 0
pinMode(ledPin, OUTPUT); //declare LED as output
pinMode(inputPin, INPUT); //declare infrared sensor as input
microgear.on(PRESENT, onFoundgear);
/* Call onLostgear() when some gear goes offline */
microgear.on(ABSENT, onLostgear);
/* Call onConnected() when NETPIE connection is established */
microgear.on(CONNECTED, onConnected);
Serial.begin(115200);
Serial.println(“Starting…”);
/* Initial WIFI, this is just a basic method to configure WIFI on ESP8266. */
/* You may want to use other method that is more complicated, but provide better user experience */
if (WiFi.begin(ssid, password)) {
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}
}
Serial.println(“WiFi connected”);
Serial.println(“IP address: “);
Serial.println(WiFi.localIP());
/* Initial with KEY, SECRET and also set the ALIAS here */
microgear.init(KEY, SECRET, ALIAS);
/* connect to NETPIE to a specific APPID */
microgear.connect(APPID);
}
void loop()
{
val = digitalRead(inputPin); // read input value
if (val == HIGH) //check if the input is HIGH
{
digitalWrite(ledPin, LOW); //LED is off
Serial.println(val);
myservo.detach();
}
else
{
digitalWrite(ledPin, HIGH); //LED is turned on
Serial.println(val);
myservo.attach(0);
for (pos = 0; pos <= 90; pos += 1) // ค่อยๆเพิ่มองศาการหมุน จาก 0 ถึง 180 เพิ่มขึ้นที่ละ 1 องศาในเวลา 0.015 วินาที
{
myservo.write(pos); // คำสั่งองศาการหมุน
delay(2);
}
for (pos = 90; pos >= 0; pos -= 1) // ถ้าองศาถึง 180 แล้ว ให้ลดทีละ 1 องศาจนถึง 0 แล้ววนไปเรื่อยๆ
{
myservo.write(pos);
delay(2);
}
myservo.detach();
}
if (qround == roundmax) {
qround = 0;
}
if (qround == 0) {
String locate;
smartdelay(1000);
locate = Get_Location();
if(locate==”NULL”){
locate = locate +”|” + String(micros());
Serial.println(locate);
}else{
Serial.println(locate);
}
if (microgear.connected()) {
Serial.println(“connected”);
/* Call this method regularly otherwise the connection may be lost */
microgear.loop();
Serial.println(“Publish…”);
/* Chat with the microgear named ALIAS which is myself */
//microgear.chat(ALIAS,locate);
microgear.publish(“/location”,locate,true);
timer = 0;
}
else {
Serial.println(“connection lost, reconnect…”);
if (timer >= 5000) {
microgear.connect(APPID);
timer = 0;
}
else timer += 100;
}
delay(100);
}
qround++;
delay(50);
}
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);
}
ผลการดำเนินงาน
ผลจากการทำถุงมืออัจฉริยะสำหรับผู้พิการทางสายตาที่ควบคุมการทำงานด้วยโปรแกรมคอมพิวเตอร์ได้ตามเงื่อนไขที่กำหนด จากการทดสอบพบว่าถ้าเซนเซอร์อินฟาเรด (Infrared sensors) ที่สามารถตรวจจับวัตถุในระยะ 120 เซนติเมตร ถ้าพบวัตถุในระยะ 120 เซนติเมตร บอร์ด WeMos D1 จะสั่งงานให้ มอแตอร์สั่นทำงานแต่ถ้าระยะทางมากกว่า 120 เซนติเมตร มอเตอร์ จะไม่ทำงาน และยังสามารถเช็คดูตำแหน่งของอุปกรณ์ผ่าน c ในสมาร์ทโฟนได้
คณะผู้จัดทำโคงงาน
1. นายสัจจา ชัยนามล 2. นายศักดา ดีแสง
ครูที่ปรึกษา
1. นายคมกริช บุตรอุดม สอนวิชา คอมพิวเตอร์
2. นางสาวฐิติมา ผ่องแผ้ว สอนวิชา คอมพิวเตอร์
3. นายภีศเดช วิชัด สอนวิชา คอมพิวเตอร์
โรงเรียนศึกษาสงเคราะห์ธวัชบุรี
ที่อยู่ของโรงเรียน ตำบลนิเวศ อำเภอธวัชบุรี จังหวัดร้อยเอ็ด