Iteration 2: Explore
- elijahsensibar
- Feb 28, 2022
- 3 min read
Updated: Mar 1, 2022
I started this Iteration by taking apart our first MVP, and confirming that our new potentiometers work with Arduino and that they do not need a pull down resistor.

It dose not need the resistor and displays the full range of values, next step is figuring out how to connect it to the brace I can't use the same method as last time because the potentiometer dose not have a smooth back that I can just glue to the brace.
After thinking on it awhile I soldered the pot to a small pice of prototyping board. filled in all the unused holes with solder and then glued the hole assembly to the brace.

I used super glue as it works well for bonds between hard materials. This took much longer than I anticipated because the first 2 times i did not get it centered on the pivot point and had to re-glue. The next step is to make a new potentiometer arm as the old one is of the wrong size and ugly anyway. I drew up a quick model in illustrator for the laser cutter.

I struggled to get it to export to the laser cutter at the right size so I ended up cutting 4 prototyped before i got the one that worked. It ended up working too well and pulled the new pot apart, but I got it put back together with the help of a little super glue.

Now that I have the potentiometer hooked to the brace its time to glue the pin and the potentiometer arm,

Next I cut off the exes pin material. My repair of the potentiometer might not work and I might need to re-do all this work ahhhhhhhhh.
Now that the physical electronics are all in place we can start working on the code that ties it all together! We have solved the problem of detecting if they are walking by using the bilt in pedometer algorithm for the accelerometer on the nano iot 33, its not good for counting steps but we dont care about how many steps they take but just that they are walking which it dose well. Then we had a brain storm section where we looked at the graph of the potentiometer
from this graph we got the idea to look for max and min values to detect limping

We originally we thinking about using time between peaks to detect the limping but using time in the Arduino loop was proving to be difficult, so we switched to storing values in an array to act as our "timer" and look to see if at any point while the array was filling they hit the max value. Code below.

The new pot while small and low profile was not robust enough for repeated activation so I drilled a hole through the center and put a small bolt.

Now to repeat the soldering and glueing for the forth time!

Next we started using the Arduino Iot cloud tutorial to connect our brace over wifi to send the pot value at first it was really slow. After some optimization was running much faster, still slower than a serial connection. We also got rid of the delay() and instead used mills(), so as not to have a blocking function.
Above is a video of our limp check code running on the Nano and the data being displayed on the IoT Cloud Dashboard. The graph are the potentiometer readings (you can see the range decrease when limping is detected). The colored box shows when limping is detected and the buzzer is activated (green).
Comments