Lego Mindstorms FLL Robot and Classroom Engineering Projects

Introduction: Lego Mindstorms FLL Robot and Classroom Engineering Projects

Hi! My name is Aaed Musa I am 16 years old, an aspiring engineer, and I am a volunteer coach for the FLL team Master Builders at Shiva robotics academy. In this Instructables I will show how my students and I engaged in 3 unique engineer projects. Building a FLL robot for the 2019 FLL city Shaper competition, Creating a Lego 3d printer, and designing and building a Automated Nerf gun. My students enjoyed building these projects with each other, and it brought out the engineer in all of them. All of these projects have the same main 3 aspects, designing, building, and programming. My FLL team is comprised of kids from grades 2-6 with many of them under 4th grade. It is very important to note that having a younger group of kids doesn't mean you cant do this project, the desire and drive of the kids will allow them to make this. This is a great resource for both students, teachers, parents, and even people who just have interest in Lego's, 3D printing, cad design, and EV3 programming. Whether you are a teacher looking for a project for your class, a student looking for something to do at home, or just an enthusiast looking for a personal project to engage in, you have come to the right place. If you follow my advice and steps you can make 3 great projects, and continue to use these ideas in your own projects. Lets get started!!!

Step 1: FLL Robot

From steps 2-13 I will showcase the FLL Robot project that My team built. This Robot is specifically designed for the 2019-2020 City shapers competitions, but it can be used for personal robotics, and other Lego competitions. The robot features our own designs and our original mechanisms. In the city shapers competition robotics teams are suppose to make a Lego robot that can accomplish missions on the board. The students have 2 minutes and 30 seconds to complete as many missions on the board as possible.

Step 2: Supplies

If you wish to follow this project the same way I have, you will need

  • A Lego Mindstoms kit that can be bought here

From the Kit I used the following electrical parts

  • 3 large motors
  • 1 medium motor
  • 2 touch sensors
  • 1 color sensor
  • 1 gyro sensor
  • 1 Lego Mindstorms EV3 Brick

Other material

  • Lego gear racks which can be bought here
  • A laptop with the ev3 software which can be downloaded here
  • A FLL city shaper Mat
  • lots of random lego pieces

Step 3: Building the Robot and Robot Design

We designed our robot in a software called LDCad which allows you to make design's using Lego's. We first built our robot and then I had the kids design it in the software as a way to document our creation. If you would like to build the robot go to the following links to both download LDcad and download our Robot model. Go through each of the parts 1 by one, find each piece and attach them using connectors.

LDCad software download link

Our Lego Robot Model

Our robot was made with many different alterations and has undergone many changes, we initially had 2 robots and decided to consolidate it into 1 because of problems with different programs being on each. Then we changed it to a sort of box like robot but the motor attachments did not fit well, finally we changed to the current version we have now which has 2 very important mechanisms. The first is the elevator mechanism and the second it the arm mechanism. Here are some details of each as well as detail of what was used.

Elevator

The elevator mechanism which is permanently attached to the robot was added because it can be used with many attachments efficiently. The elevator allows attachments to move up and down which is the most important thing for these types of missions. The elevator mission, the crane mission, the tree mission, and the traffic mission all need attachments that can move up and down. An elevator seemed like the best idea because anything can be attached to it making it able to move up and down. The other benefit with the elevator is that it allows minimal attachments, because it moves in a linear fashion it can then have the same attachment for multiple missions. the elevator was simply made by using Lego gear racks and gears as well as 1 large Lego motor to turn it. Some of the uses of the elevator include moving objects up and down, hitting an object and moving the attachment up so it is out the way, and pushing a mission upwards.

Arm

The arm mechanism utilizes a medium motor and 2 black Lego gears to move the arm up and down in a circular motion. This is very useful for hitting thing and retracting the arm. most Importantly it is used to assist the elevator mechanism by fully lifting an object. For example in the traffic mission the elevator lifts the mechanism a little, and them the arm fully lifts it. The arm allows things to be done faster as well ass a retractable piece that folds in. The design of this was made by the kids and was very smart because it saved us from having too many attachments.

Motors

2 large motors are used for the wheels and steering while 1 of them is used for the elevator mechanism. 1 medium motor is used for the arm mechanism.

Step 4: The Jig

