Category | Difficulty |
---|---|
Labs | 4 |
Project | 7 to 9 |
This class explores the intersection of embedded programming, electronics, mechanical design, and more to develop robots. Working in interdisciplinary teams of 4-5 members over the course of several weeks, you will build a robot that performs a specific task involving sensing and actuation. Your team will have a budget to purchase parts, in addition to the course inventory, and you have complete freedom in your approach to the project's design.
Please note that this guide was written from Spring 2022; the assignments and material for the course may change slightly in future offerings of the course.
Officially, 18-578 requires (18-348 or 18-349) and (18-320 or 18-370 or 15313) or (18-320 and 18-370). However, in practice, you will likely find knowledge of embedded programming and control systems to be the most useful from an ECE/CS standpoint for the course.
The entire course explores programming with embedded systems, from basic Arduinos to more advanced boards like Raspberry Pi or Jetson Nano, so having knowledge of C/C++ and Python will be very beneficial for your team. Additionally, you will likely use some form of feedback control such as PID to make your robot more stable, so having background in the applications of control systems will also help. The first few weeks of the course will have lectures that go over microcontrollers, sensors, motors, etc. so this will hopefully help as a refresher for your team.
Background in other topics may also be useful depending on your team's project and existing skills. Having experience in perception and path-planning, such as computer vision and robot kinematics, can be very helpful for your project. Other skills in mechanical design (CAD, lasercutting, etc.) can also help when you are prototyping your robot. You will have the first few days of the course to meet and match with potential teammates, so just make sure that your team covers all the important areas together.
There are only two labs in the first few weeks of the course, which function as a way to get everybody on the same page before the main project. These are the sensors lab and the motors lab. They are explained in more detail below.
You complete the lab with the rest of your team; the labs will be helpful for teammates who have less experience in ECE topics. It may get a bit tricky dividing up the work between 5 members, but the main goal is for all team members to learn the concepts from the labs so they can use them in the project.
This lab has your team interface three sensors with a microcontroller. You are provided with a number of sensors (accelerometer, ultrasonic sensor, etc.), and you choose which sensors that you wish to work with. You can make this lab as complex as you wish, or you can keep it nice and simple in your choice of sensors. All the code to interface with the sensors should be combined into a single program running on one microcontroller.
Library code was permitted as long as it was cited, which makes working with some of the more complicated sensors much easier. You'll also have to plot the sensor data that you retrieve, which the Arduino IDE makes easy. Overall, this lab should be a nice warm-up for ECE students, but be sure to catch up other team members with less experience.
This lab has your team use three different kinds of sensors to control three types of motors: a DC motor with encoder feedback, a servo motor, and a stepper motor. Additionally, your team needs to implement a basic GUI that can be used to control the motors directly, as well as display the states of the motors. You can use a debounced switch to toggle between control of the motors using the sensors or the GUI.
Be aware that this lab is significantly more complex than the previous lab. This is because there are several moving parts in this lab. The code to read all the sensors and control all the motors need to be in a single program running on a microcontroller. This means that your code will have several different parts, which all need to be integrated eventually.
You can use your code from the previous lab to read sensor data, which you can then map into a range that is used to control the motors. Like the previous lab, you can use library code to make your life easier:
- The servo motor should be relatively simple to control using the Servo library.
- The stepper motor should also be straightforward using the Stepper library.
- The DC motor with encoder feedback will be more complicated, but the Encoder library and ArduPID library should both be helpful for this.
- Also make sure to use the appropriate library for whatever motor driver that you choose to use, such as the L293 library!
You'll also need to dedicate time to implement the GUI properly. They suggest a few tools to use, including Qt and Processing. It doesn't need to be a fancy GUI; you just need to be able to read and write to the serial port to get and set the current states of the motors. Be sure to leave enough time to test your GUI with each of your motors independently and then together.
Overall, this lab is more difficult than the prior lab, but it can be divided and conquered by your team. It might be a good idea to have a team member for each kind of sensor/motor pair, as well as a member to work on the GUI. Just be sure to leave time for code integration, since getting all the code to work with all the sensors and motors at once may take some refactoring. Also, be aware that some of your teammates with less ECE experience may struggle with this lab, so try to help each other so you all understand the concepts.
This is the main purpose of the class. Once you finish the first two labs in the first few weeks of the semester, the rest of the class is dedicated to working on your project. Accordingly, after the first few lectures, class time is used for team meetings and demos for the rest of the semester.
Each team is given a budget. In Spring 2022, it started at $800 but was increased to $1000 later in the semester. That semester, there were three types of projects: ShipBot, Stair Vacuum Bot, and IV Injection Bot. The three projects are briefly summarized below, but please note that the projects may change from year to year:
- ShipBot: This is a robot that navigates around a test bed in order to interact with a number of valves and breaker boxes. Based on a mission file provided at the start of the test trial, the robot will need to visit the appropriate stations and set the valves and breakers to specific positions.
- Stair Vacuum Bot: This is a robot that is designed to clean up the surface of stairs using a vacuum. The robot must be designed to be able to climb the stairs without falling, as well as clean each step.
- IV Injection Bot: This is a robot that aims to inject an IV into the vein of a test dummy. It should be able to locate the vein autonomously and accurately insert a needle into the dummy's arm.
The unique aspect about the project is that you get to set your own pace. At the start of each week, you meet with the professors and TAs to discuss your goals for the week. Then later in the week, you have a "system demo", where you show what you promised to deliver. This means that you can choose whatever your team wants to show; if you meet those expectations, then you get a good grade on the demo. The catch is that you need to make sure that you make enough progress each week to actually finish the project by the end of the semester. Thus, it is good to be as proactive as possible so that your team is hitting milestones early on -- the semester will go by fast! Try to accomplish more than what you promise for the system demos.
In addition to the demos, you will have a number of written assignments and presentations:
- Your project starts with a design proposal, which will have you outline the basic design concepts (mechanical, electrical, software, etc.) for your robot.
- Each system demo is accompanied by a short written report summarizing your individual progress and challenges that week.
- There is a midsemester presentation where you describe your team's progress thus far.
- There is the final presentation and demo where your team shows off everything that you have accomplished.
- Your team will maintain a website throughout the semester, adding content to the site as you progress.
The reports and presentations are more time-consuming than difficult, but you should be fine if you dedicate enough time for those tasks.
Here are a few more points of general advice for the project:
- As mentioned before, the best advice for the project is to start as early as possible! The final few weeks of the semester will be stressful for everyone, and it can be incredibly difficult to integrate everything together in that final stretch. You can have your independent subsystems working perfectly, but actually getting a fully-functional robot can be the hardest part of the project.
- Your team will need to decide who does what early on. It's good to think about the different components of your robot (electronics, firmware, perception, mechanical design, etc.) and then deciding who will be responsible for what, based on their background. Teammates can certainly help each other, but it's helpful to have dedicated roles in terms of project logistics.
- You should aim to get the independent subsystems working as quickly as possible, but don't rush it -- you don't want to run into confounding bugs because of mistakes made in hardware or software early on.
- Be sure to order parts as soon as you anticipate a need for them. First, check if the course inventory doesn't have those parts already, or if you can't get them from a lab or club. If you must order the parts, then do so immediately since you could run into shipping delays for whatever reason.
- Mechatronics is a unique course in that it is very possible to cause real, structural damage to your team's robot. Motor drivers can burn up, microcontrollers can die, batteries can explode -- any number of issues can cause serious setbacks to your team. Thus, it is imperative that you and your teammates are as careful as possible! It is not a bad idea to use the "buddy system" -- always work in pairs, especially with electronics and hardware. That way, you can always double-check each other before doing something potentially catastrophic.
- Have fun! There are few classes that give you such creative freedom over how to approach a design problem. Accept that the project will be difficult, but you will have the opportunity to create something truly awesome. Nobody coming into the class is an expert at everything; use this course to expand your horizons in robotics and to learn from your teammates.
- Course Description
- C/C++ Reference, great programming resource
- Arduino Libraries, compatible with a large number of boards
- OpenCV-Python, useful if you plan to do any computer vision with your robot
- The Art of Electronics, great for learning or reviewing circuits knowledge
- HyperPhysics, another great resource for reviewing background in circuits
- Example of a ShipBot Team's Website from Spring 2022