Smart Watch HR

Group Members

Michael Brzozowski
Christopher Hough
Micah Terrell
Dong Ho Choi


Project Overview

The goal of this project was to create a concept for a smart gadget watch device using the Mbed LPC 1768. Several pages were created to provide the wearer with useful data and functionality. These pages include:

  • A compass page for directional data
  • A temperature page for basic climate information
  • A heart rate page providing the user's heart rate
  • A voice recording page for notes
  • A media page to playback stored audio files such as music or voice notes.

Bluetooth functionality was included through the Adafruit Bluefruit LE chip in order to control the gadget watch from a compatible device. Bluetooth is used to both change the page being viewed on the screen, as well as navigate within pages requiring interactions with the wearer. Future work would be to add gesture control to control the page viewed on the screen.

In addition to the local data and displays, temperature and heart rate data was pushed to the cloud through AWS using a wifi module as detailed below.


Cloud Integration

The mbed interfaces with an ESP8266 wifi module to connect to the internet. By establishing a connection to the internet, HTTP can be used to send data to a remote server. The server is hosted by an AWS EC2 instance, which can constantly be running in the cloud. The EC2 can be set up in the AWS dashboard, where you must specify the proper ports to open, our project ran over TCP on port 8080. Once an instance is created, a private RSA key named [my-key-pair].pem.txt is granted.

chmod 400 /path/my-key-pair.pem

This will configure the permissions of the key file.

ssh -i /path/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com

This will ssh to the ec2 instance. Files can be transferred to the instance and the server can simply be ran in the terminal window.

The server requires the installation of boto3, AWS4Auth, and elasticsearch on the linux instance. The server parses data from the parameter string in the received url, and packs it into a json format, which can then be inserted as the body of an elasticsearch document to be delivered to an elasticsearch index.

The index is setup by running the command in insert-es.txt from a command line. This command can be modified to include all of the fields, data types, index name, and elasticsearch endpoint to target.

Once setup, the server can run, receive incoming data, timestamp it, and send it to elasticsearch.

With elasticsearch populated, Kibana, a data visualization tool part of the "ELK stack”, the various tools that support elasticsearch, can be used to display the data. Elasticsearch uses a GUI to abstract away the modifications to the json queries used to query and aggregate data with elasticsearch. Paired with a standalone web app, Kibana could be used to test queries using a GUI for desired results. The resulting json query can then be exported to the users own script.

Kibana allows various forms of data aggregation such as average, min, max, etc. over a customizable set of date ranges and aggregation sub buckets. The graphs will auto-refresh at a customizable interval to display live data.

Images

Kirbana Dashboard /media/uploads/chough95/screen_shot_2018-12-13_at_2.38.47_am.png

Incoming Data

/media/uploads/chough95/screen_shot_2018-12-13_at_2.39.03_am.png


Video


Hardware Used


Pin Connections for Schematic

Two Mbed's were used in this project, so some pin numbers are repeated below.

uLCD-144-G2

mbeduLCD
VU+5V
gndgnd
p9TX
p10RX
p11Res

Bluefruit LE

mbedBluefruit
VUVin
gndgnd
p27TXO
p28RXI
ncRTS
ncCTS

LSM9DS1-IMU

mbedLSM9DS1
VoutVDD
gndgnd
p9SDA
p10SCL

TMP36

mbedTMP36
VoutVS
gndgnd
p15Vout

ESP8266 Wifi Module

mbedESP8266Ext. 5V DC
V+5V DC
gndgndgnd
p13RX
p14TX

mircroSD Card Reader

mbedmicroSD
VoutV+
gndgnd

MAX30102 Heart Rate Sensor

mbedMAX30102
VoutVin
gndgnd
p26int
p27SCL
p28SDA

RGB LED

mbedRGB
p23Red
gndgnd
p22Green
p21Blue


Please log in to post comments.