MECH 423: Self-Balancing Robot

Hello new and old friends! Welcome back to the Mech Ambassadors Blog! I am very excited to share with you all a project I am currently working on for my Mechatronic Product Design course.

MECH 423 is centered around learning and applying firmware knowledge to integrate what you have learned within your undergrad to a complex final project of your choice. This specific course teaches firmware writing to communicate with motor drivers, accelerometers, and encoders. Rather than a final exam, we have 3 labs and 1 final project which build up our final course grade. After polishing our C# and C, developing firmware for a close loop control system, we design our own final project which includes 3 deliverables: a proposal, a video of the final product, and a final report due 2 days after the presentation.

The project is to be designed and presented on Dec.9th which is less than a month away. My lab partner and I just submitted our project proposal on Monday and are very excited to get a start on the robot. This final project comes with a multitude of challenges but we are aiming to integrate art and mechatronics in our device.

The objective of the project is to develop a self-balancing device using a dual motor control system. The device will take the appearance of a Pokeball, hiding all the hardware components within an enclosure and can open to show small figurines. The goal of the device is to balance the figurines contained within the device enclosure. The device will primarily function as an art form. There are many collectors who look for interesting workpieces, this self-balancing robot will be of great interest and act as a centerpiece! There is no circular self-balancing robot on the market at present, while there are designs for the Star Wars BB-8, as of this moment, there are no Pokeballs. We will be able to promote engagement in the STEM field by bringing to life a childhood cartoon object which will grasp the interest of students from kindergarten to grade 12.

 

Breaking down the project into 5 functions include:

  1. Gyroscope interface circuit
    • determine and measure the rate of angular motion of our device
  2. Filter with gyroscope and accelerometer
    • integrate gyroscope and accelerometer to create a complimentary filter for angular position
  3. Motor driver
    • operate 2 motors simultaneously and integrate the motors with the rest of the system
  4. Closed loop control
    • use PI/D control to integrate all the systems together in a closed loop for stability
  5. Design and build
    • Design the enclosure to mount the mechanical and electrical components.

 

We are waiting on approval before sourcing parts and starting on the design. Bookmark the blog and check back next week for updates!

May your gears always mesh!

My summer research program with MECH CREATE-U

Walking past the closed doors of research labs felt like taking a peek into a vault of unfound knowledge with students and mentors huddled around what oftentimes looked like a sci-fi device. The sight has always fascinated me, and I wanted to try it out and see what research is without committing my entire Master’s degree to it. The CREATE-U project was helpful in addressing this, where I could get a taste of what research is like so that I could figure out if I wanted it or not in the future.

CREATE-U_S22

Poster presentation at the end of the CREATE-U program

One of the biggest questions I had starting off is how a research project is different from the numerous design projects we’ve undertaken during our regular coursework. We’ve all had a taste of what an engineering project is like starting with the cardboard chair – we have a known deliverable and we try to make our way to it through a defined process – but my research experience was quite different.

Unlike a design project, the final deliverable is left to us to choose. I initially thought that would make it simpler – what I didn’t expect was the number of rabbit holes it would open up during the first few weeks as I tried to figure out what direction I wanted my project to take. It was an exciting, overwhelming feeling when every new paper I read gave me a new idea of what I could do as a part of my project. I ended up deciding on studying the flow characteristics of aerosolized powder drugs flowing through a catheter under the overarching project that my faculty supervisor had given me and the Master’s student mentoring me. Okay, that sounds like a lot of words that probably doesn’t make too much sense. Well, it didn’t to me either, but that’s part of the fun and the process! Starting off and learning something new that you haven’t seen before and then trying to ask and answer questions that might not have been covered. Over a few weeks, I’d taken my basic knowledge of fluid mechanics and used those basic building blocks to learn about multiphase flow and a few other things to be able to take this problem head-on.

We also had regularly scheduled classes where we talked about research practices and writing styles, and initially, I thought that would just be adding more to my plate of responsibilities. However, getting some context around my research work was immensely helpful in orienting myself through the process, as well as knowing I wasn’t alone in it with the nine of us in the cohort getting to bounce ideas off each other. There were quite a few weeks where it was busier than I thought it would be with both coursework and research work picking up pace simultaneously. It all paid off with excitement of designing my own experimental setup, assembling it and then running experiments to answer a question that I found worth investigating! It was also a very weird and proud feeling when I had to present my findings in front of research faculty members – and for once I knew a little bit more about the topic than they did.

