Thursday, December 18, 2008

Final Class Blog

The robotics semester has come to an end and this will be my last entry. In the robotics unit we covered the main areas of robot construction, NXT programming and NXT sensor usage.

When it comes to robot construction we have learned the basic and finer points to creating a well constructed and fine tuned robot. We have learned how to properly support different kinds of structures with various types of supports, for example using cross beams to properly support a rectangular or cubular shape. In addition to this we learned how to properly add on and support other parts of our robots such as the gear attachments and the wheels. The wheels should favorably, not be directly attached to the motor, however on an axle that is connected through the use of gears; also that gears, axles and wheels should all be as close to the core of a robot as possible as it reduces the amounts of friction and pressure upon them. Finally we also learned how to properly balance the loads on our robots so that the robot has a center of gravity that is as low and stable as possible.

During the robotics course we learned how to use the NXT programming software to allow us to control what we wanted our robots to do. The NXT programming software consisted of two main palettes that allowed us to control most all of the robot's actions. On the robotics palletes where blocks programmed to make the robot perform actions such as moving, sensor blocks such as the sound sensor block and math/logic blocks which allowed the robot to compare data it had collected to make a decision based upon it. The NXT programming software would then be downloaded onto the NXT brick and the program could then be run.

Upon conclusion of the course we researched, studied the capabilities of and used almost all, if not all of the NXT sensors included in the kit. The sensors we focused on included: the rotation sensor, sound sensor, ultrasonic sensor, light sensor and touch sensor. The rotation sensor was built into the motor's and allowed us to calculate the distance the robot would travel based upon the wheel size and distance/rotation the robot travelled. With the sound sensor (measuring soud levels), we created thresholds of sound that allowed us to program our robots to perform actions upon that threshold being reached, however prevent it from acting prematurely upon sounds that were too quiet/loud. The ultrasonic sensor worked by calculating distance of objects based upon sending and recieving sound waves. We used the ultrasonic sensor to help us navigate an obstacle course. The light sensor emitted a red light and measured the amount of reflected light it recieved. We used the light sensor to allow our robots to track lines and stop at certain points. Finally, the touch sensor was triggered based upon if the sensor was pushed, tapped, or released, at which point the robot would perform a certain action. We used the touch sensor to stop our robots whenever it hit an object so that the motors would not keep moving and possibly damage the robot.

Throughout the course we were constantly working with calculating different algebraic formulas in order to measure and predict distance, speed and gear ratios. During our investigations of each sensor we also compared different hypotheses in order to prove which was most right/correct. Throughout the course we also had to constantly work with different partners so collaboration was a must in order to achieve our tasks. Thus effective collaboration and communication were important concepts throughout the course.

Thursday, December 4, 2008

Challenges: Drag Race and Tractor Pull

We have been assigned a new challenge, and this time around its less about using the sensors and all about the speed. We have to design a robot that will be able to cover the distance of a 3 meter straight track in the shortest amount of time. This challenge comes after we finished the gear worksheets, so obviously we will need to find a gear combination that will be optimum for speed.

At first we planned to create a robot with a gear train of two 40t gears and two 8 t gears...(even three at a point in time...that machine would truly have been monstrous) however my partner, Hakyoon, and I soon came to realize that with the minimal time allotted us, our robot simply wouldn't be able to support all of that extra weight on the wheel axles...a true shame. In the end we opted for a simple 1:5 gear ratio added a wheelie bar...In the first drag race our robot went berserk and 'unintentionally' using little lego 'spikes' protruding from its wheels rammed into the opponent and flipped it...even though we had to re-run the drag race (surprisingly beating the competitor's robot with the same gearing) our robot...truly was demonstrating its inner beastliness.




The tractor pull challenge works much in the opposite direction. We will have to design a robot that can push/pull the greatest amount of weight across 50cm in the shortest amount of time.
The gearing for this robot will be hard to balance between losing too much speed while still giving the robot lots of torque.

In addition to the modified gearing, our robot will most likely need a slight revamp to its actual structure in order to push large amounts of weight. The weight of the robot shouldn't be much of a problem, so my partner and I will most likely try to place additional weight on the driving wheels of our robot so that it has more traction and won't slip when pushing the weights. Some other attachments such as 'steering rods' may be placed out in front of the robot so that the object being pushed doesn't slip away.

Tuesday, December 2, 2008

Gears and Speed Investigation

In this investigation we explored the relationship between gearing up or gearing down and speed.
We were testing two hypotheses used to predict this relationship; the first being:

