There has been a 13% increase in the Thai aging population in the past half-century. This increase is still growing rapidly and will reach 20% within the next 3 years. Population aging is already becoming a tremendous issue in terms of living arrangements and health care. Moreover normally Thai families will not let their parents to stay at the nursing home but at home instead. However, parents will stay alone on day time because the rest have to go to work. And there is still a lack of long-term geriatric nursing methodologies. So it's important to provide the suitable technology for elderly people when living alone on day time.
SAENSUK is small city (Chonburi, THAILAND) which is a one the top tourist destination and, also there are a number of nursing homes. The city vision is to be the Healthy City within 2020. So the first pilot to prove smart city concept, we have selected only subset of the smart city solutions which is “Smart Healthcare with Elderly houses”.
We then designed a low-power wireless device based on CC1110 Bluetooth LE from Texas Instrument, called the blueBLE Tag. It is simply used for the elderly people staying alone at home by just pressing it whenever there are some emergency occurred or help needs. The SMS Gateway powered by LinkIt ONE will always monitor the elderly and will send the sms message to his/her family immediately as shown in figure below.
- Press-to-SMS
- Out-of-area Alert
- SMS Gateway LinkIt ONE Setup via Config file
- blueBLE iBeacon Configuration using BAESLab's Android SDK
Specifications:
- High-Performance CC1110 TI SoC with Low-Power 8051 Microcontroller Core
- In-System-Programmable Flash, 256 KB
- 8-KB SRAM
- Frequency: 2.4GHz
- Modulation: GFSK, Bluetooth Low Power, V4.0
- Input Voltage: +3.3 DC
- Operating temperature: -10 ℃ ~ +65 ℃
- Battery and Temperature Sensor build-in.
3.1 What does blueBLE SDK provide?:
This library allows for easy access to a Bluetooth LE devices. It also offers:
- A simple running average RSSI reading.
- iBeacon: Get manufacturer data [Raw Data]
- iBeacon: Distance indicators (Near, Far, Immediate, Unknown).
- iBeacon: Config UUID, Major, Minor, Name and data (buffer 200 bytes)
This will only work on devices with Android 4.3 (API Level 18) and above.
3.2 How to import lib aar to Android Studio:
1. Download blueBLE SDK from the github
2. Copy file blueBLE.aar to your /app/libs
3. Open Project Structure [File --> Project Structure]
4. Push "+" on top left of window
5. Select Import .JAR or .AAR Package
6. Browse file .aar --> OK
3.3 How to use the blueBLE Android App:
It's simply easy to apply the LinkIt ONE board as sms gateway. So we just design the housing case for it for easily installation at a home.
4.2 SMS Gateway Assembly
From the photo below, we just add two LEDs connected to Pin 12 (LED_POWER) and Pin 13 (LED_SIGNAL). The rest are the battery and all antenna cables.
After assembled, it look like this as photo below. The user can easily install it at any places in the home via the two hanging arms.
5.1 Gateway configuration file
Before using the sms gateway, the user have to connect the LinkIt ONE board via USB to the computer by changing the DIP switch to "Mass Storage Bootup" and then press the reset button.
The user will find the mounted drive of LinkIt ONE board and after that create the config file named "Config.txt
" into the same default directory as shown below.
There are two parameters i.e.; time_interval
and phone_number
. First parameter is the value of timeout for starting sending the sms message when the out-of-area is detected.
And the second one is the lists of phone numbers (using the comma ",
" to separate the phone number) receiving the sms message sent from the SMS Gateway LinkIt ONE. After saving the config file, the user have to change the DIP switch back to "Normal Bootup" and reset the board.
5.2 Press-To-SMS Application
...
void loop() {
int devices = gateway.scanBLE();
if( devices > 0){
numberOfButtonsPressed = gateway.buttonsPressed(devices);
if( numberOfButtonsPressed > 0){
Serial.println("+++++++++++ Alert ++++++++++++");
smsFlag = true;
}
}
if(gateway.isSIM()){
if(smsFlag){
if(timeOut == 0){
if(gateway.sendSMS(numberOfButtonsPressed, "Help Me.")){
Serial.println("Send SMS complete.");
}
}
digitalWrite(LED_SIGNAL, !digitalRead(LED_SIGNAL)); //Toggle LED
timeOut++;
if(timeOut >= SMS_TIMEOUT){ // Time out sent SMS 30 second.
smsFlag = false;
timeOut = 0;
}
}
}
}
5.3 Out-Of-Area Application
...
void loop() {
int member = gateway.scanBLE();
if(!gateway.isLoss(member, RSSI_SIGNAL)){
Serial.println("+++++++++++ Alert ++++++++++++");
smsFlag = true;
}
if(gateway.isSIM()){
if(smsFlag){
if(timeOut == 0){
if(gateway.sendSMS("Out Of Area.")){
Serial.println("Send SMS complete.");
}
}
digitalWrite(LED_SIGNAL, !digitalRead(LED_SIGNAL)); //Toggle LED
timeOut++;
if(timeOut >= SMS_TIMEOUT){ // Time out sent SMS 30 second.
smsFlag = false;
timeOut = 0;
}
}
}
}
ACKNOWLEDGMENT
This small work is one of big project of IoT Thailand Smart City organised by the collaboration of TRF, NIA, CAT and TESA. We would like to express our gratitude to Saensuk Municipality and Embedded Systems Laboratory, Electrical Engineering Department, Faculty of Engineering, Burapha University for HealthCare Research and Development supports. Moreover our completion of this work could not have been accomplished without the support of MediaTek, Seeedstudio, BAESLab engineer team and SE-EDUCATION (PLC) Ltd.
Comments