For our final project for ME 461, we used color recognition to control our robot’s movement. There are three cups with different colored fluorescent tape (pink, yellow, and blue) on them.
The robot picks out its favorite color amongst three choices: pink, yellow, then blue. It then actualizes a servo to tip them over. Initially, the robot makes a circle until it sees the target color. It stops in the direction that it needs to go and plays a sound. Then, we manually move forward in that direction, and then start the servo sequence to tip over the cup. After the cup is tipped over, the robot manually backs up.
Our robot is in the SegBot configuration and utilizes code to keep it balanced. In addition to the robot configuration we've been using through the semester, a myRIO module and USB camera were added for color recognition. LabVIEW was used to code the myRIO. A servo arm on the robot is used to tip over the cups and was added to the robot.
Here is a more in-depth video explaining the sensors and actuators that we used for this project and where they are connected to our robot.
Also, for powering the myRIO module, we had to solder the power chord shown below. We were given an adapter and then had to solder the red and black chords to 12V and ground respectively.
For this project, Brenna focused on implementing the color recognition and coding the myRIO through LABView, as well as the communication between both boards. Breanna was in charge of balancing the robot in its SegBot configuration and implementing the servo and sound that is played. Click here to view the number of hours we spent in the lab.
Here is a video close up of Brenna's LabVIEW software working to recognize all three colors.
An algorithm that was incorporated into this code was the state machine code discussed in lecture using the Kuri example. Brenna built the base of this code for this operation and it is the main piece of code that moves the project along by using a series of if, else, and if else statements to determine the states that the robot can be in. This ultimately allows for autonomous decision making. The code was later fleshed out by both Brenna and Breanna.
In addition, Breanna created the design for the servo arm mechanism that would be used to tip over the cup. The servo was mounted to the green board using a servo mount. A servo with a laser cut arm was found but the length of it was not ample, so two metal brackets were added using velcro to extend the length of the arm. The complete servo arm is shown below.
Below are photos of our complete robot.
Below are videos of our robot working.
Comments