Book Image

Building Smart LEGO MINDSTORMS EV3 Robots

By : Kyle Markland
Book Image

Building Smart LEGO MINDSTORMS EV3 Robots

By: Kyle Markland

Overview of this book

Smart robots are an ever-increasing part of our daily lives. With LEGO MINDSTORMS EV3, you can now prototype your very own small-scale smart robot that uses specialized programming and hardware to complete a mission. EV3 is a robotics platform for enthusiasts of all ages and experience levels that makes prototyping robots accessible to all. This book will walk you through six different projects that range from intermediate to advanced level. The projects will show you building and programming techniques that are used by engineers in the real world, which will help you build your own smart robot. You'll see how to make the most of the EV3 robotics platform and build some awesome smart robots. The book starts by introducing some real-world examples of smart robots. Then, we'll walk you through six different projects and explain the features that allow these robots to make intelligent decisions. The book will guide you as you build your own object-tracking tank, a box-climbing robot, an interactive robotic shark, a quirky bipedal robot, a speedy remote control race car, and a GPS-navigating robot. By the end of this book, you'll have the skills necessary to build and program your own smart robots with EV3.
Table of Contents (9 chapters)

Examples of smart robots in the real world

That definition may have seemed somewhat abstract, so let's put it into context with two real-world examples. We will first discuss a simple smart robot—the robotic vacuum cleaner—then talk about a much more sophisticated example—the autonomous car.

Robotic vacuum cleaners

These are some of the simpler smart robots that you are likely to encounter, but they are nonetheless smart robots because they fulfill all of the points of our definition:

  • They follow a series of pre-programmed instructions: These machines come with their vacuum-cleaning program pre-installed on their control unit. The engineers who developed the product have already sorted out what the robot needs to do during its routine to keep the floors clean. The software is installed on each robot before it leaves the factory. After the customer purchases the robot, all they have to do is charge it, then turn it on, and it gets right to work, following the instructions that the engineers defined in the software.
  • They make an observation about the outside world: The vacuum robot has some sensors that allow it to make observations about where it is in the room. On the front of the robot, there is a bumper equipped with an impact sensor. When the robot collides with the wall, the impact sensor is pressed, and the robot knows it has reached the end of the room:

The user can also set up an invisible fence using infrared emitters that confine the robot to one area. The robot is equipped with an infrared sensor that can detect this fence and tell the robot that it has reached the end of the area to be cleaned.

Infrared refers to a type of light that is invisible to humans. Robots can be equipped with specialized sensors that detect infrared light. This makes for a convenient way to set a barrier for a robot that will not obstruct a human, as people cannot see or touch infrared light.

Finally, the robot's charging pad has an infrared beacon. When the job is complete, the robot uses its infrared sensor to navigate back to the charging pad to replenish its battery:

  • They have a central computer/controller that interprets instructions and sensor data: The robotic vacuum has a central controller that runs the software set at the factory and receives input form the robot's impact and infrared sensors. Though this central controller is not necessarily a powerful supercomputer, it has the ability to interpret the software and sensor measurements to decide what to do next.
  • They make a decision and react based on the observation, following the instructions defined in the program: The robot proceeds during its cleaning routine as the software specifies. The sensors tell the robot when it needs to change its course; if the impact sensor detects that the robot has collided with a physical wall, or the infrared sensor detects an invisible wall, the robot knows that it has come to the end of the area it is supposed to clean. It reacts by turning and moving in a different direction. The robot decides to alter its course based on the measurements from its sensors.
  • They complete all of these steps automatically: The robot does everything without the help of a person; it cleans the floor while staying within the bounds of its room and returns itself to its base to recharge when it is finished. The only human assistance it needs is when the vacuum bag needs to be replaced.

Autonomous cars

Autonomous (also known as self-driving) cars are a much more sophisticated type of smart robot, yet they still fulfill the criteria we defined earlier:

  • They follow a series of pre-programmed instructions: The engineers develop advanced software that enables the car to drive itself. They program all of the conditions necessary for driving so the car drives safely and follows the law, but the car is also programmed to learn as it drives!
  • They make an observation about the outside world: Driving is a very complex task, especially for a robot, so a self-driving car needs to take in a large volume of information about its environment. A GPS receiver tells the vehicle where it is in the world. In addition, it needs to keep an eye or eyes on the road to avoid collision with objects, pedestrians, and other cars. An autonomous car may use an assortment of ultrasonic sensors; LIDAR, which is a light-based radar; machine vision; and more to monitor what is happening around it.
  • They have a central computer/controller that interprets instructions and sensor data: An autonomous car has multiple computers that work together to processes the sensor data, run the software, and manage the car's responses to the road. Because there is a large amount of information to manage and reactions need to be made within fractions of a second, these computers need to be very powerful.
  • They make a decision and react based on the observation, following the instructions defined in the program: The GPS receiver tells the car what road it is currently traveling on and where its destination is in relation to its current position. The self-driving car reacts by making the proper turns to get to the destination. The proximity and vision sensors help keep the car safe. If an object is detected in the road, the vehicle either stops or maneuvers to avoid it. If the car's vision system sees a stop sign or a red light, the vehicle makes the appropriate stop. If the lane sensors detect that the car is nearing the edge of the lane, the car responds by steering itself back into the center of the lane. If the proximity sensors detect that the vehicle is too close to the car in front of it, the self-driving car slows down to maintain a safe distance in-between itself and the other vehicle. The sensors provide the car with the information it needs to regulate its driving. The computers then decide what the best course of action is based on the information. The result is an autonomous car that reaches its destination safely.
  • They complete all of these steps automatically: A self-driving car follows all of the rules of the road and reaches its destination without the need for any driver input. After all, the purpose of such a vehicle is to be able to navigate on its own! Because of the large volume of information it processes and the amount of decisions it needs to make to complete its task, an autonomous car is a very smart robot!