0% found this document useful (0 votes)
11 views

Obstacle Avoiding Robot

Uploaded by

22m146
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Obstacle Avoiding Robot

Uploaded by

22m146
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

LEGO MINDSTORMS EV3 KIT

INTRODUCTION
LEGO MINDSTORMS is a series of kits that contain the software and hardware to
create customizable and programmable robots. They include an ‘intelligent’ brick computer
that controls the system, a set of modular sensors and motors, and LEGO parts from the Technic
line to create the mechanical systems. Technic is a line of LEGO interconnecting plastic rods
and parts. Lego Mindstorms EV3 is the third generation robotics kit in Lego’s MINDSTORMS
robotic line.

There are two sets of kits under the EV3 edition namely, the home set and the education
set.

EV3 HOME SET


The EV3 Home (31313) set consists of

 1 EV3 programmable brick - ‘brain’ of the robot


 2 Large Motors and 1 Medium Motor - to run the robot
 3 sensors - 1 Touch Sensor, 1 Colour Sensor, 1 Infrared Sensor
 1 Remote Control
 Cables - to connect the motors and sensors to the brick
 USB cable - to connect to the PC to download the written programs
 585 TECHNIC elements - to build the robot

EV3 EDUCATION SET


The Education EV3 Core Set (45544) consists of

 1 EV3 programmable brick


 2 Large Motors and 1 Medium Motor
 5 sensors - 2 Touch Sensors, 1 Colour Sensor, 1 Gyroscopic Sensor, 1 Ultrasonic Sensor
 Cables
 USB cable
 1 Rechargeable battery
 TECHNIC elements.

An expansion set for the Educational Core Set, which can be bought separately contains
853 Lego elements.
ROBOTS MADE USING EV3 KIT
The Lego MINDSTORMS EV3 kit has inbuilt instructions to build 5 models namely

 SPIK3R: It is a complex robot that crawls and turns to search for targets. It can attack with
its claws and shoot with its tail.
 TRACK3R: It is an easy to create and command robot and has a lot of tools like Bi-blade
Blender, Gripping Claw and Heavy Hammer.
 EV3RSTORM: It moves around on tracked skates and can attack with his Spinning Tri-
blade or Blasting Bazooka. It can detect objects, follow the Infrared Beacon and receive
commands remotely.
 R3PTAR: It is a tall, long and powerful robot which moves like a snake and can strike
with its Fearsome Fangs when it detects an object.
 GRIPP3R: It is a strong robot that can lift and carry heavy things with its Grasping
Grippers and can be controlled remotely to pick the desired objects.

The various robots are shown in Fig. 1.1 to 1.5.

Fig. 1.1: SPIK3R Fig. 1.2: TRACK3R

Fig. 1.3: EV3RSTORM Fig. 1.4: R3PTAR


Fig. 1.5: GRIPP3R

EV3 BRICK
The ‘intelligent’ brick forms the brain of the robot. It interprets signals from the various
sensors and operates the robot based on the written program. The Lego Mindstorms’
programming is command box programming. Fig. 2 shows the intelligent brick used in EV3
kit.

Fig. 2: EV3 intelligent brick

SENSORS USED
The sensors act as input devices for the robot. The various sensors available in the EV3
kit are
1. TOUCH SENSOR: It checks the condition of the touch sensor block at a specific point in
the program. If the sensor has been triggered, it sends out the logic signal ‘TRUE’ and if it
is not triggered, it sends the signal ‘FALSE”.
2. COLOUR SENSOR: It can detect the colour or intensity of light that falls on the sensor.
It can distinguish 7 colours and can be used to follow a specific colour path or detect the
room light intensity.
3. GYROSCOPIC SENSOR: It detects rotational motion of the robot. It detects two data
namely, the rotational angle and rate. The Gyro sensor can detect motion only about a single
axis of rotation which is indicated on the sensor by means of arrows.
4. ULTRASONIC SENSOR: This sensor is used to measure the distance of an object in
front of it by employing ultrasonic waves. High frequency sound waves are sent out by the
sensor and the time taken for the sound to reflect back to the sensor is measured.
5. INFRARED SENSOR: It can detect Infrared light signals that are sent from the Remote
Infrared Beacon and can also send its own infrared light signal and detect the reflection of
this light by other objects and sense the distance between the sensor and the object.

Fig. 3.1: Touch sensor Fig. 3.2: Colour sensor

Fig. 3.3: Gyroscopic sensor Fig. 3.4: Ultrasonic sensor


Fig. 3.5: Infrared sensor and beacon

Fig. 3.1 to 3.5 show the various sensors used in Lego Mindstorms EV3 kit.

PROGRAMMING
The programming language used in Lego Mindstorms EV3 is an icon-based drag-and-
drop programming language. Programs are created by dragging the programming blocks from
the program palette onto the program canvas.

Fig. 4: Lego EV3 program page

ACTION BLOCKS
The action block is used to command the robot to perform some work. It includes the
following blocks to control the motors and output signals

 Small motor: to control a small motor


 Large motor: to control one large motor
 Move steering: to control two large motors simultaneously similar to vehicle
steering to obtain the motion in the desired direction
 Move tank: to control two large motors simultaneously by providing individual
