cane walker project researchnrgalassi.org/eece490b/eece490b spring 2019 class... · initializing...
TRANSCRIPT
Cane Walker Project Research
By: Diana Garcia
5/22/19
Abstract: An estimated of 6 in 10 people
are at risk of wandering due to confusion
and disorientation because of early
Alzheimer’s. Wandering for older adults
is really dangerous and hard to detect
those who have it especially when they are
active. It is easy for them to become
confused and lost which can lead to
dangerous consequences such as injuries
or death from harsh weather conditions
that they may not be aware of. The reason
why I wanted my project to take
wandering Alzheimer’s into consideration
is because my Grandpa has it and I
wanted to create a project that would
help him as well as others who are
affected by this behavior.
I. Introduction
People who have a problem with memory
loss are at risk for wandering even if they
are the early stages of dementia. They can
become confused and disoriented for some
period in time. One of the main symptoms
my Grandpa suffered from was forgetting
how to get back home after leaving my
uncle's house to go on one of his daily
walks. He had been very familiar with the
area before until this day he forgot how to.
Luckily he remembered a phone number
without realizing it was my uncles and the
local store helped, by contacting him and
telling him the situation that had happened.
This leads to my project.
A. Electron Particle Board
The Electron is a small kit that will create a
3G cellular connection amongst other
products that you may use in your projects.
The specifications of the Electron is that it
has 36 pins with 28 being GPIO (D0 -D13,
A0-A13), a transmitter/receiver, 2 grounds,
Vin, Vbattery,WKP, 3V3, and a RST. It is a
small board with dimensions of 2.0”x
0.8”x0.3”. It has a cellular radio with mine
being a 3G for America and Australia. The
main processor consists of an STM32F205
ARM Cortex M3 microcontroller and a
1MB Flash with 128K RAM. I will be using
the Device Cloud which includes 3MB of
cellular data per month.
The Device Cloud allows us to manage our
device, use over the air firmware, manage
connectivity, develop tools, and use
integrations.
II. Project
The goal of my project was to use an
Electron Particle board and connect it to a
cane or walker depending on what the user
prefers. The board would be able to obtain
the location of the user as well as monitoring
the person's blood pressure and heart rate.
The goal was to collect data such as, the
person's blood pressure in beats per minute,
and collect the coordinates of the person's
location. Once the data has been collected
the main focus was to send this data
collected and send it to a loved ones phone
to let them know of their whereabouts and
health without letting the user feel like they
can not continue on with their routine. The
devices I was currently using for my project
was the Electron Particle Board, a pulse
sensor, and an arduino board. In this paper I
will talk about the data that I have collected
and what I would do differently in order to
have a better outcome.
III. Experiment
A. GPS Locator
I began my experiment my first registering
my Electron Particle board. The reason why
I chose this particular board was because it
would allow me to create a 3G
cellular-connection between the phone and
the board itself. This board also comes with
a particle SIM card that will provide a
service in worldwide countries. The Electron
Particle board will be able to connect with
the device cloud which is a tool that will
help us to build, connect, and manage our
device through code. Once the device was
installed and updated I continued to do some
more research on the board to get a better
understanding of what I was working with.
With the Electron Particle board, the gps
locator would be set up along with sending
SMS messaging to the phone. I began by
initializing the GPS locator using google
maps that was associated with Particle.
The above code calls our google maps to be
able to track the location of the Particle
board. The Serial.begin(9600) is the 9600
bits per second which is set in default for the
Electron Particle board.
This next line of code allows the location to
be returned to be handled by the
locationCallback() by passing it through. It
will publish the location to the Cloud every
30 seconds. The locationCallback() in the
next line will handle the location data that is
being returned for the device by passing
three different arguments that we see above
as latitude, longitude, and the accuracy of
the location.
We create a loop in order to get updated
results on the locator every 30 seconds.
When we compile the code and run it our
next step is to create an integration through
the console.particle.io by clicking the
integration tab. Once it is clicked we will be
given four options. The one I chose is
Google maps since we want our gps locator
to work. Once we choose Google Maps we
need to retrieve an API key through Google
Maps JavaScript that we can add to our
Electron Particle board. The API key is used
for us to track our API requests that is
associated with this project which in our
case is locating the location. Once we type
in our API key, I just needed to choose the
device I wanted to run and shown below.
Once we save our Integration, we run the
code with the chosen integration being
applied and we get the following output.
Our location came out in the form of
coordinates as shown below.
If I type the coordinates in Google Maps, I
get this location shown below
Which is the location of where I live Shasta
Glen Apartments.
The image below is how the board is setup
in order to obtain the location:
We have our antenna connected to our
Electron board and instead of using a USB
connected to a laptop as battery source, I
used the battery connected directly to the
board.
B. SMS Messaging
My next step was to enable texting messages
that will send the data collected to a reliable
person who will be taking care of the
person. In order to do this, I first had to
create a twilio account in which this account
allows me to send messages and make calls
to verified numbers by providing me with a
trial number, and account SID, and an auth
token. We need these three items in order to
receive messages through the Electron
Particle board. In order to test it out, I used
the following code.
The first line of code is the message we will
receive on our phone when we run and
compile our code. The void setup() is where
it all happens. Particle.publish() will publish
the event that we want through our Particle
Device Cloud. It will forward to the
registered messenger. This feature allows
the device to generate the event based on our
condition. In our case we want to send a
message from the Electron Particle board to
the phone. The structure of Particle.publish()
is Particle.publish(string eventName, string
data, publish flags). The string eventName is
the name of our integration. To get a better
picture we will look at the image below.
Along with the URL we use to connect to
twilio. Now the trial number we get from
Twilio will be the one we register our
Electron Particle. We must go to advanced
settings and add not just the trial number but
the number we want to receive messages
from. It will look like the following where
“To” is my phone number and “From” is the
Twilio trial number. The image below
shows our username which is our given SID
number and our password being our auth
token. This directly connects our Twilio
phone number connected to the Electron
Particle board and allows us to send
messages from Twilio to the phone. When
we run and compile the code we get the
following output in the console.
It lets us know that that the compilation was
a success and the message has been sent in
the following form of a text message. It lets
us know that our Twilio account sent the
message. The text message says “Cane
Walker Support Message”. I used this to test
the project name on the phone.
C. Pulse Sensor
Our next step is to use the pulse sensor in
order to detect the heart-rate for the Arduino
My goal was to use the Electron Particle
board to get the heart-rate but due to
technical difficulties I moved onto the
Arduino board. The Pulse sensor is an
integrated optical amplifying circuit and
eliminates noise through the circuit sensor.
We will connect the pulse sensor directly to
the Arduino board as shown below:
We have the brown wire connected to
ground, black wire connected to 5V, and the
white wire connected to A0 which is our
sensor.
When we run the following code, we get the
following output in values of beats per
minute. I collected the data from beats per
minute and plugged into excel and got the
following output.
# BPM
1 238
2 194
3 181
4 143
5 149
6 155
7 162
8 170
9 178
10 187
11 198
12 209
13 222
14 236
15 236
16 237
17 237
18 237
19 237
20 237
21 237
22 237
23 237
24 238
25 238
26 238
I connected the pulse sensor to my wrist in
order to collect the data above. I collected
238 points but only showed a little bit
above. When I plugged the values in excel, I
got the following graph.
Our x-axis is the # of values that we
collected and the y-axis is the number of
beats per minute. If I use the Arduino Plotter
I get the following output:
IV. What Did Not Work
I was able to get each one of my main parts
to work individually, but my biggest
challenge was getting them to work all
together as one. I did my best to first copy
the code I previously had for Google maps
and continue to add onto to it with the
second piece of code being retrieving the
coordinates and sending a text message
using my Twilio account. I was able to get
the code to work and compile but when I
created the integration, I was getting errors.
I was reading an article that had said that
using the Particle AssetTracker was better
than using the Electron Particle board when
using Google Maps. It would be able to
directly send messages directly to your
phone. It was something that I considered
switching the board but due to my financial
situation, I was not able to. I had a goal of
having the Electron Particle coordinates and
having them being opened directly onto
Google Maps but I was having trouble
having it open up so I kept it by just using
the coordinates.
V. Conclusion
Even though I had many complications and
it was a challenge, I did get a lot out of it. As
I still continued to do more research to get
out of it, I found ways in which I can
improve to one day make this project work.
I plan to continue working on this project
over the summer and hope that many people
will be able to use it one day and feel great
about it.
Sources
● https://docs.particle.io/tutorials/int
egrations/google-maps/
● https://www.twilio.com/docs/sms/t
utorials/how-to-send-sms-messages
-particle-electron
● https://docs.particle.io/datasheets/c
ellular/electron-datasheet/
● https://www.sparkfun.com/produc
ts/11574