Tutorial 1. Introduction to moway robot www.moway-robot.com 1
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
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
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
Summary: ROBOT Machine that performs a task autonomously. PROGRAMMABLE The robot allows to modify its program for different tasks. 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
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 Device that allows the robot to know the environment that surrounds it. ACTUATOR Device that allows the robot to perform a function. www.moway-robot.com 5
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 Obstacle sensors Temperature sensor Light sensor Accelerometer Line sensors Brain Microprocessor Speaker Lights Wheels Actuators www.moway-robot.com 6
Person moway robot Brain Microprocessor Legs Wheels Ear Microphone Voice Speaker Eyes Light sensor, camera www.moway-robot.com 7
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 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
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
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 Did I hear the sound? NO YES Go straight www.moway-robot.com 11
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
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? NO Turn off the front light www.moway-robot.com 13
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 Did I find the door? NO YES GO Gira OUT 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
Diagram Rotate and go straight Detect wall (obstacle) Did I reached the wall? YES NO Go straight to try to escape www.moway-robot.com 15
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
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
Diagram Detect tilt Backward tilt? YES 100% speed NO Forward tilt? YES 30% speed NO 0 50% speed Av anz ar rect o 15 cm www.moway-robot.com 18
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