A Jig can be defined as a device that holds a piece of work, and guides the tool operating on it.The Jig is essential when completing missions to make sure that every time the robot runs it is a certain distance from the wall. The 3rd picture is our original Jig, but we then changed it to the one in the first 2 pictures. To use one you simply align one side to the wall of the FLL board and you push the robot to the other side of the Jig. This ensures that you have the robot start in the same place every time it runs a program.

Step 5: Attatchments

So far we have used 3 attachments for the 2019 competition but that can and will change depending on the efficiency of them and our ability to complete missions. Attachments are essential because not everything can be built on the robot. Some attachments may hinder another so it is better to have a attachments that are removable so you can add other ones when needed.

List of attachments

  • A flat panel for pushing the blocks
  • 1 angled wedge for the crane mission
  • A long rod piece for the elevator mission

The next steps will go in depth of each of the missions we have done.

Step 6: Program

The programming is the second major essential part of making a Lego robot aside from actually building the robot. You may have a great robot but a bad program making the robot seem useless. Knowing how to program using the Ev3 software and being able to teach it to your class is essential to the success of your project or competition.The Ev3 software features 6 colored tabs at the bottom of the screen.

  1. the green tab is the action tab, in this tab you will be able to make motors move with either the large motor or medium motor as well as add sound or text to the robot.
  2. the orange tab which is the flow control tab is the tab with loops, switches, plays, and delays. Loops are used to make things continue until specified criteria are met, and switches tell the robot to do 1 thing if something has reached a specified criteria, and do another thing it it doesn't meet the criteria.
  3. the yellow tab is the sensor tab which has all the sensors in it such as the ultrasonic sensor, touch sensor, and gyro sensor. Each sensor tells certain information and can be used with loops and switches to produce certain outcomes.
  4. The red tab is the Data operation tab. the data operation tab has all the math blocks, and variable/constant blocks. A variable stores a certain word to a certain numerical value or a certain text. Variables can be used when you have the same numerical amount in many places. Instead of typing 598 fifty times you can make 598 a variable and add it anywhere Constants are just variables that do not change. Math blocks are used to make equations and have numbers perform basic algebraic expressions.
  5. The blue tab or the advanced tab features some advanced blocks that you probably wont use that much. It contains things like comments, and stops.
  6. The Light blue tab or the My block tab allows you to take certain code and turn it into 1 block. this is very useful if you have certain lines of code that you use periodically. Instead of typing it every time, you can turn it to 1 block. Once you make a block, it will be accessed in this tab.

All our code can be found here

The gyro, reset, and line follower my blocks can be found here

Step 7: Block Mission

On the mat there are multiple different colored circles. these are meant for the block missions. the robot is suppose to push these blocks into the circle. For this mission we created a flat panel as our attachment so it could push many of the blocks.

Step 8: Elevator Mission

The elevator mission is made for the robot to hit it (which turns it to the other side) and then move back without hitting it again. This is were the elevator mechanism comes in handy. We made a long rod attachment that fit on the elevator and when it hits it it moves up, clearing the rod from hitting it again when it moves back. The code we used can be seen in the pictures.

Step 9: Swing Mission

The swing mission is made for the robot to hit a support that holds a woman in a wheelchair letting her swing. We decided to use the arm mechanism for this as well as a line follower. The Robot followed the line until it gets to the swig and then lifts the arm and releases the swing and moves back to base. Before the arm mechanism we used just a regular rod. The code for this can be found in the pictures.

Step 10: Robot Reset

In the beginning of each program the robot has to reset so that it knows its position or else it will mess up. The 2 mechanisms we use (elevator, and arm) can be moved and hindered when its not running, so when each program starts each mechanism moved all the ways down until it hits the touch sensor. This allows it to have a set position it returns to every time a program runs. Think of it as an end stop on a 3D printer. It basically resets all the mechanisms, sensors and rotations of motors. The code for this can be found in the pictures.

Step 11: Color Sensor

A color sensor is used to measure and detect either a specific color, reflective light intensity or ambient light intensity. The black lines in the board are made for color sensors to follow it. For the color sensor on this robot we will use reflective light intensity for 2 reasons. Reflective light intensity measures how much light reflects back on the sensor. This way when we want to follow the black line on the mission board we can tell it to stay at a low reflective light intensity ( under 30) which is the reflective light intensity of black. If it Goes over this range it will turn either left or right. Whenever attaching a color sensor you always want to attach it to the bottom and front of the robot. You also want it pointed down and almost touching the ground as well as not being too far from the ground. The code we used can be found in the pictures.

