We put together a video to demonstrate the hardware used in the GAINS pants. Hope you enjoy it! Time passes by so quickly! In two days, we will be presenting GAINS to the University of Waterloo. It will take place on March 15th from 1:00 pm - 4:00 pm at Engineering 7. Be sure to drop by to see the culmination of our work on GAINS. The past few days have been hectic. The hardware team put the finishing touches on our project, which included sewing on fabric to cover the wires. This was challenging; at first we used non-stretchy material, which proved to be difficult to judge how much slack was needed. We then tried to use a different material —panty hose! This was the perfect textile as pantyhose is very stretchy, and gives the desired effect of a see-through mesh. This resourcefulness contributed greatly to the aesthetics of the product. We also refined the 3D printed main module such that it’s appearance matches the overall sleek theme of GAINS. We added an aesthetic ridge to the side of the module, instead of simply using the blunt edge. We also got started on creating a mock-up haptic model so that users can get a chance to see what the haptic feedback looks like. On the software side, the team cleaned up the GUI so that it is easily interpreted by the audience. This is an important aspect to our project since the audience will not have the chance to actually try on the pants, but we would like them to still be immersed in the experience. Our original model, Gabi Kim, partially tore her MCL over the weekend and could no longer do squats. Thus, Bonnie Cheung took over, and the software team recalibrated the pants to fit Bonnie. Luckily, we had implemented equations such that the user only has to input their height, and the average anthropogenic measures could be used for limb lengths. The team also ran some validation tests. The first test resulted in a 650 ms average haptic feedback latency. This indicates that the feedback for correcting squat form is almost instantaneous! Additionally, we found that the maximum limb tracking error is 6 degrees, which is within our constraints. We also ran a battery life test, and found that the average battery life was 2 hours under normal use. This exceed our initial constraint of 1 hour. Overall, the testing turned out to be amazing, and all of our constraints were met. We also finished up our poster board, and will be printing it tonight. Below is a sneak peak for Friday's symposium! There are many improvements and additional features that GAINS could implement. This would include creating a mobile application so that the user can see the visualization and record training data in the palm of their hand. On the hardware side, we could look into using conductive ink instead of wires. We could also extend GAINS to track upper body movements. Lastly, we can use the framework that we have created to extrapolate to a variety of exercises including deadlifts, calf raises, and any imaginable exercise! There are many steps that we can take which could lead us to disrupt the fitness industry.
See you on Friday and thank you for coming on this journey with us, The GAINS team Symposium is coming up and it’s crunch time! This past week has been a gruelling trial of all-nighters. We really wanted to wrap things up so that we would be less stressed for symposium. Our meeting with our supervisors is also this week, so we had to achieve our Minimum Viable Product (MVP). Although it was hard, we accomplished a lot this week; we tested and debugged both the hardware and the software, and we implemented all the squat mistakes. On the hardware side, we ran into some trouble with i2c communication. Because we were using such long wires, the shank IMUs were a little bit finicky. The long wire was essentially acting as a capacitor and corrupting the i2c signal. We lowered the pull-up resistor value of the shank IMU from 10K Ohms to 7.2K Ohms, and the signal worked much better. This simple fix was not without a late night of trying to fix the corrupted i2C signal. Additionally, the haptic motor wires were secured with another layer of fabric on the inner lining of the leggings. This required an immense amount of hand sewing, and took the hardware team around 10 hours to complete! Thankfully, this helped secure the haptics such that the user can put on the pants without worrying about breaking the hardware. On the software side, there were some latency issues. The visualization would update very slowly compared to the real-time motion of the user. This was a critical problem since the basis of the product is that the user can receive real-time form feedback. This problem was solved by increasing the Bluetooth data transfer rate. There were additional problems with the kinematic model on the server side.We debugged this issue for a few nights and finally solved it by having a group discussion. Lastly, all 7 of the detectable mistakes were implemented and tested this week. This was a huge milestone, as at least 5 mistakes are to be presented on Symposium day. It looks like we are on the right track to having a polished project for March 15th!
Until next time, The GAINS team Reading week is the prime time to work on FYDP —but also the prime time to go to Cuba for a graduation trip with the Mechatronics Class of 2019. This week was all about team bonding and relaxing, which is an extremely important facet to collaboration. The GAINS team also took work to the beach. We had beach days where we took an hour or two to discuss the next steps of our project. We scheduled tasks that we needed to complete, and created a detailed project plan. This will help us with meeting deadlines, and ensuring that we will not be stressed out as symposium approaches. After this vacation, we are ready, and motivated to put all of our gears into action!
Until next time, Gabi This week was the first time we integrated our software components with all of our hardware. The first step was testing the haptics. Nathan created a script that accessed each haptic via the shift register. We debugged and tested out the haptics, which proved to be very useful. We ended up choosing a pulsing vibration as opposed to a long pulse. This was chosen through user testing, as the pulse was noticeable, effective, and not annoying compared to other options.
Next, we looked at getting IMU data from each of the five IMUs. Nathan calibrated each IMU, and worked on getting a nicely filtered signal. Nathan also wrote a script that zeros the IMU values when the user is standing straight up. This is because the leggings will not be on the exact position of the user each time, and requires relative motion data as opposed to absolute. Josh finished creating the visualization so that the user and audience can look at the user’s pose according to IMU data. The visualization compromised of a stick figure with both shanks, both thighs, and a torso. Additionally, he worked on algebraically quantifying identifying the squat mistakes based on the IMU data that would be sent over bluetooth by Nathan. Preliminary tests demonstrated that the IMU data can be sent, but the kinematic of the stick figure visualization must be further looked at. Bonnie and Gabi helped with debugging the hardware now that it was integrated with the rest of the system. Additionally, the wires appeared to be very messy. There was a need to find a method to manage them while maintaining the integrity of the wires. We found that the best option was to use an adhesive to stick the wires together such that a ribbon-cable-like structure is formed. Wire management is an important facet to the final product since the leggings are designed to be worn in public. We want the design to be as discreet and subtle as possible. Overall, project development is going pretty well and we haven’t run into any issues that we couldn’t solve (cross our fingers). On a side note, we recieved our iron rings, and are now more committed to this project than ever! Until next time, The GAINS team Hey guys! A lot of progress this week. We’re just about finished up with the hardware portion of our project! We've got all our hardware wired up: our IMU mux, our 5 IMUs, our haptic shift register, and all of our haptics. And its all attached to our pants! Pictured below is our swole team manager, Gabi Kim, modelling off our pants: As you can see, the pants are a little jerry-rigged for now. This was just to make sure it stays together for our demo. In the upcoming weeks, cleaning up these wires and sewing components on is on our to do list.
And that’s not all. On our software side, we’ve gotten Bluetooth Low Energy up and running, and can successfully communicate our IMU data from suit to server. Currently, we're focusing on sending over rotation matrices of each IMU. These rotation matrices are built by:
We presented this during our demo, and most of this worked! Our one issue is IMU calibration and algorithm tuning. We seem to be more susceptible to IMU drift and noise. In the coming weeks, this is the most important thing on our list to fix on the software side. Until next time! Nathan We’ve been hard at work on the GAINS project. We are expected to provide a small demo for our advisors by next Monday. This week, we clearly defined goals in order to meet the needs of our mini-demo next week. We constrained our problem by forming these milestones which are to be completed by Monday:
I believe that we are well set to meet this deadline. We will be sure to share our successes and recommendations after our demo next week! Until next time, Joshua In the recent weeks, I have been working with Nathan figuring out wireless communications between the Raspberry Pi and the Python server (which is run on one of our computers). Searching for an adequate Bluetooth library for the Python Server turned out to be quite difficult. Much of the difficulty stemmed from the fact that Nathan and I use a Macbook for development. It turns out that the Bluetooth capabilities of the Macbook are wrapped in a library called CoreBluetooth , which is written by Apple in Objective C. Since there were no native Python Bluetooth libraries, we had to search for a library which calls procedures from that Objective C library. Many of the libraries such as Pybluez and Pygatt are only supported on Linux. We managed to find a library called Adafruit Python Bluefruit LE, so we decided to use that. Nathan and I decided to user the Bluez library for the Raspberry Pi because of its wide usage and support in the Linux platform. After determining which libraries would be sufficient for us, we had to come up with a protocol for communication over Bluetooth. We have decided to go with the following GATT profile. We decided on UUIDs for each of our Bluetooth services and the encoding of our data for our Bluetooth characteristics. We are working on implementing this protocol on both sides and we plan to get finished the IMU service for our first demo on February 4. We hope to meet up in a couple days to make sure it works as a system. On my side, I have been continuing to work on server side development. In the recent weeks, I cleaned up the repository by enforcing virtual environment, creating a setup script, developing a server entrypoint script, installing and enforcing the pytest unit testing suite, and writing up documentation for server setup. I decided to setup Redis as a in-memory cache so that different threads can send data to one another. I legitimized the form plotter, which utilizes the 3d animation capabilities of the matplotlib python library, and it is now able to construct the right leg and visualize the tibial angle error. I also developed a process which will be used to assess the form. This thread is meant to eventually send the appropriate haptic feedback back to the user, but for now, we have this thread simply outputting error messages whenever the user makes a mistake. The thread currently is able to identify one squat form mistake out of seven. The following image shows the current state of the application with the leg plotter on the left, and the form evaluator command line on the right. In this example, the server is assessing the mistake of the tibial angle (when the knee surpasses the foot). Lots has been done to get this project rolling, but we definitely are nowhere close to being done. The grind continues! - Joshua As deadlines peer ominously on the horizon, Gabi and I hustled hard to complete the mechanical and electrical portions. This past week has been a frenzy of PCB design, solder fumes, way-too-small-components, and 3D printing resin. You see, we need to have the hardware finished before Josh and Nathan can work their software magic to bring this product to life. Come along as I walk you through some highlights of this week! First, we checked how well the flex sensor works. In the images above, you can see Gabi replicating different back postures. The flexure can be seen in the graph on the computer. Next, we tested different methods of implementing slack in the wiring of the pants. The wire is sewn in a meandering path, which will allow the wire to stretch along with the fabric. Finally, you'll see my very first PCB layouts done in Eagle above! The board on the left is our haptic board, which contains the vibration motors, and the board on the right controls haptic multiplexing and the flex circuit as well. A special thanks goes to Rayyan Ghani for sanity checking these designs and teaching me about POUR OVERS! The images below show the final boards. We are so very excited to be wrapping up soldering and wiring later this week. Nathan and Josh have been preparing the stage by setting up the Python server and the Raspberry Pi Bluetooth and Wi-Fi modules. We'll take a closer look at their progress in next week's blog post!
Bonnie |
Archives
March 2019
Categories |