ME 497: Mechatronics
In the Spring semester of 2019, I enrolled in a Mechatronics course for one of my Engineering electives. This course turned out to be one of my favorite classes I had taken during my undergraduate career. It was a mixture of lecture and lab which I enjoyed thoroughly. The beginning stages of the course focused on understanding the basics of the Arduino microcontroller. After a few weeks, we began to incorporate different devices such as TTL chips, encoders, potentiometers, servo motors, IR sensors, and DC motors into programs through the microcontroller. The purpose was to learn about these devices and eventually integrate them onto a single platform: a RedBot. In the final few weeks of the class, we were tasked with developing various RedBots that would carry out the following tasks: (1) a talent show, (2) an obstacle course, and (3) a wall following robot. A description of the tasks are as follows:
All code for these projects can be found here.
Talent Show
The first project was focused on getting everyone acquainted with the RedBot platform and some of their unique parts. The talent we programmed onto the RedBot was inspired by the upcoming release of the final Game of Thrones season. We programmed our robot to 'sit' in the Iron Throne and play the famous soundtrack from the series. Onboard, we had a mechanical bumper attached onto the lower frame of the RedBot. This sensor was going to be used in order to inform the robot on when to 'sit down'. Once the bumper came into contact with the chair, the RedBot would reverse, make a 180 degree turn, and then reverse into the chair. Once in position, the Game of Thrones theme song would play from the onboard buzzer.
Obstacle Course
The second project required us to develop a remote controller to maneuver our robot around an obstacle course and automatically stop after crossing the finish line. This project was our first introduction to transceivers. We used two RedBot microcontrollers each equipped with an XBee antenna module. One microcontroller would act as the remote control with potentiometers controlling the direction and speed inputs. The other microcontroller was attached to the RedBot and would apply the inputs received to the wheels. In addition, the RedBot had an IR sensor onboard and when the robot came close to the end of the track (a cardboard wall), the brakes (shorting the motors) would be applied.
Wall Following Robot
The final lab involved creating a wall following robot. The focus of this project was to develop a simple feedback control loop that the RedBot would use to move along a wall. The feedback would be used to adjust for any obstacles that come along the path of the wall (indentation, door stopper, etc.). Onboard the RedBot, there was an IR sensor that would function as the feedback sensor. Based on the distance that we wanted the robot to stay from the wall and the feedback from the IR sensor, the RedBot would adjust the speed of its left and right wheel accordingly to maintain that distance. The feedback was modified by a simple proportional gain.