History of Computers
Computers have done or can be made to do almost anything nowadays. The definition of a computer is a machine that receives inputs, stores and manipulates data, and provides a output of useful information. The first computers were made for doing calculations, such as keeping track of the times of year and figuring out when events such as solar eclipses would occur. The first electronic computers, made during the middle of the 20th century, were the size of a large room and required massive amounts of power to use. Many personal computers are now smaller than some books. Computers are now used in many things, such as fighter jets and traffic lights.
History of Programming
Computer programming as we know it began to thrive around the industrial revolution. Some basics forms of programming existed in Ancient Greece, where they were used to track such events as meteoric cycles. Some other simple programs, made by Jacquard Loom, used post cards to make patterns while weaving that produced different effects. Today we use computer programming for a lot of things, including programming robotic arms on an assembly line and to make robots that detonate bombs. Many programming languages exist, many of which make doing a specific task easier.
Programming Basics
A programming language acts as a translator between machine language (binary) and English. A compiler is a specialized program that takes the written code and converts it into binary. Written codes have syntax, or rules, which establish in what order the words occur. Programming elements are different types of words which define how they are used to write programs. Common programming elements include statements, declarations, methods, operators, and keywords.
Programming Languages
There are many different types of programming languages in the world. Popular ones include Java, C++, and HTML amongst others. Many exist today because they serve to make a certain task easier. For example, HTML is excellent for web design, but is useless when it comes to doing other things. Although the order of your code generally is written in chronological order, some codes differ. In addition, when you write your code you have to list what the robot is going to do from second to second, including when it waits. Without it the robot will move right on to the next task. The art of programming takes a level of skill from many different subjects to be good at it. The intellectual effort involved with writing a medium sized program has been likened to writing a novel.
EasyC Programming
EasyC is one of the many programming languages. It is a strongly typed object oriented programming language. EasyC is a graphical programming environment. In the integrated developing environment (IDE), it bears a strong resemblance to Visual C++ or Visual Basic. It also has similar expressive power to the ANSI-C language whilst avoiding many of the issues that make ANSI-C tedious or difficult to code in. In order to program, you just drag the function blocks into place and fill in their appropriate fields. Although this makes it a beginner friendly program, it does have some downsides, including the fact that you can only only edit visual blocks and not their code. The program flow includes while, do while, for, if, else, comparisons, and assignments. In order to make comments, you can use /* /* or //. At the top of the function or globally, you must declare your variables. There are several menus built into the IDE which allow you to configure the port bank and other related tasks. In order to load the code to you robot, all you need to do is plug in the orange serial cord to a USB port on the computer and into the micro controller. Once this is done, you can compile the codes into a HEX file and download it to the micro controller. The program will run immediately after download. Old code is automatically replaced with the new code. The version of your software (L1, L2, or PRO) determine what functions are available to use.
EasyC IDE
The first screen when you open up the EasyC software has many things for you to use. These include a menu bar, a tool bar, a function blocks window, a programming window, a C programming window, and a status and output window. To make a basic program that makes the robot go forward, it is quite simple. First you click “Launch Project” from the “File” menu. You then select “Pro” from the toolbar. Next, in the function blocks window, under the “Outputs” heading, find the “Motor Module” block. Click and drag it into the programming window, between the begin and end blocks. In the motor configuration window, select Port 3 for the motor and clockwise for the motor direction. Select “Ok”. Once you repeat for the right motor (albeit with a counterclockwise direction), your program will be done. Common compilation errors include “Symbol has not been defined” and “Syntax error”. The former is caused when you misspell a variable name or if you try to use a variable that has not been defined in the “Global Window” or “Variable Window”. “Syntax Error” occurs frequently when you don’t complete the condition in an “if” statement or “while” statement. Download errors most commonly are fixed by making sure the robot is on, checking your battery levels, making sure all your cables are plugged in, and verifying what USB port your serial cord is plugged into.
Circuits
A battery or generator is used to push electrons around a circuit, thus powering it. This force is called voltage, and is measured in volts. The flow of electrons, or current, is measured in amperes. The product of the force and current is electrical power, which is measured in watts. An electron moving through the wires encounters resistance every time it collides with atoms. This resistance is measured in ohms. The amount of resistance increases as the diameter of the wire decreases.
Military Robots (Practical Applications)
The military has begun to implement robots in day to day combat situations. One of the larger robots, the ACER (Armored Combat Engineer Robot), is about the size of a Zamboni. It can be used to clear out explosives using a mechanical arm, remove obstacles with a plow blade, haul cargo in a trailer, sweep for mines, and even tow disabled vehicles as large as a bus. MATILDA (Mesa Associates Tactical Integrated Light-force Deployment Assembly) is another robot used by the military. It utilizes a triangular tread shape, which results in it having a high profile. It has a top speed of 3 seconds and is controlled by four joysticks. The tread system is designed to be changed out in under five minutes in the event of damage. Another small robot used by the military is the PackBot. Weighing in at 40 pounds, this robot is designed to fit in the Army’s new standard pack. It is design to withstand rough treatment such as a 6-foot drop onto concrete equaling 400 G’s of force. This ruggedness is used by soldiers who toss the robot through windows of hostile buildings to scope out the area. The chassis on a PackBot includes a GPS system, an electronic compass, and temperature sensors. It also has a square “head” that can raise up on a metal arm and a mechanical arm with a gripping hand. Another neat feature is that even if it is dropped upside down, PackBot can right itself using the flippers. A fourth robot used by the military is the Talon. It is amphibious, has seven speed settings controlled by a joystick, a mechanical arm, and it can be weaponized.
Tanks
Tanks were originally called “land ships”. They first appeared as we know them in 1915. However, early models have been in existence since the the 18th century. They were used to break through trenches in the first world war. Tank treads have two big disadvantages: metal treads destroy asphalt, and they have less mobility than wheels in tasks such as turning. However, the list of pros includes they have less weight distributed per square inch, they’re more durable than wheels, more all-terrain than wheels, better at climbing, more capable of obliterating whatever’s in their path, and they destroy less landscape than wheels.
VEX Robotics Kit
The VEX robotics system comes with a variety of parts. These parts can be classified into several subsystems. The structural subsystem contains steel or aluminum sheet-metal parts with pre-fabricated square holes and the compatible hardware such as nuts and bolts. These parts are designed to be modified, and can be cut and bent into an appropriate shape/form. The motion subsystem includes everything that enables movement- gears, bearings, squared shafts, rollers, wheels, treads, and motors. The power subsystem contains batteries. The sensor subsystem contains limit switches, bumper switches, accelerometers, light sensors, line following sensors, ultrasonic range finders, optical shaft encoders, and potentiometers. The VEX robotics kit also includes a micro controller, which is in the control subsystem along with a transmitter, receiver, and a signal splitter. The controller has 2 transmitter ports (Rx1 and Rx2), one serial port for the programming cable, and a port for the battery. It also has 8 motor ports and 6 interrupt ports. Ports 1-12 of the analog/digital bank are for sensor, and ports 13-16 are for jumpers. There are also ports for a TX and RX cable. The micro controller has a digital input frequency of 50 Khz and an analog input access of 10 μsec. The user micro controller is a Microchip PICmicro® PIC18F8520 with a processor speed of 10 million instructions per second.
Robot Structure
Structure plays a vital role in robot design. When designing a robot, one should try to anticipate and compensate for the expected environment and task. During the design phase, sensing should be taken into account, with particular emphasis on what sensors can accomplish this task and where they should be positioned. Consideration should be given to the robot’s center of gravity. The center of gravity is the average of both weight and placement. As a rule of thumb, a piece that weighs more counts more than a lighter piece, as do pieces placed further out. A support polygon is formed by connecting points where the robot touches the ground. In any configuration, there is always one support polygon. The robot is most stable when its center of gravity is located in the support polygon. If the center of gravity is placed outside the support polygon, the robot will tip over. In addition, gripping and weights alter the center of gravity. To counter these effects, a larger support polygon can be used. To increase the sturdiness of your robot, you can brace heavy or long parts to reduce the strain. Also, if something needs to remain stationary, use two screws instead of one. To add to the life of your robot, you should also protect the vulnerable points (sensors, cables, controllers, etc.).
Motors
Motors serve the purpose of transforming electrical energy into mechanical energy, which makes physical movement. A motor generates power (a specific amount of energy per second). Motors spin in opposite directions due to internal designs. A clutch is a system used to protect internal gearing from damage by breaking the connection. Standard motors spin the axle around completely and keep going. These should be used when continuous motion is required, such as in the drive system. A servomotor turns the axle to face a specific direction within a range of motion (120° in the VEX kit). These should be used in instances where boundaries of motion are well-defined and specific positions must be used, such as in an arm that opens and closes.
Gears
Gears are used to change the torque-speed ratio. Torque is the force at which a motor can turn a wheel. Speed is the rate at which the motor turns a wheel. Gears are a multiplier on torque and a divider of speed. A driving gear provides he force to turn other gears. This is usually the one attached to a motor. A driven gear is the gear being driven by a driving gear. An idler gear is the gear between the driving and driven gear. It has no effect on the gear ratio. The idler gear spins in the reverse direction of the other gears. It is commonly used to transmit force over a distance to another gear. Gear ratio is equal to driven_gear_teeth over driving_gear_teeth. For example, a gear ratio of 1:2 has 1/2 the torque of a gear with a gear ratio of 1:1, but twice as much speed. A compound gear ratio is made when one or more pairs of gears share the same axle. They allow for force and speed combinations not available with normal gear combinations. A compound gear ratio is calculated by multiplying together the ratios of each individual gear pair. For example, a compound gear with the ratio 12:60 x 12:60 = 1:5 x 1:5 = 1:25 is turning the axle 25 times faster with 1:25 of the force.
Wheels
Wheel size is a factor that effects a robots acceleration and top speed. Bigger tires provide slower acceleration but a faster top speed while producing a larger pushing force. Smaller tires provide faster acceleration but a slower top speed due to their larger pushing force. Larger wheels cover more ground with the same amount of rotations. Higher gear ratios take slightly longer to reach top speed. Wheels convert torque into a pushing force on the ground. This force is equal to the torque over distance from the center to the edge of the wheel. Friction dissipates some of the energy. Wider, bumpier, and stickier tires provide more friction. Narrower, smoother, and more slippery tires provide less friction.
Power
VEX robots use rechargeable batteries for an energy source. The robot uses 6 AA batteries at 7.2 V and the transmitter uses 8 AA batteries at 9.6 V that are stacked in series. The power pack included with the VEX kit charges both packs with an auto-off feature. The micro controller uses two indicator lights to show its status: green means okay, and red means that it needs recharging. When the transmitter reaches 9.4 V, it means the battery is low. At 8.9 V, it’s very low and you have under 10 minutes left. At 8.5 V, you need to stop. VEX robots can also use a rechargeable NiCd battery. These batteries are rechargeable, and have a larger capacity. They provide a constant voltage until they are depleted. To charge them, it takes around one and a half to three hours.
Sensors
Sensors provide robots a way to measure things about their environment. They can be measured in analog or digital. With analog, the voltage is measured between 0 and the maximum range. This makes it difficult to send and maintain the specific voltage in noisy environments. For example, with a light sensor, 0 V means dark and max V means very bright. In the code, it calls a return between 0 and 100 or 1024. Digital, which is used on a bump sensor, gives you a voltage rounded to low (0 V) or high (max V) with no in-between. Digital readings are more reliable in noisy environments due to the rounded voltages. The VEX function calls a return of 0 or 1. Certain sensors must be placed in certain ports on the micro controller. For example, a bump sensor can be placed in ports 1-12 in the analog/digital section on the micro controller as can light sensor.
Light Sensors
A light sensor, as its name suggests, is a mechanical or electronic apparatus that detects light. It can be used to provide information on distance, shape, speed, dimensions, and even types of substances contained in a wide array of objects. Light sensors are essential tools used for their high level of precision. Light sensors can be used for anything from counting the output of an assembly line to high-tech applications such as in space exploration, and even in cameras telling you when there is a break in the film. Light sensors have a higher level of accuracy than the human eye. In the VEX system, light sensors take analog readouts with a feedback range between 0 and 1024. They use a photo resistor, which translates darker light into a higher numerical value. Consequently, very bright gives reading of 0, some light gives a reading of 512, and no light registers at 1024. Depending on the light source used, the sensor can have a range of 0 to 6 feet. The sensor can be plugged into ports 1-12 of the analog/digital section; however, the port used must be configured as analog input. The code used for the light sensor is light = GetAnalogInput(port);//Returns ‘unsigned int’
Triangulation
Triangulation is the process of determining the location of a point by measuring angles to it from known points at either end of a fixed baseline, rather than measuring distances to the point directly. Triangulating is used for many different things, including geometry and search and rescue. The method of triangulation is commonly used in GPS systems to find a location. This is the same technology that can be used to trace phone calls.