Make your robot faster or slower using gears
In this lecture you will learn how cogwheels can effect speed. After completing the lecture you will have an idea of how the gearbox of a car works. You will see, that connecting smaller and larger cogs can make your robot slower or faster and you will learn about turn angle ratios.
Figure 1 - Using gears to make the Speeder faster
- Ozeki Gears: Gears build instructions
- Ozeki Sniffer: Sniffer build instructions
- Ozeki Speeder: Speeder build instructions
- Ozeki 10 installed: Installed Ozeki 10 Robot OS
- Lego connection installed: Installed Lego Bluetooth connection
- SNAP basics: Basic knowlege of the Snap programming language
Build the Speeder and run it for 3 seconds!
Just follow the build instructions for the Speeder to build it! Once you've finished building the robot, write a simple program to drive it forward. To do it, just open the Snap application, create an entry point and attach a 'Start motor [motor] at [power] %' block to it. Select option A for the 'motor' field because the large motor of the robot is connected to the A port of the brick. Due to the gears, the robot will move in the opposite direction to the direction of rotation of the motor. So you need to type -100 for the 'power' field to move your robot forward at 100% power. Next attach a 'wait [time] secs' block and type number 3 for the 'time' field to define the travel time. Finally attach a 'Stop motor' block to stop the motor. Time to run the program! But be careful! The robot will be move fast!
Figure 1 - Program code to move the robot for 3 secs
You've probably experienced that the Speeder moves much faster than the Sniffer. The reason is that the diameter of the cogwheel driven by the large motor is larger than the diameter of the cogwheel connected to the wheel. You have learned in the previous lectures that the larger the diameter, the larger the circumference. So, during a one 360 degree rotation of the motor, the wheel can travel a bigger way as if it were connected to the wheel directly (without a gear). There is the Gearbox on Figure 2. It is similar to the one used in the Speeder. Build your own Gearbox and try to rotate both gears and see what will happen!
Figure 2 - Gearbox
Organise a race on a 2-meter long track! Start the Sniffer at 100% power and the Speeder at 30% power!
You have seen that the Speeder is very fast at 100% power. But how fast is it going to be at 30% power? Who is going to win? The Sniffer at 100% power or maybe the Speeder at 30% power? It is going to turn out! Select the target line and put the two robots on the starting line. Then you need to start them at the same time. To do this, you need to create a program that starts the large motor of the Speeder connected to port A, and the motors of the Sniffer connected to the A and D ports of the brick. It will not be hard because you have already written similar programs to this one during the previous lectures. There is a program code on Figure 3 that you can use for starting the robots.
Figure 3 - The program code to start the robots
Watch the video to find out who is going to win!
Video 1 - Race
Measure the speed of the Speeder!
After you saw who had won the race, it would be good to know exactly how much faster the Speeder compared to the Sniffer. To find out, first you need to calculate the speed of the Speeder at 100% power. You can use your stopwatch program you coded during Lecture 4 for measuring the travel time. You just need to replace the number in the 'power' field of the 'Start motor' block with -100 because of the reason explained earlier. The complete program code can be seen on Figure 3. Run the program for 10 seconds then measure the distance in meter the robot traveled. Finally divide the measured value with the elapsed time to get the speed in meter/sec.
Figure 3 - Calculate the traveled time with the stopwatch
Compare the Speeder speed with the Sniffer speed!
Although the two robots are different in structure and one is much faster than the other, they can be compared. The first reason is that the circumference of the Speeder's wheels are the same as that of the Siffer's wheels (Figure 4). So if you did not use any cogwheels in the Speeder, they would do the same distance at same motor power. The second reason is that the robots moved only straight. So the width did not affect the speed.
Figure 4 - The wheels of the robots are equal to each other
As you can see on Figure 5, the Speeder is more faster at 100% power then the Sniffer due to the cogwheels. The larger the diameter of the cogwheel, the faster the robot will be.
Figure 5 - Speed comparison
Figure 8 - A program code that moves both robots
|Download the SNAP programs|
It contains 3 program codes. The first one can start the Speeder at 100% power. The second one is capable of measuring the time. Using the last one, you can start and stop both robot at the same time. Download the codes to follow the steps.
Download the SNAP program files