A: Speed One/Gear Ratio One = Speed Two/Gear Ratio Two
and the second being:

B: Speed 1 * Gear Ratio 1 = Speed 2 * Gear Ratio 2

We then setup our taskbot to run for 3 seconds and recorded the distance the robot moved each time with three different gear ratio configurations, 1:1, 3:5, and 5:3. Following this we used each formula to predict the speed at which the robot would travel at each speed, later comparing this to the actual angular velocity at which the robot moved by dividing the distance by the time (3 seconds). After comparing all of the results we found that hypothesis B was very accurate in predicting the actual speed the robot would go. Looking at the values produced by our experiment we found that the relationship between gear ratios and speed is inverse. Inverse meaning that as the gear ratio decreases, the speed increases, and as the the gear ratio increases, the speed decreases. This relationship is the opposite of a direct relationship such as that between wheel size and distance.

Wednesday, November 26, 2008

Playing With Gears

This chapter in the LEGO robotics book overviews the importance of using gears to improve the functionality of your robot and to ensure proper usage of gears.
First off, the main theory behind a gear is that by using a gear to turn another gear of a different size, you can either multiply the force behind that second gear, or greatly accelerate the speed at which that gear travels. In the above example, the gear being used to turn the other gear is known as the driving gear, and the gear being turned is known as the driven gear. The forces being outlined in the above example are essentially torque, and what is known as angular velocity, or 'speed'. Torque is a product of force and distance and basically is the amount of kick or driving power behind a gear. Angular velocity is the rate at which your robot will cover distances.
When wanting to increase torque on a robot, the driving gear would have to be smaller (have fewer teeth, ie. little pegs) than the driven gear and vice versa for the driven gear. So based upon this concept one would think that you should just add as many gears as possible to magnify your robots capabilities. However, this is where another catch is met: a force called friction. Friction is the amount of force being transferred between the teeth of your gears; and consquently, having more gears means more teeth and thus more friction. Having too much friction can damage the robot, gears, and whatever motors are driving it; thus a proper balance must be found.

There are also many types of gears that can be used for several different situations. For example, a gear known as a knob wheel (four rounded teeth) is a gear that is specialized in providing more torque as its larger surface area on the teeth allows more energy to be transferred. Another type of gear, known as a clutch gear is essentially a 'safety' gear that locks down when too much force is applied to it. This gear is useful in protecting the rest of your gears and robot in case too much force is exerted.

In addition to just connecting gears to gears; gears can be connected using pulleys and chains. Using pulleys and chains allows you to connect gears that would normally be too far away to just stick in a bunch of other gears to connect. Pulleys also have the advantage of being much quieter than gear connections. The difference between pulleys and chains lies in the forces they are better suited to dealing with. Pulleys, using belts tend to have very little grip on the gears and as a result produce very little torque, which is good if you are going to for angular velocity. Chains however are composed of individual links and have the most amount of grip on the cogs on the gears. This means that they produce the most torque and are relatively poor for use when trying to achieve high angular velocity.

Thursday, November 20, 2008

Getting in Gear Investigation

Today we started to work with gears and experimenting with gear ratios.

We experimented with making both the driven and driving gears larger. We did this be switching which gear (24t/8t) was attached to the motor. The driving gear is the gear attached to the axle attached directly to the motor, the driven gear is the gear that is attached to the axle attached to the wheel (turned by driving gear). We found that making the driving gear larger than the driven gear speeds up the robot based on the ratio of the teeth on the wheels. However by making the driving gear smaller than the driven gear means that the gear has to rotate multiple times to turn the other gear once. This slows down the robot however adds considerable torque to the robot (torque is basically the power/driving strength behind a motor) .

The highest speed we would be able to achieve with the taskbot NXT model without using gear trains would be with using a gear ratio of 40t to 8t with 8cm diameter wheels.

However, as we came to realize, having a setup with high gear ratios and high angular velocity creates a potentially hazardous situation for the NXT motor and gears. If for whatever reason the robot hits an obstacle and doesn't stop, then the motors multiplied driving force of the gears can bend or mangle parts of the NXT. Having some sort of PANIC! button here would be useful...or perhaps just adding a touch sensor to the front of the robot underneath some sort of ramming shield.

Classic Projects

