Welcome to my Lego Robotics STEM II Page here you will see the Lego robot that my team was able to put together. We used programs like Lego Mindstorms, Google Slides, and Screencastify. Our group had to submit a slideshow presentation that was recorded on Screencastify.
The Lego Robotics project in STEM was a very interesting project because the student learned how to use coding blocks to move a robot. The program we used to create the code for the robot was called Lego Mindstorms. This program allowed each student to download coding blocks to the EV3 brick, the EV3 brick was pretty much the brain if the robot. This project was a team project that consisted of five people. By putting in hard work and good collaboration this project would become a success. Read on to learn more!
Taken 11/18/2020
Taken By: Michael Holmberg
Picture of code.
This is a picture of the code that our group created to make the robot follow the line.
For this project the task was to create a robot that could pick up and drop off a ball at the end of a track and at the beginning of the track. (Look at track below). The robot would start off with the ball in the beginning and would have to drop it off at the end. At the end of the track, another ball was waiting so it would have to be picked up and dropped off from where the robot had started. However, there would be a wall that the ball could be supported against to make it easier to pick up. The robot was required to follow the black line using a light sensor to determine the change in values in reflected light intensity.
This was the track that our group had to use in order to complete the task. There were two tracks the first one was much easier but our group wanted the challenge so we decided to go with a more difficult track.
Taken 11/16/2020
Taken By: Michael Holmberg
Picture of assembling the robot.
Here in this picture you can see how the EV3 brick was placed up on its side and the light sensor placed between the two large motors. The scoop in this picture is not fully completed but the medium motor would be placed around the area of the persons pinky finger. The motor would spin an axle which made the scoop lower and raise.
In the building stages of our robot we had decided to go with a completely unique design. We placed the EV3 brick up on its side to maximize the space that is available. Since the EV3 brick was on our side, it gave us access to place the light sensor in between the motors. This allowed for a more accurate and direct response to turns and placement. To make sure we maximized space usage, we decided to build a stand so the ultrasonic senor could easily determine any wall or object in front of it. Next up we have the scoop. This scoop was created to easily pick up the ball and was powered by a medium motor. The motor was connected to a gear so when the motor turned the gear would turn. When that gear turned it would then turn the gear connected to the scoop allowing it to pick up and drop off the ball.
In the coding portion of the project our group decided to choose a specific type of code that would allow our robot to almost directly follow the line. How our code worked was there was a light sensor that would try to find the grey value on the line. The grey value our robot detected was 48. If the robot was directly on the line the next block of code would tell the robot to do 48-48 which equals 0. 0 means that the motor is going to go straight. Lets say for example if the value was 65. The robot would do the equation 65-48 and get 17. Since it does not equal 0 it has to go through a standard correction value which is 0.39. Once that correction value is solved it is placed in another equation. That equation is A+B-C.
A is the grey value (48) B is the correction value product (.39 x 17 = 6.63) and C is (16). 16 is a standard number to correct the motors because for our robot one motor was stronger than the other so we had to correct it with the number 16 and the number 15. Moving on, the 48 and 6.63 would be added to get 54.63. Then 54.63 would be subtracted by 16 which is 38.63. 38.63 would be the power of one motor which the number stands for how much percentage of power its using. Then for the next motor another equation is used, A - B - C. Each variable is the same but this time were subtracting A and B. So 48 - 6.63 - 15 = 26.37. Since the one motor is moving faster than the other this would be considered to be a right turn (The left motor was described first). This all is placed in its own loop so the robot knows to continuously pick up different values to follow the line. The loop was on a timer because we timed it to stop at the end. Next on the list, we had an ultrasonic sensor with a true false statement block with it. The true false block was placed into a loop that made it forever searching for values. If any value 11 inches or less was picked up the robot would turn, lowering the scoop. Then it would turn back to its original position, go forward, and raise the scoop. This motion was so the robot could pick up the ball. There was nothing placed in the false portion of the command.
Taken 11/18/2020
Taken By: Michael Holmberg
Picture of the robots code.
This is an image of the code. It was complex but worked!
This video shows our robots performance when placed on the track. Watch carefully on how it corrects itself on the track using the code that I explained above.
This was our groups presentation. Enjoy :)
For more information about the Lego Mindstorms program visit the website hyperlink below: