Chapter 2. building your first robot

In Chapter 1, you learned that EV3 robots consist of motors, sensors, and the EV3 brick. To make it easy for you to understand how each of these work, you’ll begin with only some of them.

In this chapter, you’ll use the EV3 brick and two Large Motors to build a wheeled vehicle called the EXPLOR3R, as shown in Figure 2-1. You’ll also add a receiver for the remote control. After you finish building the robot, you’ll learn how to navigate the EV3 by using its buttons and how to control your robot remotely.

The EXPLOR3R moves around on two front wheels and a support wheel in the back.

Figure 2-1. The EXPLOR3R moves around on two front wheels and a support wheel in the back.

The LEGO MINDSTORMS EV3 set contains many beams and axles, which come in a variety of lengths. To help you find the correct element, their lengths are indicated in the building instruction steps, as shown in Figure 2-2.

To find the length of a beam, simply count the number of holes (in the figure, the beam’s length is denoted by the box with the “11”). To find the length of an axle, put it next to a beam and count the number of holes it covers (in the figure, the axle’s length is indicated by the circle with “3”).

When connecting beams or other elements using pins, be sure to select the correct pin based on its color, as shown in Figure 2-3. This is important because nonfriction pins spin freely (and are useful for smooth hinges) while friction pins resist rotation (and are more useful for rigid constructions).

To begin building, select the pieces you’ll need by referencing the bill of materials, shown in Figure 2-4. Next, assemble the robot as shown in the steps on the pages that follow.

image with no caption
image with no caption
image with no caption
image with no caption
image with no caption
image with no caption
image with no caption
image with no caption
image with no caption

Congratulations—you’ve finished building the EXPLOR3R!

Now let’s talk about the wires you just connected to the EV3 brick. You connected the two Large Motors to output ports on the EV3, labeled B and C. Both Large and Medium Motors should always be connected to output ports—to port A, B, C, or D—as shown in Figure 2-5. Sensors should be connected to the input ports 1, 2, 3, or 4. (I’ll discuss sensors in detail in Part II of this book.)

Your EV3 set has three types of cables: four short cables (25 cm, or 10 inches), two medium-sized ones (35 cm, or 14 inches), and one long cable (50 cm, or 20 inches). Always string the cables around your robot so as not to interfere with any rotating elements (like wheels), and make sure they don’t drag on the floor when the robot moves around.

The EV3 brick has two USB connections. The one labeled PC at the top of the EV3 (see Figure 2-5) is used to transfer programs from your computer to your robot. The USB host on the side of the EV3 is used to connect external devices, such as a Wi-Fi Dongle, to the EV3. A microSD card slot next to the USB host port allows you to add to the 4MB of free space on the EV3’s built-in storage. (The built-in storage will be enough for everything we do in this book.)

Before you move on to programming in Chapter 3, let’s try using the buttons on the EV3 brick (shown in Figure 2-6) to navigate around the menus and to run stored programs.

To turn on the EV3, press the Center button, as shown in Figure 2-7. The brick status light should turn red while the EV3 starts up. Once startup is complete (in about 30 seconds), the status light should turn green and you should see a menu with four tabs on the screen. You’ll learn to use each of these menus in later chapters. Each tab contains a specific set of files or functions, listed here from left to right:

  • Run Recent: This tab contains recently run programs.

  • File Navigation: This tab contains a folder for each programming project you’ve transferred to the EV3. Inside each folder, you’ll find programs and related files, such as sounds.

  • Brick Apps: This tab contains applications for viewing sensors and controlling motors manually or remotely.

  • Settings: This tab lets you set user preferences, like Bluetooth visibility and sound volume.

To turn off the EV3, return to the Run Recent menu and press the Back button. When you see the power off icon, either select the check mark to turn the EV3 off or select the X to cancel (see Figure 2-8). If you’re turning off the EV3 in order to replace the batteries, be sure to wait until the red status light is off, or you’ll lose all programs that you sent to the EV3 since you turned it on.

Once you’ve finished building a robot, it’s important to test its mechanical functions before you start programming in order to identify problems like missing cables or gears.

You can manually control your robot’s motors with the Motor Control and IR Control apps, as shown in Figure 2-10. Motor Control lets you run each of the motors using the EV3 buttons. IR (Infrared) Control allows you to control the robot with a remote. Select IR Control on the Brick Apps tab, and use the infrared remote control to make your robot move (see Figure 2-10). Not only is this a simple way to test your robot remotely, but it’s also a lot of fun!

In this chapter, you learned to work with two essential robot components: the EV3 brick and motors. When you ran the Demo program, the EV3 switched on the motors, which made the robot move. In Chapter 3 and Chapter 4, you’ll learn how these programs work, as well as how to make your own programs with the EV3 software. The Infrared Sensor and infrared remote control will return in Part II of this book.