This chapter basically summarizes two projects that are often undertaken and are an ample introduction into the fun yet complex world of programming and constructing effective robots.
The first project concerns the navigation of your room. The robot to be constructed for this project will require at least one touch sensor and ultrasonic sensor to be successful in this task. A robot optimized for this task however would probably incorporate the use of at least two touch sensors, the ultrasonic sensor as well as a bumper design and special gearing. The bumper would probably be split into two sections as it allows for more coverage and allow the robot to turn based upon which touch sensor was hit, in relation to which bumper was pressed. The only limitations with this kind of bumper however are that it increases the likelihood of the robot being too wide and getting stuck on awkward inward facing angles such as where walls meet. The gearing (1:3, meaning that for every rotation of the motor, the wheel would turn a third of its normal capacity) would be used to slow down the robot so that a more cautious approach could be used to explore your room in case the robot falls into dangerous pitfalls that would be harmful to the robot (stairs...). These additions are what differentiate a robot that is optimized for a project, and those that simply 'work.'

The second project involves line tracking and covers several methods to both increasing tracking speed, accuracy and design more efficient robots. When line tracking the important to remember is the amount of hysteresis your robot creates. Hysteresis is the amount of 'sway' the robot has as it travels over the line; more sway means less control and less speed in this case. It is also suggested to place the light sensor 5mm-10mm to the ground to maximize the amount of reflected light and reduce the chance of the robot veering off of the line (If it has too much speed).

Monday, November 10, 2008

The Course Robot

The key points from chapter six to remember when building are:
  • Modularity
  • Balance - low center of gravity = stability
  • lightweight and strong as possible
  • Proper structural support
Of these points, as my partner and I are planning to create a robot that is both slim, low to the ground and light-weight; we will use the concepts of balance, lightweight structural support and keeping the robot low to the ground. These will keep the robot from flipping over during the various obstacle course challenges as well as reduce unneeded weight which could slow down the robot. More to come...

...Today we worked on programming the robot to make the first leg of the course. This included setting up a light sensor and touch sensor as well as getting the robot to run straight. For the most part the program was successful, however the robot had difficulties in keeping a straight path. For the challenge this will be our main concern.

For Monday we will have to setup the program for the ultrasonic sensor as well as create the evasion program for our ultrasonic sensor on the last leg of the course.

After COUNTLESS on-course tests and the never ending re-balancing of the our course-bot...and admittedly due to calculating the angles at which the robot generally steered off of course...Hakyoon and I finally managed to navigate the obstacle course, scoring perfect 10's across the course with the exception of the last leg where the robot skimmed the can and earned us a lowly 7 :S

Building Strategies

(NOTE: This entry is a work in progress)

Chapter six of the Lego Robotics book emphasizes the importance of the structure of your Lego Robot. When creating a robot, the main goals you want to keep in mind, are that you want to keep the robot as lightweight as possible - using minimal amounts of bricks - without sacrificing the structural integrity of your robot and making it very vulnerable to forces such as compression and tension (unless you have alternative intentions for your robot). Compression is a force exerted on structures that pushes and tries to make the structure smaller, while Tension is the opposite; it stretches and tries to elongate the structure. To counter both forces and to make your robot more 'economical' by using less parts for more strength, a variety of different supports must be used in combination (ex: beams and 'L-beams' must be used together).

When it comes to structural integrity, protecting the gears and motors of your robot are vital, as in relation to the human body, they are the heart of your robot; driving it forwards and turning it into the unstoppable monster, or lithe dragster that it is. The important thing to remember with gear and wheel placement is that the closer the gear/wheel is to its supporting beam the better. Having the gear/wheel closer to its supporting beam means that less force (generated by the mass of the robot for example) will be pushing down on the axles and pushing your gears apart. Another point to remember when supporting gears is to mount supports in line with the gears, as illustrated in 6.10, 6.11 of the robotics book. This means that if your gears are operating horizontally - match parallel support beams horizontally. Having the axles snap under multiplied pressure, or your gears failing to function as they slide apart are realities that can be easily solved by remembering these points.

Also, when constructing a robot it is also important to remember to balance the robots weight between both the driving wheels and any other wheels on the robot (generally slightly more weight on driving wheels) so the robot isn't off balance.

Finally, another important thing to remember is to build your robot with modularity. This means that you should construct portions of the robot together so that you can easily attach and detach certain portions of the robot to easily remake the structure. When building a robot using both the Technic and Mindstorms kits, also known as a hybrid, modularity is one advantage the robot has compared a purley Mindstorms kit in most cases (Hybrid robots also tend to be heavier and more stable) .

Thursday, November 6, 2008

Challenge: Obstacle Course

