Turning with the Gyro Sensor on a specified angle and stopping there have never been easy. It is not going to get any better. However, this is not a problem of the Gyro sensor. The problem is in the way we develop our programs.
- #155
- 01 Jan 2017
- 5:01
No matter what your robot is when you turn at 90 degrees with the LEGO Mindstorms EV3 Gyro sensor it would almost always stop at 90+ or 90- degrees. This makes using the sensor difficult and error prone. The solution requires you to understand how sensors work. Not only this, but also the Touch, Color, Ultrasonic sensors.
Previous video tutorials:
English
In the previous video we tried to build a program for turning the robot to 90 degrees but we couldn't, because the sensor was returning negative values. In this video we'll search for ways to overcome these negative values and to handle them.
The first very obvious solution would be just to turn in the opposite direction. Not to turn in this direction, but in the opposite direction, turn right. Let's program it and see if the program works. I'll change the motor form A to D This will be our left motor. So we'll be turning right, the robot will be turning right. Download and run the program.
The robot turns and it stops at about 90 degrees. I'll try to align it on the camera, so that we can see the angle.
It's not precisely 90 degrees but we'll also look for why this happens. Looking at the program and running it.
The motor turns, the whole robot turns, but at the end of the program the value detected by the sensor is not 90 degrees, it's 97 degrees. What happened here is that after we stop the motor, the robot continues for very small distance, but it's enough for the sensor to detect 97 so it stops at precisely 90 degrees but after we stop, the whole robot continues because of the inertia and because of the calibration of the sensor it returns not exactly 90 degrees, but slightly more than 90 degrees. What can we do? We can try to turn the robot back to return it a few degrees. So if it is 95, we'll return the robot, 5 degrees back. How can we do this? We can add a new block, it's again motor block. We'll turn it in reverse direction -10% of the power
and we'll be turning until the gyro sensor detects an angle of exactly 90 degrees and then we stop with motor D.
How does the program behave? Let's check at the software.
Run.
Again, at the end of the program you can see that the sensor returns a value of 96 so the program is not working as we would expect. I'm entering into these details because it's not intuitive but very logical and I've seen students that are looking at such programs and are wondering why this happens and why is it so non intuitive so I'll first show you the problem, this one that the sensor is not returning the correct value. Then we'll search for ways why. Let's see on the camera what happens with the robot. Running the same program.
The robot turns to more than 90 degrees but it does not return back.
Turning but although we've add the blocks for turning motor D in reverse and we would expect something like this to happen and to align to 90 degrees the robot is not returning. This is something that we'll solve in the next video.
Курсове и занятия включващи този Урок
Този Урок е използван в следните курсове и занятия.
Moving Straight with LEGO Mindstorms EV3 robots
One of the most controversial topics when it comes to LEGO Mindstorms robots is how to make them move in a straight line. This is a problem that has caused a lot of confusion among teachers, parents, rookie teams and students. The robot makes about 2-3 centimetres error for every meter, which is about an inch for every 3-4 feets. In this course, I would like to discuss the different ways in which you can improve the behaviour of the robot and how you could make it move in a straight line with the help of the LEGO Mindstorms EV3 Gyro Sensor.
- 24
- 102:09
- 3
Gyro Sensor Introduction
The Gyro sensor in LEGO Mindstorms EV3 sets is new for the sets and we answer basic questions about its usage. The sensor detect when the whole constructions turns at a particular angle, but there are a number of gotchas in using it.
- 5
- 0
- 3
- 3d_rotation 0
EV3 Basic Course. Introduction to robot programming, construction and sensor use
This course is designed for students, mentors and teachers that are completely new to LEGO Mindstorms EV3 robots and would like to start using them to learn, in classes or at competitions. It is quite different from previously built resources at FLLCasts because it makes no assumption on any previous knowledge and tries to introduce everything step-by-step.
- 38
- 193:26
- 30
Gyro Sensor
The Gyro sensor in LEGO Mindstorms EV3 sets is new for the sets and we answer basic questions about its usage. The sensor detect when the whole constructions turns at a particular angle, but there are a number of gotchas in using it.
- 5
- 0
- 3
- 3d_rotation 0
Instructors Remote Training
If you are working with students and you want to introduce Robotics to your class or you want to mentor a FLL team, but you are insecure about your technical knowledge in the Robotics field, then this is the right place for you. Having in mind teachers' busy schedule, we have design two different schedules and added an option to design one just for you. FLLCasts's Mindstorms EV3 Robotics Online Training is the perfect match for any teacher.
After the completion of each task the participant has to upload his solution for verification.
- 136
- 280:11
- 156
Gyro Sensor
The Gyro sensor in LEGO Mindstorms EV3 sets is new for the sets and we answer basic questions about its usage. The sensor detect when the whole constructions turns at a particular angle, but there are a number of gotchas in using it.
- 4
- 0
- 4
- 3d_rotation 0
Instructors Remote Training
If you are working with students and you want to introduce Robotics to your class or you want to mentor a FLL team, but you are insecure about your technical knowledge in the Robotics field, then this is the right place for you. Having in mind teachers' busy schedule, we have design two different schedules and added an option to design one just for you. FLLCasts's Mindstorms EV3 Robotics Online Training is the perfect match for any teacher.
After the completion of each task the participant has to upload his solution for verification.
- 136
- 280:11
- 156
Gyro Sensor Theory
The Gyro sensor in LEGO Mindstorms EV3 sets is new for the sets and we answer basic questions about its usage. The sensor detect when the whole constructions turns at a particular angle, but there are a number of gotchas in using it.
- 4
- 0
- 0
- 3d_rotation 0