-
IoT Demo Video!
08/12/2016 at 22:30 • 0 commentsHere's a video demonstrating the Fall Detector Wearable (Particle Core, Spark Core) connected over wifi and transmitting data to various services. You can see a simulated dashboard we created titled "Patient Fall Activity Monitor," as well as my Gmail account running in an Android Emulator (Genymotion+Virtualbox).
You can see a fall reflected in all the logs when I pull the pin (As requested by a commenter, we are adding a button that can be activated in addition to autonomous fall detection). Particle's dashboard detects it and pushes this out to the Thingspeak dashboard, while also sending an alert to IFTTT which sends me an email to notify of the fall, along with some variables measured i.e. Fall Device ID, Accelerometer Trigger Value, etc...
Hope you guys enjoy it! Now that the basic code is implemented and everything is talking to eachother, we'll be tweaking the code for accuracy, doing real world testing, and developing the 3D-printed case.
If anyone can help us with any of these tasks, please feel free to comment/message us!
I pull the pin to to activate a Fall Alert at 1:20 in the video.
-
Fall Detector is talking to web services! (IFTTT, Thingspeak)
08/01/2016 at 18:08 • 0 commentsSo I've settled on building the prototype with my Photon Core from Particle.io. It has built in wifi and good support documentation, so I don't need to worry about connectivity. I have connected the 3-axis accelerometer outputs to the A1, A2, and A3 pinouts on the board (white, orange, and yellow wires). The black wire is a ground and is connected to the GND pin on the same side. I did not need to apply voltage to the accelerometer, and the Photon Core would actually blink and shut-off when I tried. I've also connected a green LED just to show it's own. The push-button to the top right will be incorporated later as an alternative alerting mechanism.
In the picture above, you can see the log from Particle.io, as well as the raw accelerometer data (accsum) being plotted on the "Patient Fall Activity Monitor" via Thingspeak. You can also see that email alerts were received within seconds of the detected fall on my Android phone!
Now that the basic code is in place to to talk to the online services, I'm going to focus on tweaking the code for fall detection. Currently, I'm just combining the raw values of the 3-accelerometers into a single variable. When that variable crosses a threshold, it activates and alerts to a potential fall.
I will be incorporating a smoothing algorithm for the accelerometer as well adding some code to self-calibrate the accelerometer intermittently.
Again, I'm self taught, so I'm learning along the way and most likely doing a few things inefficiently. Please let me know if you have suggestions or can help with any of this project!
Next steps:
1) calibration code
2) smoothing algorithm of data
3) fall detector testing
3.1) Test out some ideas for fall detection i.e. stock trading equations
4) design 3-d printed enclosure for board, accelerometer, and battery.
I'll clean up my code for the above and post that as an update soon! Very excited that it's starting to come together! :)
-
Finalizing Hardware (Again!)
07/18/2016 at 18:22 • 0 commentsSo after some trial and error, as well as a lot of deliberation among the great choices of hardware available to us, we have decided to move forward using a particle board and a well-supported ADXL355. These are both affordable and easy to manage maintain in high quantity.
Our ultimate goal is to be able to produce a final end-product that 1) Easily replicable for personal use by lay people 2) Easily administered, installed, and scaled at any clinic, hospital, or care facility.
Using Particle, we can share code in the cloud and anybody can buy a Particle board and ADXL355 accelerometer and simply flash our code.
If we have 1 or 100 patients to manage, we can easily add more devices as needed.
The small form-factor, cloud-ide, and robust support were deciding factors in our decision.
We are happy to have finalized the hardware and we'll be posting build pictures and code in the coming days and weeks!
*I'll be using a Particle Core since I picked this up years ago when they were first released as Spark Core at Makerfaire. It should be trivial to implement on the newer Particle Photons, and we even have the option of using Particle Electrons for a completely remote monitoring solution using 2g/3g with minimal code changes.
-
4/21/2016 Finalizing Hardware for First Prototype!
04/21/2016 at 22:51 • 0 commentsSo after some research, I've decided that going with an actual Arduino component (MKR1000) vs a variation (Tinyduino) will be a better solution, even if the form factor is a little larger (this is the first prototype!). The reason for this is cost and support. Going forward, we may need some help from the community to optimize code for the components (we are both self-taught programmers...) so it will be best to use the most popular parts we can.
We'll start out with just the bare minimum - 3-axis accelerometer and Arduino MKR1000 - with the following initial milestones in mind:
- Get the Arduino and the accelerometer talking and read the values over USB
- Get the data online over wifi as a precursor to a remote "fall alert."
- Refine the method of detecting an actual fall. For now, we are planning to begin fall detection by comparing magnitudes of acceleration vectors. We plan to initially test a trigger by using 2 threshold acceleration vectors that must both be activated simultaneously during one reading. Of the 3-axis (X,Y,Z) data, any combination of sufficient acceleration will be used to trigger a "potential fall."
Axis X Y Z X XX XY XZ Y XY YY ZY Z XZ YZ ZZ Given the possible permutations above, the resulting relevant combinations of fall detection will include simultaneous threshold acceleration triggers along XY, XZ, or YZ. Thresholds for activation will be 2 different values - The larger magnitude will represent a fall along the main axis, while a secondary magnitude will be smaller to represent any torsional/rotational acceleration.
Alternatively, we may combine values from all 3 of the accelerometer axix (X+Y+Z) and then use that single value as a threshold level for a fall. We'll have to do a lot of IRL testing to figure out the best way to interpret the data.
ARDUINO MKR1000
ADXL335 - 5V ready triple-axis accelerometer (+-3g analog out)
Lithium Ion Polymer Battery - 3.7v 1200mAh
-
A Viable Alternative for hardware? ARDUINO AND GENUINO MKR1000 NOW AVAILABLE IN OUR STORES
04/20/2016 at 06:38 • 0 commentsWhile our initial idea was to use Tinyduino components, the recent announcement of the MKR1000 presents an interesting alternative. We'll now start looking into how easily we can integrate an accelerometer/thermometer component into the MKR1000 as an alternative. We will also need to assess the wifi range in order to make sure the connection is stable enough. It will be necessary to include an indicator to determine whether the device is connected properly to the network as this is paramount to alerting others. ARDUINO AND GENUINO MKR1000 NOW AVAILABLE IN OUR STORES
-
4/19/2016
04/20/2016 at 04:53 • 0 commentsProject submitted to to Hackaday Prize 2016!