mOway introduction Tutorial

Page 1

mOway tutorial

Tutorial 1. Introduction to robot

Tutorial 1. Introduction to mOway robot

www.moway-robot.com

1


mOway tutorial

Tutorial 1. Introduction to robot

Index

INTRODUCTION .................................................................................................................... 2 MOWAY ROBOT.................................................................................................................... 2 MOWAY – PERSON COMPARISON .................................................................................... 6 HEARING SENSE EXAMPLE .............................................................................................. 11 VISION EXAMPLE ............................................................................................................... 12 TOUCH SENSE EXAMPLE ................................................................................................. 14 BALANCE SENSE EXAMPLE ............................................................................................. 16 MORE INFORMATION ........................................................................................................ 19

www.moway-robot.com

1


mOway tutorial

Tutorial 1. Introduction to robot

INTRODUCTION In this tutorial the mOway robot will be introduced. If you didn’t know mOway, this is the best way to know this robot, what its characteristics are and how it works. In the course of this tutorial, sensors and actuators of the robot will be described and we will see how we can use them to perform several tasks. The mOway robot is compared with a person for learning the new concepts of robotics. In addition to this, some questions will be proposed for mOway to solve them using its resources. The solution of each question is explained on a text diagram. This diagram consists of the strategy that the programmer has to follow. In order to become familiar with mOway programming, the MowayWorld flowchart diagram is included in the solution. MowayWorld is the software to program the mOway robot in a graphical way. In the mOway website (www.moway-robot.com) you will find several examples for learning how to design MowayWorld diagrams and programming. MOWAY ROBOT mOway is a programmable robot with sensors and actuators. Let’s explain what mean all these words. Question: What is a robot? Answer: A robot is a machine that performs a task autonomously, which means that it doesn’t need to be controlled by a person. They make our life easier because they perform tasks that can be difficult, tedious, or dangerous for human beings. Robots can be found on industries, hospitals, space, or even at home.

www.moway-robot.com

2


mOway tutorial

Tutorial 1. Introduction to robot

Question: What does “programmable” mean? Answer: A robot needs a program to work autonomously. A program is a sequence of steps or instructions to order the robot what to do in every moment. A robot can be designed to do just one task. For example, a vacuum cleaning robot is designed just for the task of vacuuming the floor. The program could be something like this:

Turn on the vacuum

Go straight

Did you reach a wall?

NO

YES Rotate

On the other hand, a programmable robot allows to modify its program in order to change its performing for adapting to different tasks. Imagine that we could connect that vacuum cleaning robot to a computer and download into the robot different programs. We could choose the functionality of this robot depending on the downloaded program. For example one program would vacuum the floor, another program would mow the lawn, etc. As we will see further, mOway robot can be programmed for doing a lot of tasks, such as:  Tracking a line  Pushing objects  Avoid obstacles  ...

www.moway-robot.com

3


mOway tutorial

Tutorial 1. Introduction to robot

Summary:

Machine that performs a task autonomously.

ROBOT

The robot allows to modify its program for different tasks.

PROGRAMMABLE

Question: What is a sensor? Answer: A sensor is a device that allows the robot to know the environment that surrounds it. It is something similar to our senses. In the case of the vacuum cleaning robot, it needs sensors to detect when it reaches the wall and then rotate. Thanks to the sensors, the mOway robot can “see”, “hear” and “feel”. This makes it possible for the robot to stop when it reaches and obstacle, go forward when it detects a sound, turn on the light when it passes through a tunnel, etc. These are the sensors of mOway:

Sensor of mOway

Function

A person uses

Light sensor

Detect level of brightness

Eyes

2 line sensors

Detect colours

Eyes

4 obstacle sensors

Detect the distance to an object

Eyes, hands

Microphone

Detect the noise level

Ear

Temperature sensor

Detect the environment temperature

Skin

Accelerometer

Detect inclinations and forces

Sense of balance

www.moway-robot.com

4


mOway tutorial

Tutorial 1. Introduction to robot

Question: What is an actuator? Answer: An actuator is a device that allows the robot to perform a function. Taking into account the example of the vacuum cleaning robot, its actuators are the wheels to move around the room, the motor to vacuum and the lights that indicate that it is working. In our case, mOway has actuators for moving, emitting sounds, etc. In this table you can check them:

