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 9: Creating Plankton from SpongeBob SquarePants – Part 1

What better way to learn about robots than to create an iconic cartoon character? Of course, I am talking about Plankton from SpongeBob SquarePants. If only you had yellow and pink LEGO elements in the kit to build the whole cast! In this chapter, you will build a toy model of Plankton. This build is divided up into two chapters. This chapter focuses on building the main structure of Plankton. Chapter 10, Creating Plankton from SpongeBob SquarePants - Part 2 focuses on the final touches to make him look more like Plankton and on interactive coding to bring the character to life. Let's dive into the sea of possibilities.

Here's what your Plankton model will look like by the end of these two chapters:

Figure 9.1 – The complete view of Plankton model you will build in this chapter

In this chapter, we will break down the build and program into the following sections:

...

Technical requirements

To build the robot, all you will need is the Robot Inventor kit. For programming, you will need the LEGO MINDSTORMS app/software.

Access to the code for this chapter can be found here:

https://github.com/PacktPublishing/Smart-Robotics-with-LEGO-MINDSTORMS-Robot-Inventor/blob/main/Chapter%209%20Plankton%20Code.lms

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

Building the robot

The strategy in the design of Plankton is to consider the elements of the kit that will allow you to bring a cartoon character to life. In the end, you want to be able to interact with your build much like any animatronic toy. In order for this to happen, the robot build must have the following characteristics:

  • Be able to turn its head from side to side
  • Be able to move its arms
  • Have animation of the eye to express emotion
  • Be able to respond to the environment by using color and distance sensors
  • Be able to speak popular phrases from the show

Keeping these features in mind, you will understand the building process. More importantly, you will be able to tweak this build to your liking by adding animations, phrases, and other responses to the environment as you see fit.

Building the base of the frame

You are going to start with the base of the robot body and prepare the first motor placement. In order to get started, you will need the following pieces from your kit:

  • One teal 11x19 base plate
  • One motor
  • Three black 5x7 open frames
  • Two red 3L beams
  • Four blue connector pins
  • Ten black connector pins

To begin you will need following pieces from the preceding list:

Figure 9.2 – Parts layout

You will start by adding the four blue connector pins to the sides of the motor where the gear spins on the motor. Keep the 2L side of the connector pin exposed.

This is illustrated in the following image:

Figure 9.3 – Connectors added to motor

Next, slide on the red 3L beams on each side, as illustrated in the following image:

Figure 9.4 – Red 3L beams added to motor

Finally, clip on the black open frames on the 7L side, making sure...

Adding the motors for the arms

Locate the following elements for the arms:

  • Two motors
  • Four black 3L beams
  • Six black connector pins
  • Two gray connector perpendicular pins

The required pieces can be seen in the following image:

Figure 9.12 – Parts layout

Start this section by connecting the gray connector perpendicular pins to the gray part of the motors. It is easier if you have motors facing down, to ensure you properly build the part in the right direction to fit on the main frame. This is illustrated in the following image:

Figure 9.13 – Gray perpendicular pins added to motor

Next, add a black 3L beam to the other end of the gray connector perpendicular pins and insert a black connector pin in the middle hole of the black 3L beam, as illustrated in the following image:

Figure 9.14 – 3L beam added to motor

The next step is to locate the black 3L beams that have...

Adding the color sensor

Let's begin to frame up the body a bit. In this section, you are going to build the front panel of Plankton that will house the color sensor, to give some interaction with the environment.

For this section, you will need the following pieces:

  • Three teal 3x3 Technic pieces
  • Seven blue connector pins
  • Four teal 9L beams
  • One color sensor
  • Twelve black connector pins

Before we add the front plate, you are going to add a couple of pieces to the top of the robot frame you have assembled so far while everything is exposed. Find one of the 3x3 teal Technic pieces and three blue connector pins. These pieces are illustrated in the following image:

Figure 9.22 – Parts layout

Add the 1L side of the blue connector pins to the three holes of the top motor. Make sure before you do all of this that your motor is aligned to 0 as far as possible. Locate the gray dot and align it the best you can. Slide the teal...

Assembling the mouth

For this next part of the build, it's important to pay attention to detail. Double-check your work and, as you go, test things out so that the mouth moves properly. There are several parts to this build, so this section will split the parts up as you go, to navigate through the parts easily.

To begin the mouth, you will need the following pieces:

  • One motor
  • Two teal T beams
  • Four black connector pins
  • One red axle connector pin
  • One tan 12-tooth half-bevel gear

Begin by inserting the four black connector pins to the top two holes on the motor where the gear spins. Additionally, insert the red axle connector pin in the middle of the motor gear and slide the tan 12-tooth bevel gear onto the red axle connector pin, as illustrated in the following image:

Figure 9.35 – Four black connector pins, red axle, and gear added to motor

Next, take the two teal T beams and attach them to both sides of the motor...

Attaching the Intelligent Hub

This next part is the really exciting part because this is where you will add the brains of the operation—you will start to see Plankton come to life with this section of building.

To kick things off, you will need the following pieces:

  • Two black 5x7 open frames
  • Eight black connector pins

The required pieces can be seen in the following image:

Figure 9.62 – Parts layout

Each open frame will have four black connector pins attached to it. Two will be on the edge pin holes, on the 5L side. Along the 7L side at the bottom, add the other two black connector pins, as illustrated in the following image:

Figure 9.63 – Black connector pins added to open frames

Using these two black connector pins, connect each open frame to the motor that will activate the mouth of the robot, as illustrated in the following image:

Figure 9.64 – Open frames...

Summary

In summary, you designed the first part of Plankton. You explored some new ways of using gears to build a mouth that moves, along with inserting sensors. Additionally, you have positioned the Intelligent Hub to serve as a face. Using many of these techniques, your Plankton is almost ready for animatronic action.

In the next chapter, you will continue this build by adding all the aesthetic details and writing some code to bring the robot to life.

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