Contextualized Learning Activity: Motion Introduction: In the following exercises and discussion, we will assume ideal situations. That is, we do not take into account any losses due to friction in the gear systems, sprockets, and chains. The efficiency of any gear train can be calculated by measuring output and comparing it to the expected output by calculation. Motion Beginning with the basics of motion – speed = distance x time (s = d x t) we can look at a motor with angular velocity of x and translate that in to a forward velocity of a vehicle. We can then “change” the velocity by way of gears. A transmission converts the velocity of the motor to a velocity that is desired. Example: Your 18 speed mountain bike. As you change the gears, you increase torque (force) when going up a hill or you increase speed when going down a hill or on a straight. Exercise 1.1: Cut out a circle of radius 2.00 cm and another of 4.00 cm. Mark a point on the edge of each circle. Now start rolling the smaller circle on a ruler lining up the mark on the beginning mark of the ruler. See diagram below. Record where the mark again meets the ruler. This can also be verified by calculation. The distance the circle travelled was of course the circumference. Calculate the circumference of each circle and record. 1 Circumference = 2 * Pi * R Small circle —> 12.56 cm Larger circle —> 25.12 cm Notice that the distance the smaller circle travels is half the distance the larger circle travels. This explains why two gears, one half as big as the other, have a gear ratio of 2:1. The smaller gear has to spin twice to cover the same distance covered when the larger gear spins once. Most gears that you see in real life have teeth. The teeth have three advantages: 1. They prevent slippage between the gears. Therefore, axles connected by gears are always synchronized exactly with one another. 2. They make it possible to determine exact gear ratios. You just count the number of teeth in the two gears and divide. So if one gear has 60 teeth and another has 20, the gear ratio when these two gears are connected together is 3:1. 3. They make it so that slight imperfections in the actual diameter and circumference of two gears don't matter. The gear ratio is controlled by the number of teeth even if the diameters are a bit off. In the example below, the DRIVER has 60 teeth and because it is the largest we say that it revolves once. The DRIVEN gear has 30 teeth. Simply divide 60 teeth by 30 teeth to work out the number of revolutions of the driven gear. Gear Ratio = (Distance moved by Driver) / (distance moved by load) = Driver / Driven = 60 T / 30T =2 Therefore the gear ratio is 2:1 That is, the driven gear goes around twice for each revolution of the driver. The gear ratio is proportional to the ratio of the gear diameters and inversely proportional to the ratio of gear speeds. 2 Exercise 1.2: Calculate the gear ratio for each of the following questions. 2a) 1b) See the table of common gear sizes (number of teeth) and corresponding ratios in Appendix A. Ryan, V, “Working out Gear Ratios”, 2001, TechnologyStudent.com, http://www.technologystudent.com/gears1/gears5.htm, April 26, 2008 Exercise 1.3: a) If the driver (pedal) gear has 80 teeth and the driven (sprocket) gear has 20 teeth, what is the gear ratio? b) If the driver gear has 100 teeth and the driven gear has 50 teeth, what is the gear ratio? c) If the driver gear has 60 teeth and the driven gear has 20 teeth, what is the gear ratio? d) In the three above questions, what has the gearing done? Increased torque or speed? 2. Gear Trains To create large gear ratios, gears are often connected together in gear trains, as shown here: 3 The gear on the right (purple) in the train is made of two gears. A small gear and a larger gear are connected together, one on top of the other. Gear trains often consist of multiple gears as shown in the next two figures. In the case to the left, there are four gears in the train with the purple (2nd gear from left) turning twice the rate of the blue (left most) gear. The green gear turns at a rate twice that of the purple and so on, with the red gear turning twice that of the green. Therefore, the red gear will travel at 2 x 2 x 2 = 8 times the speed of the blue gear. The gear train shown below has an even higher gear ratio. In this train, the smaller gears on top of the large gears are one-fifth the size of those they are connected to. That means that if you connect the purple gear to a motor spinning at 100 revolutions per minute (rpm), the green gear will turn at a rate of 500 rpm and the red gear will turn at a rate of 2,500 rpm. You could also turn this around and attach a 2,500-rpm motor to the red gear to get 100 rpm on the purple gear. Here is how it would look mathematically: You have two gear ratios of 5:1. For the first one you will have: Driver RPM Output Driven RPM Input 5 x 1 100 RPM x 500 RPM If you can see inside your power metre on the side of your house, and it's of the older style with five mechanical dials, you will see that the five dials are connected to one another through a gear train like this, with the gears having a ratio of 10:1. Because the dials are directly connected to one another, they spin in opposite directions (you will see that the numbers are reversed on dials next to one another). Check your metre when you get home and report on whether it is of this style or not. You can also check your gas metre in the same fashion. Exercise 2.1: Given the following gear train, what would the overall ratio be as well as the output RPM. a) 4 1:3, 1:4, 1:5 with a driver at 10500RPM b) 1:2.2, 1:3.3, 1:4.4 with a driver at 3990 RPM c) 5:1, 6:1 with a driver at 100 RPM d) 4:1, 3.3:1, 2.5:1 with a driver at 10 RPM 3. Planetary Gears There are many other ways to use gears. One specialized gear train is called a planetary gear train. Planetary gears allow the output shaft to be in the same axis as the input shaft. Let's assume you need a gear ratio of 6:1 with the input turning in the same direction as the output. One way to create that ratio is with a three-gear train as follows: In this train, the blue gear has six times the diameter of the yellow gear (giving a 6:1 ratio). The red gear is used to change the direction of the rotation so that both the input gear and output gear are travelling in the same direction. The size of the red gear does not matter. However, if you want the axis of the output gear to be the same as that of the input gear you can use a planetary gear system as shown below. A common place where this same-axis capability is needed is in an electric screwdriver. In this gear system, the yellow gear (the sun) engages all three red gears (the planets) simultaneously. All three are attached to a plate (the planet carrier), and they engage the inside of the blue gear (the ring) instead of the outside. The use of three red gears (planets) makes this gear train extremely rugged. The output shaft is attached to the blue ring gear, and the planet carrier is held stationary -- this gives the same 6:1 gear ratio as above but the input and output shafts will be in the same axis. Not shifted as in the one above. Planetary gear systems can be found in sprinklers and inside automatic transmissions. Brain, Marshall. "How Gear Ratios Work." 20 November 2000. HowStuffWorks.com. <http://science.howstuffworks.com/gear-ratio.htm> 26 April 2008. 5 Brain, Marshall. "How Oscillating Sprinklers Work." 23 May 2000. HowStuffWorks.com. <http://home.howstuffworks.com/s prinkler.htm> 01 May 2008. Nice, Karim. "How Automatic Transmissions Work." 29 November 2000. HowStuffWorks.com. <http://auto.howstuffworks.com/automatic-transmission.htm> 01 May 2008. Exercise 3.1: Given the following gear ratios in a planetary gear, calculate the output speed based on the input speed. a) b) c) d) 6:1, 5 RPM 10:1, 2 RPM 12.3:1, 4.5 RPM 10:1, 4.6:1, 10 RPM Application 3.1 Example: Given the example drive train in section 2 of 5:1, and 5:1 and attach the final gear to a 10 cm wheel with a ratio of 1:2, what will the resulting speed be with an input rpm of 100? The overall gear train will 12.5 or 12.5:1 6 Driver RPM Output Driven RPM Input 12.5 x 1 100 RPM x 1250 RPM speed 1250 RPM 10cm / RPM 3.9 10 4 cm / min 6.5m / s give a ratio of 5 x 5 / 2 = 1. A motor with an output shaft that has an RPM of 5000 is connected to the following gear train: 1:2, 1:3.3, 1:2.3 and the wheel size is 20 cm diameter, what would the speed of the machine be? 2. If the same machine has three speeds with an overall ratio of 1:3, 1:4, & 1:12 connected to the 20 cm wheel, what would the “ground” speed be for each setting? 3. 2 CIM motors at 4000 rpm under load are connected to the following gear train: 1:3.3, 1:3.3, 1:1.6 that drives a wheel of 15 cm diameter. What is the RPM of the wheel? 4. How fast will the robot in number 3 travel? 5. How far will the robot move in 15 seconds? 6. How quickly will the robot travel 16 m? 4. Torque Torque is a force that causes a rotation or turning of things. It can be thought of as a “rotational force”. You generate a torque any time you apply a force using a wrench. Tightening a nut is a good example. When you apply a force at the end of the wrench, the force creates a torque on the nut, which tends to turn the nut. The torque and speed of a gear train are inversely proportional. That is, as you increase the speed with a gear, you decrease the torque. Remember the mountain bike in section 1. Example: Using the same example from 3.1 we see that the speed of the output gear is 12.5 times faster than the input. The torque will be the opposite. If the torque under normal load of the input motor is 0.45 Nm then the output torque will be: 7 InputTorque Driver Driven OutputTorque 12.5 0.45 Nm 1 x x 0.036 Nm x 3.6 10 2 Nm The SI units for torque are Nm (Newton - metre). Force times distance (distance from fulcrum to applied force). Exercise 4.1 Given the following overall gear ratios, calculate the output torque based on the input torque. a) 6:1, 1.0 Nm b) 10.5:1, 2.0 Nm c) 1:2.3, 25 Nm d) 1:104, 0.50 Nm 8 Exercise 4.2 Given the following, calculate the missing values for each situation. Driver Teeth a) 12 b) 12 c) 24 d) 9 Driven Teeth Gear Ratio 1:5 Input RPM Output RPM 100 4 300 1000 Output Torque Nm 6.0 55 100 Input Torque Nm 2.0 2.4 80 0.43 1.2 5. Encoders Have you ever wondered how you can determine how far a robot or motorized machine has moved? Well that is the job of an "encoder". An encoder is a device that encodes information so that your computer processor and program can interpret them. If you want to count rotations of a wheel with a tab that pushes a switch every rotation you have just encoded information. This is a form of a mechanical encoder. There are also magnetic and optical encoders in common use. Most automotive distributors now use a solid state form of the old mechanical “points” which uses the "Hall effect", where the magnetic properties of a metal-toothed wheel rotate past this encoder. Optical encoders use light to switch on and off. There are also rotary and linear encoders. The type of sensor you use depends on your application. However, in industry and robotics, optical encoders are used due to their speed and reliability, as opposed to a mechanical encoder whose mechanical components may eventually deteriorate. Quadrature encoders A quadrature encoder is simply an encoder that has four states or positions. The word “quadrature” has the root of “quad” standing for four. A regular encoder has two states which are “off” and “on”, or the popular binary values 0 and 1. A quadrature encoder has four. If you think in binary you immediately will realize that to represent four states you need at least two bits. Example: 01 or 11. Quadrature encoders use two switches, called the “A” phase and the “B” phase. Essentially quadrature encoders supply counts to you. You will receive the signals of phases A and B in some pattern like 00, 01, 10, 11 (or better known as 0, 1, 2, 3) The most interesting aspect of a quadrature encoder is that it can tell you direction. Let’s say that the pattern 0, 1, 2, 3, 0, 1, 2,… is forward. Then the pattern 0, 3, 2, 1, 0, 3, 2,… is backward! If you keep track of these state changes, you can track distance moved. By the way if you think that this technology is not in common use… then take apart your mechanical mouse (at your own risk, of course). Go ahead, open it up by twisting the cover around the ball, and then take out the ball. You may also be able to find an old (not in use) ball mouse and take the screws out of the bottom. Look inside and you will see two shafts that the ball rolls against at right angles to each other. Then look to the ends of each shaft and you may see the encoder, and, depending on the type of mouse, you may also see an encoding wheel. Mechanically, the shift in encoder phases can be accomplished in optical encoders by having two "mask wheels" through which light shines. Or there can be two light sensors mounted around one mask wheel at an angle that creates the phase shift. Robot Application In any application, one must first select a location of the encoder. Once selected, you must do some math to select the appropriate encoder for the given application. Start by finding the motor’s maximum RPM (revolutions per minute) without load from the specification sheet or manufacturer. Also if possible, measure how fast the robot travels a given distance, then using known gear ratios and drive wheel circumference compute the motor shaft’s 10 RPMs under load for the robot’s maximum speed. The difference in speed is the effect of friction within your drive train. You should have both numbers for a check. For sake of example we will use an RPM of 5.1 under no load and 4.3 under load. For examples of the above calculations, see the example below Next, identify the resolution that you want the robot to have. Its OK to be unreasonable. I suggest that you try a number of different resolutions when all is said and done. For example, choose the resolution to be 1/8”. Then compute how many increments of the selected resolution are required for the drive wheel to rotate once. Given a 28” circumference divided by 0.125” resolution we got 224 increments or "state changes", “ticks”, or interrupts per drive wheel revolution. At the robot’s maximum theoretical and observed speed how many times did the wheel rotate per second? Our computed speed was 5.1 and 4.3 drive wheel revolutions per second, receptively. Multiply the number of interrupts per drive wheel revolution by the drive wheel rotations per second to get the number of interrupts per second. Believe it or not, numbers like 1,000 to 2,000 interrupts per second are practical. From our observed wheel speed of 4.3 rev./sec. * 224 interrupts/rev. = 936 interrupts/sec. Now you begin selecting which encoder to use. Encoders are described by the number of positions, cycles or phase changes per revolution of the encoder. They are basically all the same thing. As a rule, the fewer phase changes per revolution, the less you will pay. Compute the resulting number of encoder revolutions per wheel revolution. Next take the theoretical and observed target number of interrupts per second and divide it by the number of encoder revolutions per second to determine the number of encoder interrupts per revolution needed, (interrupts / sec.) / (rot./sec.) = (interrupts/rot.) Now comes the judgement part of the design. Look at the catalogues to find an encoder that comes close to the desired state changes per revolution. Some encoder makers seem to like using powers of 2 so numbers like 8, 16, 32, 64, 128 and 256 are popular. But numbers like 24, 25, 50, 75 or 100 are common as well. It all depends on the manufacturer. Now compute your "real" resolution. Given the number of state changes per rotation of the encoder selected times the number of revolutions of the encoder per drive wheel rotation, compute the number of state changes per drive wheel rotation, and finally your real resolution. Also compute the number of interrupts per second given the selected encoder. In this design process you have to iterate your design multiple times to find the best fit. It is most important to be certain that the number of interrupts per second is reasonable with the motors under load. The unloaded state just makes certain that you don’t damage the encoder by spinning it too fast should your drive wheel lose grip. But realize that if the drive wheel ever loses its grip, your positional information will be unreliable. Quadrature Encoders February 18, 2004 Version 0.1 By Daniel Katanski, Programming Mentor, Team 240, http://www.chiefdelphi.com/media/papers/1490 11 Driver sprocket Encoder on shaft of driver Wheel sprocket (driven) Wheel Andy Mark Super Shifter Example 5.1: CIM motor with 4300 RPM normal load with a 12 tooth gear coupled to a 40 tooth gear. On the same shaft a 15 tooth gear drives a 48 tooth gear which is on the same shaft as a 15 tooth sprocket connected via chain to a 24 tooth sprocket which is bolted to a 10 cm diameter wheel. The speed of this drive train is 1.32 m/sec. The encoder on the shaft of the sprocket shaft is a 32 pulse Grayhill encoder. That is, the encoder will “tick” 32 times every revolution. A tick translates into 6.1 mm of robot movement. Speed = 4300 RPM*12/40 * 15/48 * 15/24 =250 RPM Speed = 250 RPM/60 sec/min = 4.2 RPS d = 4.2 RPS *10 cm * PI = 132 cm/sec = 1.32 m/sec encoder speed = 4300 RPM*12/40 * 15/48 / 60 sec/min = 6.72 RPS = 6.72 RPS * 32 ticks /R = 215 ticks / sec encoder distance /tick = d/encoder speed = 132 cm/sec /215 ticks/sec = 6.1 mm / tick Exercise 5.1: a) Based on the a robot with CIM motors with 4000 RPM under load and a drive train with a gear ratio of 1:20 and wheels that are 10 cm in diameter, what encoder should be chosen? b) With an encoder of 32 ticks, how far will it travel each tick? How many ticks will it take to travel 8.0 m, 4 m , 2 m ? 12 Other applications of encoders: Motor speed Motor speed can be determined by an encoder attached to the drive shaft of almost any application. Web Speed/Tension control On a conveyor system, the speed of the conveyor and the tension on the belts or web of the conveyor can be determined by encoders. Linear Measurement/Cut-to-length Steel can be moved along a conveyor type system a specific distance so that it can be cut-tolength. An encoder can determine the exact length or distance the motor has turned. Position Measurement - Conveying, arm motion etc Robotic arms can be moved to specific positions or turned specific amounts by the use of encoders for feedback. 6. Gear Tooth Sensors Computerized Odometers If you make a trip to the bike shop, you most likely won't find any cable-driven odometers or speedometers. Instead, you will find bicycle computers. Bicycles with computers like these have a magnet attached to one of the wheels and a pickup attached to the frame. Once per revolution of the wheel, the magnet passes by the pickup, generating a voltage in the pickup. The computer counts these voltage spikes, or pulses, and uses them to calculate the distance travelled. If you have ever installed one of these bike computers, you know that you have to program them with the circumference of the wheel. The circumference is the distance travelled when the wheel makes one full revolution. Each time the computer senses a pulse, it adds another wheel circumference to the total distance and updates the digital display. Many modern cars use a system like this, too. Instead of a magnetic pickup on a wheel, they use a toothed wheel mounted to the output of the transmission and a magnetic sensor that counts the pulses as each tooth of the wheel goes by. Some cars use a slotted wheel and an optical pickup, like a computer mouse does. Just like on the bicycle, the computer in the car knows how much distance the car travels with each pulse, and uses this to update the odometer reading. One of the most interesting things about car odometers is how the information is transmitted to the dashboard. Instead of a spinning cable transmitting the distance signal, the distance (along with a lot of other data) is transmitted over a single wire communications bus from the engine control unit (ECU) to the dashboard. The car is like a local area network with many different devices connected to it. 13 7. Application 1) Given the following motor specs, design a drive that will produce a wheel speed of 4.0 m/s. Give the gear sizes and ratios as well as the wheel size. Justify and explain each selection. Include a quadrature encoder and justify why it was chosen. Grayhill’s optical encoders from Digikey.com would be a good place to look. CIM Motor specifications: Under no load the output shaft has a speed of 5300 RPM and under normal load it has an RPM of 4300. 2) A conveyor system, on a 15 cm diameter pulley, is required to move 1.0 m in 1 second. If a motor with normal load spins at 1000 RPM’s, design a gear train that will produce the desired speed. How often would a 128 pulse encoder pulse if connected to the motor shaft? How often would it pulse if connected to the driven shaft? How far does the conveyor travel for every pulse of the encoder connected to each of these locations? 3) A cut-to-length system is required to move a piece of steel exactly 3.45 m each time. Based on a motor speed under load of 500 RPM and a desired conveyor speed of 0.85 m/s, design a gear train that will produce the desired speed and suggest an encoder that will provide adequate feedback to control the system. The output pulley is 18 cm in diameter. Justify each decision. 4) The picture on the right is an automated vacuum seal machine. The belt moves the product under the vacuum unit and then seals it. The system needs to move a precise number of increments based on the product being processed. A redundancy mechanism is built in with electronic eyes to see that the product is within the bounds. If the motor on the conveyor has an RPM with load of 2500 RPM, and the conveyor is to move between 1.0 m in 3 seconds and 3.0 m in 10 seconds, create a gear train that will produce the desired output and suggest an encoder size that will mount on the output gear. 5) The foam cut off saw as pictured here has an indexing increment of 25.4 mm. That is, it can move 25.4 mm each time or any multiple of that. The speed of the conveyor is 24.5 m/min and it has a motor that rotates at 1000 RPM under load. Design a gear train and size the encoder required to receive the output specified. 14 Appendix A. Common Gear Sizes and Ratios 32 pitch Teeth 16 18 20 24 40 16 1.000 18.000 1.250 1.500 2.500 18 0.889 1.000 1.111 1.333 2.222 20 0.800 0.900 1.000 1.200 2.000 24 0.667 0.750 0.833 1.000 1.667 40 0.400 0.450 0.500 0.600 1.000 24 Pitch Teeth 12 15 16 20 21 24 36 48 72 12 1.000 15.000 1.333 1.667 1.750 2.000 3.000 4.000 6.000 15 12.000 1.000 1.067 1.333 1.400 1.600 2.400 3.200 4.800 16 0.750 0.938 1.000 1.250 1.312 1.500 2.250 3.000 4.500 20 0.600 0.750 0.800 1.000 1.050 1.200 1.800 2.400 3.600 21 0.571 0.714 0.762 0.952 1.000 1.143 1.714 2.286 3.429 24 0.500 0.625 0.667 0.833 0.875 1.000 1.500 2.000 3.000 36 0.333 0.417 0.444 0.556 0.583 0.667 1.000 1.333 2.000 48 0.250 0.312 0.333 0.417 0.438 0.500 0.750 1.000 1.500 72 0.167 0.208 0.222 0.278 0.292 0.333 0.500 0.667 1.000 20 pitch Teeth 12 15 16 20 23 24 25 32 36 48 60 12 1.000 15.000 1.333 1.667 1.917 2.000 2.083 2.667 3.000 4.000 5.000 15 12.000 1.000 1.067 1.333 1.533 1.600 1.667 2.133 2.400 3.200 4.000 16 0.750 0.938 1.000 1.250 1.438 1.500 1.562 2.000 2.250 3.000 3.750 20 0.600 0.750 0.800 1.000 1.150 1.200 1.250 1.600 1.800 2.400 3.000 23 0.522 0.652 0.696 0.870 1.000 1.043 1.087 1.391 1.565 2.087 2.609 24 0.500 0.625 0.667 0.833 0.958 1.000 1.042 1.333 1.500 2.000 2.500 25 0.480 0.600 0.640 0.800 0.920 0.960 1.000 1.280 1.440 1.920 2.400 32 0.375 0.469 0.500 0.625 0.719 0.750 0.781 1.000 1.125 1.500 1.875 36 0.333 0.417 0.444 0.556 0.639 0.667 0.694 0.889 1.000 1.333 1.667 15 48 0.250 0.312 0.333 0.417 0.479 0.500 0.521 0.667 0.750 1.000 1.250 60 0.200 0.250 0.267 0.333 0.383 0.400 0.417 0.533 0.600 0.800 1.000