Step 12: Gyro

The Gyro sensor was used to make the robot move in a straight path. It does this by checking the angle of the robot and editing it to remain at 0 which is going straight. The gyro is very useful because Lego motors drift a lot making the robot turn unexpectedly. When you are attaching a gyro sensor you want to make it parallel to the direction the robot is facing. The Gyro straightens this out and makes it go forward without drift. You can also change the number that is 2.5 on the gyro program to make it change sharper. A higher number will produce a sharper turn. But beware if it turned to sharp the robot will wobble and not move. Gyros can also be used to turn the robot as at a specific degree. The code can be found in the picture.

Step 13: Touch Sensor

A touch sensor can sense 3 things, whether it has been pressed, bumped or let go of. You can use this with a switch or loop to make a motor keep moving until it presses the touch sensor. This acts like an end stop and is very effective especially when you have mechanism's that need to start at a certain place. The code used for this can be found in the pictures.

Step 14: Nerf Rival Assist

This is our Nerf Rival assist that we designed, 3d printed, built and programmed. The Nerf rival assist is an automated Nerf gauntlet and turret the shoots Nerf rival bullets with the press of a button. What makes this special is that it can be controlled from far away because it uses an IR sensor. The Nerf rival assist has proven to be able to shoot long distances, shoot at top speeds, and shoot with accuracy. My students and I made this as a little side project that they all enjoyed. We all designed it in Tinkercad and then printed it on my CR-10 3D printer. From steps 14-18 the building of this will be explained. the Rival assist requires soldering which needs to be done by an adult and NOT BY THE CHILD. You will also need access to a 3D printer.

This contraption utilizes the following 3 unique mechanisms.

The magwell

The magwell allows the magazine to be pushed in to unload the bullets. This was done by designing a Magazine well that can push on the lever of the magazine when it is loaded.

The loader

The loader moves the bullets to the flywheel. It utilizes a gear to push the bullets forward. The loader is effective because it allows one bullet at a time to be shot while restraining the others. It can also release multiple bullets to be shot at a time. The loader is also designed to not jam the bullets and have smooth contact.

The flywheel

The flywheel uses 2 12v DC motors to spin in opposite directions to shoot the bullet. When the bullet is pushed through by the loader it is then spun very fast by the flywheel and is launched forward. The flywheel is the most important mechanism and the heart of the Nerf rival assist.

I utilized both functions of tinkercad to create this. I used the design tools to make the model of the rival assist and export it to be 3D printed on my CR-10 3D printer. I also used the circuits tool to create a schematic and write the code for the gauntlet which allows it to have its unique abilities. The Nerf rival assist features the following.

LCD display

The LCD display shows the battery percent of the 11.7v lipo battery as wells as if the magazine Is fully pushed in.

Lipo battery

The Rival assist includes a 11.7 volt lipo battery that can be recharged without fully taking it out.

End stop

There is a mini endstop switch that detects if the magazine is in or else it won’t shoot. This is located next to the magwell. The magazine has an attachment that allows it to push the endstop when fully in.

IR remote and receiver

The Nerf rival assist features a IR remote and IR receiver that allow it to work from far distances as long as you have the remote. The power button on the remote spins the flywheel while every button except 2-9 shoots 1 bullet by activating the loader. The 2-9 buttons shoot that number of bullets rapidly. So, pressing 5 would shoot 5 bullets continuously.

Step 15: Supplies

I used the following supplies to build this, The total price was about $170 but it was definitely worth it. Your class will enjoy making it. We created this in about 2 months, and we enjoyed every minute of it. Most of the parts can be found on amazon. The parts list with links to where I bought them can be found in the file titled "Nerf rival assist parts list" below.

Nerf assist parts list

● 2x Uxcell Shaft Coupling 2.3mm to 3mm Bore L26xD10 Robot Motor Wheel Rigid Coupler Connector Each - $6.79 Total - $13.58

● 1x Momentary Hinge Metal Roller Lever Micro Switch Total - $2.50

● 1x LiPo Charger 2S-3S Balance Battery Charger 7.4-11.1V Total - $14.99

● 1x Male Female Bullet Connectors Power Plugs Total - $1.25