Introduction to Club Mech

Hi gears and peers, nice to meet you all! My name is Janet and I am one of the ambassadors in the Mechanical Engineering student services office. This is my first time doing a blog post, and it’s all so new and exciting! As a student ambassador and the president of Club Mech, I am looking forwards to interacting with everyone and should you choose to join Mech, I would love to see you at our events.

So who or what is Club Mech? Club Mech, or Mechanical Engineering Club, is the undergraduate society representing all of the Mechanical students. We host events to bring together the mech community, stock the club room with snacks and fun drinks, organize professional development opportunities, and skills building sessions! Most importantly we love to hear your feedback about Mechanical Engineering in general, various course work or what events you would like to see for the mech population.

You can find our club room in CEME 2207, we have a Switch, microwaves, many comfortable couches great for napping, and tables perfect for studying between classes!

If you have any questions please don’t hesitate to reach out to me through the student ambassador email or comment below! If you have any specific Club Mech related questions, please email the president email at ubcclubmech@gmail.com. I look forward to interacting with everyone soon!

Have a great start to your summer and I’ll see you all on my next post!

How you plan your degree vs how it goes

When you begin your degree at this university or any university, like any first-year student, you walk in with a solid plan on how your academic development is going to go for the next four years. You will start first year strong achieve amazing grades in first year, get into your preferred program, then another three years of pure academic dedication and then walk out of this university with a smile on your face and a graduation photo on your dad’s desk of you in your graduation gown. A lot of us start our university careers with these thoughts in our heads. But ask anyone and they will all tell you the same thing: things did not go according to plan. And for the majority of them, things took a turn for the better!

Of course, the very first thing that will change your degree plans is when you receive your offers into the various engineering programs. For some students it goes exactly like planned, they get their first choice and for other students, they get put into a program they were not that excited to get into. It happens to a fair number of students, many of my friends too.

Then the second change in your four-year academic plan comes. Co-ops. Being an international student, I wasn’t aware this was something that we could do in the middle of our degrees. Work with amazing companies across Canada, gain invaluable experience, and graduate with a good understanding of engineering principles. However, it adds a year to your degree and requires you to move some courses here and there which the faculty and co-op offices help to navigate very well.

And to be honest, if you are passing all your courses, those are the only two major 2 changes you have to account for unless a major unprecedented global pandemic that will collapse the economy takes over the world.

COVID-19 was the wild card that graduates of 2020, 2021, and 2022 could not have planned for at all. Even the Canadian government couldn’t see this one coming, so you can’t expect a student running on caffeine and pizza to predict it either. I was caught in this pandemic towards the almost beginning of my final year at university.

My initial plans were to start working for a company in May 2021 which I had built a profile in through my coops. But as the pandemic unfolded, that sector went under, and people started getting fired, and hiring freezes started. A future in that sector no longer looked promising. And then within three hours, I changed my entire plan for the next two years. I decided to extend my co-op with the company I was working for that summer till December and do another eight-month co-op in a different sector the following year and finish off my degree in May 2022.

My reasoning? The industry I was working in was Oil and Gas and was all set to work full time in that sector. Once hiring freezes began, a PEng at the company advised me to not bank on the full-time opportunity anymore. He also advised me to look if I could push my degree out by another year to make sure I graduate in a better market. Because May 2021 was not a hot time for recent graduates. The market was still struggling to recover. So I decided that during that extra gap I would take, I had the prime opportunity to diversify my portfolio a bit more. So I decided to do an eight-month term in the renewable energy sector. And then in September 2021, we started in-person classes again.

What I wanted to get across from this post is this. When you start university, its good to have a plan for the next four to six years. It will help guide a lot of your decisions. But also make sure you keep the flexibility to alter those plans as situations change, opportunities arise, economies fall. Because we live in a world that changes literally every day and for an engineer of today, you need to learn to adapt to it.