instructions to the motors
 Display: to display the desired
 Sound: to play the selected note or file
 Brick button light: to display light on the brick buttons when required

MOTOR CONTROL
The programming of small and large motors is similar as they both have the same
options. Fig. 5.1 and Fig. 5.2 show the program block of a small motor.

Fig. 5.1: Small motor block Fig. 5.2: Options

 OPTIONS: the options include the input for the motor which are
 OFF: to switch off the motor
 ON: to run the motor continuously until it is stopped
 ON FOR SECONDS: to run the motor for the required number of seconds
 ON FOR DEGREES: to run the motor for the desired amount of rotation
 ON FOR ROTATIONS: to run the motor for the required number of rotations
 POWER: It is used to select the percentage of power required to be given to the motor
 INPUT DURATION: It is used to mention for how long the motor is to be powered. The
input duration is given in number of rotations, number of seconds or degrees.
 STOP: It contains two options namely brake and stop which describes how the motor
should stop after completing its work.
 PORT: It is used to mention the port to which the motor is connected to. The signals or
instructions are given to the motor from the programming brick via that port.
Fig. 5.3: Program block of large motor

Fig. 5.3 shows the program block of a large motor which is similar to that of a small
motor and contains the same options.

Fig. 5.4: Program block of steering

Fig. 5.4 shows the program block of steering through which both the motors are
simultaneously controlled by the brick to provide the specified direction.

Fig. 5.5: Program block of move tank

Fig. 5.5 shows the program block of a move tank through which two large are controlled
simultaneously by manually providing the amount of power input for the individual motors.

SIGNALS FROM THE BRICK


Various signals can be programmed to be received from the brick such as audio, text
display and brick button light.
Fig. 5.6 (a): Program button for text display

Fig.5.6 (b): Program button for brick button light

Fig. 5.6 (c): Program button for audio

FLOW CONTROL BLOCKS


The flow control blocks are used for the logical programming of the robot. It includes
wait, loop, switch and loop interrupt blocks.

WAIT
This block makes the program to wait for an input before continuing to the next block
in the sequence. The wait can be for a certain amount of time, for a sensor to reach a certain
value or for a sensor value to change.

NOTE: The Wait block does not make the robot stop. If any motors are on at the beginning of
the block, they will stay on during the wait.
Fig. 5.7: Program block for wait

The inputs available will change depending on the selected mode.

LOOP
The loop block is a container that can hold a sequence of programming blocks. The
block will make the sequence of blocks inside it repeat. The blocks can be made to repeat
forever, a certain number of times or until a sensor test or other condition is true.

Fig. 5.8: Program block for loop


Only the blocks inside the loop will repeat. After the loop ends, the program will
continue with the blocks that are after the loop.

Fig. 5.9: Program blocks in and after the loop

In the Fig. 5.9, the loop condition is to repeat the loop 5 times. The program blocks
inside the loop are wait block which makes the robot to wait for 2 seconds before making one
rotation forward and stops before the commencement of the next cycle. After 5 rotations, the
program exits the loop and the robot makes a right turn for 2 rotations.

SWITCH
The switch block is a container that can contain two or more sequences of programming
blocks. Each sequence is called a Case. A test at the beginning of the switch determines which
case will run. Only one case will run each time the switch is executed.

Fig. 5.10: Program block of switch condition


In the Fig. 5.10, the test condition is the state of the motion sensor. When the test
condition is true, i.e., when the sensor is pressed, the first case is executed. The motor runs
straight for one rotation. If the sensor is not pressed, the condition is false and the second case
is executed i.e., the motor stops rotating.

LOOP INTERRUPT
The loop interrupt block makes a loop block end. No more blocks in the loop sequence
will be executed and the program will continue with the blocks that are after the loop. The loop
to be interrupted is specified in the loop interrupt block by using the loop name. The loop
interrupt block is used to make a loop exit sooner than it normally would or in response to
different condition.

The loop can be interrupted from inside the loop itself or from another block sequence
that is running simultaneously.

Fig. 5.11: Program block for loop interrupt

In the Fig. 5.11, the loop 01 is programmed to run 5 times. Simultaneously, a second
running sequence waits for a colour sensor to detect red colour and uses the loop interrupt block
to stop the loop early if red colour is detected.

SAMPLE PROGRAM - OBSTACLE AVOIDANCE


A program is to be written such that the robot moving in a path has to avoid hitting the
obstacle in its path. There are various ways to program the robot depending on the action
desired when an obstacle is sensed.

 Robot has to stop


 Robot has to stop and provide a signal
 Robot has to stop, reroute and move again
ROBOT IS TO STOP AND PROVIDE A SIGNAL
FLOWCHART

Fig. 6.1: Logic for programming

PROGRAM

Fig. 6.2: Program written on EV3 window


ROBOT IS TO STOP AND REROUTE
FLOWCHART

Fig 6.3: Logic for programming

PROGRAM

Fig 6.4: Program written in EV3 window


CONCLUSION
The components of the LEGO EV3 kit and the functions of the various blocks in the
program were studied. The logic for writing the program for obstacle avoidance robot was
formulated. Using the logic the program was written in the EV3 programming window.

You might also like