● 1x 7 Round Cartridge Magazine Replacement Bullet Clip for Nerf Rival Zeus Apollo XV-700 / XVIII-700 Blasters BB035 Total - $9.00

● 1x Arduino nano Total - $9.00

● Solder Total - $2.00

● 22awg wire Total - $8.00

● 2x L298N Motor Drive Controller Board Module Total - $9.00

● ⅛ inch heat shrink tubing Total - $2.00

● ½ inch heat shrink tubing Total - $0.50

● 1x 11.1v Lipo battery Total - $16.00

● 1x IR receiver and remote Total - $10.00

● 1x 1602 LCD Total - $6.00

● 13x M3 x 14mm hex screws Total- $1.50

● 13x M3 3mm Female Thread Hex Metal Nut Fastener Total - $1.50

● 2x M3 x 50mm hex screws Total - $0.50

● 1x Mini Gear motor Total - $10.69

● 2x 27mm dc motor Total - $12.00

● 2mm black foam Total - $2.00

● 1x 10k potentiometer Total - $1.60

● 1x 100k ohm resistor Total - $0.06

● 1x 10k ohm resistor Total - $0.06

● 1x electronic switch Total - $0.50

● 7x ammo Total - $1.00

● 1x wrist brace Total - $10.00

● 8x 5x5x3mm magnets Total - $1.44

Filament

● Blue filament Total - $16.18

● Black filament Total - $0.71

● Grey filament Total - $0.07

● White filament Total - $5.53

● Orange filament Total - $0.22

Total - $22.5

Parts price - $169.62

Step 16: Design

We designed the Nerf Rival assist in tinkercad and printed it on my CR 10 3d printer. Using the models you should be able to assemble the Nerf rival assist. The motors go under the flywheel in the casing. The endstop goes in the space provided in the magwell, the arduino and the wires all go under in the compartment. here are all the 3D model files. There are a lot of files but many of them are small prints.

Step 17: Code

We coded the Nerf rival assist in Tinkercad as well using both block programming and regular arduino code. When you upload this to Arduino the Nerf rival assist should work just like ours. Here is PDF of the code, copy it and paste it into Arduino.

Step 18: Circuit Design

The circuit design was also made in tinker cad. The circuit design can be downloaded and viewed here. All electronics used are in the schematic.

Step 19: Lego 3D Printer

The Last project is a Lego 3d Printer. It can print basic shapes and lines. It works by using a 3d pen to print thin layers of filament over and over each other which then gives it height. This is how a traditional 3d printer works. The only thing is that you have to program each object you want to print. Here are a list of materials we used.

Supplies

1 x Lego EV3 minstroms kit that can be bought here ( We used the older version of of the mindstroms kit called NXT but wither will work)

1 x 3d Pen that can be bought here

3 x large motors from the Lego Mindstorms kit

3 x touch sensors from the Lego Mindstorms kit

lots of Lego Technic pieces to assemble it

Step 20: Design

The Lego 3d printer much like a traditional 3d Printer uses 3 axis's (X, Y, and Z). The actual build plate moves in the x and y direction while the extruder moves in the z direction. The 3d pen is mounted on a plate that is connected to a motor that moves up and down. We used Lego gear racks to make the motors move across in a controlled manner. Go to this link to get the full LDCad file of the 3d printer o build your own.

Lego 3d printer model

Step 21: Program

There are 2 main programs we made for the 3D printer. One is a calibrate/reset program that moves the motors until it hits the end stop on all 3 axis's. It does this to make a common position for the printer every time it starts up. This acts like an endstop on a traditional 3D printer. The second program is a block program and can 3d print a block about 1 inch wide and 1 inch long. It basically has 2 different movements looped for x amount of times, making x amount of layers.

The program can be downloaded here

Step 22: Conclusion

Thank you for viewing this instructable, I hope you were able to learn a couple of things and get some ideas of how to implement engineering, and robotics into your classroom. If you have any other questions feel free to contact me at printedgadgets@gmail.com. Thanks!!!

Robotics Contest

Runner Up in the
Robotics Contest

Be the First to Share

    Recommendations

    • Arduino Contest

      Arduino Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Barbecue Speed Challenge

      Barbecue Speed Challenge

    3 Comments

    0
    t3_265
    t3_265

    Question 1 year ago on Step 2

    Can the instructions be downloaded?

    0
    seamster
    seamster

    1 year ago

    Very nicely done! : )