Actuator of mOway

Function

A person uses

Wheels

Move

Legs

Speaker

Emit sounds

Voice

Lights (LEDs)

Illuminate and indicate

-

Summary:

SENSOR

ACTUATOR

Device that allows the robot to know the environment that surrounds it.

Device that allows the robot to perform a function.

www.moway-robot.com

5


mOway tutorial

Tutorial 1. Introduction to robot

MOWAY – PERSON COMPARISON As we have already seen, mOway robot sensors and actuators can be compared with some human characteristics. Robot sensors receive information from the environment. This information is collected by the microprocessor, as it was the “brain” of mOway. Then, depending on the collected information, the robot can active their actuators that the task needs. In order to understand this, let’s see an example with a person. Imagine that a ball is thrown towards you. Your eyes see it and they send to your brain this information (a ball is going to hit you). Immediately your brain sends an order to your legs for dodging the ball. In this example the “sensors” would be your eyes, the “microprocessor” is your brain and the actuators are your legs. Here you can see a diagram of the mOway devices.

Sensors Temperature sensor

Obstacle sensors

Accelerometer Light sensor

Line sensors

“Brain” Microprocessor

Speaker

Lights Wheels

Actuators

www.moway-robot.com

6


mOway tutorial

Tutorial 1. Introduction to robot

Person

mOway robot

Brain

Microprocessor

Legs

Wheels

Ear

Microphone

Voice

Speaker

Eyes

Light sensor, camera

www.moway-robot.com

7


mOway tutorial

Tutorial 1. Introduction to robot

Sense of balance

Accelerometer

Feeding

Battery recharge

Sense of touch

Obstacle sensors

Communication

Radiofrequency

In the following examples we will see how to use these devices to make the robot perform several tasks. Light sensor, microphone, obstacle sensors and accelerometer will be used. The actuators used are wheels and lights (LEDs). Once you understand these devices, you can design your own applications and use other sensors and actuators (for example line sensors, temperature sensor, speaker, or whatever you can imagine). In order to learn how to program the robot, visit the mOway web page to find videotutorials and programming examples.

www.moway-robot.com

8


mOway tutorial

Tutorial 1. Introduction to robot

MOWAY MOVING EXAMPLE Imagine that you have a map with a route that you have to follow. If you wanted to reach the destination, you should move following a series of indications. For example:  Go straight for 20 steps  Rotate to right  Go straight for 10 steps  Rotate to left  Go straight for 15 steps

www.moway-robot.com

9


mOway tutorial

Tutorial 1. Introduction to robot

Question: How can we make mOway to follow a route? Answer: The wheels allow mOway to go forward, backward and rotate in order to move around. In addition, it is possible to configure these movements to cover a specific distance or time. Por ejemplo, vamos a trazar la misma ruta que la explicada antes. En el caso de mOway, en vez de contar los pasos, lo haremos en centímetros. Los giros pueden ser sobre el centro del robot, de 90º (un ángulo recto). For example, we will tell mOway to follow the previously described route. The robot doesn’t have legs, so that instead of counting steps, it will count centimetres. Rotations can be done over the center of the robot, of 90º (right angle). Diagram

Go straight 20 cm

Rotate right 90º

Go straight 10 cm

Rotate left 90º

Go straight 15 cm

www.moway-robot.com

10


mOway tutorial

Tutorial 1. Introduction to robot

HEARING SENSE EXAMPLE In an athletics race, runners start when they hear the sound of the beginning shoot.

Question: How could we make the robot to start going straight when it “hears” a sound? Answer: mOway robot has a microphone inside. As you already know, a microphone is used to detect sounds. For example, the microphone of a singer “collects” the voice in order to amplifying it and be reproduced through the speakers. We can make mOway to “listen” to the surroundings. If the robot “hears” a sound (the microphone detects the sound) then mOway will start to go straight. Diagram

Listen

NO ¿Did I hear the sound?

YES

Go straight

www.moway-robot.com

11


mOway tutorial

Tutorial 1. Introduction to robot

