Reader small image

You're reading from  Smart Robotics with LEGO MINDSTORMS Robot Inventor

Product typeBook
Published inMay 2021
PublisherPackt
ISBN-139781800568402
Edition1st Edition
Concepts
Right arrow
Author (1)
Aaron Maurer
Aaron Maurer
author image
Aaron Maurer

Aaron Maurer, also known as “Coffeechug” is the STEM lead for 21 school districts in Iowa helping to expand STEM, Computer Science, Makerspace, and Purposeful Play into classrooms K-12. Aaron is also a former FIRST LEGO League coach for 8 years with much success working with phenomenal kids. He has a Master Educator License with endorsements in 5-12 Psychology – 163; 5-12 World History – 166; 5-12 American History – 158; 5-12 Computer Science – 278; PK-12 Talented and Gifted – 107; 5-8 Middle School Generalist – 182; and K-8 Computer Science – 277. Currently, Aaron is a member of ISTE Making It Happen Award; Lego Education Ambassador and Master Educator; PBS Digital Innovator and All-Star; PITSCO Tag Committee; Microsoft Innovator Educator Expert; Microsoft Innovative Educator Fellow; Global Learning Mentor (formerly Skype Master Teacher); Minecraft Global Mentor; and Makey Makey Ambassador. Finally, Aaron was a finalist for the Iowa Teacher of the Year in 2014.
Read more about Aaron Maurer

Right arrow

Chapter 7: Building a Dragster

Dragsters that race and are designed for speed are a classic build and one that every builder creates at some point in their lives. I have operated the summer MINDSTORMS Robotics camp for several years and the dragster challenge is a favorite every year that the kids always want to compete in. Whether designing for yourself or competing against others, racing is a blast. In this chapter, we will build a dragster using this kit to see how it turns out in terms of speed and design:

Figure 7.1 – Top view of the dragster you will build in this chapter

In this chapter, we will break down the build and program as follows:

  • Building the motor frame
  • Adding the wheels with a gear
  • Developing the body of the dragster
  • Adding the body design
  • Programming the dragster to race and capture time

Technical requirements

For the building of the dragster, all you will need is the Robot Inventor Kit. For the programming, you will need the LEGO MINDSTORMS app/software.

Access to the code can be found here: https://github.com/PacktPublishing/Smart-Robotics-with-LEGO-MINDSTORMS-Robot-Inventor/blob/main/Chapter%207%20Dragster%20Code.lms.

If you would like a more detailed, photo-by-photo build process of the dragster, please head here to view the images: https://bit.ly/3tlu77b.

Building the dragster

Before we get into the building of this dragster, let's explore the strategy being used for this dragster. The strategy for drag racing is all about speed – how fast can we get from the starting line to the finish line? That is it! The design of this particular dragster is based on the following strategies:

  • Sitting low to the ground to eliminate drag
  • Friction points: The less friction we have the better
  • Gearing up to max out the speed of the dragster
  • Weight balance to help the dragster stay straight

Keeping these features in mind will help you understand why the dragster is built the way it has been designed. Additionally, the dragster has been designed in a way to allow plenty of customization to be done to it without losing sight of these strategies. The body design has been created to give the look of a dragster, but you could easily modify the design to your own liking, as well as adding or reducing weight to the dragster...

Programming the dragster

The code for this project is designed to achieve the following objectives:

  • The dragster needs to count down 3-2-1 to make sure people have time to move out of the way.
  • The dragster needs to stop when it sees the red finish line.
  • The dragster needs to display the time to avoid human error when using a stopwatch.

The ports

Before we begin to code, you need to make sure you have all the parts properly connected to the Intelligent Hub. Start with the motors. The motors should be plugged into ports B and F. It does not matter which motor goes into which port as long as they are B and F. Both motors will simply move forward.

You will next connect your color sensor to the Intelligent Hub by clipping into part A. This sensor will help us stop at the finish line.

Dragster code program

In this section, you will walk through how to program the dragster to count down 3-2-1 and then take off at full throttle to achieve the fastest time...

Make it your own

And now it is time to hand the dragster over to you. This is where you can take what you have built so far and customize the dragster to your liking. Plenty of pieces have been left in the bin, such as designing aesthetic features, new approaches to making your dragster more intuitive, and plenty of coding options to take the dragster to the next level.

Here are a few ideas to consider:

  • What can you change on the body of the dragster to look like a dragster you would drive?
  • Search online for different dragster designs and tweak this model to another body design.
  • If you don't want to use the color sensor, then how could you use the distance sensor to race down the track?
  • What are other approaches to help your dragster become faster? Less weight, better gearing, and drag resistance reduction are a few things to consider.

Summary

In summary, we explored the concept of gearing up to increase the speed of your dragster. You also explored the timer block in the coding as well as the use of the broadcast block. Again, this is one of my favorite build challenges because you can spend hours designing the perfect dragster to become as fast as possible. It is a timeless activity that everyone loves.

In the next chapter, you will be building a decorator dragster that will allow you to design eggs and ornaments.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Smart Robotics with LEGO MINDSTORMS Robot Inventor
Published in: May 2021Publisher: PacktISBN-13: 9781800568402
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Aaron Maurer

Aaron Maurer, also known as “Coffeechug” is the STEM lead for 21 school districts in Iowa helping to expand STEM, Computer Science, Makerspace, and Purposeful Play into classrooms K-12. Aaron is also a former FIRST LEGO League coach for 8 years with much success working with phenomenal kids. He has a Master Educator License with endorsements in 5-12 Psychology – 163; 5-12 World History – 166; 5-12 American History – 158; 5-12 Computer Science – 278; PK-12 Talented and Gifted – 107; 5-8 Middle School Generalist – 182; and K-8 Computer Science – 277. Currently, Aaron is a member of ISTE Making It Happen Award; Lego Education Ambassador and Master Educator; PBS Digital Innovator and All-Star; PITSCO Tag Committee; Microsoft Innovator Educator Expert; Microsoft Innovative Educator Fellow; Global Learning Mentor (formerly Skype Master Teacher); Minecraft Global Mentor; and Makey Makey Ambassador. Finally, Aaron was a finalist for the Iowa Teacher of the Year in 2014.
Read more about Aaron Maurer