Taking a Break: Extended Degrees and COVID-19

Last year was definitely a year of extenuating circumstance and I am not one to enjoy uncertainty.  I did however, take a leap and decide to extend my degree instead of graduating in 2021 as I had expected back in 2016 when I started my bachelors degree.  In this post I plan to go over my experience in taking an extra year including my reasons, my feelings, and recommendations for anyone thinking about extending their Mech degree.

My reasons for extending my degree

  1. Burnout and Mental Health – I’m sure this is a shared experience within Mech, but by the end of my 3.5 year I was very burnt out.  By this point 2 years ago, I was struggling to keep up with my studies.  My grades were declining and instead of being worried or scrambling to catch up, I felt an unnatural apathy.  During this period of time, I felt a loss of the enjoyment of studying and learning that once came natural to me, even though the topics we discussed in class were interesting, I felt detached and robotic.  Though this was the one of the main reason I extended, it was also a big reason I did not want to extend.  Part of me just wanted to push through, but today I am glad I did, I am in much higher spirits and have regained my passion for learning.
  2. Online Classes – Though the professors tried their best to accommodate and make class as engaging and useful as in-person, there are limitations to online communication.  For one, it made  comradery, group work and design projects harder. As I was going into my last year and was finally taking the technical electives and courses of interest that I had been waiting my whole degree to take, I wanted to make sure I got the full experience.  For example, courses like Orthopaedic Biomechanics (Mech 435) which normally lets students go watch surgeries or Capstone (Mech 45X) were limited in opportunities because of the pandemic.
  3. Loss of Facilities – One of the biggest advantages of being a Mech student is access to the great facilities available such as the student machine shop and student team spaces.  Spaces that I did not have access to last year and I am very excited now that I’m back in school to finish the projects I had planned for my last year.
  4. Opportunity to Try a New Industry – While deciding whether or not to extend, I did some co-op applications.  At the time I had already fulfilled all my term requirements for co-op but extra work experience never hurt anyone.  One of my goals during my schooling was to try out as many different industries while I was still a student.  Mechanical engineering is a degree which provides a great variety of industries and I wanted to take advantage of the short term internships to try new things.  I luckily got an 8 month internship at a great biomedical engineering company which broadened my portfolio.

Emotional Experience of Extending

When I started university in 2016, I worried about things like being able to finish “on-time” and graduating with all my friends.  To be honest, now I’m not sure what “on-time” means.  It turns out that half my friend group and my fellow Mech Ambassador Hamayun did the exact thing as me.  In a way, I still am graduating with a good number of my friends.  Some even decided after I did, knowing that someone else would be around for the extra year.  Considering that my career will be ~40 years long, will one more year in school matter.¯\_(ツ)_/¯

I am enjoying this year a lot more.  My course load is lower, I am taking super interesting courses and my grades are much higher than before.  I am more productive, the burnout has significantly improved and even though I was very worried about whether I made a good decision initially, I have no regrets today and would encourage those who relate to any of the reasons I extended, to explore the opportunity.

Recommendations

Here are some things to consider if you are thinking of extending your degree based on my experience:

  1. Consider your financial situation – I worked co-op for 8 months of my extension and I am also a local student.  Unfortunately, scholarship or other financial limitations may limit your ability to follow in my footsteps.  If you are an international student, consider the price of staying around UBC for the extra time if you plan to stay in Vancouver during the extension.
  2. Check your course requirements when you come back to school – One of my necessary courses to graduate was Mech 429 which this year was moved to a 3rd year course and became Mech 329.  This meant that the course wasn’t in the fourth year standard time table.  The Mech Student Services Advisors are super friendly and helped me register smoothly (and easily) into the course with a simple email.  They can help you to navigate any changes in course requirements.
  3. Make friends in your classes – Group projects can run a lot smoother when you know people in your classes.  Unfortunately one of the bi-products of extending is knowing less people in your classes.  That being said, I have group projects in all but one of my classes this term and have been able to find great team mates.
  4. Have some fun – Burnout won’t go away without some real relaxation – SO RELAX.  I spent a lot of time playing video games, hanging out with friends (pandemic permitting) and exercising.

 