My Lego Robotics team (yet to be decided) has been presented with the challenge of building a robot that will be able to navigate an obstacle course with several kinds of obstacles; in this challenge our robot will have to use most of the sensors we have been taught to use so far.
The robot must first travel forwards and stop within a boxed out region for five seconds, a light sensor will be used here, after this the robot must ram in to a wall and activate a touch sensor before reversing and turning right. After this the robot will travel forwards and use its ultrasonic sensor to detect a wall, and turn right again. The final leg of the course calls for the robot navigating a randomly placed obstacle; this would probably be done with the use of a ultrasonic sensor and if time allows, some sort of lego 'missile' that will remove the obstacle from the course.

(All of the above while smoking the competitors' robots navigation times of course)




Essentially I am only brainstorming as to the actual design of the robot at the moment...and I'm clueless...so far:

  • The robot should be low to the ground - probably longer than taller for balance and aerodynamics :O
  • Will need multiple appendage like structures to hold variety of sensors in place and to prevent overlapping of sensors
  • May use gear trains to juice all of the possible speed out of the robot (losing torque shouldn't be an issue as it is a flat course)
  • The largest Lego wheels possible should be used for additional speed.
  • The touch sensor will have to be mounted on the front, as well as the ultrasonic sensor, so some variations in height will be necessary.

Understanding Lego Geometry

Essentially this chapter gets at the bare bones, or bricks in this case, behind Lego construction. In the world of Legos, measurements and sizes of bricks are noted by the number of studs on a Lego brick, also known as Lego units. When stating the sizes of Lego bricks, it is stated in dimensions in the order of, width, length and finally height. Width is determined as being the shorter of the two horizontal sides of a Lego brick when it is laying 'studs up.' For example, the smallest Lego brick has dimensions of 1 x 1 x 1 Lego units, however this does not mean that it is a cubular shaped brick. In the world of Legos, one 'stud' has a ratio of 6:5 when comparing height to width in milimeters, thus explaining why the one stud Lego 'cube' isn't really a cube.

When comparing Lego bricks to Lego plates, Lego plates are approximately 1/3 the height of one stud.

However, bricks and plates are for those of you that like to kick it Oldskool, as the NXT Mindstorms sets use the newer Lego Technic pieces. The Technic pieces are essentially studless versions of the Oldskool blocks that are more weight efficient and less cumbersome when it comes to precise and lightweight building, that retain the same strength.
With the studless beams and liftarms in the Technic set, capabilities such as diagonal crossbracing become a possibility. When diagonally crossbracing with studless beams, one can use Pythagorean's Theorem to calculate if a certain beam can be used to crossbrace a structure.
Pythagorean Theorem essentially is a formula that relates the measurements of the hypotenuse of a right angle to being equal to the squared values of the other arms...
In other words...a^2 + b^2 = c^2, where c is the hypotenuse.
For example a structure with a base of 15 units, and a height of 8 units can be crossbraced because:
15^2 + 8^2 = 17^2, c in this case equals to a number whose square is a whole number, meaning a studless beam could be used to crossbrace.

I apologize as this is a rather long-winded post...however to conclude my summary of the chapter, one can also use liftarms to brace Lego structures. The key difference here is that liftarms arent straight beams, meaning that one can use them regardless of the Pythagorean Theorem to brace a structure from impacts in totally unique ways.

Tuesday, November 4, 2008

Field of View Experiment

In order to test the capabilities of the the NXT ultrasonic sensor we conducted an experiment to demonstrate the width and length ranges at which the NXT sensor was still functional.

1. We layed our NXT robot, equipped with an ultrasonic sensor on the front of the robot, on a flat white board. The program detecting distance (cm) under 'view' was run.
2. After this, white masking tape was layed directly in front of the robot in a straight line for 2 meters.
3. Intervals of 10 cm were marked on the white tape
4. An object (Whiteboard eraser, flat side towards sensor) was slid down the white tape until the ultrasonic sensor no longer detected it. This position was marked with black tape.
5. At every 10 cm interval the whiteboard eraser was slid left and right until the sensor no longer detected an object. These positions were also marked with black tape.

Once the procedure was finished we marked down the black tape points on a smaller a4 paper which was divided into a grid. The distances were scaled down so as to fit onto the a4 grid, personally I used a scale of 2:1.

Now looking at the black tape pattern our group recognized that when an object was closer to the sensor, the sensors field of view was narrow (~5cm either direction). However past a certain distance, (~40-70cm) the sensors field of view widened to a maximum of about 20cm before gradually shrinking down in width to the maximum distance the sensor could read.
This formed a somewhat balloon-like shape.

http://isklrobotics.blogspot.com