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
Incoming Data
Video
Hardware Used
- Mbed LPC 1768
- uLCD-144-G2
- Adafruit Bluefruit LE
- LSM9DS1-IMU
- TMP36 Temperature Sensor
- Adafruit ESP8266 Huzzah Wifi Module
- microSD Card Reader
- Maxim MAX30102 Heart Rate Sensor
- RGB LED
Pin Connections for Schematic
Two Mbed's were used in this project, so some pin numbers are repeated below.
uLCD-144-G2
mbed | uLCD |
---|---|
VU | +5V |
gnd | gnd |
p9 | TX |
p10 | RX |
p11 | Res |
Bluefruit LE
mbed | Bluefruit |
---|---|
VU | Vin |
gnd | gnd |
p27 | TXO |
p28 | RXI |
nc | RTS |
nc | CTS |
LSM9DS1-IMU
mbed | LSM9DS1 |
---|---|
Vout | VDD |
gnd | gnd |
p9 | SDA |
p10 | SCL |
TMP36
mbed | TMP36 |
---|---|
Vout | VS |
gnd | gnd |
p15 | Vout |
ESP8266 Wifi Module
mbed | ESP8266 | Ext. 5V DC |
---|---|---|
V+ | 5V DC | |
gnd | gnd | gnd |
p13 | RX | |
p14 | TX |
mircroSD Card Reader
mbed | microSD |
---|---|
Vout | V+ |
gnd | gnd |
MAX30102 Heart Rate Sensor
mbed | MAX30102 |
---|---|
Vout | Vin |
gnd | gnd |
p26 | int |
p27 | SCL |
p28 | SDA |
RGB LED
mbed | RGB |
---|---|
p23 | Red |
gnd | gnd |
p22 | Green |
p21 | Blue |
Please log in to post comments.