5 Unconventional Tips to Help You Master Online School in 2021

1. Use google docs during break-out rooms.

A guy in my breakout room suggested this, and honestly, it’s genius. You can keep track of what you’ve covered, giving yourself an excellent reference to cover points you might have missed or share with the class later. Using shared documents also means that people without hardware or people who might be uncomfortable speaking can still contribute their ideas. It’s a brilliant reference for future studying- I would seriously recommend trying this.

2. If you’re using your camera in your zoom lectures, hide yourself from view.

I can’t say I love turning on my cam at 8 am after pulling a hoodie over my pyjamas and rushing to make a coffee at 7:52 am, but using your camera in online lectures definitely has its pros. Nonetheless, there’s a good chance that your camera could be hurting your performance.

This article from the Harvard Business Review suggests that seeing yourself on-screen (and watching others) can be a massive distraction and exhausting. When you have several different videos on screen, you can overwhelm yourself with visual stimuli. It may be worth setting the camera window to show only the speaker, or hide it altogether in some situations.

Researchers from Emory University and the University of Copenhagen found that images of yourself from a mirror (or in our case, a webcam) can induce feelings of anxiety, social-awkwardness, shame or embarrassment. Consider hiding yourself from view when using your webcam; you may notice a subtle difference in your confidence when interacting with your class.

3. Connect with nature.

Research suggests that connecting with nature can make us feel calmer, and reduce symptoms of depression and anxiety, which can improve motivation, focus and performance.

If you can, set up a workspace next to a window, or maybe try and find a safe spot outside to get some reading done. If that’s not available to you, research claims that even just looking at images of nature have a similar effect. Perhaps you can change up your desktop background, print some cool pictures or invest in some lovely houseplants.

4. Bolster your social support network.

Online school can feel pretty isolating, especially if you are not living with family or roommates at the moment. When the workload gets tough, it’s important to have friends to turn to for support! Obviously, it’s a bit tough right now to meet new people and do things together in person. Still, the internet is a brilliant resource for finding new friends or cultivating existing friendships.

In 2020, I joined a Pokemon Shiny Hunters discord, reconnected with some old LoL friends, and formed an online D&D party. My online friends undoubtedly helped me get through the worst parts of 2020.  Online communities are a goldmine of like-minded people that you can de-stress and have a good time with, and thanks to the anonymity of the internet, it’s easier than ever to put yourself out there and make new friends.

If making friends in purely online communities isn’t for you, you can still reconnect online with some of your old IRL friends! Why not make a discord server with your friends from the first-year res, and play some games together?