VISION EXAMPLE Human vision works basically as follows: light is reflected on the objects that surround us. This reflected light reaches our eyes, which transforms it into an electric impulse. Finally this impulse is received by the brain, which makes that we “see” the image that reaches to our eyes.

Question: Let’s see an example of mOway turning on its front light when we turn off the light of the room. How can mOway do this? Answer: mOway robot has a device that allows it to detect the level of brightness of the environment. This device is the light sensor. As our eyes do, the light sensor transforms the light that it receives into an electric signal. The higher the light level is, the higher this electric signal is. The microprocessor and the electronic circuits work as the “brain” because they receive the electric signal and measure its level.

Light sensor

Front light

www.moway-robot.com

12


mOway tutorial

Tutorial 1. Introduction to robot

Diagram This program consists of a closed loop, that is, it doesn’t have an end. This is necessary because the robot has to be always checking if the level of light changes.

Turn on the front light

YES Is the room dark?

www.moway-robot.com

NO

Turn off the front light

13


mOway tutorial

Tutorial 1. Introduction to robot

TOUCH SENSE EXAMPLE Question: Imagine that you are in a room with a blindfold on your eyes. How would you get out of the room without taking off the blindfold? Now imagine that mOway is into a space and the space is closed except in one side. How could mOway escape? Answer: If you wanted to get out of the room, you would have to touch the walls while you are moving until you find the door. This is shown in the diagram below:

Move

Touch the wall

NO Did I find the door?

YES GO GiraOUT a la derecha 90º

The mOway robot case is similar, but instead of touching the walls to detect the door, it uses the obstacle sensors. These sensors can detect if the robot is close to an object, even without touching it. This “object” would be the walls of the cage.

Obstacle sensors

www.moway-robot.com

14


mOway tutorial

Tutorial 1. Introduction to robot

Diagram

Rotate and go straight

Detect wall (obstacle)

YES Did I reached the wall?

NO Go straight to try to escape

www.moway-robot.com

15


mOway tutorial

Tutorial 1. Introduction to robot

BALANCE SENSE EXAMPLE The sense of balance is located into our ear. Thanks to this sense we can know when our body is tilted. For example, when you are into a car, your body feels if the road slopes up or down.

Question: Depending on the slope of the floor we could want the robot to change its speed. How could mOway increase the speed if it goes up and decrease the speed if it goes down? Answer: The “sense of balance” of mOway is performed by its accelerometer. An accelerometer measures the forces on the robot, for example the force of gravity. As the direction of force of gravity has always the same direction, mOway can compare its position with the gravity force and know if it is tilted. Let’s imagine that mOway has an axis drawn from the top to the bottom (green line). This axis tilts with the robot. Apart from that, the force of gravity (red line) always points down, whatever the position of the robot is. When mOway is over a horizontal surface the robot axis (green) is in line with the force of gravity (red). So that, the angle formed by these axes is 0º.

www.moway-robot.com

16


mOway tutorial

Tutorial 1. Introduction to robot

If mOway is going up, the robot axis (green) will tilt from the gravity direction (red). For example they could form an angle of 30º.

In the case of mOway is going down the robot axis (green) will tilt from the gravity direction, but in this case the formed angle will be negative, for example -30º.

Let’s see an example of how we can adapt the speed of mOway to the slope of the floor. If the slope is upwards mOway will increase the speed, so that it’s easier to go up. If the slope is downwards mOway will brake (decrease the speed) to avoid losing control. The speed of mOway is set by the power of its motors, that is:  If we want the maximum speed, we will have to select a speed of 100% (100% of the power of the motors).  If we want a medium speed, we can select for example 50% of the power of the motors.  If we want a low speed, we can select for example 30% of the power of the motors.

www.moway-robot.com

17


mOway tutorial

Tutorial 1. Introduction to robot

Diagram

Detect tilt

YES Backward tilt?

100% speed

NO YES Forward tilt?

30% speed

NO 0 Av 50% speed anz ar rect o 15 cm

www.moway-robot.com

18


mOway tutorial

Tutorial 1. Introduction to robot

MORE INFORMATION If you want to start with mOway you can find more tutorials and practices in the webpage. This is the best way to learn about robotics, programming and many other things. http://www.moway-robot.com

www.moway-robot.com

19


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.