Here are my recommendations for cheap and simple but fun party games:

  • Among us ($5.69 on PC, Free on mobile)
  • Jackbox Party Pack (~$34 on Steam/Most Consoles but you only need one purchase, and you can play it with up to 8 people using mobile phones as controllers
  • Scribbl.io (Free browser game!)
  • Other online classic board games such as Catan or  Chess (Free, but possibly costs some friendships). This website has a ton of interesting board games to try.

5. Be kind to yourself

It’s ok if online school isn’t your thing, grad school admissions officers or future employers understand that we are dealing with a global pandemic. One year of slightly lower grades is not going to ruin anything.

The most valuable skill I’ve learned in my three years at UBC is to be kind, patient and honest with myself, and to do my best. Put your mental and physical health first, and the rest will fall into place. Hang in there; you’ll get through this- I believe in you!!

Project Ideas for Curious Students (2020)

I get it. Since COVID hit, many of us have been trapped at home, wondering how to make the best of the excess time not available for socializing, travelling or just generally going outside.Or, maybe you are reading this post-pandemic, still wondering if there is more to engineering than equations and datasheets. Well, my dear reader, I empathize with you and would like to propose some of my own suggestions! 

First, a bit of background. I am a student in the Mechanical Engineering department here at UBC. The program itself is excellent; subjects are often well-integrated, and the faculty is aware of the need to tie theory with practice. Nonetheless, the allure of personal projects remains if you want to venture beyond the fundamentals taught in class, or to have total freedom regarding what you choose to create. 

There is one big challenge with mechanical projects: you may find yourself grappling with the financial burden of doing so or worried about the safety implications of your projectI say this because outside of my design team, I am often constrained by these limitationsThe goal of this blog series will be to highlight some of the resources available to students within the mechanical engineering department, and hopefully to give inspiration to those who are perhaps unsure of exactly what they want to create. 

See below for a list of all the blog posts in this series: 

Passion Projects 

Engineering Design Teams 

CAD and Simulation 

Software 

Project Ideas for Curious Students: Passion Projects

I have no shame in admitting that most of the ideas for my projects come into mind while I am bored of assignments. If I see value in a project and can afford to pursue it, I probably will. I do know people who take this to the extreme: a close friend of mine built a PID-controlled oven which can be pressurized or vacated of air, and thus used for manufacturing small, high-quality carbon fibre components.  

Depicted: my hydroponics system, for which I never hesitate to tell everybody about.

I actually think that there is value in pursuing projects in this manner. Ideas that get you excited are the ones that you should pay the most attention to; they are the most likely to keep you engaged, and will typically put you in a position where you learn much faster than if you were forced to do the work. When I started my hydroponics project, I did not expect to learn much more than I already knew about plants. Instead, I found myself learning about the mechanisms of nutrient uptake, and getting started with Arduino. As summarized by Marc Anthony, “if you do what you love, you’ll never work a day in your life.” I think that in some cases where there is a market for your idea or if it is applicable to what you want to do, you may end up opening new opportunities for yourself in the future. Perhaps you found a passion that you never realized you had, or maybe you will find that it was not as exciting as you originally thought.  

Still in need of inspiration? Here is a list of ideas that might help to get your brain moving:  

  • Remote-controlled vehicles  
  • Robotic arms  
  • Drones  
  • CNC machines  
  • Car modifications  
  • Anything that uses a 3D printer

Many of these suggestions are relatively expensive, however the resources necessary to complete them are generally quite accessible. While COVID-19 restrictions confine many of us to our rooms, projects related to robotics, as well as drones often have a plethora of components that “just work” once you assemble them, massively simplifying the design and assembly process.   

Whatever you decide to pursue, be sure to check local regulations, your tenancy agreement and to never skimp on safety research! I remember how one of my projects made use of LiPo batteries, which my friend and I found can carry an explosion risk if overcharged, excessively discharged or punctured. Safe to say that the additional safety equipment, including an explosion-proof case were worth the investment. We also learned that there are licensing regulations around flying drones above a threshold size (250 grams in our case). Similarly, making my own hydroponic nutrient solution meant that I had to be familiar with any of the safety risks related to the chemicals that I had in use. With any project, the importance safety and compliance with restrictions cannot be understated.  

Project Ideas for Curious Students: Engineering Design Teams

This year marks my fourth year on Formula UBC, one of many engineering design teams at UBC. I can unequivocally say that it has been the highlight of my university experience so far. When I joined, I was not sure what to expect. I knew that I wanted to learn more about aerodynamics and CFD, but I never expected that 2 years later, I would be leading the aerodynamics sub-team. Even more so, I never anticipated learning anything about machining, composites or even race cars (shocking, I know). I never imagined myself running track tests or figuring out how to manage people. And I certainly never saw myself driving the car.  

You will often hear that the value of engineering design teams is that they are an opportunity to apply concepts learned in class to a real project. In my experience, there is a stark difference between knowing something, and understanding it well enough to apply the concept to a real system. Moreover, you get to see the result of your design decisions on a working (or failing) system.  

Depicted: formula UBC front wing during test day. Test days are used to verify that the final product behaves as intended in its design.

It also gives you the opportunity to explore far beyond what is taught in class: for example, composites manufacture and fluid dynamics simulation, to the best of my knowledge, are only taught in a very limited capacity. Outside of the Mech 2 curriculum, design teams are also a great way to link concepts from seemingly disparate subjects. On Formula, large projects cannot be completed successfully without adequate communication with members from other subteams, since these systems will have to be able to work together on the car. In some cases, such as with the pneumatics, different subsystems will be competing for the same resources.  

Beyond technical skills, the one experience I feel is often overlooked is interpersonal skills. Learning to manage others, to deal with an occasionally political environment and how to work with sponsors can prove to be a very humbling experience. Interpersonal skills come with experience, and learning them in a fast-paced environment is excellent practice for the “real world.” Your sponsors are real stakeholders, who often want to see a return on their investment of potentially thousands of dollars into your project through representation and promotion of their brand. Over the past year, I have truly begun to appreciate the significance of the proverb “if you want to go fast, go alone…if you want to go far, go together.” What my team has been able to accomplish by creating a healthy, collaborative team environment has been nothing short of amazing.  

If you are considering whether not you should join a design team, my answer to you is an emphatic YES! 

Project Ideas for Curious Students: CAD and Simulation

Fortunately, engineering coursework typically requires a fair amount of CAE (computer-aided engineering) software, which can double as a creative tool whenever you have an idea that you would like to experiment with. I have found that a good combination of CAD, simulation software and some programming is sufficient for a significant portion of the design of low-risk projects.

To those who are not yet aware, UBC Engineering students have free access to several software licenses specific to the engineering department:

MATLAB 

Matlab is a programming language built specifically for technical work. Many scripting languages require the addition of libraries for tasks such as data visualization for example, which Matlab excels at. Well-integrated with this is Simulink, which allows you to model relatively complex systems in a more intuitive manner than explicitly writing code.

Your coursework will do a good job at teaching you the basics of Matlab, which you can choose to take further on your own. For all engineering-focussed math courses including linear algebra, ordinary and partial differential equations, vector calculus and multivariable calculus, my coursework has included a heavy Matlab component.

If you are in an engineering design team or have a project that warrants large amounts of computation on a problem for which you cannot find ready-made software, this is always a good option. Matlab is also used commonly in industry. If you have graduated and are looking for a free alternative, Octave is a good potential solution; with that said, depending on the task you may also feel that languages such as R could be of use. My personal pick would be Python. With an explosion of open-sourced libraries, I have found that Python – along with SciPy libraries – is just as capable as Matlab for most tasks. It is also free, very well-documented and extremely popular. Being a general-purpose language makes it a useful transferrable skill to have, and gives you tools to expand your projects far beyond what dedicated tools might allow.

SOLIDWORKS 

If you are in or entering the Mech department, SolidWorks will need no introduction. CAD (Computer-Aided Design) in general can be an invaluable tool when you want to get a good idea of how components will look when assembled, and to spot problems (such as interference) in the design before it becomes a problem. With inorganic geometry, it can also speed up the process of making technical drawings, if you were to communicate your design to a third party.

ANSYS 

I will admit, I am somewhat less familiar with the practical uses for Ansys. If you do have access to a full Ansys license, you will be able to simulate anything ranging from computational fluid dynamics and thermal simulations to load simulations. Ansys has a great graphical workflow for coupled simulations, if you are interested in simulating multiple physical phenomena concurrently.

From personal experience, I would encourage anybody pursuing technical projects to be wary of the computational cost and learning curve associated with simulations. Having used the UBC Star-CCM+ license for fluid simulations (computational fluid dynamics or “CFD”), I can confirm that it is worthwhile to consider the cost vs. benefit of complicated simulations. For simple simulations where rough estimates are acceptable (e.g. “how likely is it that this non-critical component fails?”), SolidWorks often has a perfectly acceptable solution for you.

Finally, I would recommend looking into a free SimScale community license, providing access to 3000 core-hours of cloud compute time (calculated as the product of the number of cores used and the amount of time using them) with up to 16 cores at a time. Their documentation is nothing short of excellent, and they have a great user interface. To the best of my knowledge, SimScale is built using open-source technologies such as OpenFOAM, which provides open-sourced CFD and simulation code.

So…why do I recommend CAD and simulation if it doesn’t involve creating something real? Just as I mentioned previously, mechanical design projects often become prohibitively expensive once manufacture begins. Software allows you to pursue a design project with minimal upfront cost, and pursue its manufacture at a later date when it is more feasible. This is exactly what I have been planning to do for one of my more ambitious projects, which is a small-scale axial flow turbojet engine. Chances are that it will fail miserably when I am done, and I’m looking forward to it.