Sie sind auf Seite 1von 245

INTRODUCTION TO ROBOTICS WITH REVOBOT

Student Guide
Introduction to Robotics is intended to be a complete theoretical and practical reference for robotics. The book guides robotics hobbyists and students to understand, appreciate experiment and ultimately build completely autonomous robots from scratch.

Introduction to Robotics with Revobot

TABLE OF CONTENTS
TABLE OF CONTENTS......................................................................................... 2 PREFACE PREFACE ................................................................................................................. 6 CHAPTER 1 ............................................................................................................. 9 INTRODUCTION ..................................................................................................... 9 1.1 Voltage (V) ...................................................................................... 9 1.2 Electric Current (I) ..................................................................... 13 1.3 Electrical Resistance (R) .......................................................... 16 1.4 Ohms Law ..................................................................................... 20 1.5 Electric Power............................................................................... 23 CHAPTER 2 ........................................................................................................... 25 ACTIVE AND PASSIVE COMPONENTS ................................................................ 25 2.1 Electronics Components ........................................................... 25 2.2 Active and Passive Components ........................................... 25 2.2.1.1 Resistors .............................................................................. 26 2.2.1.2 Measurement of Resistance Values ............................ 26 2.2.1.3 Calculation of Resistances in circuits ......................... 28 2.2.1.4 Series Connection ............................................................. 29 2.2.1.5 Parallel Connection ........................................................... 29 2.2.1.6 Special Kinds of Resistors .............................................. 29 2.2.1.7 Thermister ............................... Error! Bookmark not defined. 2.2.1.8 Capacitors ............................................................................ 31 2.2.1.9 Inductor ................................................................................ 35 2.2.1.10 Diodes .................................................................................... 37 2.2.1.11 Light emitting diode [LED] ............................................. 38 2.2.1.12 Variable capacitance diode ............................................ 38 2.2.2 Active Components ............................................................... 38 2.2.2.1 Bipolar Junction Transistor ............................................ 39 2.2.2.2 Operational amplifiers ..................................................... 41 CHAPTER 3 ........................................................................................................... 43 ELECTRICAL CIRCUIT & THEORY ....................................................................... 43 3.1 Electrical circuit ........................................................................... 43 3.2 Ground concept in a circuit ..................................................... 46 3.3 DC and AC ..................................................................................... 46 3.4 Designing DC power Supply or Battery Eliminator.......................... 49 3.4.1 The Power Transformer ....................................................... 49 3.4.2 The Rectifier ............................................................................. 50 3.4.3 Bridge Rectifiers ..................................................................... 52 3.4.4 The Conventional Full-Wave Rectifier ............................ 52 CHAPTER 4 ........................................................................................................... 62 SENSORS AND ACTUATORS ............................................................................... 62 4.1 Sensory Systems ........................................................................ 62

Page 2

Introduction to Robotics with Revobot

4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17

Rangefinders ................................................................................ 62 Light Sensors ............................................................................... 65 Color Sensor ................................................................................. 69 Accelerometers ............................................................................ 70 Gyroscope...................................................................................... 72 Rotation Sensors ......................................................................... 73 Contact and Proximity Sensor ............................................... 76 Force Sensors .............................................................................. 79 Magnetic Sensors ................................................................... 80 Thermal Sensors .................................................................... 83 Vision Sensors ......................................................................... 87 Acoustic Sensors .................................................................... 90 Localization............................................................................... 91 Voltage and Current Sensor............................................... 93 Analog-To-Digital Converter .............................................. 94 Other Sensors and Time Reference ................................ 94

CHAPTER 5 ........................................................................................................... 98 ACTUATORS......................................................................................................... 98 5.1 Mechanical movements ............................................................ 98 5.2 Types of Actuators ..................................................................... 98 5.3 Electromagnetism ..................................................................... 103 5.4 Solenoids ..................................................................................... 106 5.5 Electrical Motors ........................................................................ 107 5.6 Brushed Direct Current (DC) Motor ................................... 107 5.7 Brushless Direct Current (DC) Motor ................................ 109 5.8 Stepper Motor ............................................................................ 111 5.9 RC Servo Motor ......................................................................... 112 5.10 Application of Electrical Rotary Motor in Robotics ... 114 5.11 Guideline to Electrical Motor selection ......................... 116 5.12 Gears ........................................................................................ 117 CHAPTER CHAPTER 6 ......................................................................................................... 125 FUNDAMENTALS OF ROBOTICS ........................................................................ 125 6.1 Robots ........................................................................................... 125 6.2 The very first concept Robot and Robotics ................. 125 6.3 The three laws of robotics by Isaac Asimov: ................. 126 6.4 Early Industrial Robots ........................................................... 126 6.5 Industrial Robots:..................................................................... 128 6.6 Mobile Robots ............................................................................. 129 6.7 Humanoids .................................................................................. 132 6.8 Cooperative Robotics .............................................................. 133 6.9 Robotic Design Approaches .................................................. 134 6.10 Neuromorphics ...................................................................... 136 6.11 Biomorphics............................................................................ 136 6.12 Looking forward .................................................................... 137 CHAPTER 7 ......................................................................................................... 139

Page 3

Introduction to Robotics with Revobot

MECHANICAL ASSEMBLY .................................................................................. 139 7.1 Nuts and Bolts ........................................................................... 139 7.2 Mechanical Parts of the Revobot ........................................ 139 CHAPTER 8 ......................................................................................................... 152 ELECTRICAL ASSEMBLY .................................................................................... 152 8.1 Hooking it UP.............................................................................. 152 8.2 How to turn on your Revobot .............................................. 152 8.3 Tuning the sensor modules .................................................. 162 8.4 Mode Selection .......................................................................... 163 8.5 Enable/Disable the motors .................................................... 165 8.6 Reset the Revoboard ............................................................... 165 8.7 Turn off the Revoboard .......................................................... 165 CHAPTER 9 ......................................................................................................... 166 GETTING STARTED WITH REVOBOT ................................................................ 166 9.1 Getting Start............................................................................... 166 9.2 Obstacle Detection and Avoidance .................................... 167 9.3 Line Follower .............................................................................. 170 9.4 Wall Follower .............................................................................. 173 9.5 Pit avoidance .............................................................................. 174 9.6 Light Follower ............................................................................. 177 9.6.1 LDR Circuit Assembly on the breadboard ................... 180 9.7 Revobot Projects ....................................................................... 187 9.7.1 Sumobot .................................................................................. 187 9.7.2 Robo-Race............................................................................... 188 9.7.3 Mine hunter ............................................................................ 188 9.7.4 Fire Extinguisher .................................................................. 188 CHAPTER 10 ...................................................................................................... 189 EXPLORING THE REVOBOARD AND THE SENSOR MODULE ............................ 189 10.1 Revoboard ............................................................................... 189 10.2 Microcontroller ...................................................................... 189 10.3 Motor and Motor Driver ..................................................... 189 10.4 Mode selection ...................................................................... 190 10.5 Buzzer ...................................................................................... 190 10.6 IR sensor module ................................................................. 191 10.6.1 Timer......................................................................................... 192 10.6.2 IR transmitter ........................................................................ 192 10.6.3 IR receiver .............................................................................. 192 10.7 Power Supply ......................................................................... 193 CHAPTER 11 ...................................................................................................... 195 INTRODUCTION ................................................................................................. 195 11.1 Installation Procedure: ...................................................... 195 CHAPTER 12 ...................................................................................................... 197 CREATING THE WORKSPACE ............................................................................... 197

Page 4

Introduction to Robotics with Revobot

12.1 12.2

MPLAB....................................................................................... 197 USB Bootloading: ................................................................. 207

CHAPTER 13 ...................................................................................................... 209 HOW TO LOAD A PROGRAM IN TO REVOBOT ...................................................... 209 13.1 Programming Revobot ....................................................... 209 13.2 Installing the PIC USB driver : ....................................... 210 13.3 Loading a new program via the USB Bootloader: ... 212 CHAPTER 14 ...................................................................................................... 215 HOW TO WRITE A C PROGRAMMING IN MPLAB USING C-18 ............................. 215 14.1 First Program ......................................................................... 215 CHAPTER 15 ...................................................................................................... 225 SAMPLE C PROGRAMS ...................................................................................... 225 15.1 More Programs ...................................................................... 225 15.2 Tips to improve performance: ........................................ 229 CHAPTER 16 ...................................................................................................... 242 SUPPORT ........................................................................................................... 242 INDEX .................................................................................................................. 243

Page 5

Introduction to Robotics with Revobot

PREFACE
The Revobot educational kit is the one of its kind from Robhatah Robotic Solutions Pvt. Ltd. intended to facilitate students, professionals and hobbyists with a concrete platform for their foray into the exciting world of robotics and artificial intelligence. The kit introduces basic concepts of electrical, electronics, mechanical and computer engineering, with an elaborate learning manual, and detailed projects that will enable users to gain valuable insights into these disciplines. Hands on experiments on the kit will nurture the understanding of basic engineering disciplines and the robotics concepts providing the users a strong entry into the world of robotics and automation. Robhatah Robotic Solutions Private Limited was founded in Singapore in the year 2004 with the vision to enable peaceful human-robot co-existence. Scientists at Robhatah see robots as being faithful assistants to humans, extremely useful to humans to do the dull, difficult and dangerous tasks. The Roboticists at Robhatah have dwelled into extensive research and development in wheeled robots, legged robots, Humanoids, pipe crawling snake robots, underwater robotics, biologically inspired Robotic systems, real-time vision based navigation, target tracking, robot path planning and a variety of other cutting edge robotic technologies. Robhatah's technology team comprises of celebrated pioneers in international robotics research. Dr.Prahlad Vadakkepat, director and chief mentor of Robhatah is a renowned robotic researcher. He holds respectable positions in numerous international professional bodies (senior member IEEE USA, and Fellow IETE, India) and several Robotic associations (For a detailed profile of Dr. Prahlad Vadakkepat visit www.robhatah.com/prahlad ). The educational research platforms from Robhatah have won several international accolades: the coveted FIRA international Robot Championships four times in a row Austria (2003), Korea (2004), Singapore (2005) and
Page 6

Introduction to Robotics with Revobot

Germany (2006). Our humanoid platforms have been widely recognized and have been casted on various international television and print media. Intelligence and capabilities are very subjective. Even the simplest action may become the best intelligent way of tackling an issue at a point in time. Revobot is designed to guide you on journey into the robotics world, thus it must have a few tricks in its pocket to perform this important task. Intelligence and capabilities are very subjective. Even the simplest action may become the best intelligent way of tackling an issue at a point in time Chapter Outline Chapter One Chapter Two Chapter Three Chapter Four Chapter Five Chapter Six Chapter Seven Chapter Eight Chapter Nine Chapter Ten Chapter Eleven Chapter Twelve Chapter Thirteen Chapter Fourteen Chapter Fifteen Introduction to Basic Engineering Concepts Electrical Components, Types, Features Fundamentals on Electrical circuits Sensors Actuators Introduction to Robotics Getting started with Revobot Working of Revoboard Assembling Mechanical components Making Electrical connections Introduction to Software Starting a project for Revobot Loading a Microcontroller C Programming program into

Example Programs

Page 7

Introduction to Robotics with Revobot

PART I
BASIC CONCEPTS

Page 8

Introduction to Robotics with Revobot

CHAPTER 1
Introduction
1.1 Voltage (V)

Voltage or Electrical Potential Difference is the difference of electrical potential between two points of an electrical or electronic circuit. The unit of Voltage is volt and is generally represented by V. An electrical source of energy typically consist of two terminals- the positive terminal is known as the anode and the negative terminal as the cathode as shown in Figure 1.1 indicated by the + (anode) and (cathode) signs.

Figure.1.1 Figure .1.1 Representation of an Electrical source

In all electrical circuits, an electrical source of energy (E shown in Figure.1.1) is required to drive the circuit. To create the driving force for the circuit, there must be a potential energy difference between the anode and cathode and, the magnitude of difference is known as the voltage (V) or electrical potential difference. The terminal with higher potential is denoted by the anode (+) and the lower potential by the cathode (-).

Page 9

Introduction to Robotics with Revobot

Voltage measurement can take on both positive and negative values. When the measurement is made with respect to the cathode, the voltage is a positive value since the anode represents a higher potential and viceversa. Figure1.3 Illustrates how the voltage can be positive (V*) and negative (V) depending on the point of measurement indicated by the arrow.

Figure.1.3 Figure .1.3

Page 10

Introduction to Robotics with Revobot

There are many types of electrical energy sources, which can convert various forms of potential energy into electrical energy. One of the most common and wellknown electrical energy sources is the dry cells shown in Figure1.4. Dry cells store potential energy in chemical form and converts back into electrical energy when used.

Figure: 1.4 Dry Cells

Commercially available electrical energy sources are usually sold in fixed voltage range. For an instance, dry cells are available in fixed voltage values of 1.5V, 9V, etc. Different voltages of electrical energy sources can be combined together in two types of configurations- Series or Parallel as shown Figure 1.4.

Page 11

Introduction to Robotics with Revobot

Figure: 1.4 Figur e: 1. 4 Series and Parallel configurations of energy sources

When two electrical energy sources are connected in series, the total voltage is the equivalent of the individual voltages as shown in Figure 1.4 (a). Series connection is usually employed when the desired voltage can be made up of fixed voltage energy sources. For instance, connecting a series of four 1.5V dry cells can produce an output voltage of 6V. Figure1.4 (b) shows two energy sources connected in parallel. The only type of parallel configuration allowed is that the potential difference or voltage in parallel must be the same. Energy sources with different voltages in parallel would result in undetermined voltage output and hence only parallel configuration with the same voltage is employed in practice.
FAQ: But why do we need to have the same energy source since the output resultant voltage is the same?

Page 12

Introduction to Robotics with Revobot

In actual applications, usually a single electrical energy source is present. However, what happens when different voltages are required from a single electrical energy source? One of the easiest solutions is to use an electrical energy source that provides a voltage above or equal to the maximum voltage required in the circuit. Then, using potential divider, voltage regulator (Figure 1.5) or switching regulator1, the voltage can be step down to the required voltages.

Figure: 1.5 Voltage Regulator

In this section, the voltage highlighted only relates to direct current (DC) voltages however, voltages can also be in another form called the alternative current (AC) voltage where the energy source produces alternating voltages at intervals. 1.2 Electric Current (I)

Electric Current (I) is the rate of flow of electric charges


with respect to time. The unit of current is Ampere (A) and is generally represented by A. A As a general convention, the direction of electric current is considered opposite to the direction of flow of electrons. Often, there is a need to indicate the direction of the current as shown in Figure1.6.

Voltage regulator and switching regulator are commercially available products to step down voltages

Page 13

Introduction to Robotics with Revobot

I = -3A I* = 3A

Figure: 1.6 Conducting Wire

Normally, the flow and direction of the current is indicated from the point of higher to lower potential. However, there can be instances where the indicated current direction is reverse which implies that the magnitude of the current is negative (I).

Page 14

Introduction to Robotics with Revobot

As discussed earlier, the electrical energy source provides the driving force, however for current to flow, there must exist a closed loop path in which the current can flow. Using the analogy of the water tank and pipe, there must be at least one pipe to connect the two tanks for the water to flow thru and fro. In other words, no electric current will flow if there is an open loop (I=0).

Short circuit or short circuit current occurs when the


positive terminal of the electric energy source is connected to the negative terminal directly without any passive or active components in between. Short circuit in practice is not desirable unless it is intentionally required, as short circuit results in large current flow, which may in turn burn the conductor through which it flows. Using the water tank analogy, a short circuit can be seen as an extreme high rate of water flow, which might eventually burst the pipe.

Electric current splitting and merging relate to how


current flows when wiring connection transits from single to multiple or vice versa. Current split occurs when there is more than one closed loop path in which it could flow. Fig1.8 shows how current can split in multiple wire connections and Figure1.9 shows the merging of currents.
Figure: 1.8 Splitting of electrical Current

Figure: 1.9 Merging of electrical current

Page 15

Introduction to Robotics with Revobot

1.3

Electrical Resistance (R)

Electrical resistance (R) is the opposition offered by a


conductor to the flow of electrical current. It explains the relationship between voltage and electrical current.

Figure: 1.10 Representation of Resistance

In all conductors, there exist characteristics that oppose the flow of electrical current known as resistance of the conducting material. Resistances are inherited in all materials. In an electrical circuit, resistance is required to control the magnitude of the electric current. Conductance (G) is the terminology to represent the inverse of resistance where G = 1/R. Figure 1.10 shows the typical drawing symbol used to represent resistance. Resistance is the direct measurement of the resistive characteristics of the material in relation to voltage and current. Since resistance opposes the current, controllable resistance is required to effectively vary the magnitude of the electric current flow. Controllable resistance or fixed value resistance components are known as resistors. Resistors help engineers to control the electrical current flow. There are different types of resistors in the market. Two of the commonly used resistors are the standard value resistors and the variable value resistors. Standard value resistors with various fixed values are commercially available in the market. A typical standard value resistor comes in a package shown in Figure 1.11 where the color band indicates the resistance of the resistor.

Page 16

Introduction to Robotics with Revobot

1.11 Figure: 1.1 1 Resistor

The color bands on the resistors indicate the followings: (1st band is the first color strip on the left as shown in Figure 1.11) 1st band is first significant figure of component value 2nd band is the second significant figure 3rd band is the decimal multiplier 4th band if present, indicates tolerance of value in percent (no color means 20%) The 4th band also represents the amount of resistance that the actual resistance of the resistor can deviate from the resistance indicated by the colored band.

*Figure 1.11 shows a resistor with a resistance of 2000 ohms.


A variable resistor, Figure 1.12, provides a range of resistances with the use of a mechanical knob or adjustment. By adjustment of the mechanical knob, the resultant resistance of the variable resistor varies accordingly.

1.12 Figure: 1.1 2 Variable Resistor

The main advantage of such a resistor is that it can give dynamic value of resistance in comparison to the

Page 17

Introduction to Robotics with Revobot

standard fixed value resistor. However, a multi-meter2 is required to effectively measure the resistance. Resistors can be connected in series and parallel to form various resultant resistances. When the resistors are connected in series, the resultant resistance is the total of the individual resistances as shown in Figure1.13

For the parallel configuration, the resultant resistance of all the individual resistance is given by the reciprocal of the summation where the summation is the sum of the reciprocals of the individual resistances. Figure 1.14 is an illustrative example of resistances in parallel.

Figure: 1.14 Resistors in parallel

Page 18

Introduction to Robotics with Revobot

Resistor Power Ratings


The resistor power rating can be differentiated by its size. Normally, a larger size indicates higher power ratings. Figure 1.15 shows resistors with different power ratings.

1.1 Figure: 1. 15

Example: In Problem 4, Power dissipated by R1 is 0.5A * 3V = 1.5W Thus, the 2W resistor should be used in the circuit.

1.3.1

Exercise
Determine the total resistance of the circuit shown in figure 1.15?

Page 19

Introduction to Robotics with Revobot

1.4

Ohms Law

The Ohms Law was named after a German physicist George Ohm (1789 - 1854). It defines the relationship between Voltages (V), Current (I) and the Resistance (R). On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look.
I
Figure: 1.17

The relationship states that voltage across a resistor is proportional to the current flowing into the resistor and the resistance of the resistor. Ohm's Law is given by: V=IR

Page 20

Introduction to Robotics with Revobot

Where V is the potential difference between two points that include a resistance R. I is the current flowing through the resistance.

Now we will put Ohms law into application and solve some simple problems Problem 1: Find the Voltage across R1 & R2 in Figure: 1.19
1 .5 A

R1 1 3V R2 1

Figure: 1.1 1.19

Solution: Voltage across R1 is 1.5A * 1 = 1.5V Voltage across R2 is 1.5A * 1 = 1.5V

Problem 2: Find the Voltage across R1 & R2 in figure 1.20 Solution:


Figure: 1.20

Voltage across R1 is 1A * 1 = 1V Voltage across R2 is 1A * 2 = 2V Problem 3 Find the current flowing into R1 in Figure 1.21
Page 21

Introduction to Robotics with Revobot

Figure: 1.21

Solution:

Current into R1 is 3V 6 = 0.5A Problem 4: Find the current flowing into R1 in

Figure: 1.22

Solution: Current into R1 is 3V 3 = 1A

Figure: 1.23

Page 22

Introduction to Robotics with Revobot

Problem 5 Find the Current IT, I1 and I2 in figure 1.24

Solution:
Since the voltage across both resistors is the same (3V), I1 & I2 can easily be calculated using Ohms Law.

Figure: 1.24

Where , And

Note: The amount of current flowing depends on resistors that we use in electric circuits. Hence to select the correct rating of a resistor, the concept of power needs to be introduced. We will also be looking at how Power is computed.

1.5

Electric Power
EQUATION 3 EQUATION 3

The Electric Power (P) formula is given as where I is the current flowing into a resistor / system and V is the voltage across the resistor / system. Together with Ohms Law, the Power formula can be manipulated into several other forms.

EQUATION EQUATION 3

The next Chapter introduces the Printed Circuit Board (PCB) that is

Page 23

Introduction to Robotics with Revobot

used to connect various electronics components to perform certain functions. Besides the soldering tips are shared and discussed. Furthermore, various types of batteries as well as batteries characteristic are summarized as the reference to choose the right battery.

Page 24

Introduction to Robotics with Revobot

CHAPTER 2
Active and Passive Components
2.1 Electronics Components

Electronics deals with flow of electrons through nonmetal conductors or semi conductors. Electrical refers to the flow of charge through metal conductors. Flow of charge through Germanium, which is not a metal, would come under electronics. The study of new semiconductor devices and related technology is a branch of physics whereas the design and construction of electronic circuits to solve practical problems comes under electronics engineering. An electronic component is an entity in an electronic system, who serves the purpose of changing, the nature of charges in accordance with the purpose of the electronic system as a whole. Components are generally used to create an electronic circuit with a particular function (for example an amplifier, radio receiver, or oscillator). Some common electronic components are capacitors, resistors, diodes, transistors etc. 2.2 Active and Passive Components

The main components used in electronics are of two general types: passive (e.g. resistors and capacitors) and active (e.g. transistors and integrated circuits). Passive components are those that do not have gain or directionality. They require power from outside to operate. Active components are those that have gain or directionality. They can amplify signals on their own.

2.2.1 Passive Components The following section outlines the commonly used passive components.

Page 25

Introduction to Robotics with Revobot

2.2.1.1

Resistors

Ohms law states that with all the physical conditions remaining unchanged the current through a conductor between two points is directly proportional to the voltage drop across the two points. The proportionality constant is defined as resistance. Resistors are symbolized as . The name comes from its main property; it resists the flow of charge through itself, hence allowing the control of current. Two wires are connected to opposite ends of the resistor. When we apply a potential difference between the wires, we set up a current from one wire to the other, through the resistor. The size of the current is proportional to the difference in voltage between the wires. The resistance (in units of Ohms) is defined as the ratio of the applied voltage, V (in Volts), divided by the current, I (in Amps), produced by the applied voltage. Resistors come in a wide variety of shapes and sizes, but the most common type is a cylinder with wires at the ends. Most of the resistors used in electronics have 'fixed' values, but resistors can also be made which have a controlled, variable resistance. These are sometimes called pots, and they are used for tasks like the volume control on an audio amplifier. 2.2.1.2 Measurement of Resistance Values

Resistance values can be identified manually by using color codes. The value of most resistors is shown by a pattern of colored rings. These are read starting from the band closest to an end. The colors are internationally defined as listed below. A brief illustration of how the color code is read is shown in the figure below. The First band is red and it stands for two, violet for seven, orange for three and gold for tolerance of 5%. Therefore, the total value of resistance is 27*103 with 5% tolerance.

Page 26

Introduction to Robotics with Revobot

This value is commonly specified as 27k.

Figure: 2.1

There are two classes of resistors; fixed resistors and the variable resistors. They are also classified according to the material from which they are made. The typical resistor is made of either carbon film or metal film. There are other types as well, but these are the most common. The resistance value of the resistor is not the only thing to consider when selecting a resistor for use in a circuit. The "tolerance" and the electric power ratings of the resistor are also important. The tolerance of a resistor denotes how close it is to the actual rated resistance value. For example, a 5% tolerance would indicate a resistor that is within 5% of the specified resistance value. The power rating indicates how much power the resistor can safely tolerate. Just as if you would not use a 6-volt flashlight lamp to replace a burned out light in your house, you would not use a 1/8 watt resistor when you should be using a 1/2 watt resistor. The maximum rated power of the resistor is specified in Watts. Power is calculated using the square of the current (I2) x the resistance value (R) of the resistor. If the maximum rating of the resistor is exceeded, it will become extremely hot and even burn.

Page 27

Introduction to Robotics with Revobot

Resistors in electronic circuits are typically rated 1/8W, 1/4W, and 1/2W. 1/8W is usually used in signal circuit applications. When powering a light emitting diode, a comparatively large current flow through the resistor, so you need to consider the power rating of the resistor you choose.

1/8W
Figure: 2.2

1/4W

1/2W

2.2.1.3

Calculation of Resistances in circuits

Resistances come in standard values. Therefore, to customize the value of resistance needed resistances are connected in series or parallel in a circuit. This section describes how to calculate the value of resistances connected in series or parallel.

Figure: 2.3

Page 28

Introduction to Robotics with Revobot

2.2.1.4

Series Connection

In a series circuit, the current flowing is the same at all points. The circuit diagram shows two resistors connected in series with a 6 V battery: The total resistance in this circuit is the sum of both the resistances R1 and R2. R total = R1 + R2 = 2 k (As shown in figure 2.3) The current can be hence measured as V/R = 6v/ 2k= 6 (2*103) = 3 * 10-3 Or 3mA (milli Ampere) 2.2.1.5 Parallel Connection

In parallel connection, the potential drop is constant in all the branches, but the current varies in accordance to the value of resistances in each branch. The total resistance is calculated as R total = (R1 * R2)/ (R1+R2) =1*1/ (1+1) = 0.5k

2.4 Figure: 2. 4

The current can be hence measured as V/R = 6v/ 0.5k= 6 / (0.5*103) = 12 * 10-3 Or 12mA (milli Ampere). In general, if there are n Resistors connected in parallel then total resistance is calculated by the formula 1/Rtotal = 1/R1 + 1/R2 + .. + 1/Rn

2.2.1.6

Special Kinds of Resistors

Some Resistors have values which changes according to the environmental parameters. Most common amongst
Page 29

Introduction to Robotics with Revobot

this category is the LDRs (Light dependent Resistors) and Temperature dependent resistors commonly called as Thermistors (Thermally sensitive Resistors). 2.2.1.6.1 Light Dependent Resistor (LDR)

A photo resistor or Light Dependent Resistor or CdS () Cell is a resistor whose resistance decreases with increasing incident light intensity. It can also be referred to as a photoconductor. A photo resistor is made of a high resistance semiconductor. If light falling on the device is of high enough frequency, photons absorbed by the semiconductor give bound electrons enough energy to jump into the conduction band. The resulting free electron (and its hole partner) conduct electricity, thereby lowering resistance. A photoelectric device can be either intrinsic or extrinsic. An intrinsic semiconductor has its own charge carriers and is not an efficient semiconductor, e.g. silicon. In intrinsic devices, the only available electrons are in the valence band, and hence the photon must have enough energy to excite the electron across the entire band gap. Extrinsic devices have impurities, also called dopants, added whose ground state energy is closer to the conduction band; since the electrons do not have, as far to jump, lower energy photons (i.e., longer wavelengths and lower frequencies) are sufficient to trigger the device. If a sample of silicon has some of its atoms replaced by phosphorus atoms (impurities), there will be extra electrons available for conduction. This is an example of an extrinsic semiconductor. Photo resistors come in many different types. Inexpensive cadmium sulfide cells can be found in many consumer items such as camera light meters, streetlights, clock radios, security alarms, and outdoor clocks.

Page 30

Introduction to Robotics with Revobot

2.2.1.7

Thermistor

The resistance value of the thermistor changes according to temperature.

Figure: 2.5

This part is used as a temperature sensor.

Figure: 2.6
Symbol for Thermistor

2.2.1.8

Capacitors

A capacitor is a passive electrical component that can store energy in the electric field between a pair of conductors (called "plates"). The process of storing energy in the capacitor is known as "charging", and involves electric charges of equal magnitude, but opposite polarity, building up on each plate. A capacitor's ability to store charge is measured by its capacitance, in units of farads.
Figure: 2.7

Capacitors are often used in electric and electronic circuits as energy-storage devices. Capacitors are occasionally referred to as condensers. A wide variety of capacitors have been invented, including small electrolytic capacitors used in electronic circuits, basic parallel-plate capacitors, mechanical variable capacitors, and the early Leyden jars, among numerous other types of capacitors.

Page 31

Introduction to Robotics with Revobot

The symbol diagram.

is used to indicate a capacitor in a circuit

Generally, capacitors have two leads. Some are axial leaded, like resistors, and others are radial leaded, with both leads at one end. Unlike resistors, some capacitors are polarized, with positive and negative leads: the voltage across such capacitors must agree with the polarity of the leads. Take care to orient polarized capacitors correctly in a circuit. A capacitor acts as a charge store. It contains a pair of metal plates separated by a thin sheet of insulating material. Left to them the plates is electrically neutral the number of positive protons in each exactly equals the number of negative electrons. However, if we connect wires to the plates and apply and external voltage we can drag electrons off one plate and push them on to the other. This takes energy, i.e. we have to do work charging the capacitor. The result is a capacitor with one plate positively charged and the other negatively charged. The energy used to move charge is stored by this imbalance. If we connect two plates together with a resistor, the electrons 'rush back home' releasing their energy again. The voltage between the plates of a charged capacitor is proportional to the amount of charge moved. The charge/voltage ratio for any specific capacitor is called its capacitance.

Figure: 2.8

Page 32

Introduction to Robotics with Revobot

Breakdown voltage
When using a capacitor, you must pay attention to the maximum voltage, which can be used. This is the "breakdown voltage." The breakdown voltage depends on the kind of capacitor being used. You must be especially careful with electrolytic capacitors because the breakdown voltage is comparatively low. The breakdown voltage of electrolytic capacitors is displayed as Working Voltage. The breakdown voltage is the voltage that when exceeded will cause the dielectric (insulator) inside the capacitor to break down and conduct. When this happens, the failure can be catastrophic.

Different types of capacitors. Electrolytic Capacitors (Electrochemical type capacitors)


Aluminum is used for the electrodes by using a thin oxidization membrane. Large values of capacitance can be obtained in comparison with the size of the capacitor, because the dielectric used is very thin. The most important characteristic of electrolytic capacitors is that they have polarity. They have a positive and a negative electrode. [Polarized] This means that it is very important which way round they are connected. If the capacitor is subjected to voltage exceeding its working voltage, or if it is connected with incorrect polarity, it may burst. It is extremely dangerous, because it can quite literally explode. Make absolutely no mistakes.

Figure: 2.9

Generally, in the circuit diagram, the positive side is indicated by a "+" (plus) symbol. Electrolytic capacitors range in value from about 1F to thousands of F. mainly this type of capacitor is used as a ripple filter in a power supply circuit, or as a filter to bypass low frequency signals, etc. Because this type of capacitor is comparatively similar to the nature of a coil in
Page 33

Introduction to Robotics with Revobot

construction, it is not possible to use for high-frequency circuits. (It is said that the frequency characteristic is bad.)

Tantalum Capacitors
Tantalum Capacitors are electrolytic capacitor that use a material called tantalum for the electrodes. Large values of capacitance similar to aluminum electrolytic capacitors can be obtained. In addition, tantalum capacitors are superior to aluminum electrolytic capacitors in temperature and frequency characteristics. When tantalum powder is baked in order to solidify it, a crack forms inside. An electric charge can be stored on this crack. These capacitors have polarity as well. Usually, the "+" symbol is used to show the positive component lead. Do not make a mistake with the polarity on these types. Tantalum capacitors are a little bit more expensive than aluminum electrolytic capacitors. Capacitance can change with temperature as well as frequency, and these types are very stable. Therefore, tantalum capacitors are used for circuits, which demand high stability in the capacitance values. In addition, it is said to be common sense to use tantalum capacitors for analog signal systems, because the current-spike noise that occurs with aluminum electrolytic capacitors does not appear. Aluminum electrolytic capacitors are fine if you do not use them for circuits, which need the high stability characteristics of tantalum capacitors.

Figure: 2.10

2.2.1.8.1

Capacitors in Series

Page 34

Introduction to Robotics with Revobot

Figure: 2.11

1/C total = 1/C1 + 1/C2

Capacitors in parallel

Figure: 2.12

Ctotal=C1 + C2 2.2.1.9 Inductor

An inductor is a passive electrical component designed to provide inductance in a circuit. Inductors store energy in a magnetic field created when an electric current flows through them. Some sort of coiled conductive winding usually implements them. The winding may surround a magnetic core, in which case it is called a ferromagnetic-core or iron-core inductor. Large inductors used at low frequencies may have thousands of turns of wire around an iron core; however even a straight piece of wire (i.e., with turns and core reduced to zero) has significant inductance.

Figure: 2.13

An "ideal inductor" has inductance, but no resistance or capacitance, and does not dissipate energy. A real inductor is equivalent to a combination of inductance, some resistance due to the resistivity of the wire, and

Page 35

Introduction to Robotics with Revobot

some capacitance. At some frequency, usually much higher than the working frequency, a real inductor behaves as a resonant circuit (due to its selfcapacitance). In addition to dissipating energy in the resistance of the wire, magnetic core inductors may dissipate energy in the core due to hysteresis, and at high currents may show other departures from ideal behavior due to nonlinearity.

Figure: 2.14

Inductors are used extensively in analog circuits and signal processing. Inductors in conjunction with capacitors and other components form tuned circuits, which can emphasize or filter out specific signal frequencies. This can range from the use of large inductors as chokes in power supplies, which in conjunction with filter capacitors remove residual hum or other fluctuations from the direct current output, to such small inductances as generated by a ferrite bead or torus around a cable to prevent radio frequency interference from being transmitted down the wire. Smaller inductor/capacitor combinations provide tuned circuits used in radio reception and broadcasting, for instance. Two (or more) inductors, which have coupled magnetic flux, form a transformer, which is a fundamental component of every electric utility power grid. An inductor is used as the energy storage device in some switchedmode power supplies. Inductors are also employed in electrical transmission systems, where they are used to depress voltages from lightning strikes and to limit switching currents and fault current. In this field, they are more commonly referred to as reactors. As inductors tend to be larger and heavier than other components, their use has been reduced in modern equipment; solid-state switching power supplies eliminate large transformers, for instance, and circuits are designed

Page 36

Introduction to Robotics with Revobot

to use only small inductors, if any; larger values are simulated by use of gyrator circuits. 2.2.1.10 Diodes

A diode is a semiconductor device, which allows current to flow through it in only one direction. Although a transistor is also a semiconductor device, it does not operate the way a diode does. A diode is specifically made to allow current to flow through it in only one direction. A diode can be used as a rectifier that converts AC (Alternating Current) to DC (Direct Current) for a power supply device. Diodes can be used as an on/off switch that controls current. This symbol is used to indicate a diode in a circuit diagram. The meaning of the symbol is (Anode) (Cathode). Current flows from the anode side to the cathode side. Although all diodes operate with the same general principle, there are different types suited to different applications. For example, the following devices are best used for the applications noted.

Voltage regulation diode (Zener Diode) Diode)


The circuit symbol is .

It is used to regulate voltage, by taking advantage of the fact that Zener diodes tend to stabilize at a certain voltage when that voltage is applied in the opposite direction. Diodes that can be made to conduct backwards. This effect, called Zener breakdown, occurs at a precisely defined voltage, allowing the diode to be used as a precision voltage reference. In practical voltage reference, circuits Zener and switching diodes are connected in series and opposite directions to balance the temperature coefficient to near zero.

Page 37

Introduction to Robotics with Revobot

2.2.1.11

Light emitting diode [LED] .

The circuit symbol is

This type of diode emits light when current flows through it in the forward direction. (Forward biased.) In a diode formed from a direct band-gap semiconductor, such as gallium arsenide, carriers that cross the junction emit photons when they recombine with the majority carrier on the other side. Depending on the material, wavelengths (or colors) from the infrared to the near ultraviolet may be produced. The forward potential of these diodes depends on the wavelength of the emitted photons. 2.2.1.12 Variable capacitance diode .

The circuit symbol is

The current does not flow when applying the voltage of the opposite direction to the diode. In this condition, the diode has a capacitance like the capacitor. It is a very small capacitance. The capacitance of the diode changes when changing voltage. With the change of this capacitance, the frequency of the oscillator can be changed. 2.2.2 Active Components A transistor is a semiconductor device commonly used to amplify or switch electronic signals. A transistor is made of a solid piece of a semiconductor material, with at least three terminals for connection to an external circuit. A voltage or current applied to one pair of the transistor's terminals changes the current flowing through another pair of terminals. Because the controlled (output) power can be much larger than the controlling (input) power, the transistor provides amplification of a signal. The transistor is the fundamental building block of modern electronic devices, and is used in radio, telephone, computer and other electronic systems. Some transistors

Page 38

Introduction to Robotics with Revobot

are packaged individually integrated circuits.

but

most

are

found

in

2.15 Figure: 2.1 5

2.2.2.1

Bipolar Junction Transistor

A Bipolar Junction Transistor essentially consists of a pair of PN Junction Diodes that are joined back-to-back. This forms a sort of a sandwich where one kind of semiconductor is placed in between two others. There are therefore two kinds of bipolar sandwich, the NPN and PNP varieties. The three layers of the sandwich are conventionally called the Collector, Base, and Emitter. The reasons for these names will become clear later once we see how the transistor works.

2.16 Figure: 2.1 6

A transistor may be used to switch or to amplify. The image to the right represents a typical transistor in a circuit. Its three components are the base, emitter and collector, which correspond to regions of the mixed semiconductors from which the transistor is made. Current may flow from the emitter to the collector depending on the voltage applied to the base, but only if this voltage exceed a certain value:

Page 39

Introduction to Robotics with Revobot

Transistor as a switch
Once the base voltage reaches a certain level, no more current will flow and the output will be held at a fixed voltage. The transistor is then said to be saturated. Hence, values of input voltage can be chosen such that the output is either completely off, or completely on. The transistor is acting as a switch, and this type of operation is common in digital circuits where only "on" and "off" values are relevant.

Figure: 2.17

Transistor as an amplifier
A varying base voltage, Vin, as long as it exceeds Vbe, controls current through the transistor and thus influences the output voltage Vout. The slope of the graph is such that small swings in Vin will produce large changes in Vout.

Types of transistor
This occurs because the base voltage controls how much of the power supply voltage Vcc causes current through the transistor itself, and how much of it causes current through a load driven by Vout. It is important that the operating parameters of the transistor are chosen and the circuit designed such that as far as possible the transistor operates within a linear portion of the graph, such as that shown between A and B, otherwise the output signal will suffer distortion.

Page 40

Introduction to Robotics with Revobot

Semiconductor material: germanium, arsenide, silicon carbide, etc.

silicon,

gallium

Structure Polarity Maximum power rating

BJT, JFET, IGFET (MOSFET), IGBT, "other types" NPN, PNP (BJTs); N-channel, P-channel (FETs) Low, medium, high Low, medium, high, radio frequency (RF), microwave (The maximum effective frequency of a transistor is denoted by the term fT, an abbreviation for "frequency of transition". The frequency of transition is the frequency at which the transistor yields unity gain). witch, general purpose, audio, high voltage, super-beta, matched pair Through hole metal, through hole plastic, surface mount, ball grid array, power modules

Maximum frequency

operating

Application

Physical packaging

Amplification factor hfe (transistor beta)[7]

2.2.2.2

Operational amplifiers

An operational amplifier (11/19/2008) is a high-gain electronic voltage amplifier. An Opamp has two inputs and one output. The output of the Opamp is high since the high gain of the Opamp drives the output value into saturation. So in order to control the output voltage, Feedbacks are provided. Feedbacks are of two type, positive feedback and negative feed back. Negative feed back helps in stabilizing the gain. Depending on whether the feedback is there or not, the op-amp configurations are classified into open loop and closed loop configurations.

Page 41

Introduction to Robotics with Revobot

Figure: Figure : 2.18

Op-amps are among the most widely used electronic devices. The simplicity and the integrated circuitry help it to be used in vast consumer electronic devices and other applications.

Page 42

Introduction to Robotics with Revobot

CHAPTER 3 Electrical circuit & Theory


This chapter covers the fundamentals on basic circuit and voltage source. 3.1 Electrical circuit

Electrical circuit is the system may consist of active, passive and reactive electrical elements (described in chapter 1) connected in any possible combination. However, to make a circuit working without damaging its own components to perform a desired task, there are several rules and methods to design and implement a circuit.
Figure: 3.1(a) Open circuit

Most fundamentally, circuits can be classified in two class open circuit and closed circuit.

Figure: 3.1(b) Closed circuit

In Figure 3.1 (a), there is an electrical potential difference across the battery but as the two terminal of the voltage source is not closed by a conductive loop, there is no current flowing through the battery. In case of Fig 3.1 (b) two terminals of a 5V, battery is connected to a 10 resistor by some connecting wires (ideally having 0 resistance). Therefore, across the two terminal of the

Page 43

Introduction to Robotics with Revobot

voltage source (5V battery) there is a 10 of load resistance.

Note: If no current is flowing through a battery then what ever the potential difference is found across the two terminal of a battery is equal to the electromotive force (EMF) of the battery

By applying Ohms Law, we can find the current flowing in the closed circuit as shown in Fig- 3.2. As Ohms law states that with all the physical conditions

remaining unchanged, the current through a conductor between two points is directly proportional to the voltage drop across the two points. The proportionality constant is defined as resistance (R).
Figure: 3.2 Flow of current in a closed circuit

Therefore, as ideal battery is connected between the two terminals of the 10 so potential drop across the 10 resistor is also 5V. Therefore, current through the resistor is I.

I = (5V/10) = 0.5A.
However, while using a practical battery to make this circuit, we cannot get the 0.5Amp current as every practical battery has some internal resistance initially when fully charged this internal resistance remains small and it starts increasing as the battery goes on discharging. At the same time, the EMF goes decreasing with discharging the battery. Now let us see, what the voltage a typical practical voltage source can offer while driving a typical load. Let us consider we have a 5V battery having 1 internal resistance driving a 10 load resistance.

Page 44

Introduction to Robotics with Revobot

In Fig-3.3, the ellipse is representing the practical battery having an ideal source and internal resistance. As the resultant resistance the ideal 5V battery is facing is (10 + 1) = 11, the current flowing through the circuit is the (5V/11) = 0.455Amp. To find the effective voltage the battery is offering while driving the 10 load resistor, we can follow several ways: (The current through a load resistor) x (value of 1. load resistor) = (10) x (0.455A) = 4.55V

Figure: 3.3 Practical batteries driving a load resister

Note: Fig 3.3 is showing a simplified model of a practical battery. More practical and complicated model can be found in online and in electrical engineering books. Actually the current through the circuit is 0.45454545Amp which is approximated as 0.455Amp

( EMF or no-load battery voltage) (Voltage drop 2. across the internal resistance) = (5V) (0.455A x 1) = (5V) (0.45 V) = 4.55V

Figure: 3.4 Voltage across practical battery driving a load

Page 45

Introduction to Robotics with Revobot

3.2

Ground concept in a circuit

The term ground in an electrical network means a point or node* with respect to which all the electrical potential difference is measured. If it is said that voltage at point-A is 5V, it means that point-A is in 5V potential difference with respect to ground point. Otherwise, while mentioning voltage at any point it is conventional to mention the reference point for that. There are various symbols to represent a ground point in a circuit, as shown in Fig-3.5.
Figure: 3.5 Symbols of ground point

Figure: 3.6 Use of ground symbol in circuit

Point in a circuit means junction of some components but


in practical sense, it may not be a geometrical point. There are some highly conductive copper wires or track is used to make a junction of components in a circuit. As the resistance of the connecting copper wires or track having a very low resistance with respect to all the components used in a circuit, the complete inter-connected copper wires or track can be considered as the same point. 3.3 DC and AC

The term DC (Direct Current) and AC (Alternating Current) are the widely used terminology in circuit theory. However, the C in the abbreviation AC and DC relates to Current but the terms AC and DC are used while

Page 46

Introduction to Robotics with Revobot

referring the voltage also. The following figure (Fig-3.7) shows the difference between a DC and AC circuit.

Figure: 3.7 Difference between DC and AC

The graphs shown in Fig 3.8 represent the variation of current (IR1) flowing through the resistor R1 with respect to time. It can be easily observed in Fig 3.8 (a) the dependent variable IR1 in Fig 3.8 (a) is not varying with time that is why this type of current is known as Direct Current or DC. In comparison to the Fig 3.8 (a) graph, Fig 3.8(b) shows that the current IR1 (in Fig 3.8(b)) varies and changes its direction with respect to time, thats why this type of current is known is Alternating Current or AC.

3.8(a) Figure: 3.8 (a)

3.8(b) Figure: 3.8 (b)

Graphical representations of DC and AC

As mentioned earlier the terminologies AC and DC are not only limited to the current but also widely used for voltage, such as AC voltage and DC voltage. Fig 3.8 shows the variation of voltage* at Point-P with respect to time.

Page 47

Introduction to Robotics with Revobot

* As no reference point is mentioned while referring the voltage at Point-P so implicitly it means that it is with respect to ground point. Coming at this point, a question may arise that in India the voltage of our power line is 230V AC, what it means. Actually, 230V AC means that the Root Mean Square (RMS) value of the alternating voltage of approximately 320V peak to peak and having frequency 50Hz. Now the question is what is RMS? Instead of going for the mathematical explanation of the term RMS, we can think that it is the equivalent DC value of the AC, which can create same amount of heat energy if applied on a same resistor. As for example while our line voltage 320V peak to peak / 50 Hz is referred as 230V / 50Hz, it means that this AC voltage can create same heating effect like 230V DC voltage while applied on same resistor.

3.9 Figure: 3. 9

Domestic Power socket: socket: Body

Figure: 3.9 Domestic Power Socket


Page 48

Introduction to Robotics with Revobot

3.4 Designing Desig ning Eliminator

DC

power

Supply

or

Battery Batter y

The following components are essential for designing a DC power supply.

3.4.1 The Power Transformer In some cases, a power supply may not use a transformer; therefore, the power supply would be connected directly to the source line voltage. This type of connection is used primarily because it is economical. However, unless the power supply is completely insulated, it presents a dangerous shock hazard to anyone who meets it. When a transformer is not being used, the return side of the ac line is connected to the metal chassis. To remove this potential shock hazard and to have the option of stepping up or stepping down the input voltage to the rectifier, a transformer must be used. View A of figure 3.10 shows the schematic diagram for a STEP-UP transformer; view B shows a STEP-DOWN transformer; and, view C shows a STEP-UP, CENTERTAPPED transformer. The step-up and step-down transformers were discussed in earlier NEETS modules, so only the center-tapped transformer will be mentioned in this chapter. The primary purpose of the center-tapped transformer is to provide two equal voltages to the conventional full-wave rectifier.

Figure: 3.10 (a) Common types of transformers. STEP UP

Page 49

Introduction to Robotics with Revobot

Figure: 3.10 (b) Common types of transformers. STEP DOWN

3.4.2 The Rectifier From previous discussions, you should know that rectification is the conversion of an alternating current to a pulsating direct current. Now let us see how the process of RECTIFICATION occurs in both a half-wave and a fullwave rectifier.

The HalfHalf-Wave Rectifier

Figure: 3.10 (c) Common types of CENTERtransformers. CENTER TAPPED

Figure: 3.11 halfSimple half -wave HALFrectifier. HALF -WAVE RECTIFIER

Page 50

Introduction to Robotics with Revobot

Figure: 3.12 halfSimple half -wave rectifier. OUTPUT WAVEFORM

Since a silicon-diode will pass current in only one direction, it is ideally suited for converting alternating current (ac) to direct current (dc). When ac voltage is applied to a diode, the diode conducts ONLY ON THE POSITIVE ALTERNATION OF VOLTAGE; that is, when the anode of the diode is positive with respect to the cathode. This simplest type of rectifier is the half-wave rectifier. As shown in view A of figure 3.11, the half-wave rectifier uses only one diode. During the positive alternation of input voltage, the sine wave applied to the diode makes the anode positive with respect to the cathode. The diode then conducts, and current (I) flows from the negative supply lead (the secondary of the transformer), through the millimeter, through the diode, and to the positive supply lead. As indicated by the shaded area of the output waveform in view B, this current exists during the entire period of time that the anode is positive with respect to the cathode (in other words, for the first 180 degrees of the input sine wave).

Figure: 3.13

During the negative alternation of input voltage (dotted polarity signs), the anode is driven negative and the diode cannot conduct. When conditions such as these exist, the diode is in cutoff and remains in cutoff for 180 degrees, during which time no current flows in the circuit. The

Page 51

Introduction to Robotics with Revobot

circuit current therefore has the appearance of a series of positive pulses, as illustrated by the shaded areas on the waveform in view B. Notice that although the current is in the form of pulses, the current always flows in the same direction. Current that flows in pulses in the same direction is called PULSATING DC. The diode has thus RECTIFIED the ac input voltage. Full-Wave Rectifiers Conduct on both halves of the input ac cycles. As a result, the dc pulses are not separated from each other. A characteristic of full-wave rectifiers is the use of a centertapped, high-voltage secondary. Because of the center tap, the output of the rectifier is limited to one-half of the input voltage of the high-voltage secondary. 3.4.3 Bridge Rectifiers Are full-wave rectifiers that do not use a center-tapped, high-voltage secondary. Because of this, their dc output voltage is equal to the input voltage from the highvoltage secondary of the power transformer. Bridge rectifiers use four diodes connected in a bridge network. Diodes conduct in diagonal pairs to give a full-wave pulsating dc output. 3.4.4 The Conventional Full-Wave Rectifier A full-wave rectifier is a device that has two or more diodes arranged so that load current flows in the same direction during each half cycle of the ac supply.

Figure: 3.15 FullFull -wave rectifiers. POSITIVE ALTERNATION.

A diagram of a simple full-wave rectifier is shown in figure 3.17. The transformer supplies the source voltage for two diode rectifiers, D1 and D2. This power transformer has a center-tapped, high-voltage secondary winding that is

Page 52

Introduction to Robotics with Revobot

divided into two equal the source voltage for voltage for D2. The arranged so that the cycles.

parts (W1 and W2). W1 provides D1, and W2 provides the source connections to the diodes are diodes conduct on alternate half

Figure: 3.16 FullFull -wave rectifiers. NEGATIVE ALTERNATION

During one alternation of the secondary voltage, the polarities are as shown in view A. The source for D2 is the voltage induced into the lower half of the secondary winding of the transformer (W2). At the specific instant of time shown in the figure, the anode voltage on D2 is negative, and D2 cannot conduct. Throughout the period of time during which the anode of D2 is negative, the anode of D1 is positive. Since the anode of D1 is positive, it conducts, causing current to flow through the load resistor in the direction shown by the arrow.

fullFigure: 3.17 Practical full -wave rectifier7

View B shows the next half cycle of secondary voltage. Now the polarities across W1 and W2 are reversed. During this alternation, the anode of D1 is driven negative and D1 cannot conduct. For the period of time that the anode of D1 is negative, the anode of D2 is positive, permitting D2 to conduct. Notice that the anode current

Page 53

Introduction to Robotics with Revobot

of D2 passes through the load resistor in the same direction as the current of D1 did. In this circuit arrangement, a pulse of load current flows during each alternation of the input cycle. Since both alternations of the input voltage cycle are used, the circuit is called a FULL-WAVE RECTIFIER. Now that you have a basic understanding of how a fullwave rectifier works, let us cover in detail a practical fullwave rectifier and its waveforms.

A Practical FullFull-Wave Rectifier


A practical full-wave rectifier circuit is shown in view A of figure 4-6. It uses two diodes (D1 and D2) and a centertapped transformer (T1). When the center tap is grounded, the voltages at the opposite ends of the secondary windings are 180 degrees out of phase with each other. Thus, when the voltage at point A is positive with respect to ground, the voltage at point B is negative with respect to ground. Let us examine the operation of the circuit during one complete cycle. During the first half cycle (indicated by the solid arrows), the anode of D1 is positive with respect to ground and the anode of D2 is negative. As shown, current flows from ground (center tap), up through the load resistor (RL), through diode D1 to point A. In the transformer, current flows from point A, through the upper winding, and back to ground (center tap). When D1 conducts, it acts like a closed switch so that the positive half cycle is felt across the load (RL). During the second half cycle (indicated by the dotted lines), the polarity of the applied voltage has reversed. Now the anode of D2 is positive with respect to ground and the anode of D1 is negative. Now only D2 can conduct. Current now flows, as shown, from ground (center tap), up through the load resistor (RL), through diode D2 to point B of T1. In the transformer, current flows from point B up through the lower windings and back to ground (center tap). Notice that the current flows across the load resistor (RL) in the same direction for both halves of the input cycle.

Page 54

Introduction to Robotics with Revobot

View B represents the output waveform from the fullwave rectifier. The waveform consists of two pulses of current (or voltage) for each cycle of input voltage. The ripple frequency at the output of the full-wave rectifier is therefore twice the line frequency. The higher frequency at the output of a full-wave rectifier offers a distinct advantage: Because of the higher ripple frequency, the output is closely approximate to pure dc. The higher frequency also makes filtering much easier than it is for the output of the half-wave rectifier.

for fullFigure: 3.18 Peak and average values fo r a full -wave rectifier

In terms of peak value, the average value of current and voltage at the output of the full-wave rectifier is twice as great as that at the output of the half-wave rectifier. The relationship between the peak value and the average value is illustrated in figure 3.18. Since the output waveform is essentially a sine wave with both alternations at the same polarity, the average current or voltage is 63.7 percent (or 0.637) of the peak current or voltage.

Figure: 3.18 Peak and average values for a fullfull -wave rectifier

3.4.6 Filter Circuits


Page 55

Introduction to Robotics with Revobot

Are designed to smooth, or filter, the ripple voltage present on the pulsating dc output of the rectifier. This is done by, an electrical device that has the ability to store energy and to release the stored energy. 3.4.7 Capacitance Filters Is nothing more than large capacitors placed across the output of the rectifier section. Because of the large size of the capacitors, fast charge paths, and slow discharge paths, the capacitor will charge to average value, which will keep the pulsating dc output from reaching zero volts.

The Basic Power Supply


View A of figure 3.19 shows the block diagram of a basic power supply. Most power supplies are made up of four basic sections: a TRANSFORMER, a RECTIFIER, a FILTER, and a REGULATOR. As illustrated in view B of figure 3.20, the first section is the TRANSFORMER. The transformer steps up or steps down the input line voltage and isolates the power supply from the power line. The RECTIFIER section converts the alternating current input signal to a pulsating direct current. However, as you proceed in this chapter you will learn that pulsating dc is not desirable. For this reason, a FILTER section is used to convert pulsating dc to a purer, more desirable form of dc voltage.

Figure: 3.19 Block diagram of a basic power supply

The final section, the REGULATOR, does just what the name implies. It maintains the output of the power supply

Page 56

Introduction to Robotics with Revobot

at a constant level in spite of large changes in load current or input line voltages. Now that you know what each section does, let us trace an ac signal through the power supply. At this point, you need to see how this signal is altered within each section of the power supply. Later on in the chapter, you will see how these changes take place. In view, B of figure 3.20, an input signal of 115 volts ac is applied to the primary of the transformer. The transformer is a step-up transformer with a turn-ratio of 1:3. You can calculate the output for this transformer by multiplying the input voltage by the ratio of turns in the primary to the ratio of turns in the secondary; therefore, 115 volts ac X 3 = 345 volts ac (peak-to-peak) at the output. Because each diode in the rectifier section conducts for 180 degrees of the 360degree input, the output of the rectifier will be one-half, or approximately 173 volts of pulsating dc.

Figure: 3.20 Block diagram of a basic power supply

The filter section, a network of resistors, capacitors, or inductors, controls the rise and fall time of the varying signal; consequently, the signal remains at a more constant dc level. You will see the filter process more clearly in the discussion of the actual filter circuits. The output of the filter is a signal of 110 volts dc, with ac ripple riding on the dc. The reason for the lower voltage (average voltage) will be explained later in this chapter. The regulator maintains its output at a constant 110-volt dc level, which is used by the electronic equipment (more commonly called the load).

The Practical Implementation Unregulated Power Supply


The following circuits are showing how to design a basic power supply that will deliver 12V DC voltages to the electronic circuit.

Page 57

Introduction to Robotics with Revobot

Figure: 3.21

Figure: 3.22

Limitations of an unregulated power supply is explained below Output is varying with changing of the input voltage of AC power supply.

Page 58

Introduction to Robotics with Revobot

Output voltage drops when the power supply is loaded (output is connected to ground through a resistor). Though this circuit uses a 1000-F capacitor for filtering the fluctuation (ripples) in the output voltages, it is impossible to remove the ripple completely by increasing the capacitance of the filtering capacitor. If accidentally the output is shorted to ground (resistance between output terminal and ground becoming very low), the component(s) in this power supply may be damaged.

The practical implementation of regulated power supply:


To remove all the above limitation we can follow the following scheme to design a regulated power supply.

Figure: Figu re: 3.23

Page 59

Introduction to Robotics with Revobot

Kirchhoff's Current Law

This fundamental law results from the conservation of charge. It applies to a junction or node in a circuit -- a point in the circuit where charge has several possible paths to travel. In Figure 3.24, we see that IA is the only current flowing into the node. However, there are three paths for current to leave the node, and these current are represented by IB, IC, and ID. Once charge has entered into the node, it has no place to go except to leave (this is known as conservation of charge). The total charge flowing into a node must be the same as the the total charge flowing out of the node. So, IB + IC + ID = IA Bringing everything to the left side of the above equation, we get (IB + IC + ID) - IA = 0

Figure: 3.24 Possible node (or junction) in a circuit

Page 60

Introduction to Robotics with Revobot

Then, the sum of all the currents is zero. This can be generalized as follows

Note the convention we have chosen here: current flowing into the node are taken to be negative, and currents flowing out of the node are positive. It should not really matter which you choose to be the positive or negative current, current as long as you stay consistent. However, it may be a good idea to find out the convention used in your class.

Kirchhoff's Voltage Law


Kirchhoff's Voltage Law (or Kirchhoff's Loop Rule) is a result of the electrostatic field being conservative. It states that the total voltage around a closed loop must be zero. If this were not the case, then when we travel around a closed loop, the voltages would be indefinite. So
Figure: 3.24 Around a
closed loop, the total voltage should be zero

In Figure 3.24, the total voltage around loop 1 should sum to zero, as does the total voltage in loop2. Furthermore, the loop, which consists of the outer part of the circuit (the path ABCD), should also sum to zero.

We can adopt the convention that potential gains (i.e. going from lower to higher potential, such as with an emf source) is taken to be positive. Potential losses (such as across a resistor) will then be negative. However, as long as you are consistent in doing your problems, you should be able to choose whichever convention you like. It is a good idea to adopt the convention used in your class.

Page 61

Introduction to Robotics with Revobot

CHAPTER 4
Sensors and Actuators
4.1 Sensory Systems

In order for robots to interact with its surroundings, it must collect information around it. Hence, generally all robots are equipped with a sensory system for acquiring feedback from the environment. This chapter aims to give students and hobbyists a general view on what type of sensory systems are used in robotics. 4.2 Rangefinders

Rangefinder sensors are usually devices that emit either light or sound energy to measure the distance from the device to the target. There many techniques to measure the distance, but the most common method measures the time required by the emitted beam to reflect back from the obstacle to estimate distance. Typically, distances measured by rangefinders are retrieved in the form of analog voltage, current or digital signal such as PWM (Pulse-Width Modulation). Rangefinders have a minimum and maximum range within which the sensor can measure accurately. Hence, when selecting the type of rangefinders for particular application, one should take the output signal representation and range factors into considerations. 4.2.1 Ultrasonic Rangefinder Ultrasonic rangefinder employs the use of ultrasound or sound waves above the normal audible range. They measure the distance by evaluating the echo of the emitted wave produced. The typical directivity of the ultrasonic sensor is seen below.

Page 62

Introduction to Robotics with Revobot

4. Fig 4 .1 Coverage of Ultrasonic Sensor

Shown below is a typical ultrasonic module. The module consists of a piezoelectric transducer which Transducer Detector

Fig 4.2 Ultrasonic Rangefinder

Converts electrical energy into ultrasonic waves. This wave propagates through a medium like as air and water. When these waves hits a particular target such as an obstacle or wall, these sound wave bounce back resulting in an echo. This echo is converted back into electrical energy by the piezoelectric. The distance is calculated by computing the time interval between the emission of the signal and the echo received. 4.2.2 InfraInfra - Red Rangefinder Infra-Red (IR) rangefinder works on similar principle to that of the ultrasonic rangefinder. The range of IR rangefinder only provides a range, which is limited to the line of sight view. IR rangefinder is generally less expensive compared to ultrasonic rangefinder. IR rangefinder emits an infrared beam instead of ultrasound and detects the distance through the reflected beam. The IR rangefinder consists of both a transducer and detector to emit and detect IR beam respectively.

Page 63

Introduction to Robotics with Revobot

Transducer

Detector

InfraFig 4.2 Infra -Red Rangefinder

Infrared sensors are generally easy to use, implement, small and cheap. The main disadvantage is that the reflectivity of the target would affect the distance measured and hence IR rangefinders are less accurate, precise and reliable. Now a days IR rangers also use triangulation to estimate distance. This method is more accurate as the sensing capability does not directly depend on the reflectivity of the surface of the target. In triangulation method, the sensor measures the radius of the projection of the emitted beam using an array of IR sensitive elements. The farther the target the larger the projection. Based on this information, the range of the target can be estimated. 4.2.3 Laser Rangefinder

Rangefinder Fig 4.3 Laser Range finder

Laser rangefinder provides high accuracy and precision distance measurement however; these devices are very much more expensive in compare to ultrasonic and infrared rangefinder. Laser rangefinder emits a beam of laser light to measure the distance. Using a high quality laser sensor to track the

Page 64

Introduction to Robotics with Revobot

emitted laser beam, the distance in which the beam of laser traveled from the device to the target is recorded also known as triangulation. To illustrate the measuring principle, the two diagrams below shows how triangulation is done to measure the distance. Laser Sensor Laser Beam

Fig 4.4 Principle of Triangulation

As such, in compare to the previous two rangefinders, laser rangefinder provides high accuracy and precision distance measurement as it does not employ the reflection method; reflection method is prone to disturbance present in the medium the emitted energy travels through and reflectivity of the targets surface.

4.3

Light Sensors

Light sensors are the detectors or measuring devices of light energy, which are also called as photo detectors there are various types of sensors among which most common ones are described in the following. 4.3.1 PhotoPhoto - Resistors Photo resistors are Light Dependant Resistor (LDR), photocells or photoconductors, which change resistance when subjected to varying light intensity. A symbol of photo resistor used in circuitry diagram and practical photo of photo-register are shown below.

Page 65

Introduction to Robotics with Revobot

PhotoFig 4.6 Circuitry Symbol Of Photo Resistor

PhotoFig 4.7 Photo -Resistor

Photo resistors resistance varies wit light intensity, so photo-resistors are used as light measuring device, due to this photo resistors are employed as a measuring unit in solar seeker also. Note: Photo-Registers are widely used to redirect the solar panels, according to the detection of incident light, to obtain higher efficiency. Multiple photo resistors can be positioned in different angle or direction to determine where the amount of sunlight is most ample, using the simple principle of the resistance variation with respect to light intensity. Likewise, a solar powered device can automatically adjust its solar panel to face the direction that can harness the highest amount of energy available. 4.3.2 Photo Diodes Like photo resistors, photo diodes also react to light in general. The photo diodes have high resistance when place in darkness and allow less current to conduct and its internal resistance decreases when subjected to light and hence conducts more current. The amount of current conducts is relative to the intensity of the incident light. The symbol to represent a photo diode in electronic semantics is given below.
Fig 4.7 Circuitry Symbol of Photodiode

Page 66

Introduction to Robotics with Revobot

The photo diodes can be operated under two configurations such as zero bias or reverse bias mode however, the principle and basis in which the photo diode is used in these two modes are different. In zero bias mode when photodiode subjected to light and current flows through, the diode becomes forwardly biased, in the zero bias modes. This principal is also known as the photovoltaic effect, as under illuminated condition photodiode can induce a small amount of current if its two terminals are connected by some resistance to make the circuit closed. However, in other case in reverse bias mode whenever light falls on the reversely biased photodiode it starts conducting. In this case, also the amount of current varies with the intensity of the incident light. The advantage to use this mode is the better sensitive and faster response time. Below is a picture of a photo diode, which resembles that of Light Emitting Diode (LED).
Fig 4 .8 Photodiode

4.3.3 PhotoPhoto - Transistors Phototransistor works similarly to the photodiodes but it offers higher sensitivity to the incident light, when subjected to light. However comparing with the photodiode there is a minus point to use it, as it has a slower response time with respect to photodiode. There are different types of phototransistors available such as two-terminal or three-terminal types. However, both of them should be biased across the emitter and collector and the amount of current flows through the emitter and collector can be determined by the intensity of light incident on base emitter junction, in the twoterminal type. Below is the shown picture of the two terminal phototransistor.

Page 67

Introduction to Robotics with Revobot

Fig 4.9 Phototransistor

In the tree-terminal type, the additional terminal allows us to keep an electrical bias, to compensate the ambient light. Both PNP and NPN phototransistors are available commercially, like the convention transistors. Phototransistors can be used as conventional distance measurement applications. Below is the shown picture of the symbols used in circuit diagrams.

Fig 4.10 Circuitry Symbol of Photo Transistor

4.3.4 InfraInfra - Red OptoOpto - Couplers OPTO-COUPLERS are the combination of light emitter and the photodetectors the emitter may be typically a LED and the detector may be a photodiode or phototransistor. Through a short optical transmission path, the light transmitter transfers the electrical signal in optical form and the receiver in the other electrically isolated end receives the optical signal and converts it again in electrical form. Thus, this combination is known as OptoCouplers or Opto-Isolators. By considering the Infra-Red (IR) Opto-Coupler, IR is the optical medium used in the transmission. The configuration of IR Opto-Couplers can be in two ways and they are as follows. Incase of reflective opto-coupler the optical signal is transmitted to the receiver through a
Page 68

Introduction to Robotics with Revobot

reflection as shown in the fig: 5.3.7, in the reflective configuration.

Fig 4.11 Reflective IR OPTOOPTO -COUPLER

In the inline configuration, the transmitter is placed directly facing the receiver so, optical signal is directed directly towards the receiver. There are some dual optocouplers available, where one LED illuminates to identical photodetectors to create a good matched opto-coupler. The following figure shows the simple configuration of an inline opto-coupler.

Fig 4.12 OptoInline IR Opto Coupler Couple r

4.4

Color Sensor

Color Sensors are used for color detection and measurement for a variety of reasons. In robotics, color sensors are mostly used for recognizing the environment or goal by mean of color-coding the objects. There are several types of color sensors available commercially, like Charge Coupled Device (CCD) type, LED-LDR type etc. The following Fig: 5.3.11 shows a scheme of implementing a LED-LDR type color sensors. The LED is shown in Fig 4.13(a) having three different colours Red, Green and Blue (RGB) as shown in Fig 4.13(b). The LED in Fig 5.3.11 turned on one by one sequentially and for each instance, the signal obtained from the LDR is measured. In each case (according to color of the glowing LED), the output from the LDR is indicating the depth (intensity) of that color component of the reflecting obstacle.

Page 69

Introduction to Robotics with Revobot

Fig 4.13(a) Diy Colour Sensor

4.13 13(b) Fig 4. 13 (b) Diy Colour Sensor

4.5

Accelerometers

Accelerometers are the devices, which measure the force exerted on it due to its acceleration, as we know Force = Mass x Acceleration. These acceleration forces may be static or dynamic means acceleration due to gravity multiplied by its mass is a static force on the measuring device. Whereas any net acceleration of the accelerometer will get a dynamic component of Force of (Net Acceleration x Mass). The following describes the working principle of commonly used Accelerometers.

Note: Accelerometers are often used in robotics for several purposes. Accelerometers can be used to measure the amount of acceleration forces and hence determines the way the robot is moving. Accelerometers are employed to allow a better understanding of the environment thus, allowing the robot to compute and react accordingly. Accelerometers can be used as a tilt sensor to measure the angle in which the device is inclined with respect to earth by measuring the amount of gravitational acceleration forces.
Page 70

Introduction to Robotics with Revobot

4.5.1 Micro ElectroElectro- Mechanical System (Mems)

Fig 4.14 Mems Accelerometer

MEMS Accelerometers can be used to measured both translational and rotational accelerations. MEMS accelerometer are often based on the use of a micro machined oscillator which when subjected to acceleration will deflect its position. The deflection can be detect using several method such as piezoelectric, piezoresistive and capacitive.

Note: One of the most common applications of MEMS accelerometers is in airbag deployment system in automobiles to detect whether a collision has occurred.
4.5.2 Thermal Accelerometer

Fig 4.15 Thermal Accelerometer

Thermal accelerometer is also a micro machined based accelerometer. Instead of the conventional method of detection by micro mass or capacitive changes, thermal accelerometer detects acceleration using temperature sensing. Thermal accelerometers consist of a small volume of gas, which is heated in the middle with surrounding tiny temperature sensors. When no acceleration is subjected, there is no difference between the temperature sensors and hence no reading. When acceleration is imposed, the tiny amount of gas is displaced by virtue of convection

Page 71

Introduction to Robotics with Revobot

resulting in a temperature difference between the sensors portraying the amount of acceleration. 4.6 Gyroscope

Gyroscope is a device based on the principle of conservation of angular momentum, used for measuring or maintaining orientation. It is often used to perform balancing act and keeping accurate direction of travel. Some typical applications are flying robots, soccer robots, micro mouse, humanoid robots, digital camera etc. Two common types of gyroscopes are 4.6.1 Piezoelectric Gyroscope Piezoelectric gyroscopes use piezoelectric oscillators to capture the rotational movements of objects. They are commonly used in digital cameras and R/C helicopters.

Fig 4.16 Basic Structure of Piezoelectric Gyro

Fig 4.17 Piezoelectric Gyro for R/C Toys

Page 72

Introduction to Robotics with Revobot

4.6.2 Mems Gyroscope MEMS gyroscope are relatively cheaper than traditional mechanical gyros and they can be easily fabricated in large volume on a tiny IC chip.

Fig 4.18 Mems Mem s Gyroscope Design

Shown in Fig microscope.

is a design of MEMS Gyroscope under a

Gyroscope Selection Guidelines


Size Cost Availabilities Output Accuracy
Piezoelectric Big Fair Found in Hobbies Shops PWM Fair MEMS Small Low R/C Found in Robotics Shops PWM, Analog High

4.7

Rotation Sensors

As discussed earlier in Issue 4, wheeled robots are among one of the most common types locomotion used. In order for these robots to navigate properly, feedbacks from the wheels are important to stay in control. Hence, Rotation Sensors are used to collect feedback from the wheels.

Page 73

Introduction to Robotics with Revobot

4.7.1

Optical Encoders

The optical encoders are made up of a pair of optocouplers with a slot. A disc is mounted in the slot between the transmitter and receiver pair of the optocouplers. When the disc spins with the wheel, the output of optocouplers will start oscillating in-between two different voltages and a counter is used to count the number of pulses per second the output of optocouplers generates and hence the frequency of the pulses indicate the speed of the wheel it is indicating the rotational.

Fig 4.19 Optical Encoder

In Fig shown the internal construction of the optical encoder describe earlier.

Fig 4.20 Optical Encoder Pattern

The illustration in Fig is an example of now the encoder disc looks like. The source URL provides more details on the optical encoder and how to construct one you.
Fig 4.21 Ball Mouse

Page 74

Introduction to Robotics with Revobot

The most common used of Optical encoders are in the computer ball mouses, which has been very much phased out by better performance optical mouses. 4.7.2 Rotary Potentiometer

These special potentiometers are capable of rotating 360o continuously and with high linearity, it is best for measuring angles.

Fig 4.22 Angle Transducer

The above figure shows a rotary potentiometer that is used as an angle transducer to translate angular motion into electrical signals.
Rotation Sensor Selection Guidelines Optical Encoder Rotary Potentiometer Medium Large High Robotics Electronic Stores Rotary Switch Medium Large Low Medium Electronic Stores Debouncing system -

Size

Tiny Large

Cost Availabilities

Low High DIY Shops

Special Requirements

Counter (Hardware/Software)

ADC

Application Speed

Slow High

Slow High

Slow

Page 75

Introduction to Robotics with Revobot

4.7.3

Multi-Contact Switches

Fig 4.23 Rotary Switch

The use of rotary switch for high angular speed applications is not recommended as it degrades the mechanic switch much faster than its practical usage time, besides that the switching speed is also limited by the mechanical bouncing characteristic. Common usage of these switches is in the speed selector of fans. 4.8 Contact and Proximity Sensor

As discussed in the introduction robots requires sensory system for its environmental awareness. In addition, contact and proximity sensors are used to accomplish the task of allowing robots to detect physical obstacles. Contact sensors provide pain feedbacks when contracting the obstacles physically. Whereas proximity sensors are able detect obstacles without physically touching them and it is commonly done by means of wave emissions (i.e. Electromagnetic; Sonic and Light). 4.8.1 Bumper Switches

This type of pain feedback sensor is usually mounted on the edges of the robot to sense any contact with obstacles.

Page 76

Introduction to Robotics with Revobot

Fig 4. 24 Bumper Car

Some common used switches in the construction of a bumper switch are the push button switch ( ) and the level switch (Error! Error! Reference source not found.). found.

Fig 4.24 Level Switch

Fig 4.25 Push Button Switch

Page 77

Introduction to Robotics with Revobot

Fig 4.26 Bumper Switch

4.8.2

Touch Switches

Touch switch used to sense human touches is one commonly used sensor in robot-human interaction. It is normally implemented using resistive or capacitive technology. 4.8.3 Resistive Touch Switches

The human body is a good conductor, which has a good percentage of conducting fluid inside (similar to saline water) covered with partially conducting skin (outer most dead skin is not a good conductor). Therefore, a close circuit can be formed by simply placing a finger in between two conducting plates. This is a simple method of detecting a touch but it cannot tell a human touch or just any conductor placed in between them.

Switch Fig 4. 27 Resistive Touch Swi tch

Page 78

Introduction to Robotics with Revobot

4.8.4

Capacitive Touch Switches

A capacitive touch switch consists of two conductive layers on opposite sides of an insulating material such as glass or a printed-circuit board. The touch switch has conductive layers, which create a capacitance that decreases when a layer is touched. Interface circuitry is used on a touch switch to convert the capacitance and change into a usable switching action to drive logic systems or to switch analog signals.

Fig 4.28 Capacitive Touch Switch

4.9

Force Sensors

Transducers used to translate force in to electrical signals are essential for robots that require high precision control. Commonly used in robotic grips ( ) and foot of humanoid robots.

Fig 4.29 Robotic Arm

Page 79

Introduction to Robotics with Revobot

Fig 4.30 Flexi Force Sensors

4.10 Magnetic Sensors Magnetic sensors as the term itself suggest are sensors that are based on the principle of magnetism.
Hall Effect Sensors

Fig 4.31 Commercial Hall Effect Sensor

The Hall Effect1 refers to the potential difference on the opposite sides of an electrical conductor through which an electric current is flowing, created by a magnetic field applied perpendicular to the current. Edwin Hall discovered this effect in 1879.

In the simple form, Hall Effect sensors are analog transducers or solid-state device that output a small voltage in relative response to the magnitude of the magnetic field if present. As the output signal is low, amplification is needed. As amplification is needed for better usage of Hall Effect sensors, the commercial Hall Effect sensors sold nowadays often consists of an amplifier device coupled with a Hall Effect device. In recent years, various Hall Effect sensors comes in package consisting of Analog to Digital converter providing digital output or serial output that can be connected directly to microprocessors. Hall Effect sensors are used in various applications such as position, speed, direction sensing and current sensing. One of the advantages of Hall Effect sensors is that it is immune to dust and dirt in position sensing in compare to optical and electromechanical sensing. A unique application of Hall Effect sensor is currents sensing in

Page 80

Introduction to Robotics with Revobot

which there is non-contact between the sensor device and the conductor to measure.

Fig 4.32 Hall Effect Current Sensor

4.10.1

Magnetometer

A magnetometer is a device when subject to the presence of magnetic field, can be used to measure the magnitude and the direction of the magnetic field. Magnetometer comes in two different type; scalar and vector. Scalar type measures the total magnitude of the magnetic field present whereas vector type can determine the direction in which the magnetic field is there is various type of magnetometer (scalar or vector) that works using different principle. However, this section, primarily serves as an informative part for the readers.

Fig 4.33 Magnetometer

Some of the type of magnetometers: Proton Precession Nuclear Magnetic

Page 81

Introduction to Robotics with Revobot

Fluxgate Overhauser Cesium Vapor Spin-Exchange-Relaxation-Free Atomic (SERF) Superconducting Quantum Interference Devices,

4.10.1

Electronic Compass

Electronic compass is one of the sensors widely employed in robotics as it gives the robot the information on its orientation. An electronic compass can simply be made up of a magnetometer with marking to determine the orientation. Electronic compass can also be made up of Hall Effect sensors where multiple sensors are incorporate at different axis. Using trigonometry, the orientation is calculated and determined. In both cases, the common principle of the electronic compass works by measuring the earth magnetic field. Typically, electronic compass can be divided into two type; digital or analog. In an analog compass, the output of the electronic compass usually comprise of two sine wave signal, which interpolate each other giving information on the orientation. Digital compass gives output digital signal by digitalization. Digital output compass usually give information by means of PulseWidth-Modulation (PWM) or serial information which allows direct connection to microprocessor.

Fig 4.34 Digital Compass Cmps03

Page 82

Introduction to Robotics with Revobot

Figure 6.2.4 shows a Devantech CMPS03 digital compass which is commonly used in robotics for its ease of use, compact size, and simplicity. In robotics, as mentioned, electronic compass allows the robot to obtain information on its orientation. As such, electronic compass provide vital information on the surrounding which enable the robots to made intelligent decision. However, one main disadvantage of electronic compass is its dependency on the earth magnetic field to determine the orientation. For as such, the electronic compass is vulnerable to magnetic disturbances. Another problem of electronic compass is the non-linearity measurement of the compass direction. 4.11 Thermal Sensors Thermal sensors or heat sensors are devices that provide information or measurement of thermal energy or heat. Thermal sensors are particular useful in areas where performance is dependent on temperature or for temperature control applications. In robotics, thermal sensing plays a major role not only in terms of sensing thermal information but also in terms of control such as current protection and regulating. Thermal sensors can be seen in smart home robots where temperature measurement is required for various operations.

4.11.1

Thermistor

A Thermistor is an electric component that changes it resistance with varying temperature. The temperature and resistance relationship is non-linear however in certain case; linear approximation can be used if it is over a small range of temperature.

Page 83

Introduction to Robotics with Revobot

Fig 4 .35 Thermistor

Fig 4.36 Circuit Symbol For Thermistor

Figure 6.3.2 above shows the electrical circuit symbol commonly used to represent the thermistor. Thermistor is used in various applications such as thermometer, current limiting, and over-heating protection circuit. As resistance increases with increase temperature, it can be used to limit current to the device when the amount of heat generated by the current is over excess of what the circuit can dissipate. One characteristic of thermistor is that when current flow through the thermistor, it resulted in self heating causing the thermistor resistance to increase or decrease due not only to the environment it is supposed to sense but also the self heating. Hence, correction of error in temperature due to self-heating must be taken into consideration if the current flowing through the thermistor is could cause the significant self-heating problem.

Page 84

Introduction to Robotics with Revobot

4.11.2

Thermal Coupler

Thermal coupler is device that measure thermal difference and convert it into an electrical potential different or voltage. A voltage is generated when a conductor is subjected to a thermal gradient known also as the Seebeck effect. As such, when an additional conductor is connected to measure the voltage, a similar phenomenon occurs. When a conductor of different material is connected to complete the circuit, a potential difference is generated that correspond to the thermal gradient.

Fig 4.37 Thermocouple Thermometer

Thermal coupler devices are employed widely as temperature sensors as they are inexpensive and can measure a wide range of temperature depending on the type of metal used. However, thermal coupler does not possess high precision and cannot measure temperature of typically less than one degree Celsius.

4.11.3

Thermostat

Fig 4.38 Mechanical Thermostat

Thermostat are devices that acts as switches, turning on or off, heating or cooling to regulate the temperature of a system. The thermostat is a control system that helps maintain the temperature at a desired set point.

Page 85

Introduction to Robotics with Revobot

Thermostat can sense and control the temperature in various ways. Sensing: Bi-metallic strip (mechanical) Thermistor (electrical) Thermocouple (electrical) Controlling: Mechanical (Direct Control) Electrical (Analog or Digital Output) Thermostats are widely employed in application such as refrigerator, air-conditioning system, etc.
4.11.4 Thermal Array Sensor

Thermal array sensors are simply array of thermopiles sensors which can measure several temperature points simultaneously. In simpler term, thermal array sensor is like a thermal camera capable of measuring temperature from a distance.

FIG 4.39 THERMAL ARRAY SENSOR

A Thermopiles sensor consists of multiple thermocouples in series or parallel as single thermocouples generates insufficient output. It is an analog transducer which convert thermal energy into electrical energy and is capable of measuring thermal energy through radiation absorption and hence the capability of measuring temperature from a distance. In robotics, thermal array sensor is particularly useful in the application of human recognition and detection. Other application includes robots ability to determine hotspot or fire threat autonomously by measuring the location position and the amount of thermal energy in the environment.

Page 86

Introduction to Robotics with Revobot

4.12 Vision Sensors Vision sensing is an information processing task of discovering what is present in the surrounding and their position from an image. In Issue 5, sensors like the Rangefinders, Light sensors etc usually only provide one type feedback (i.e. Distance, colour). With advance image processing algorithm, vision sensors can provide more feedbacks with just one kind of sensor (i.e. Distance, colour, shape, orientation, quantity) The use of Visual Feedback seems to be very useful but it usually requires a fair bit of computation power for image processing thus the selection of computation platform will become very important. Usually the Digital Signal Processor (DSP) systems or Single Board Computer (SBC) are preferred. Generally Vision Sensors are classified into two major technologies; CMOS (Complimentary Metal-Oxide Semiconductor) and CCD (Charged Coupled Device). Each of these technologies has their Pros and Cons and they are worth discussing to aid better vision sensor selection. The basic use of the Vision Sensors is converting light (from real-world) into electrical signals (in digital-world). The main difference CMOS and CCD technology is the way these electrical signals are read for further processing. CCD VS. CMOS

Fig 4.40 ElectronToElectron -To Voltage Conversion

Illustrated in Fig , the CCDs photo generated charges move from pixel to pixel to the side of the sensor before

Page 87

Introduction to Robotics with Revobot

being converted into voltage. And for the CMOS sensor charges are converted into voltages within each pixel. Because of this difference, the CMOS sensors tend to perform faster than the CCDs.

Fig 4.41 Sensors Functionality

Shown in Fig , the CCDs most of the analog signal chain and digital control are processed outside the sensor and the CMOS sensors have them integrated in it. Although the CMOS may be faster but this difference reduced it light capturing area compare to the CCDs of the same pixel size, resulting in less sensitivity and lower imaging quality. In summary, CCDs generally provides better image quality but they are slower and consume a lot more power. CMOS sensors are better in high speed and low power applications. Main applications of vision sensors are listed below: Automotive Traffic Registration Collision warning Lane Following Driver surveillance Vehicle/Driver Identification Human Machine Interface Facial expressions Gesture recognition Direction of Gaze Surveillance & Security Intrusion detection People tracking Access Control Biometric (face, hand) Home automation

Page 88

Introduction to Robotics with Revobot

Industrial Control Mobile Robot Vision Visually guides actuators Assembly alignment control Robot gripper sensors

Fig 4.42 Nissan Pivo Concept Car With Papero The Th e Robotic Driver

Fig 4.43 Lexus Driver Monitoring System

Fig 4.44 3d Face Recognition

Page 89

Introduction to Robotics with Revobot

4.13 Acoustic Sensors Sound is another form of natural energy and acoustic sensors are use in robots to harvest this energy and convert into signals that it can interpret. With the sensors robot can process the signals and determine the direction of the subject of interest, directs and other characteristic of the subject depending of the complexity of the signal processing algorithm. The microphones are the most commonly used transducers that convert sound energy into electrical signals. They are generally classified into two types; Omni-directional and cardioids directional. 4.13.1 OmniOmni - Directional Microphones

These microphones are meant to pick up sounds from all directions. There are good for monitor an area of interest (i.e. Security Purposes) or for general robot-human interactions.

Fig 4.45 4.45 OmniOmni-Directional Microphone Response

Illustrated in Fig , shows the response of an Omnidirectional microphone. 4.13.2 Cardioid Directional Microphones

These microphones are directional, and are more sensitive to sounds coming from a particular direction (normally the front).

Page 90

Introduction to Robotics with Revobot

Fig 4.46 Cardioid Directional Microphone Response

Illustrated in Fig , shows the response of a cardioids directional microphone. Applications of acoustic sensors are listed below Intrusion detection Area Surveillance Voice Surveillance Subject classification (i.e. Vehicle, Animal)

Fig 4.47 Mini Microphone With Amplifier

Shown in Fig , is a mini microphone that has in built amplifier suitable for surveillance and small robots. 4.14 Localization Localization, in general, is the determination of the locality (location) of an object. In robotics application, localization refers to the technique that a robot can determine or update its own location by analyzing of the sensor data. The Global Position System (GPS) and the

Page 91

Introduction to Robotics with Revobot

NorthStar Indoor Navigation System are two among the various localization sensor and systems. 4.14.1 Global Positioning System (Gps)

The GPS is originally a military project for various navigation applications. Recently, GPS has been extended to the civilian industry and are commonly see in car navigation systems.

Figure 4.48 Global Position System Device

In military applications, GPS allows soldiers to find the objective in unfamiliar territory. In various military weapons, the GPS is used to track the potential target and engage the target accurately. In some of the rescue mission, the victims can be located faster if they have a GPS receiver. Many civilian applications benefit from GPS signals, such as use GPS as surveying tool or as an aid to navigation. The ability of GPS in determining relative movement enables a receiver to calculate local velocity and orientation; this is useful in vessel or observations of the Earth. 4.14.2 The GPS satellite system

Figure 4.49 GPS Satellite System

Page 92

Introduction to Robotics with Revobot

The 24 satellites that make up the GPS space segment are orbiting the earth about 12,000 miles above us. The GPS satellites are constantly moving and making two complete orbits in less than 24 hours. These satellites are travelling at speeds of roughly 7,000 miles an hour. GPS satellites are powered by solar energy. They have backup batteries onboard to keep them running in the event of a solar eclipse, when there's no solar power. Small rocket boosters on each satellite keep them flying in the correct path. GPS satellites circle the earth twice a day in a very precise orbit and transmit signal information to earth. GPS receivers take this information and use triangulation to calculate the user's exact location. Essentially, the GPS receiver compares the time a signal was transmitted by a satellite with the time it was received. The time difference tells the GPS receiver how far away the satellite is. Now, with distance measurements from a few more satellites, the receiver can determine the user's position and display it on the unit's electronic map. A GPS receiver must be locked on to the signal of at least three satellites to calculate a 2D position (latitude and longitude) and track movement. With four or more satellites in view, the receiver can determine the user's 3D position (latitude, longitude and altitude). Once the user's position has been determined, the GPS unit can calculate other information, such as speed, bearing, track, trip distance, distance to destination, sunrise and sunset time and more. 4.15 Voltage and Current Sensor Most of the sensors which are introduced previously will convert the various input signal to either continuous voltage or continuous current output. These continuous signals need to be converted to the digital form to facilitate the data processing by the digital controller or microcontroller. The conversion of the analog signal to the digital form is performed by the device called Analog-toDigital converter (ADC).

Page 93

Introduction to Robotics with Revobot

4.16 Analog-To-Digital Converter

000..11 ADC : 111..10

Figure 4.50 Functional of ADC

The typical ADC specifications are the resolution and sampling rate. The resolution refers to the number of the discrete values the ADC can produce over the range of analog values, which always refers to number of bits. The number of discrete level is two to the power of number of bits. For example, for the 8 bits ADC, the number of available discrete level is 28 = 256. The 256 discrete levels can be used to represent the unsigned number (0 to 255) or signed number (-128 to 127). In this 8 bits case, each discrete step represent Vref/256 Volt, where Vref id the reference voltage given to the ADC. The sampling rate is the maximum number of conversions can be done in one second. The rule of thumb to choose the sampling rate is at least twice the maximum input signal frequencies. If the sampling rate is lower than the input signal, the input signal cannot be recovered. In robotic application, ADC is widely used to convert the analog signal from the sensors. With all the digital data from ADC, the microcontroller in the robot can do the calculation, do the decision and react accordingly. For example, in the line-tracing robot, the IR sensor in the robot will output different voltage when dark or bright colour is detected. This voltage will be converted to digital data by ADC and the microcontroller will process the data to determine whether the robot is still tracing the line and do the necessary motion correction to ensure the robot is moving according to the line. 4.17 Other Sensors and Time Reference This section covers the sensors, which are not come under any specific categories listed in the former chapters. This includes humidity sensors, biometric sensor etc.

Page 94

Introduction to Robotics with Revobot

4.17.1

Humidity Sensor

Humidity Sensor refers to the sensor to detect water vapor content in air or other gases. Humidity measurements can be stated in a variety of terms and units. The three types of humidity sensors are Capacitive Humidity Sensors, Resistive Sensors and Thermal Conductivity Humidity Sensor. 4.17.2 Capacitive Relative Humidity (RH) Sensors

Figure 4.51 Capacitive Relative Humidity Sensor

Capacitive Relative Humidity (RH) Sensors are widely used in industrial, commercial, and weather telemetry applications. The humidity of the surrounding is reflected by the capacitance change of the sensors. The capacitance is increase as the relative humidity of the surrounding is increasing. 4.17.3 Resistive Humidity Sensors Sensors

Figure 4.52 Resistive Humidity Sensor

Resistive Humidity Sensors measure the change in electrical impedance of a hygroscopic medium such as a conductive polymer, salt, or treated substrate. The impedance changes of this kind of sensors are typically an

Page 95

Introduction to Robotics with Revobot

inverse exponential relationship to humidity (impedance increase as the humidity decrease). 4.17.4 Thermal Conductivity Humidity Sensors

Conductivity Figure 4.53 Thermal Conductiv ity Humidity Sensors

Thermal Conductivity Humidity Sensors measure the absolute humidity by quantifying the difference between the thermal conductivity of dry air and that of air containing water vapour. The example of this kind of sensor is shown in Figure 6.9.3 4.17.5 Barometric Sensor

Figure 4.54 Barometric Sensor

A Barometric Sensor is the sensor used to measure the weight of the atmosphere, or atmospheric pressure. The barometric sensors determine atmospheric pressure by measuring resistance in an electrical current. Within the sensor housing, there is a metal disc called a resistive strain gauge. On one side of the disc, the cylinder is sealed and calibrated with a known pressure. The other side is open to the atmosphere. When atmospheric

Page 96

Introduction to Robotics with Revobot

pressure increases, it pushes on the disc creating an electrical signal. Thus, the electrical output, or voltage from the strain gauge is proportionate to pressure being exerted on it. Changes in voltage create a signal which is converted to a digital value using an analog-to-digital converter (ADC) and is processed by the digital-signal processor (DSP). 4.17.6 Real Time Clock (RTC)

A real time clock (RTC) is a computer clock that mostly appears in the integrated circuit (IC) form. It is used to keeps track the current time and is presented in the electronic devices which need to keep accurate time.

RealFigure 4.55 Real time Clock

The RTC has advantage of low power consumption and able to free the main system for time-critical tasks. One example for the advantages of the RTC is in the computer main-board that keeps the time for the computer system so that the computer will be able to display the correct time to the users. In some of robotic application, where the robot will need to perform certain routine task at specific time, the RTC provide the solution to keep track the time while allow the robotic system to have very low stand-by power consumption.

Page 97

Introduction to Robotics with Revobot

CHAPTER 5
Actuators
5.1 Mechanical movements

Actuators are an essential part of robotics, they are the plant that drives the robots; grating the robot the ability to control and move its mechanical parts. 5.2 Types of Actuators

Generally, actuators can be classified into two category of movement; Linear and Rotary. 5.2.1 Linear Actuators These actuators generate linear displacements, normally in sliding motion.
Fig 5.1 Linear Actuator

Illustrated in Fig 5.1 is the movement of the linear actuator 5.2.2 Rotary Actuators These actuators generate rotary displacements, normally in spinning motion.

Fig 5.2 Rotary Actuator

Page 98

Introduction to Robotics with Revobot

5.2.3 Pneumatic & Hydraulic Actuators These are fluid powered actuators that are commonly used in industrial robotic applications to handle varies tasks from material handling to precision product manufacturing. This section will provide an introduction of the actuators' working principles, highlight some important areas of their application and do a comparison between the actuators. 5.2.4 Pneumatic Actuators Pneumatic Actuators uses compressed air to create movement. Compressed air stored in storage cylinders or air compressors are pumped into the Pneumatic Actuator thus creating movements. The working property of the linear pneumatic actuator is illustrated in Fig 5.3 Pneumatic Actuator (Extended)Fig 5.3 and Fig 5.4

Fig 5.3 Pneumatic Actuator (Extended)

1. When compressed air is enters the pneumatic actuator from valve A. 2. It pushes the piston and hence extending the piston rod. 3. Air at valve B is vented into the atmosphere.

Page 99

Introduction to Robotics with Revobot

Fig 5.4 Pneumatic Actuator (Retracted)

1. When compressed air enters the pneumatic actuator from valve B. 2. It retracts the piston rod. 3. Air at valve A is vented into the atmosphere. These actuators are used for varies application such as Pneumatic drills, as they are lighter, faster, and simpler than an electric drill of the same power rating. Replacement of electric actuators where electric sparks (mines) and EMI (MRI scanners) can a safety hazards.

Fig 5.5 Dentist Drill

Fig 5.6 Jackhammer

Page 100

Introduction to Robotics with Revobot

Shown in Error! Reference source not found. is a dentist drill employing a rotary pneumatic actuator and in Fig 5.6 is a jackhammer with a linear pneumatic actuator. 5.2.5 Hydraulic Actuators Hydraulic actuators operates with incompressible liquid such as oil and water, they are normally used when large amount of force is required in operation. The most common hydraulic actuators design is the piston type (Linear) actuators. The working property of a typical piston type hydraulic actuator is illustrated in Fig 5.7.

Fig 5.7 Hydraulic Actuator

Initially, when there is no hydraulic fluid pressure, 1. the spring holds the piston fully extended 2. As fluid enters the actuator, pressure in the actuator increases. When the hydraulic force is greater than the spring force, the piston retracts 3. When the fluid is drawn out of the actuator, hydraulic force release and hence the piston is extended by the spring. 4. The fluid drawn from the actuator is returned back to the hydraulic fluid reservoir. Hydraulic actuators are commonly used on heavy machinery like Airplanes, Space Shuttles, Cranes, Bulldozers, Forklift, Vehicle jacks etc.

Page 101

Introduction to Robotics with Revobot

Fig 5.8 Vehicle jack

Fig 5.9 Plane landing gear

Shown in Fig5.8 is a hydraulic vehicle jack that is capable of lifting up to 10 tons of load and in Fig 5.9 is a hydraulic landing gear of an airplane. 5.2.6 Electrical Actuators These electromagnetic driven actuators are the most commonly used actuators used in robotics application. Their application ranges from industrial robotics all the way to hobbyist robotics. The advantage of using electrical actuators over fluid powered one are ease of interfacing to electronic circuitry (not signal conversion is required) available in very small form factors electricity drive both the control circuitry and actuators (no extra power source needed) easily and cheaply available The working mechanism of the electrical actuators will be covered in the next section when electromagnetism is introduced.

Page 102

Introduction to Robotics with Revobot

5.2.7 Guideline to Actuator selection Here are some brief guidelines to the selection of actuators. Amount of power required? Difference actuators type delivers difference among of power Ease of power generation and driving actuators? Hydraulic actuator requires fluid tank Pneumatic actuator requires air compressor and high pressure storage tanks Electrical actuator requires batteries/electricity supply Size constraint? Is there a limit to the same of the actuator? Availability? How easy is it to obtain the actuator? Price? How much does the actuator cost? 5.3 Electromagnetism

Electromagnetism is simply the physics of the electromagnetic field which is produced due to a changing electric field traveling in a conductor.

Fig 5.10 Right Hand Rule

Illustrated in Fig 5.10 is the relationship between electric current and magnetic field following the Right hand rule. These fields can be converted into forces that can drive actuators.

Page 103

Introduction to Robotics with Revobot

The reverse is also true when a changing magnetic field cuttings across a conductor it actually generates electricity!!! 5.3.1 Electromagnet The simplest form of electromagnetism at work is the electromagnet. It is simply made up of wire coils, and when a changing electric current (AC) is passed through it, it turn into a magnet.
Fig 5.11 Electromagnetic Coil

Shown in Fig 5.11 is a plain electromagnetic coil. To produce a much stronger magnetic force, a ferromagnetic material (i.e. soft iron) can be use to as a core which can concentrates the magnetic field that is stronger than that of the coil itself.

Fig 5.12 Simple Electromagnet

Shown in Fig 5.12 is a simple electromagnet that can be easily constructed with a battery, long wire and an iron nail.

Page 104

Introduction to Robotics with Revobot

5.3.2 Applications Applications of Electromagnets They are widely used in common household, the tiny ones come in the form read/write head in the computer hard disk, cassette tape recorder, VCR etc. and earphones, speakers in entertainment systems.

Fig 5.13 CrossSpeaker Cross View Sectional V iew

Illustrated in Fig 5.13 is the cross-sectional view of a speaker, the electromagnetic coil can be clearly seen at the back of the speaker.

Fig 5.14 Magnetic Tape Head

Illustrated in Fig 5.14 is a simplified magnetic tape head commonly found in magnetic tape recorders. The larger ones can be found in heavy industry, such as metal junk yards where cranes fixed with huge electromagnets are use to transport scraped metal. High-

Page 105

Introduction to Robotics with Revobot

speed bullet trains also made use of electromagnetism to levitate on the tracks to overcome the speed barrel due to fractions on the track.

Fig 5.15 Shinkansen Bullet Trains

Shown in Fig 5.15 is the bullet trains that run on Japans Shinkansen route.

Fig 5.16 Crane Mounted With Electromagnet

Shown in Fig 5.16 is a crane used in the metal junk yard, mounted with a gigantic electromagnet that pick up large pieces of scraped metal. 5.3.3 Electromagnetic Actuators After discovering the basic working principal of electromagnetism, lets look at how it can be applied to actuators. There are mainly 2 types of Electromagnetic Actuators; Solenoids (Linear) and Electrical Motors (Rotary) 5.4 Solenoids

Page 106

Introduction to Robotics with Revobot

Solenoids produce linear motion when electricity is applied to its coil the ferromagnetic core is pull or push depending on the direction of the current flow, this is illustrated in Fig 5.17

Solenoid Fig 5.17 Solenoi d

5.5

Electrical Motors

DC motors are the most commonly used electrical motors used in robots, various type of DC motors may difference in constructions but the basic working principal behind them are generally the same. Similar to the solenoid electric current is applied to the coils but instance of interacting with a ferromagnetic core, DC motors interact with magnets.

5.6

Brushed Direct Current (DC) Motor

Brushed Direct Current (DC) Motor are rotary motor that turns upon applying a significant voltage. The applied voltage determines the rotation speed where higher voltage would relate to higher rotation speed.

Page 107

Introduction to Robotics with Revobot

Fig 5.18 DC motor

As the voltage increases, the current also increases resulting in the motor to heat up. The heat if exceed the permissible range the motors material can tolerant, the motor becomes overheated and eventually burn out. As such, all motors typically come with a voltage rating or an operating voltage range to prevent such overheating. Voltage rating on a motor indicates the typical permissible voltage that can be applied that the motor would operates continuously and normally without overheating. In addition, the typical speed in which the motor can produce with the voltage is also given. The speed indicates the number of turns the motor (revolution) would rotate per minute (rpm) without load. The working property of a typical brushed DC motor is illustrated in Fig 5.19

Fig 5.19 How Brushed Dc Motor Works

1. A simple rotary-brushed DC motor consists of a coil as the rotor3 and the permanent magnet (N S) as the stator4.
3

Rotor, Rotor, http://en.wikipedia.org/wiki/Rotor_%28electric%29 Stator, Stator, http://en.wikipedia.org/wiki/Stator

Page 108

Introduction to Robotics with Revobot

2. An electric direct current passes through and energized the coil (rotor). The coil is connected to the via contact points commonly known as brushes. 3. As the current flows through the wires, magnetic fields are produced by these current-carrying wires using principle of the right-hand rule. 4. The interacting alignment configuration of the magnetic fields created by the wires and permanent magnet, result in an upward force on the positive pole side and downward force on negative pole side. These opposing forces created within result in a clockwise motion of the rotor as shown in fig 5.19 5. As the rotor rotates, the direction of the current through the coil is reversed; the magnetic field subsequently produced by coil is also reversed resulting in a repeat of the sequences.

Brushed DC motor has it advantages as it is commercially and easily available with various voltages and speed rating and typically less costly. However, brushed DC motor are approximately 70-80% efficient only and are subjected to the problem of contact irregularities of the brushes at high speed. As such, brushed motor have typically lower maximum speed limit. Friction produced by the brushes also constitute to the problem of wear and tear which need replacement and maintenance. In addition, DC motor is also subject to electrical noise. Overall, brushed motor are still widely use in robotics due to its easy of use and cost. 5.7 Brushless Direct Current (DC) Motor

A brushless DC motor electric motor is an actuator similar to that of a brushed DC motor however with a totally different physical configuration.

Page 109

Introduction to Robotics with Revobot

Fig 5.20 A Typical Brushless Dc Motor

In a brushless DC motor, the coils are the stators and the permanent magnet is the rotor. In such a configuration, there is not a need to transfer a direct current to a rotating armature and hence there are no brushes in a brushless motor.

Configuration Fig 5.21 Config uration Of A Brushless Dc Motor

Fig 5.21 show a typical conventional configuration of a brushless DC motor where 3 coils or stators surround the rotor. By use of an electronic controller or logic circuits, a rotating magnetic fields created by the 3 coils such that the rotor can be directed in a particular direction. To facilitate the directing, information on the rotor position is required and this is commonly achieved using Hall Effect5 sensors or rotary encoders6.

Hall Effect, Hall Effect, http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/hall.html Rotary Encoders, Rotary Encoders, http://en.wikipedia.org/wiki/Rotary_encoder

Page 110

Introduction to Robotics with Revobot

Brushless DC motor has it advantages in term of its efficiency, reliability, reduced noise and longer lifetime (no brush degradation). However, brushless DC motors typically more costly and are more complex in its implementation. Additional logical circuits and control are required for generating the rotating magnetic field. Overall, brushless DC motors provide high performance but are generally more costly and complex to implement which deter many robotics users. 5.8 Stepper Motor

A stepper motor is a brushless electric motor that can rotate precisely to a particular angle in which the full rotation is divided into a number of steps. The angle resolution is dependant on the number of steps. Typically, since stepper motors are used for positioning purpose, stepper motors are rated using torque7 (holding force) and voltage. Diff from the DC motor, stepper motor does no spin continuously when potential is applied to the motor. Instead, stepper motor is used to precisely hold the rotor at a particular direction.

Fig 5.22 A Typical Stepper Motor

Torque, Torque, http://en.wikipedia.org/wiki/Torque

Page 111

Introduction to Robotics with Revobot

In a stepper motor, the rotor is a gear with magnetic teeth as shown in Fig5.23

Fig 5.23 A Stepper Motor Configuration

A simple explanation of how a stepper motor works is as follows 1. Each coil is magnetized one at a time attracting the nearest few magnetic teeth to it. 2. The next coil to be magnetized is mounted at an offset such that when it is magnetized, the gear rotates slightly to align itself. 3. When one coil turns off and the other on, the gear rotates towards the required direction. 4. Using the same principle, the rotor is hold by aligning particular teeth of the gear to the coils Stepper motor in other words can be deemed as a brushless DC motor coupled with a controller for position control. As such, stepper motor exhibit most of the advantages to that of the brushless DC motor and can provide precise position control. Its main disadvantages come as stepper motors are subjected to slippages and are typically less power efficient and more bulky. Cost of stepper motors relate to the precision of position control as the more precise the control, the more costly the motor is. 5.9 RC Servo Motor

RC Servo motors are DC motors coupled with logical controllers that provide velocity or position control through the use of feedback information. Typically, RC servo can provide only a limited degree of rotation
Page 112

Introduction to Robotics with Revobot

control. (140 - 270 degrees). Similar to stepper motor, RC servo are rated accordingly to their torque and voltage. By use of Pulse-Width Modulation8 (PWM), the position of the rotor is set accordingly. In recent years, new generation servos uses serial data or daisy chain9 method as it reduces the need for multiple connecting wires.

Fig 5.24 Parts Of The Rc Servo

A typical RC servo consists of the following parts; DC motor (1), potentiometer(2), reduction gears(3) , actuator arm(4) and a digital controller as shown in Figure 5.24
Fig 5.25 Circuitry Of A Typical Rc Servo

Pulse Width Modulation, PWM, http://en.wikipedia.org/wiki/ Pulse-width_modulation

9 Daisy Chain, Rotary Encoders, http://searchnetworking.techtarget.com/sDefinition/0,,sid7_gci1115470,00.html

Page 113

Introduction to Robotics with Revobot

A RC servo works as follows: A PWM signal is send to the digital controller. Based on the PWM and reading from the potentiometer (indicates position of actuator arm), the appropriate drive required is sent to the DC motor. The DC motor rotates the actuator arms through the reduction gear to provide more torque (reduction gear and torque would be discussed in the section 3.3). The potentiometer updates the digital controller on the new position of the actuator arm. Visit the following URL to find out more detail information in the use and controlling of servo motors. RC servo has it advantage over stepper motors in position precision control in terms of torque and response time. In addition, it is easy to implement. However new generation servos used in robotics are better performance and more information feedback but are subjected to higher cost and more complexity. 5.10 Application of Electrical Rotary Motor in Robotics Electrical rotary motor are vastly employed as actuators in robotics in various aspects. Below are examples of these rotary motor discussed used in robots. Brushed DC Motors

Fig 5.26 Biomorph (Left) And Soccer Robot (Right) Employ The Use Of Brushed Dc Motors
Page 114

Introduction to Robotics with Revobot

Brushless DC Motor

Fig 5.27 Omni Directional Soccer Socce r Robot From Cornell University Employ The Use Of Brushless Dc Motors For Robocup Compeition

Stepper Motor

Fig 5.28 The M6 Robot Built For Locomotion Test On Unstructured Environment Employs The Use Of Stepper Motors In Each Of The Wheels

RC Servo

Page 115

Introduction to Robotics with Revobot

Fig 5.29 the humanoid robot manusas manus -i uses rc servos a s actuator for each of its joints.

5.11 Guideline to Electrical Motor selection Here are some brief guidelines to the selection of electrical rotary motors. Type of electrical motor required? For rotation drive brushed/ brushless DC motor, stepper motor or hacked10 RC servos For position control stepper motor or RC servos Speed (RPM) and voltage rating required? Typically, higher speed motors required higher voltage rating. Other considerations? Cost Reliability Efficiency Noise Immunity Lifetime Implementation Availability

10

Hacked RC Servo, Servos that are hacked/ modified to provide full rotation control.

Page 116

Introduction to Robotics with Revobot

5.12 Gears A gear is a wheel with teeth around its circumference, the purpose of the teeth being to mesh with similar teeth on another mechanical device -- possibly another gear wheel -- so that force can be transmitted between the two devices in a direction tangential to their surfaces11.

Fig 5.30 Gear

Typically, gears are employed to increase or decrease torque and speed. Speed and torque are inversely related as increase in speed would decrease torque and viceversa. As such, gear is a very useful property especially in robotics where mechanical advantage is needed. There are many type of gears used for mechanical advantages. Different type of gear provides different efficiency, stepping up/down and also translates into different mechanical direction.

11

Gear, Definition adopted from http://en.wikipedia.org

Page 117

Introduction to Robotics with Revobot

5.12.1

Spur Gears (~90% efficiency) efficiency)

Fig 5.31 Spur Gears

Spur gears are the most common type of gears. They have straight teeth, and are mounted on parallel shafts. Sometimes, many spur gears are used at once to create very large gear reductions12. 5.12.2 Helical Gears (~80% efficiency)

Fig 5.32 Helical Gears

Helical gears are an improvised version of the spur gears where the edges of the teeth are not parallel to the axis of rotation but set at an angle. In this configuration, the teeth engage more often in compare to the spur gear resulting in a smoother and quieter run. Helical gear also has it advantage to provide cross coupling which changes the mechanical axis of rotation as shown in Figure 5.32

12

Spur Gear, Definition adopted from http://auto.howstuffworks.com/gear2.htm

Page 118

Introduction to Robotics with Revobot

5.12.3

Bevel Bevel Gears (~70% efficiency)

Fig 5.33 Bevel Gears

Bevel gears are another form of gear which is used to provide the same cross coupling discussed earlier only. Bevel gear changes the angle of operation and can be designed to operate at different cross coupling angle. 5.12.4 Worm gears (70% efficiency)

Fig 5.34 Worm Gears

A worm gear is another type of helical gear that looks like a screw which can be coupled with a spur gear. Similarly, this coupling provides the change in operating angle of the rotation axis. The main feature of such a gear is that it is not back-drivable. Back drivable implies that worm (screw-looking) can drive the gear but not necessary the vice-versa direction. This special property makes it ideal for driving large load without the need of holding torque.

Page 119

Introduction to Robotics with Revobot

However, it efficiency is a disadvantage in compare to other type of gears.

5.12.5

Rack and Pinion Gears(~90% Gears(~90% efficiency)

Fig 5.35 Rack And Pinion Gears

A rack and pinion gear translates rotational motion into translation motion or vice-versa. This type of gear is typically employed in steering in automobiles.

5.12.6

Gear Ratios

When two gears of different number of teeth are coupled, the speed and torque that the gears provide change. When a gear with fewer teeth (pinion) drives another with more teeth (wheel), the speed is reduce. Speed is reduced as when the pinion completes 1 revolution, the wheel does not due to the teeth difference. Similarly, in the same case, since there is a speed reduction, there is an increase in torque as the same amount of force in the pinion moves a much lesser angle of rotation in the wheel. In other word, the wheel move with more torque. As such, a unit of indication is used to calculate the change and this unit is known as the gear ratio. Gear ratio is a unit to indicate the resultant speed and torque when gears are employed and usually, the number in the front is the gear where the power is applied.
Page 120

Introduction to Robotics with Revobot

For an instance, when a gear is determined to be 3:1, this indicates that the number of teeth of the gear in which the power is applied to is three time the number of teeth of the resultant gear.

FIG 5.36 GEARS RATIO 10 Teeth Power applied to this gear

To calculate the resultant speed and torque, the following formulas can be used. Gear ratio given A:B Resultant Speed = Applied Speed * A/B Resultant Torque = Applied Torque * B/A

5.12.7

Type of Coupling

Type of coupling indicates the type of method used in to provide the gearing ratio. There are three methods: Gear to gear, Belt driven, Rotary to Linear 5.12.8 Gear to gear

Fig 5.37 Gears To Gear Coupling

Gear to gear is the most common type of coupling employed due to its simplicity. In areas of speed reduction and torque increase, gear to gear is often

Page 121

Introduction to Robotics with Revobot

employed. A point to note is that gear-to-gear gives a counter-rotation when even number of gears is employed. 5.12.9 Belt Driven

Fig 5 .38 Belt Driven Coupling

Belt driven coupling uses a belt to drive the gears. In instances, this belt can be seen as a chain that hooks the two gears up. In such a configuration, the rotation direction is the same. An advantage of such a system is that the gears can be positioned apart with the need of more mechanism. 5.12.10 Rotary to Linear

Rotary to linear is one of the most common methods used when rotary actuators are used to provide linear motion. Rack and pinion and worm gear are typically employed to provide such conversion.

Fig 5.39 Rotary To Linear

5.12.11

Guideline to Gear Selection Selection

Here are some brief guidelines to the selection of gear. Type of gear? Cross coupling or non-cross coupling required Efficiency Size and space The required gear ratio?

Page 122

Introduction to Robotics with Revobot

Using the formula determine the required gear ratio to obtained the necessary speed and torque Multiple gears can be employed Speed and torque are trade-off of each other. High speed-low torque and vice versa Type of coupling? Gear to gear Suitable for compact gear box Higher efficiency and less prone to slippage Belt-driven Suitable for long distance coupling Subject to slippage depending on the belt used Rotary to linear- Suitable for steering and rotation to linear conversion Material of gears Metal gears Strong Need to be accurately coupled to reduce friction Longer lifetime Less prone to slippage Heavy Plastic gears Weaker Wore out more easily Light More prone to slippage

Page 123

Introduction to Robotics with Revobot

PART II
ROBOTICS WITH REVEBOT

Page 124

Introduction to Robotics with Revobot

CHAPTER 6
Fundamentals of Robotics
6.1 Robots

The world around us is changing in unprecedented ways and unimaginable speed. The robotic age only dreamed about and depicted in science fiction novels and movies are becoming a reality. Robots have a long history from fictional characters (in Isaac Asimovs novels and in motion pictures), to industrial robots and mobile robots. Industrial robots have taken a long stride and are well established, though newer application domains and research directions are very much in the limelight. Robotics are now taking the robots out of their fixed base (industrial robots) imparting mobility and intelligence and there are a number of mobile robots situated in real worlds. 6.2 The very first concept Robot and Robotics

The word "Robot" was first used in the 1921 play R.U.R.13 (Figure 6.1)14 by the Czech writer Karel Capek. The word "Robot" was derived from a Czech word "robota", meaning, and forced labor."

Figure 6.1: The robot from the 1921 play R.U.R.

13

Rossum's Universal Robots [http://jerz.setonhill.edu/resources/RUR/] Image from Robot Museum [http://www.the-robotman.com/nv_fs.html]

14

Page 125

Introduction to Robotics with Revobot

Robotics15 is the science and technology of robots, their design, manufacture, and application. Robotics requires a working knowledge of electronics, mechanics, and software. A person working in the field is a roboticist. roboticist The word "robotics" first appeared in the short story "Runaround" (1942) by Isaac Asimov16 (6.3). This story was later included in Asimov's famous book "I, Robot." The robot stories of Isaac Asimov also introduced the "three laws of robotics." 6.3 The three laws of robotics by Isaac Asimov: A robot may not injure a human being, or through inaction, allow a human being to come to harm; A robot must obey the orders given it by human beings except where such orders would conflict with the First Law; A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws. Later, Asimov added the "zeroth" law: A robot may not injure humanity, or, through inaction, allow humanity to come to harm. 6.4 Early Industrial Robots

In the early 1950s and 60s George Devol and Joe Engleberger created probably the first modern industrial robot named the "Unimates." "Unimation" is the first robotics company, started by Joe Engleberger (Fig 6.2) who is known as the "father of robotics."

15

From Wikipedia, the free encyclopedia [http://en.wikipedia.org/wiki/Robot]

16

From Robotics Society of America [http://www.robots.org/newslttr/news0497/met0497a.htm]

Page 126

Introduction to Robotics with Revobot

Figure 6.2 6.2: ISAAC ASIMOV and JOE ENGLEBRGER

A Greek physicist Ctesibius of Alexandria made the first robot the clepsydra or water clock in 250 B.C. Nikola Tesla built the earliest remote control vehicles in the 1890's. Grey Walter's "Elsie the tortoise17" (Fig 6.3) and the Johns Hopkins "beast" are some of the early robots (1940's - 50's). In the 1960s the Stanford Research Institute developed a robot named "Shakey18" (Fig 6.3). Shakey moved on wheels and was the first mobile robot to reason about its actions.

Figure 6.3: 6.3: ELSI the Tortoise

17

The Elsie the Tortoise [http://cache.ucr.edu/~currie/roboadam.htm#Shakey] Shakey [http://www.sri.com/about/timeline/shakey.html]

18

Page 127

Introduction to Robotics with Revobot

In 1968, General Electric developed the walking truck19 (Figure 6.4)20 as an experimental quadruped robot. Ralph Mosher designed the walking truck to help infantry carry equipment over rough terrain.

Figure 6.4 6.4: : Walking truck by General Electric

A human controlled the stepping of this robot by pushing pedals with his feet. A computer coordinated the robot leg movements.

Figure 6.5: 6.5: Shakey by the Stanford Research Institute (1960)

6.5

Industrial Robots: Robots :

19

Walking Truck [http://en.wikipedia.org/wiki/Walking_truck]

20

http://www.frc.ri.cmu.edu/~hpm/project.archive/Image.Archive/other.robots/Mosher.GE.walking.truck.j pg

Page 128

Introduction to Robotics with Revobot

Until lately, most of the robots installed worldwide have been used in manufacturing processes. Industrial robots (Fig 6.6) are perfect to micro and nano levels of accuracy. Most of these robots operate from a fixed base in a very structured environment.

Figure 6.6: 6.6: Industrial Robots Robots doing vehicle underbody Assembly (KUKA)

Although the vast majority of robots today are used in factories, advances in technology enable robots to automate many tasks in non-manufacturing industries, such as agriculture, construction, health care and other services. 6.6 Mobile Robots Robot s

Mobile robots are utilized in industry, military and security environments. There are several consumer products, for entertainment or to perform certain domestic tasks like vacuuming. Autonomous robots with capabilities to reason and move about freely will be much in demand in the coming decades. Designing autonomous mobile robots in any meaningful degree has become possible only with the recent surge in computational, communications and sensing technologies. Teams of smart micro-robots could do regular maintenance in nuclear power plants and other hazardous environments. In the future they may fight our wars. Unmanned tanks through satellite control - that's the equivalent of robot soccer setup (Fig 6.7).

Page 129

Introduction to Robotics with Revobot

Figure 6.7: Leonardo Socially Intelligent Robot

To assist the disabled (Fig 6.8)21 and like a secretary, the personal robots will change our life style altogether. Artificial dogs or robot-pets with emotions can provide a smoothening feeling to many, especially to the children, the aged and the disabled. The Leonardo project22 (Fig 6.6) seamlessly merges the artistry of character, robotic technology, and artificial intelligence. The moment robots are placed in real world environments, several issues pop up where am I (positional information), where should I go (situation awareness and target identification), what should I do (target identification, object manipulation and reactive capabilities), etc. are issues that should be addressed. The Mars Exploration Rover (Fig 6.8) mission23 is part of NASA's Mars Exploration Program, a long-term effort of robotic exploration of the red planet.

Figure 6.8: Mars Rover

21

RoboWalker by Yobotics [http://yobotics.com/robowalker/robowalker.html] The Leonardo Project [http://robotic.media.mit.edu/projects/Leonardo/Leo-intro.html] Mars Rover by NASA [http://marsrovers.nasa.gov/overview/]

22

23

Page 130

Introduction to Robotics with Revobot

When it comes to real world operational conditions of mobile robots, what level of accuracy is desirable. The most advanced species on this planet (the humans) perform well out there with less precision and accuracy. Of course, it is desirable to have mobile robots that are capable of pinpoint accuracy, which will depend on the application areas. Human capabilities along tracking and following are commendable, though precision and accuracy are not major concerns as we are comfortable to adjust our actions in a continuous fashion. There is a long way to go, to bring robots to the level of human like capabilities.

Figure 6.9: Robowalker by Yevobotics

It is tough to identify a single advanced robot, as robots for specific tasks are advanced to their level of operations. There are robotic surgeons24 (Fig 6.10), robotic capsules to explore our intestines, those capable of catching a ball traveling at a speed of over 100 km per hour, etc.

Figure 6.10: Da Vinci Robotic Surgeon

24

Da Vinci Robotic Surgeon [http://www.intuitivesurgical.com/]

Page 131

Introduction to Robotics with Revobot

One of the best robots is Honda's ASIMO Humanoid (Fig 6.11). It can shake hand with humans (need to sense the human-hands comfortable level), walk around, and climb steps. 6.7 Humanoids

We have built the environment (living space, apartments, vehicles, etc.) that is suitable for two legged systems. It is predicted that robots will be with us in our daily life sharing our space and resources (power, bandwidth and space). Nature has shown the way where the most successful species on this planet has two legs. So the robots that may have to live with us in due course of time should be two legged (Fig 6.11). Or should we redesign our living space suitable for wheeled robots?

Figure 6.11 Hondas Asimo Humanoid

The most challenging issue with humanoids (Fig 6.12) is to balance on two legs. Humans are capable of doing all kinds of acrobatics with two legs. We have muscles (assisting us along various activities) and the body is flexible. Research along material science (flexible body, muscles, actuators), nano technology (smaller and lighter sensors and actuators), computational intelligence (fuzzy logic, neural-networks, learning genetic algorithms, evolutionary algorithms), etc. should be assimilated into and mastered to design better systems.

Page 132

Introduction to Robotics with Revobot

Figure 6.12 The GENUS Humanoid Humanoid By Dr. Vadakkepat and Student

6.8

Cooperative Robotics

Since the day humans started walking on this planet, they have come together for the benefit (selfishness!) of the members to get control of various resources. Cooperation / coordination among members were so much the need of the hour as they had to compete with other (hostile) communities. Organizations like FIRA [www.fira.net] are pushing along robot soccer (Fig 6.13) as a competitive platform to push technology. In robot soccer, teams have to coordinate and compete while chasing an indivisible resource (the ball). Robot Soccer is thus a benchmark problem to study various issues along coordination / cooperation and competition, giving insights into problems in social / life sciences.

Page 133

Introduction to Robotics with Revobot

Figure 6.13: Soccer Robots

Lately, emphasize is more along imparting intelligence and learning capabilities to robots. Through robot soccer and similar platforms, Roboticists are trying to appreciate how to impart intelligence to react to changes in the environment. Of course, this can be done to some extend with simple if-then-else conditions as well. We have to look beyond those to learn more along generalization capabilities. We have set a target of 2050 (many of our kids will be able to witness) where it is hoped to pitch a team of humanoids against humans to play the game of football. Many of us are skeptical of this deadline as the technology is yet to reach the needed threshold for this to materialize. However, deadlines help us to work towards and to push ourselves. 6.9 Robotic Design Approaches

In the current design approaches the sensors, motors, mechanical structure, etc, are designed and constructed individually. Nature always evolved systems as a whole. That is the beauty or rather the richness of all organisms - for instance a bee can travel kilometers in search of pollen or nectar, and return back to base - so small it is but it is intelligent (expert) enough for what it is meant for. Another example is ant - it can carry several times its weight. It has rugged body surface and though flimsy the legs are and it is capable of doing all kinds acrobatics for its survival. In conventional robotic engineering, the coordination of multiple limbs to generate motion for different

Page 134

Introduction to Robotics with Revobot

environment settings and tasks have mostly been tackled from a control and systems approach, implemented with different robotic architectures. This often requires a central processor, multiple sensory devices, a mechanical structure and a program written explicitly for the job at hand. Such microprocessor-based technology is limited in terms of size, cost and power efficiency. Many robotic builders also do not adhere to biological rules in their mechanical robotic designs, often opting to treat the problem as two distinct areas: electronics and mechanics. This method entails that the solution encoded in the CPU is delivered via electrical pathways to control a body such that it can perform useful work, without regard to the optimization of the controller, body and environment. Biological research since the mid 1910s have presented clear evidence that the neural control of rhythmic movements are attributed to the presence of rhythmic central circuits found in the central nervous system. These Central Pattern Generators (CPGs) are found to be responsible for a diverse range of biological functions like respiration in animals, flight motor patterns in locusts and triphasic stomach motor patterns in lobsters. Central pattern generators are capable of producing rhythmic activity without explicit timing information or sensory feedback. These autonomous neural circuits form the basic elements in central pattern generating networks, coordinating their activities to produce motor patterns. Often, such networks are vast, convoluted and complex structures connected to neuro-modulators and sensory pathways in the body. In this regard, the biological study of motion generating mechanisms in natural organisms is a slow and difficult endeavor. Natural organisms embody efficient rules garnered through evolution and natural selection in moving about their surroundings. Their biomechanical structure coupled with appropriate neural control networks behaves as a whole, allowing for efficient locomotion in different environment settings. As such, CPG networks are of paramount interest to roboticists, providing an alternative towards limbed coordination without the use of a central program. This frees up processing power, reduces cost and response time.

Page 135

Introduction to Robotics with Revobot

6.10 Neuromorphics Neuromorphic Engineering is a new interdisciplinary discipline that takes inspiration from biology, physics, mathematics, computer science and engineering to design artificial neural systems, such as vision systems, headeye systems, auditory processors, and autonomous robots, whose physical architecture and design principles are based on those of biological nervous systems. (Source: Wikipedia) A key aspect of neuromorphic design is to understand how the morphology of individual neurons, circuits, and overall architectures create desirable computations, affect how information is represented, influences robustness to damage, incorporates learning and development, and facilitates evolutionary change. 6.11 B iomorphics Biomorphic robotics is a sub-discipline of robotics focused upon emulating the mechanics, sensor systems, computing structures and methodologies used by animals. In short, it is building robots inspired by the principles of biological systems. The biomorphic machines (Figure 6.13) do not have any microprocessors and programming in it. This is not to say the lack of microprocessors makes something biomorphic quite the contrary. There is a huge amount of work be done implementing biological nervous and neural networks into computing devices.

FIGURE 6.13: FOUR LEGGED, 5 DEGREES OF FREEDOM BIOMORPH FROM FR.

Page 136

Introduction to Robotics with Revobot

Biomorphics use Mark Tildens Nervous Neurons - simple relaxation oscillators. The relaxation oscillator is a simple differentiator and inverter which react under excitatory inputs and relaxes after prolonged exposure. This is analogue equivalent of neuronal circuitry observed within centrally controlled vertebrates. However, biomorphs lack task specific / goal centric actions as of now. It is like millions of years ago when simple organisms started evolving. It will take time when biomorphic machines will be able to reach some kind of maturity, bearing in mind that different topologies (wiring among the actuators and sensors) result in variations in machine behaviours. The difference between neuromorphics and biomorphics is believed to be focusing on the control and sensor systems (neuromorphic) vs. the whole system (biomorphic). 6.12 Looking forward It is anticipated that robots will be utilized in the 21st century for household applications as well. This will pave the way for advanced robotic technology to dominate in the 21st century. It is expected that the personal robots will be popular in the coming decades, like personal computers!

Points to ponder:
Was Einsteins brain so different from the rest? There are several acrobats out there, who have trained themselves to do extra ordinary things are they very different from the rest? Arent they capable of making use of their senses and body on a better footing than the rest? So what makes a superman?

Page 137

Introduction to Robotics with Revobot

Neuro/biomorphs (Morphological fusion of nature and artificiality)

more man made

more

Spectrum of artificiality

Industrial robots (Man made artificiality)

cyborgs (Physical fusion of nature and artificiality) Figure 6.14

clones (Biological artificiality)

How to incorporate nature into robots at a level useful to the robot? There is a difference between incorporating nature into robots and making robots more natural. Robots are not nature and never will be. Cyborgs can mean man-machine interface or man-clone interface. Prosthetics is an example of man-machine interface while surgical implantation of an artificially grown ear is an example of man-clone interface.

Page 138

Introduction to Robotics with Revobot

CHAPTER 7
Mechanical Assembly
7.1 Nuts and Bolts

This chapter outlines how to assemble your Revobot without any error. Once you open the Revobot package, you may find all Revobot components neatly placed on a robust buffer section 7.2 to will give you a clear idea about the mechanical parts required for assembling the Revobot. Once you get familiar with all the different Revobot parts, you can start assembling the Revobot as per the instructions given in section 7.3. Let us start building your first robot with Revobot. 7.2 Mechanical Parts of the Revobot mechanical components

In the following briefs the involved in the revoboard.

Figure 7.1 The Revobot Chassis Chassi s

Page 139

Introduction to Robotics with Revobot

Nylon Wheels

7.2 Figure 7. 2 Nylon Wheels and Castor

7.3 Figure 7. 3 Screws Nuts and Spaces

Assembly Diagrams
This section gives you the systematic assembly diagram

Page 140

Introduction to Robotics with Revobot

with clear explanation on assembling your Revobot Step1:

Figure 7.4

DC motors on the Revobot comes with an inbuilt gearbox and has an external threading that can be used to attach a bolt. We use this design to attach the motors onto the chassis of the Revobot. Step 2:

7.5 Figure 7. 5

Insert the shaft of a motor through the motor slot as shown in the Chassis. Attach a nut from the other side of the chassis, tighten it to fit snugly.
Page 141

Introduction to Robotics with Revobot

Step 3:

7.6 Figure 7. 6

Likewise, attach the second motor. Step 4:

7.7 Figure 7. 7

Your chassis should look like this once you have attached both motors. Please ensure that the nut is sufficiently tight, so there is no shake in the assembly.

Page 142

Introduction to Robotics with Revobot

Step 5:

7.8 Figure 7. 8

Use the castor wheel, three nuts and three bolts to assemble the castor to the chassis as shown above. Step 6:

7.9 Figure 7. 9

Attach the nuts as shown. Tighten the bolt, so the castor fits snugly, and does not shake. While handling the chassis, please make sure that undue force is not applied on the chassis.

Page 143

Introduction to Robotics with Revobot

Step 7:

7.10 Figure 7. 10

The assembly should look like the figure above. Step 8: 8:

Figure 7.11

Connect the Wheels as shown in figure above. Do note that the wheels have to fit snugly to the shaft of the motor.

Page 144

Introduction to Robotics with Revobot

Step 9:

Figure 7.12

Now, let us assemble the wheels. Please attach the wheels as shown in the figure above, making sure that undue forces are not applied on the chassis. Hold the motor while pushing the wheel onto the shaft. Step 10:

Figure 7.13

The finished assembly after fixing the wheels will look like the figure above. Make sure that the shaft fits the wheels snugly, and that the wheels do not have an angular orientation.
Page 145

Introduction to Robotics with Revobot

Step 11:

Figure 7.14

Now that your chassis has both wheels and the castor attached, it is time to add the brains to your robot. Do see that the breadboard on the Controller Board is aligned towards the back of the robot. Use Nuts, Bolts and Spacers to attach the Controller board as shown above. Do support the nuts under the chassis as you screw the bolts in place. Step 12:

7.15 Figure 7 .15

The finished assembly should look something like this. We are almost there with the mechanical assembly, and the Robot is starting to look a little like the finished robot thats, good news!

Page 146

Introduction to Robotics with Revobot

Step 13:

Figure 7.16

Now we have the muscles and the brains in the robot. We need to attach the ears and eyes. Yes, its time to assemble the sensors that will help the robot sense its surroundings. We will start by assembling two IR sensors. IR sensors can help the robot detect an obstacle and do a desired action for example, avoid it. Use the IR sensors in the Revobot kit, nut, bot, and a spacer to assemble them as shown in the figure above. We like to handle sensors with a little bit of care, so they last longer. Make sure that the nut and not are no tighter that what is required to hold it in place. Step 14:

Figure 7.17

Page 147

Introduction to Robotics with Revobot

The finished assembly will look like the figure above. Congratulations, we are doing great. Step 15:

Figure 7.18

Let us give our robot more sensors. To make the robot follow a black line, for example, we will need sensors pointing down, to see the surface on which it is moving. Go ahead, and attach two sensors on the wings of the chassis as shown in the figure above. Please note the alignment of the sensors, and the component sides of the sensors while attaching the sensors. You will need a set of nut and bolt, and spacer for each sensor. Step 16:

Figure 7.19

The finished assembly should look like the figure above. Looks great, doesnt it?
Page 148

Introduction to Robotics with Revobot

Step 17 17:

Figure 7.20

Please refer to Step 6 of the electrical assembly chapter to see how to connect the battery case to the Battery holder. Once this is done, the battery holder can be connected to the chassis as shown above. Step 18:

Figure 7.21

We need calories to keep us going. Robots do too. Instead of food, they use batteries. Here we will be using a set of 8 1.5V dry cells to power our robot. You may also use rechargeable Nickel Metal Hydride (NiMH), or Lithium Ion (Li-Ion) batteries. They can be recharged thousands of times depending on the manufacturers specifications, and

Page 149

Introduction to Robotics with Revobot

would last a very long time. Dry cells would do just fine, but you will need to replace them when they run out. In the battery casing provided in the Revobot kit, place the batteries, and bolt them to the chassis as shown in figure above. Do note that the longer fins on the battery case align towards the back of the Revobot. Step 19:

Figure 7.22

Thats, much better. The Robot has almost all major components now. In addition, the look is awesome! Step 20: 20:

Figure 7.23

Page 150

Introduction to Robotics with Revobot

Do double check the assembly of the robot to see if all components are assembled properly. Here is one more view. If all components and faces look as shown above, we are doing great

Page 151

Introduction to Robotics with Revobot

CHAPTER 8
Electrical Assembly
8.1 Hooking it UP

This chapter outlines the electrical assembly of the Revobot, such as how to turn on your Revobot, how to select the different modes etc. 8.2 How to turn on your yo ur Revobot

Do note how Left, Right, Front and Rear are defined for the Revobot. We will follow this direction for all instructions that follow.

In this chapter, we will learn to turn on and work with the Revobot. To begin working with the Revobot, we have to first complete assembling it as discussed in the previous chapter. The next part is to complete the electrical connections as described in the following steps. The Revobot kit contains 4 main sensor connection wires. 3 of them, shorter in length, are Wire-Type-A as shown in the figure below, and the long one is Wire-Type-B

Page 152

Introduction to Robotics with Revobot

Wire-Type-B

Wire-Type -A

Legend: 1. Black wire or Red wire with black band is usually used for indicating a Ground connection. 2. Orange or Red wire usually indicates +5V connection. 3. Yellow wire or Red wire with yellow band usually indicates an output connection. All IR sensors need 3 wires for proper connection. Please ensure that all Ground, +5V and output connections are proper for each sensor. Step 1: Connecting the Left Obstacle avoidance Sensor:

Electrical connections have to be handled gently, so please ensure that you do not use excess force while slotting the wire in.

Page 153

Introduction to Robotics with Revobot

Use one end of a Wire-Type A and connect the +5V (red), Ground (black) and output (yellow) to the IR sensor as shown in the figure. Connect the black connector on the other end of the WireType-A onto the ground terminal on Revoboard as shown below.

Connect the red connector to the +5V terminal as shown below.

Connect the yellow wire-end to the RE2 Pin as shown below.

Page 154

Introduction to Robotics with Revobot

Step 2: Connecting the Right Obstacle avoidance Sensor:

Use one end of a Wire-Type A and connect the +5V (red), Ground (black) and output (yellow) to the IR sensor as shown in the figure. Connect the black connector on the other end of the WireType-A onto the ground terminal on Revoboard as shown below.

Page 155

Introduction to Robotics with Revobot

Connect the red connector to the +5V terminal as shown below.

Connect the yellow wire-end to the RE1 Pin as shown below.

Page 156

Introduction to Robotics with Revobot

Step 3: Connecting the Left Line Sensor: Note: We will be using the longer Wire-Type-B for this connection. Use one end of a Wire-Type B and connect the +5V (red), Ground (black band) and output (yellow band) to the IR sensor as shown in the figure.

Connect the black-banded connector on the other end of the Wire-Type-B onto the ground terminal on Revoboard as shown below.

Page 157

Introduction to Robotics with Revobot

Connect the red connector to the +5V terminal as shown below.

Connect the yellow-banded connector at the other end of the Wire-Type-B to the RE0 Pin as shown below.

Step 4: Connecting the Right Line Sensor: Now, this is a tricky image below. The sensor you see is actually to the right of the castor wheel, taken from below the robot. The Front of the Revobot lies to the right of the sensor below. Use one end of a Wire-Type A and connect the +5V (red), Ground (black) and output (yellow) to the IR sensor as shown in the figure.

Page 158

Introduction to Robotics with Revobot

Connect the black connector on the other end of the WireType-A onto the ground terminal on Revoboard as shown below.

Connect the red connector to the +5V terminal as shown below.

Page 159

Introduction to Robotics with Revobot

Connect the yellow connector at the other end of the Wire-Type-A to the RA5 Pin as shown below.

Step 5: Connecting the Motors: Motors: Connect the jack at the end of the Right motor wire to the Motor connector pins (M1) on the Revoboard as shown below. Please note that the jack only aligns in one way on the connector pin.

Page 160

Introduction to Robotics with Revobot

Connect the jack at the end of the Right motor wire to the Motor connector pins (M2) on the Revoboard as shown below.

Step 6: Connecting the Battery: Battery: Connect the battery connector heads as shown below to the battery case. Once connected, insert the battery case into the battery holder as shown below. Note the way the wings of the battery holder align with the battery case. The longer wings align away from wire connectors. The battery holder is now ready to be connected to the chassis.

Page 161

Introduction to Robotics with Revobot

Now let insert the power jack into the power socket of the Revobot. To ensure the power jack has properly inserted, check if the green LED lights up. Now to turn on the Revobot, slide the power switch to the on position. Now to ensure the proper functioning of the electronic components, please check if the red LED has lit up. 8.3 Tuning the sensor modules

Before we can start working with the Revobot, we have to tune the sensors. In the following steps we will explain how to tune the sensors for line sensing and obstacle sensing. 8.3.1 For line sensing

Firstly, check if the red LED on the sensor lights up on turning on the Revoboard. Now hold the sensor above a white surface and check if the yellow LED turns off. If it does not rotate the tuning screw until it just goes off. However, we should also ensure that the yellow LED lights up when the sensor is held above a black surface at the same height. For obstacle sensing

8.3.2

Firstly, check if the red LED on the sensor lights up on turning on the Revoboard. Now hold the sensor in the front of an obstacle and check if the yellow LED turns off, if it does not rotate the tuning screw until it just goes off. However, we should also ensure that the yellow LED lights up when there is no obstacle in front of the sensor.

Page 162

Introduction to Robotics with Revobot

8.4

Mode Selection

L0

L1

L2

mode

Modes

off

off

off

Line Following

off

off

on

Obstacle avoidance

off

on

off

Sumo bot

off

on

on

3 Left wall following

Page 163

Introduction to Robotics with Revobot

on

off

off

Right wall following

on

off

on

Line following sensor

with

on

on

off

Pit avoidance

on

on

on

Light following
Revoboard comes preprogrammed with eight different modes for implementing different functionalities. Each of

Page 164

Introduction to Robotics with Revobot

the different modes can be selected by setting the mode selection switches in various configurations as explained in the table below. 8.5 Enable/Disable the motors

The Revoboard has dedicated switches for enabling and disabling of each motor independently.

Figure: DIP switch position when the Motors Motors are disabled disabled Note: while programming motors have to be disabled
8.6 Reset the Revoboard

The Revoboard has a dedicated push button switch to reset the microcontroller. On depressing the reset pushbutton switch, the microcontroller begins executing the program code from the starting point. 8.7 Turn off the Revoboard

The Revoboard can be turned off by simply sliding the power switch to the off position as shown below. Conclusion Congratulations on setting up the Revoboard.

Page 165

Introduction to Robotics with Revobot

CHAPTER 9
Getting started with Revobot Revo bot
9.1 Getting Start

Revobot educational kit provides an inexpensive yet high quality robotic platform to students, professionals and hobbyists. Revobot would facilitate to attain skills in microcontroller programming and debugging in the real world. They will also be able to use this platform to educate others. Revobot is designed as practical and realistic platform for students and hobbyists to appreciate robotics in a fun and interactive way. The Revobot is built on a high-quality aluminum chassis that provides a sturdy platform for the DC motors and printed circuit board. Mounting holes and slots may be used to add custom robotic components like IR sensors, wheels etc. The programming board & PIC - 18F4550 may be removed to be used as your platform for other projects. The robot may be programmed to follow a line, follow light, or roam autonomously. Once you have mastered the basics, you can keep experimenting and expanding your Revobot robot's capabilities. Revobot educational kit exposes students to many facets of microcontroller programming, along with the excitement of Robotics the students can exercise their intelligence on actual hardware and see results, which can be exhilarating. The Revobot educational kit contains the USB 2.0 compliant PIC 18F4550 microcontroller; motors , sensors, wheels, breadboard, battery, wires, user manual that would even teach a fifteen year old how to build and program their robot in less than 50 hours. Armed with the knowledge gained from the articles and a bit of creativity, you can have a lot of fun customizing the Revobot to suit your own need, making yourself a robot that no one else have.

Page 166

Introduction to Robotics with Revobot

Features and Capabilities


Revobot is a Differential Wheeled Drive robot that is capable of doing autonomous tasks like: Obstacle Detection & Avoidance Line following Capability Wall following Capability Pit detection Capability Light following Capability The user can select each of these modes by using the mode selection switch. (Refer chapter 5 for more details on mode selection). Revobot make use of wheeled locomotion to navigate on planar surface. It make used of differential steering as it is easy to implement, simple to control and has the ability to change orientation on the spot. The below sections will explain the features in details. 9.2 Obstacle Detection and Avoidance

Figure 9.1

Obstacle detection is achieved by using Infra Red (IR) transmitters and receiver. The IR sensors are assembled on a separate Printed Circuit Board (PCB), which is mounted on the front of the chassis as shown in Figure 9.1. The working of the Revobot is as follows. At first, the Revobot will move in the forward direction. At the same time it will scan for the presence of obstacle on its path with the help of IR sensors i.e. IR LED on each of the sensor modules will keep on sending 38KHz modulated
Page 167

Introduction to Robotics with Revobot

infra red rays and the IR receiver-TSOP 1738- present in corresponding module will detect the 38KHz signals once it is reflected back from the obstacle and changes its output. In the absence of obstacle the output of the receiver, which is connected to the input pin of the microcontroller will be in logic high state. When the IR rays reflected from the obstacle falls on the detector, the detector output changes to logic zero state. The microcontroller detects this difference and the controller then gives the necessary control signals to the motors accordingly. If an obstacle is detected in the left side, then the Revobot takes a right turn until it finds no obstacle in its path. Similarly, if the right sensor detects an obstacle, the Revobot takes a left turn till it finds no obstacle in its path. If both sensors are detect the obstacles then the Revobot will move backwards for a small amount of time until the left sensor avoids the obstacle and then turn to right to check for the path and then moves forward and continues the process. Figure 9.2 shows the pictorial representation of the trajectory followed by the Revobot while doing obstacle detection and avoidance.

Figure 9.2

Page 168

Introduction to Robotics with Revobot

The forward motion is achieved by driving both the dc motors in the forward direction, reverse motion is

Figure 9.3

achieved by driving both the motors in the reverse direction. Right turn is achieved by driving the right motor in reverse direction and left motor in forward direction. Similarly, left turn is achieved by driving the left motor in
Page 169

Introduction to Robotics with Revobot

the reverse direction and right motor in the forward direction. Figure briefs the logic steps involved in obstacle detection and avoidance process. 9.3 Line Follower

The Revobot relies on two Infrared (IR) sensors, which are mounted on the bottom of the chassis to detect the position of the black line on the course. The mounting of the IR sensor modules is shown in figure: The width of the black track must be less than the distance between IR sensors, so that both the IR emitters

Figure 9.4 Revobot configured for line following

will be facing towards the white surface. While the Revobot moves along the path, the IR Emitter emit light beam towards the surface of the course and the IR Detector will detect the reflected infrared light beam. Hence, both receiver outputs, which are connected to the input of PIC microcontroller, will be in logic zero and the controller drives both the motors in the forward direction. When any of the IR emitter comes above the black track, the black surface absorbs the IR rays and hence no light beams get reflected back to the receiver. In the absence of IR signal, the receiver output changes to logic high state and the microcontroller sends the control signals to the motors based on these signal and the Revobot aligns properly into the black track by turning accordingly. This scanning and aligning is done in a specific interval. Because of this, the Revobot keep on following the black track.

Page 170

Introduction to Robotics with Revobot

When both sensors receive reflected IR signal then the Revobot moves forward. This is achieved by driving both the motors in the forward direction. When right sensor detects the absence of reflected IR beam, the Revobot takes a right turn by reducing the right motor speed and keeping the left motor speed constant. When left detector detects the absence of IR beam, the Revobot takes a left turn by reducing the left motor speed and keeping right motor speed constant. This way the Revobot aligns itself in the black trajectory and continues following the path. Figure 9.6 briefs the logic steps involved in line following process.

Figure 9.5 Revobot performing Line following

Page 171

Introduction to Robotics with Revobot

Figure 9.6 Flowchart for Line Follower


Page 172

Introduction to Robotics with Revobot

9.4

Wall Follower

In Wall following mode ((See chapter 10 for more details on selecting the already programmed modes), the Revobot will move along the length of a wall. Before we can use Revobot as a wall follower, the sensors range should be set as described in the program. The wall following mode works using two IR sensors. One of the sensors is pointed towards the wall so that when it detects the wall it moves away from it and when it does not detect the wall, it moves towards it. The other sensor faces towards the front and is used to avoid obstacles while performing wall following. This sensor also helps in navigating 90-degree bends in the wall. Figure 9.7 Shows how the Revobot performs wall following.

Figure 9.7 Revobot following a wall

Hence, the revobot moves parallel to the wall maintaining a constant distance from it. The Figure 9.8 Shows algorithm wall follower.

Page 173

Introduction to Robotics with Revobot

Start A

No

If Sensor pointing towardws wall detects Wall ?

Yes

B
Turn away from

If Sensor pointing towardws wall detects no Wall ?

Yes Move towards the Wall

No

If Sensor pointing front Doesnt detect obstacle ?

Yes

Do nothing No

If Sensor pointing front detects obstacle ?

Yes

No

Turn sharply

Figure 9.8 Flowchart for wall follower.

9.5

Pit avoidance

In Revobot Pit detection is achieved by modifying the logic of line following. Here we make use of the two IR

Page 174

Introduction to Robotics with Revobot

sensors kept under the chassis. The IR emitter present in the sensor module keep on emitting 38KHz modulated IR signal, so long as the reflected beam, from the surface where the Revobot is traveling, falls on the IR detector the Revobot continues its motion. Whenever a pit comes on its way, the emitted IR rays never are reflected back to the IR detector. Then the IR detector output changes and microcontroller gives the control signal to the motor according to this.

Figure 9.9 Pit avoidance

When the Revobot detects a pit, it moves back to the reverse direction, takes a turn and continues to move in the forward direction. The logic involved in Pit detection is shown in Figure 9.10.

Page 175

Introduction to Robotics with Revobot

Figure 9.10 9.10 avoidance.

Flowchart

for

pit

detection

and

Page 176

Introduction to Robotics with Revobot

9.6

Light Follower

When you operate the Revobot in Light Following mode (See chapter 10 for more details on selecting the already programmed modes), the Revobot will follow a light beam. However, this time the user has to do some hands on work for achieving this.

Figure 9.11 9.11 LDR circuit

The Light follower makes use of Light Dependent Resister (LDR). For example, the user can keep two LDR circuits for detecting light coming from front, right and left sides. LDR has a property of varying its resistance according to the intensity of the light falling on it. So if we connect the LDR circuit as shown in Figure 9.11 to the power supply, the output voltage (Vout) of the circuit will vary according to the amount of light falling on the LDR.

Figure Figure 9.12 9.12 Reference Voltage

Page 177

Introduction to Robotics with Revobot

Vout must be connected to one of the analog input pins of the microcontroller, say RB0. Hence, the voltage coming to pin RB0 will vary according to light falling on the LDR. Now the microcontroller can control the motor, upon comparing the Vout connected to RB0 with a constant threshold voltage (which can be adjusted to detect the light to be followed) arriving on another analog pin, say RB1. This way the user can assemble two circuits one for another LDR and one for its threshold setting, which have to be connected to RB2 and RB3 respectively. The logic steps involved in light following is shown in Figure 9.13.

Page 178

Introduction to Robotics with Revobot

Figure:9. Figure:9.13 9.13 Flowchart for light follower.

Page 179

Introduction to Robotics with Revobot

9.6.1 LDR Circuit Assembly on the breadboard The following section describes how to assemble the LDR circuit on your Revoboard. Step 1 : Place a 150 K resistor.

Step 2 : Place the second 150 K resistor

Page 180

Introduction to Robotics with Revobot

Step 3 : Connect Connect the two points with a Vcc wire.

Step 4 : place another Vcc wire to connect to +5volt

Page 181

Introduction to Robotics with Revobot

Step 5 : place a ground wire to connect to gnd terminal.

Step 6 : place another ground wire to connect the two points. points.

Page 182

Introduction to Robotics with Revobot

Step 7: Place a potentiometer

Step 8: place the second potentiometer.

Step 9: place an output wire connecting the resistor to RB 0 pin

Page 183

Introduction to Robotics with Revobot

Step 10: place an output potentiometer to RB 1 pin

wire

connecting connecting

the

Step 11: place an output wire connecting the resistor to RB 2 pin

Page 184

Introduction to Robotics with Revobot

Step 12: Place an output potentiometer to RB 3 pin

wire

connecting

the

Step 13: place the left LDR .

Step 14: place the right LDR .

Page 185

Introduction to Robotics with Revobot

Step 15: Take both the LDRs to the front while maintaining connection on the breadboard as shown below

Figure 9.14 9.14 Revobot following light

Page 186

Introduction to Robotics with Revobot

9.7

Revobot Projects

Besides the specific capabilities explained in the above sections, the Revobot can be programmed to perform interesting games similar to Sumo Wrestling, Robo-Race, Mine Detector, Fire Extinguisher etc. 9.7.1 Sumobot This is a very interesting game for robotics enthusiasts. It is similar to human sumo wrestling, in which two robots are used instead of sumo wrestlers in real life. In sumo robotics, two robots of same class are required. Each of these competes against the other, on a white platform bounded by a black circular ring. Here the robots should try to push its opponent outside the black ring. To perform this task, at first the user has to set the mode selection switch as per chapter10. For Sumo robotics we need to activate all four sensors. Among this, the two sensor modules mounted on top of the chassis is used for detecting the opponent. Once the Revobot finds the opponent then it will try to push the opponent out of the ring after following it. If the opponent is not in the vicinity then the Revobot, will continue moving in random fashion till it finds its the opponent. If the Revobot drifts towards the edge of the ring, the two sensor modules, placed on the bottom of the chassis detect the edge of the ring (black surface) and prevents going outside the ring. Figure: 9.15 shows two Revobots playing Sumo Robotic game.

Figure 9.15 Revobots playing Sumo Robotic Game.


Page 187

Introduction to Robotics with Revobot

9.7.2 RoboRobo - Race Robo race is a very interesting game. It is is similar to a grand prix in which all the competing line following robots start in staggered fashion, but if the robot which starts behind is faster than the one in front then it overtakes the slower robot and comes in front and comes back on track after overtaking. 9.7.3 Mine hunter Mine hunter is a game based on mine detection, but instead of mines the contest uses metallic coins. The arena consists of a grid of white lines on a black surface with a square sand pit at every intersection. The sand pits may or may not contain a coin buried below the sand. The task of the competing robots is to follow the lines and detect the most number of mines in the stipulated time. 9.7.4 Fire Extinguisher Fire extinguisher is a game based on fire fighting. The arena for this game consists of a maze. Somewhere within the maze, a candle is placed. The task of the robot is to autonomously detect the candle using obstacle sensors or light sensors or temperature sensors or a combination of sensors and put out the flame.

Page 188

Introduction to Robotics with Revobot

CHAPTER 10
Exploring the Revoboard and the Sensor Module
10.1 Revoboard The Revoboard is a versatile board, which is ideal for projects in robotics and embedded systems. The Revobot facilitates attaining advanced skills in embedded programming and educational research projects. The Revoboard has been designed in a fashion that enables users to customize it according to their requirements. The main features of the Revoboard include32kb flash memory On board voltage regulator which can take an input voltage from 7-18v Independent switches to enable and disable motors Dedicated switches for mode selection On board USB 2.0 driver dedicated for USB programming Compatible with other microcontrollers that have pin layouts identical to PIC18F4550 Breadboard for custom circuit designing and testing 10.2 Microcontroller The heart of the Revoboard is a PIC 18F4550 microcontroller. This is an industrial grade microcontroller manufactured by Microchip technologies Inc. The PIC 18F4550 microcontroller has been specifically designed for embedded C programming. The PIC 18F4550 microcontroller also has an integrated full speed USB 2.0 transreceiver, which has been configured for high speed USB programming of the Revoboard. 10.3 Motor and Motor Driver The Revobot comes with two geared dc motors of 500 rpm. The motors have helical gears for higher efficiency

Page 189

Introduction to Robotics with Revobot

and lower noise. A single L293D motor driver IC drives the motors. The motor driver IC has a current rating of up to 600mA per channel. The purpose of the motor driver IC is to convert the five or 0-volt signal generated by the microcontroller to a level of 12 or 0 volt so that it can power the motor. Had the motors been directly connected to the microcontroller, the voltage and current produce by it will be very low to dive the motor. 10.4 Mode selection The Revoboard has mode selection functionality inbuilt into the system. The mode selection system enables one to program the board with multiple functions for the Revoboard and switch between them by configuring the mode selection switches, L0, L1, and L2. The Revobot comes preprogrammed with eight different modes, which can be selected by configuring the mode selection switches as shown in the table below. 10.5 Buzzer The Revoboard has an on board buzzer which is driven by a darligton* pair. When a voltage of 5 volts, 25mA is given at the base terminal using the microcontroller, the darligton pair amplifies the current to drive the buzzer making it sound. This buzzer can be used to sound an alarm for a particular purpose or during debugging of program code.

10.1 Figure 10. 1

*Darlington pair is a configuration in which transistors are connected in a particular fashion as shown below to create a current gain in the system. A darlington pair takes very little input current and generates high output current.
Page 190

Introduction to Robotics with Revobot

Figure 10.2 shows the complete Revoboard with all the components

Figure 10.2 Completely assembled Revoboard

10.6 IR sensor module The Revobot comes with four IR sensors. These sensors can be configured as line sensors or obstacle sensors. The sensors have a tuning screw to vary the range of sensing. The sensors require a 5-volt supply voltage and can generate digital output of 5 or 0 volts when functioning properly. The sensor module consists of the following components. Figure 10.3 shows the completely assembled IR Sensor module. Each Revobot educational kit contains four pieces of sensor modules, which can be used to implement the different features, such as line following, obstacle detection, etc.

Page 191

Introduction to Robotics with Revobot

Figure 10.3 Completely assembled IR Sensor module.

10.6.1

Timer

The sensor module comprises of a 555 timer IC that creates a square wave of 38 kHz and 50% duty cycle. This is essential for the modulating the IR rays emitted by the IR LED. Hence, the IR led is powered by the square wave generated by the 555 timer IC. 10.6.2 IR transmitter

The transmitter section of the sensor board comprises of an IR LED. This LED in conjunction with the 555 timer IC generates a pulsating IR beam of 38 kHz. The sensor module can sense an obstacle or white surface by detecting if the pulsating IR rays emitted by the IR LED are reflected back into the IR receiver. 10.6.3 IR receiver

The receiver section of the sensor module consists of a TSOP 1738. The TSOP 1738 is an integrated module, which can detect the presence of pulsating IR rays of 38 kHz only. Hence, this module is used to detect the reflected IR beam emitted by the transmitter. Since the

Page 192

Introduction to Robotics with Revobot

TSOP module only responds to pulsating IR rays of 38 kHz, it will not be confused by the presence of stray IR rays present in the environment. 10.7 Power Supply The Revobot consist of an 8* 1.5 V AA cell bundle. This pack can provide a supply voltage of 12 volts for the Revobot. This battery pack can be easily mounted on the underbody of the chassis. The 7805 voltage regulator onboard the Revoboard takes the 12volt as input and generates a regulated 5-volt supply required for the electronic components onboard o Revoboard. The Revoboard can also be powered by drawing power from the USB port during programming and testing of sensor modules. However, this is not suitable for driving the motors. To power the Revoboard the jumper should be inserted as shown below.

Page 193

Introduction to Robotics with Revobot

PART III
PROGRAMMING GUIDE

Page 194

Introduction to Robotics with Revobot

CHAPTER 11
Introduction

This is a systematic guide to loading the first program into the Revobot. The required software and hardware tools are available in the kit. Software tools are provided along with this CD. Preconditions for Revoboard programming a) The Revoboard (Programming board) with PIC18F4550 b) A DC power supply (ideally 9V-12V) (In this case the supplied batteries) c) USB cable d) Development tools: o MPLAB IDE (Its freely available on Microchips website) o C18 C Compiler (A free students version is available on the Microchips website). The user can also choose to code in assembly or use other commercially available compilers. o Microchip MCHPFSUSB v1.3 (Its freely available on Microchips website) 11.1 Installation Procedure: Now install all the above development tools on the PC and get started. a. First install MPLAB b. Then install C-18 tool suite. Check all the check boxes during installation c. Finally install MCHPFSUSB v1.3 o Copy the file revobot.c from the CD-ROM and copy it at the location where the project has to be saved or create a new C file at the same location. o Copy the file revobot.h from the CD-ROM and copy it at the location C:\MCC18\h\

Page 195

Introduction to Robotics with Revobot

o Copy the file named rm18f4550.lkr from C:\MCHPFSUSB\fw\Demo02\ and paste it at the location C:\MCC18\lkr\

Page 196

Introduction to Robotics with Revobot

CHAPTER 12
Creating the workspace
12.1 MPLAB MPLAB Integrated Development Environment (IDE) is a free, integrated toolset for the development of embedded applications employing Microchip's PIC and dsPIC microcontrollers. To create any project we have to create a corresponding workspace. A workspace links up all the associated files required for creating and debugging a project that has embedded software aspects. One can create assembly language programs for Microchip's PIC and dsPIC microcontrollers using MPLAB. To create C programs for the same task one has to use the C-18 tool suite along with MPLAB. Now let us see how to create a workspace in MPLAB.

Creating a Workspace in MPLAB


1. Open MPLAB 2. Go to Project >> Project Wizard

3. Click on Next>>

Page 197

Introduction to Robotics with Revobot

4. Select 18F4550 from the drop down menu.

Page 198

Introduction to Robotics with Revobot

5. Press Next>>

6. Select the C18 C Compiler Tool Suite from the Active Toolsuite drop down list and click Next > button

Page 199

Introduction to Robotics with Revobot

7. Give the project name and the location to save using the browse button (the same location as revobot.c).

a. Select C: drive

Page 200

Introduction to Robotics with Revobot

b. Select Revobot folder

c. Type the project name and press Save button

Page 201

Introduction to Robotics with Revobot

d. Select Next > button

8. Add files : a. Select the C drive

Page 202

Introduction to Robotics with Revobot

9. Select the Revobot.C file from the Revobot Folder. If the C file with the program code has already been created, add that C file (Instead of Revobot.c) to the workspace. For eg: Consider the file name is Line_follower.c, Add Line_follower.c to the workspace as shown in the following screenshot. After selecting the C file, Click the Add >> button to continue with next step.

10.

Similarly add the following files to the workspace a. C:\MCC18\h\Revobot.h b. C:\MCC18\lkr\rm18f4550.lkr After adding the above files to the workspace click on Next > Button

11.

Finish.

Page 203

Introduction to Robotics with Revobot

12. Now close the workspace and open it from the location where it was saved. 13. Following are the necessary steps to add any additional files a. Select the View->Project Option

Page 204

Introduction to Robotics with Revobot

b. Right click on the folder to which the files have to be added, and then select add files from the pop up menu. (See the following Screenshot)

c. Select the file to be added to the workspace and click the Open button

Page 205

Introduction to Robotics with Revobot

d. The selected workspace

file

will

be

shown

on

the

14. The desired source file(C file) can be updated by double clicking on the file (with the extension of .c) from the Source Files folder on the workspace. A new window will be opened with the contents of the selected source file.

Page 206

Introduction to Robotics with Revobot

15. On clicking the Build All button MPLAB will generate the output file with the extension of .hex at the project folder.

This hex file can be loaded in to the microcontroller as described in the section below.

12.2 USB Bootloading: The PIC 18F4550 microcontroller that comes along with the Revoboard is pre-programmed with a bootloader program, which is essential for USB bootloading of program code into the microcontrollers flash memory. This bootloader code is available in hex form at C:\MCHPFSUSB\fw\_factory_hex\picdemfsusb.hex During bootloading, the Revoboard utilizes the PIC18F4550's inbuilt full speed USB transceiver to load the compiled program code Sample Program

Page 207

Introduction to Robotics with Revobot

Here is a sample program to activate the buzzer on the board. This code should be pasted in revobot.c. (Similarly, any program can be created by editing revobot.c or a new C file has to be created and added as a source file)
#include<stdlib.h> #include<p18f4550.h> #include<delays.h> //--------------------------------------------------------------------//NOTE: This section is required to change the interrupt vector //to a new point so as to //prevent the bootloader from being //overwritten. This section should be included in every //program code //--------------------------------------------------------------------#pragma udata extern void _startup (void); #pragma code _RESET_INTERRUPT_VECTOR = 0x000800 void _reset (void) { _asm goto _startup _endasm } #pragma code #pragma code _HIGH_INTERRUPT_VECTOR = 0x000808 void _high_ISR (void) { ; } #pragma code _LOW_INTERRUPT_VECTOR = 0x000818 void _low_ISR (void) { } #pragma code //--------------------------------------------------------------------//The required program code corresponding functionality is to // be entered below this point //--------------------------------------------------------------------//The following code implements the functionality of sounding //the buzzer void main(void) { TRISA=0; PORTAbits.RA3=1; //Turn on the buzzer }

Page 208

Introduction to Robotics with Revobot

CHAPTER 13
How to load a Program in to Revobot
13.1 Programming Revobot A microcontroller in general has no intelligence of its own. Hence, we have to program the microcontroller to instruct it, what task it has to perform. In simpler terms, we embed the microcontroller with intelligence. To do this we have to write a program in C programming language with the required sequence of instructions that we want the microcontroller to perform. When the microcontroller is used in a system like the Revobot, these instructions will relate to actions performed by the Revobot. Now this C program is converted into binary language so that the microcontroller can understand it. The program in binary language is represented as a hex file and this hex file has to be loaded into the microcontroller. This chapter explains how a program can be loaded in to the microcontroller.
NOTE: You dont need to supply power to the board; it will draw power from the USB port

Precondition to load the program to micro controller a. Connect the Revoboard to the USB port of the PC/LAPTOP. b. Open PICDEMFS USB Tool (See the following Screenshot)

Page 209

Introduction to Robotics with Revobot

c. On the Revoboard hold down the BLD SWITCH, push and release the RESET SWITCH once and then release the BLD switch. The board has now entered the Bootload Mode.

NOTE: Step d needs to be performed only the first time the Revoboard is connected to the PC/laptop

d. Windows will start unknown device.

detecting

new

USB

13.2 Installing the PIC USB U SB driver : After performing the step a, step b, step c, the Windows Operating System will pop up a window with the caption of Found New Hardware Wizard. Then select the option Install from a list of specific location (Advanced) from the window (See the following screenshot). Then select the next button to continue with the next step.

Page 210

Introduction to Robotics with Revobot

Select the option Search for the best driver in these locations. Then Select the driver path as C:\MCHPFSUSB\Pc\MCHPUSB Driver\Release using browse button (As shown in the following screen shot.) Then click on Next > button to continue to install the driver.

i. Then the Operating system will search the best driver for the connected hardware. After finding the driver, the Operating system will display a new window with the information completing the found new hardware wizard like the following screenshot

Page 211

Introduction to Robotics with Revobot

13.3 Loading a new program via the USB Bootloader: Bootloader :

REFERENCE ADVANCED USERS:


We need to consider a few things before we can utilize the USB bootloading facility. We need to change the interrupt vectors of the PIC because the default vectors are overtaken by the USB bootloader program that now resides on the PIC (The code corresponding to this action can be observed in the sample code given above.) We need to include a different Linker file (rm18f4550.lkr) which can be located at the following destination: C:\MCHPFSUSB\fw\Demo02\rm18f4550.lkr Finally, we cannot assign the configuration bits as the bootloading program already sets them.

13.3.1 In the drop down menu select PICDEM FS USB 0 (Boot)

Page 212

Introduction to Robotics with Revobot

13.3.2 Click on load hex file. Select the output hex file from location where the project was saved

Page 213

Introduction to Robotics with Revobot

13.3.3 Browse to locate the hex file. It will be present at the location where the workspace was created.

Click on program device. When the screen 13.3.4 shows programming completed press reset on the Revoboard. Then remove the USB cable from the board.

Congratulations! Your Revobot programmed with the required code

has

been

Page 214

Introduction to Robotics with Revobot

CHAPTER 14
How to write a C programming in MPLAB using C-18
14.1 First Program C is a general-purpose, cross-platform, block structured, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories. The language was initially designed to be used with the UNIX operating system. Although C was created for implementing system software, it is also widely used for developing embedded programs due to the large number of C compilers available. C has greatly influenced many other popular programming languages, most notably C++, which originally began as an extension to C. Probably the best way to start learning a programming language is by writing a program. Therefore, let us start with a simple program: Probably the best way to start learning a programming language is by writing a program. Therefore, let us start with a simple program:
1. #include<revobot.h> 2. //----------------------------------------------------3. /*NOTE: This section is required to change the interrupt vector to a new point. So as to prevent the bootloader from being overwritten. This section should be included in every program code */ 4. //----------------------------------------------------5. #pragma udata 6. extern void _startup (void); 7. #pragma code _RESET_INTERRUPT_VECTOR = 0x000800 8. void _reset (void) 9. { 10. _asm goto _startup _endasm 11. } 12. #pragma code 13. #pragma code _HIGH_INTERRUPT_VECTOR = 0x000808 14. void _high_ISR (void) 15. { 16. ; 17. }

Page 215

Introduction to Robotics with Revobot

18. #pragma code _LOW_INTERRUPT_VECTOR = 0x000818 19. void _low_ISR (void) 20. { 21. } 22. #pragma code 23. //----------------------------------------------------24. /*The required program code corresponding functionality is to be entered below this point*/ //----------------------------------------------------25. /*The following code implements the functionality of sounding the buzzer*/ 26. void main(void) 27. { 28. TRISA=0b11110111; 29. initialize(); 30. //Turn on the buzzer 31. PORTAbits.RA3=1; 32. }

Lines 1, beginning with a hash sign (#) are directives for the preprocessor. They are not regular code lines with expressions but indications for the compiler's preprocessor. In this case the directive #include <revobot.h> tells the preprocessor to include the revobot.h standard file. This specific file (revobot.h) includes the declarations, definitions and it is included because its functionality is going to be used later in the program Line 2 to 4 is a comment line. All lines beginning with two slash signs (//) or between (/*) and (*/) are considered as comments and do not have any effect on the behavior of the program. The programmer can use them to include short explanations or observations within the source code itself. In this case, the line is a brief description of requirement of certain code lines. Line 5 to 22 is required to change the interrupt vector to a new point to prevent the bootloader from being overwritten each time a new program code is loaded into the microcontroller. This section should be included in every program code for the above purpose. Amongst these, all line beginning with hash sign (#) are also directive for the compilers preprocessor. Line 26 to 32 is where the programming logic that has to be implemented. These lines correspond to the definition of the main function. The main function is the point by

Page 216

Introduction to Robotics with Revobot

where all C programs start their execution, independently of its location within the source code. It does not matter whether there are other functions with other names defined before or after it - the instructions contained within this function's definition will always be the first ones to be executed in any C program. For that same reason, it is essential that all C programs have a main function. The word main is followed in the code by a pair of parentheses (()). In C syntax, what differentiate a function declaration from other types of expressions are the parentheses that follow its name. Optionally, these parentheses may enclose a list of parameters within them. Right after these parentheses we can find the body of the main function enclosed in braces ({}). What is contained within these braces is what the function does when it is executed. Within main ( ), line 30 is initialize () function which is used to maker all the input pins digital and simultaneously initialize the PWM modules. Line 29 is called TRIS instruction. This instruction is used to set the pins of a particular port in a microcontroller as input or output pins. Let us consider the case in which we are checking the status of an obstacle sensor and in accordance to it, sound a buzzer. Both the obstacle sensor and the buzzer are connected to 0th and 3rd pin of PORTA respectively The rest of the pins are set as input pins. Now considering the obstacle sensor, we have to obtain data from the sensor into the microcontroller, so the pin corresponding to it has to be made an input pin. However, considering the buzzer, we have to send data from the microcontroller to switch it on or off. Hence, the pin corresponding to the buzzer is to be configured as an output pin. To set a particular pin in a particular port as input or output, then its corresponding TRIS bit has to be made 1 or 0 respectively. So considering our example the instruction to set the TRIS bit of PORTA we have to write the following instruction,

Page 217

Introduction to Robotics with Revobot

A microcontroller comprises of a number of pins dedicated for input/output .From a hardware point of view a microcontroller communicates with other devices via these pins, which are electrically connected. Hence, from a programming perspective we only deal with each of the pins to read the output of a device or send an input into a device because each device is physically connected to a pin. For example, the first pin of PORTB is represented as PORTBbits.RB0. If an obstacle sensor is connected to this particular pin, then to check the status of the sensor, we check the status of the pin. The Revobot obstacle sensors give an output of 0 volt when it detects an obstacle; otherwise, its output is 5 volt. In programming terminology, 0 and 5 volts are represented as 0 and 1 respectively. Hence, to check if the obstacle sensor has detected an obstacle, we will write the following code,
if( PORTBbits.RB0==0 )

For starters handling sensors in such a fashion will be a bit out of reach. To deal with this problem the C language has two tools: Macros Functions

Page 218

Introduction to Robotics with Revobot

Now using the above tools, we can represent PORTBbits.RB0 as obstaclesensor and zero as obstacle. This makes the code in a more digestible form as shown below,
if( obstaclesensor == obstacle)

Similarly, we represent number of actual parameters by their corresponding macros as shown below,
MACRO Ws Bs Ob Nob Cw 0 1 0 1 0 APPLICATION PARAMETER DEVICE APPLICABLE

Status of sensor on encountering a white surface Status of sensor while encountering a black surface Status of sensor while encountering an obstacle Status of sensor while encountering no obstacle Direction parameter in speedirr(int r,int dir) function to rotate rightmotor clockwise Direction parameter in speedirr(int r,int dir) function to rotate rightmotor anticlockwise Status of sensor encountering a wall Status of sensor encountering no wall while while

Aw Wall Nowall Light

1 0 1 1

Status of rightldr or leftldr while LDR is encountering light above threshold value Status of rightldr or leftldr while LDR is encountering light below threshold value Status of 0th pin of PORTA Status of 1st pin of PORTA Status of 2nd pin of PORTA

Nolight l0 l1 l2

0 PORTAbits.RA0 PORTAbits.RA1 PORTAbits.RA2

Page 219

Introduction to Robotics with Revobot

Status of l0,l1,l2 together


Value L2 L1 L0 of Mode

off off Mode (PORTA&0b00001 off 11) off on on on on

Off Off On On Off Off On On

Off On Off On Off On Off On

0 1 2 3 4 5 6 7

Rightlse nsor Leftlsen sor Rightos ensor leftosen sor Bld Buzzer Motorra Motorrb Motorla Motorlb motor_r _fwd motor_r _bwd motor_r _stp motor_l _fwd motor_l _bwd

PORTAbits.RA5 PORTEbits.RE0 PORTEbits.RE1 PORTEbits.RE2 PORTBbits.RB4 PORTAbits.RA3 PORTCbits.RC1 PORTDbits.RD0 PORTCbits.RC2 PORTCbits.RC0 PORTCbits.RC1=1 ; PORTDbits.RD0=0 PORTCbits.RC1=0 ; PORTDbits.RD0=1 PORTCbits.RC1=0 ; PORTDbits.RD0=0 PORTCbits.RC2=1 ; PORTCbits.RC0=0 PORTCbits.RC2=0 ; PORTCbits.RC0=1

Output of right line sensor Output of left line sensor Output of right obstacle sensor Output of right obstacle sensor Status of bootload switch Represents buzzer Right motor positive Right motor negative Left motor positive Left motor negative Right motor forward speed at full

Right motor backward at full speed Right motor stop

Left motor forward at full speed Left motor backward at full speed

Page 220

Introduction to Robotics with Revobot

FUNCTION Speedirr(r, dir)

Speedirr(r, dir)

Speedirl(l ,dir)

convert2di gital(chann el)

FUNCTION PARAMETER r can be replaced by any value from 01023 or by any variable containing a similar value which decides the speed, dir can be replaced by cw or aw which determines the direction of rotation r can be replaced by any value from 01023 or by any variable containing a similar value which decides the speed, dir can be replaced by cw or aw which determines the direction of rotation l can be replaced by any value from 01023 or by any variable containing a similar value which decides the speed , dir can be replaced by cw or aw which determines the the direction of rotation Channel can be replaced with any value from 0-12 or any variable which contains a value from 0-12.This determines which ADC channel voltage is being converted. The function will return an integer value corresponding to the analog voltage present at the corresponding ADC channel

DEVICE APPLICABLE

Right motor speed and direction control

Right motor speed and direction control

Left motor speed and direction controll

Analog to conversion

digital

Page 221

Introduction to Robotics with Revobot

initialize()

acquire_ldr _digital_val ues()

Initializes the PWM modules and makes all input pins digital Convert the LDR values to digital logic output

Now let us consider writing a C program to implement the functionality of a line follower using the macros and functions listed above. However, before starting with the program one has to figure out the algorithm for implementing the corresponding functionality. This can be done by creating a flowchart for the same as shown below. Now let us start writing the program code for Line following
Code for line following // Code for line following //----------------------------------------------------------------// header file for Revoboard #include<revobot.h> void main(void) { //setting PORTA as inputs except PA3 TRISA=0b11110111; //setting PORTB as outputs TRISB=0b00000000; //setting PORTC as outputs TRISC=0b00000000; //setting PORTD as outputs TRISD=0b00000000; //setting PORTE as outputs TRISE=0b11111111; //Making the buzzer off buzzer=0; /*Initializing adc, pwm modules and setting PA0, PA1, PA2 AND PA3 pins as analog.*/ initialize(); // loop to perform line follower using 2 sensors while(1) { // if line is between 2 sensors if(rightlsensor==ws && leftlsensor==ws) { // then move forward speedirr(512,cw); speedirl(512,cw);

Page 222

Introduction to Robotics with Revobot

} // if the bot has drifted to the left of the line if(rightlsensor==bs && leftlsensor==ws) { // Then move the bot to the right speedirr(512,aw); speedirl(512,cw); } // if the bot has drifted to the right of the line if(rightlsensor==ws && leftlsensor==bs) { // then move the bot to the left speedirr(512,cw); speedirl(512,aw); } /* if the bot has encountered a black line or surface orthogonal to its path */ if(rightlsensor==bs && leftlsensor==bs) { speedirr(0,cw); // Then move stop speedirl(0,cw); } } } //-----------------------------------------------------------------

Tips to improve performance: o Analyze the track before programming. o Check for sharp turns, smooth turns and long straights o For sharp turns implement a logic in which the wheel to the outer side rotates at full speed and the wheels towards the inner side rotates in the opposite direction. The speed of the inner wheels while rotating backwards should be set according to the curvature of the turn. o For smooth turns implement a logic in which the outer side rotates at full speed and the wheels towards the inner side rotates in the same direction at reduced speed. The speed of the inner wheels while rotating should be set according to the curvature of the turn. o If the layout of the track is known program the Revobot may be programmed in
Page 223

Introduction to Robotics with Revobot

manner to go at high speed (method for smooth turns) in sectors with smooth turns and straights and at low speed (method for sharp turns) in sectors with twists and bends. This will enable the Revobot to follow the line at maximum speed without overshooting it.

Page 224

Introduction to Robotics with Revobot

CHAPTER 15
Sample C Programs
15.1 More Programs
Code for obstacle avoidance // Code for obstacle avoidance //--------------------------------------------------------------------#include<revobot.h> // Header file for Revoboard void main(void) { // Setting PORTA as inputs except PA3 TRISA=0b11110111; // Setting PORTB as outputs TRISB=0b00000000; // Setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer =0; // initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog initialize(); // loop to perform obstacle avoidance while(1) { // if the bot has encountered an obstacle normally if(rightosensor == ob && leftosensor == ob) { // first move the bot backwards speedirr(1000,aw); speedirl(1000,aw); // for a small amount of time Delay10KTCYx(2); // Until the left sensor avoids the obstacle while(leftosensor==0) { // turn to the the right to check for a path speedirr(1000,aw); speedirl(1000,cw); } }

Page 225

Introduction to Robotics with Revobot

// if the left sensor detects an obstacle if(rightosensor==nob && leftosensor==ob) { // then turn to the right to avoid it speedirr(1000,aw); speedirl(1000,cw); } // if the right sensor detects an obstacle if(rightosensor==ob && leftosensor==nob) { // then turn to the left to avoid it speedirr(1000,cw); speedirl(1000,aw); } // if both sensors dont detect any obstacle if(rightosensor==nob && leftosensor==nob) { // then move forward speedirr(1000,cw); speedirl(1000,cw); } } }

Tips to improve performance: Analyze the colour and texture of obstacles before programming. If the colour of obstacles is dark or their have a rough texture then the reflectivity for infrared rays decreases. Hence, range for a tuned obstacle sensor will be less for a darker coloured or rough textured obstacle compared to a lighter coloured or smooth textured obstacle. The forward speed of the Revobot should be set in such a manner that if an obstacle is detected it should be able to steer away from it. If the forward speed is programmed to be very high then, though the sensors may detect the obstacle, the Revobot may collide with the it. This is because there is a small delay for the motor to respond. Another factor may be the lack of traction the wheels can generate from the floor surface.

Page 226

Introduction to Robotics with Revobot

Introduce fail-safe logic concepts like, when the Revobot detects an obstacle on it right and steers to left during which it checks if there are any obstacles on its left. If there is an obstacle on its left also, then it rotates back to the right till it can avoid the obstacle it detected first or move back and steer off in another direction

Code for sumo wrestling // Code for sumo wrestling //--------------------------------------------------------------------// header file for revoboard #include<revobot.h> void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // makin the buzzer off initialize(); // initializing adc,pwm modules and setting PA0,PA1,PA2 //AND PA3 pins as analog buzzer =0; // loop to perform sumobot while(1) { // if bot is drifting out of the ring normally if(rightlsensor == bs && leftlsensor == bs) { // then move backwards speedirl(512,aw); speedirr(1000,aw); // for sometime Delay10KTCYx(800); // then turn right speedirr(512,aw); speedirl(512,cw); // for sometime Delay10TCYx(2);

Page 227

Introduction to Robotics with Revobot

} // if the bot is drifting towards the left and out of the ring if(rightlsensor == ws && leftlsensor == bs) { // then move backwards speedirr(512,aw); speedirl(512,aw); // for sometime Delay10KTCYx(2); // then turn right speedirr(0,aw); speedirl(512,cw); // for sometime Delay10TCYx(2); } // if the bot is drifting towards the right and out of the ring if(rightlsensor==bs && leftlsensor==ws) { // then move backwards speedirr(512,aw); speedirl(512,aw); // for sometime Delay10KTCYx(2); // then turn left speedirr(512,cw); speedirl(0,cw); // for sometime Delay10TCYx(2); } /* if the bot is somewhere inside the ring then.....track down the opponent*/ if(rightlsensor==ws && leftlsensor==ws) { // if opponent is straight in front if(rightosensor ==ob && leftosensor == ob) { // go forward to push the opponent out of the ring speedirr(512,cw); speedirl(512,cw); } // if opponent is on the bots left if(rightosensor==nob && leftosensor==ob) { // then turn left speedirr(512,cw); speedirl(512,aw); } // if opponent is on the bots right if(rightosensor==ob && leftosensor==nob) { // then turn right

Page 228

Introduction to Robotics with Revobot

speedirr(512,aw); speedirl(512,cw); } // if the opponent is not vicinity start search if(rightosensor==nob && leftosensor==nob) { // rotate right speedirr(512,aw); speedirl(512,cw); // for a random period of time Delay10KTCYx(rand()); // move forward speedirr(512,cw); speedirl(512,cw); // for a random period of time Delay10KTCYx(rand()); } } } }

15.2 Tips to improve performance: Analyze the diameter of the ring0020and limit the range to it to prevent detecting obstacles outside the ring. Implement better scanning logic to track your opponents quicker.
Code for pit avoidance // Code for pit avoidance //--------------------------------------------------------------------#include<revobot.h> // header file for revoboard void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer = 0; // initializing adc, pwm modules and setting PA0,PA1,PA2 // AND PA3 pins as analog

Page 229

Introduction to Robotics with Revobot

initialize(); // loop to perform pit avoidance using 2 sensors while(1) { // if no pit is detected by 2 sensors if(rightlsensor==nopit && leftlsensor==nopit) // then move forward { speedirr(512,cw); speedirl(512,cw); } /* if the bot has detected a pit on the left then move back and turn to the right*/ if(rightlsensor==pit && leftlsensor==nopit) { speedirr(200,aw); speedirl(1000,aw); Delay10KTCYx(700); Delay10KTCYx(700); Delay10KTCYx(700); speedirr(512,cw); speedirl(512,aw); } /* if the bot has detected a pit on the right then move back and turn to the left */ if(rightlsensor == nopit && leftlsensor == pit) { speedirr(700,aw); speedirl(512,aw); Delay10KTCYx(700); Delay10KTCYx(700); Delay10KTCYx(700); speedirr(512,aw); speedirl(512,cw); } // if the bot has encountered a pit in front of the robot if(rightlsensor==pit && leftlsensor==pit) { // then move back takin a small turn speedirr(400,aw); speedirl(1000,aw); Delay10KTCYx(700); Delay10KTCYx(700); } } } Code for left left wall following // Code for left wall following //--------------------------------------------------------------------// header file for Revoboard

Page 230

Introduction to Robotics with Revobot

#include<revobot.h> void main(void) { // Setting PORTA as inputs except PA3 Setting TRISA=0b11110111; // PORTB as outputs TRISB=0b00000000; // Setting PORTC as outputs TRISC=0b00000000; // Setting PORTD as outputs TRISD=0b00000000; // Setting PORTE as outputs TRISE=0b11111111; // Making the buzzer off buzzer =0; /* Initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog*/ initialize(); // loop to perform wall following with wall on left while(1) { /* Note :keep the left sensor facing to the left and right sensor facing the front*/ // if the only left sensor detects no wall if(leftosensor==nowall ) { // Then move towards wall speedirr(512,cw); speedirl(211,cw); } // if the right sensor detects a wall while( rightosensor==wall ) { /* Then turn sharply towards the right to avoid the 90 degree bend in the wall*/ speedirr(512,aw); speedirl(512,cw); } // if the bot drifts towards the wall if(leftosensor==wall ) { // then turn away from the wall speedirr(211,cw); speedirl(512,cw); } } } Code for right wall following

Page 231

Introduction to Robotics with Revobot

// Code for right wall following //--------------------------------------------------------------------// header file for Revoboard #include<revobot.h> void main(void) { // Setting PORTA as inputs except PA3 TRISA=0b11110111; // Setting PORTB as outputs TRISB=0b00000000; // Setting PORTC as outputs TRISC=0b00000000; // Setting PORTD as outputs TRISD=0b00000000; // Setting PORTE as outputs TRISE=0b11111111; // Making the buzzer off buzzer =0; /* initializing adc, pwm modules and setting PA0,PA1,PA2 AND PA3 pins as analog*/ initialize(); // loop to perform wall following with wall on right while(1) { /* Note: please keep the right sensor facing the right and left sensor facing the front */ // if the right sensor detects no wall if(rightosensor==nowall ) { // then move towards the wall speedirr(211,cw); speedirl(512,cw); } // if the left sensor detects a wall while(leftosensor==wall ) { /* then turn sharply towards the left to avoid the 90 degree bend in the wall */ speedirr(512,cw); speedirl(512,aw); } // if the bot drifts towards the wall if(rightosensor==wall ) { // then turn away from the wall speedirr(512,cw); speedirl(211,cw); } } }

Page 232

Introduction to Robotics with Revobot

Code for line following with one sensor // Code for line following with one sensor //--------------------------------------------------------------------// header file for revoboard #include<revobot.h> void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer =0; // initializing adc,pwm modules and making all inputs digital initialize(); // loop to perform line follower using 1 sensors while(1) // note: here the bot tries to follow the interface between the black line and the white surface { // if the right sensor detects a black surface if(rightlsensor==bs ) // then turn towards the right { speedirr(0,aw); speedirl(512,cw); } // if the right sensor detects a white surface if(rightlsensor == ws ) // then turn towards the left { speedirr(512,cw); speedirl(0,aw); } } }

Page 233

Introduction to Robotics with Revobot

Code for light following // Code for light following //--------------------------------------------------------------------// header file for revoboard #include<revobot.h> void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTB as outputs TRISB=0b00000000; // setting PORTD as outputs TRISC=0b00000000; // setting PORTC as outputs // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer =0; // initializing adc,pwm modules and making all pins digital initialize(); // loop to perform light follower while(1) { /*compare the ldr values with threshold setting potentiometers to generate digital output*/ acquire_ldr_digital_values() ; // if light is detected in front of the bot then move forward if(rightldr==light && leftldr==light) { speedirr(512,cw); speedirl(512,cw); } // if light is detected on the left of the bot if(rightldr==nolight && leftldr==light) // then turn to the left to follow the light { speedirr(512,cw); speedirl(512,aw); } // if light is detected on the right of the bot if(rightldr==light && leftldr==nolight) // then turn to the right { speedirr(512,aw); speedirl(512,cw); }

Page 234

Introduction to Robotics with Revobot

// if no light is detected in the vicinity of the bot // then keep turning till light is detected in the bots vicinity if(rightldr==nolight && leftldr==nolight) { speedirl(512,cw); speedirr(512,aw); } } } } Code for multifunctionality using mode selection switches Code for multifunctionality using mode selection switches #include<revobot.h> void main(void) { // setting PORTA as inputs except PA3 TRISA=0b11110111; // setting PORTC as outputs TRISB=0b00000000; // setting PORTB as outputs // setting PORTC as outputs TRISC=0b00000000; // setting PORTD as outputs TRISD=0b00000000; // setting PORTE as outputs TRISE=0b11111111; // making the buzzer off buzzer =0; //initialize the PWM modules with frequency of 2.930KHz initialize( ); // infinite loop while(1) { // loop to perform line follower using 2 sensors while(mode==0) { // if line is between 2 sensors then move forward if(rightlsensor==ws && leftlsensor==ws) { speedirr(512,cw); speedirl(512,cw); } /* if the bot has drifted to the left of the line then move the bot to the right */ if(rightlsensor==bs && leftlsensor==ws) { speedirr(512,aw); speedirl(512,cw); }

Page 235

Introduction to Robotics with Revobot

/* if the bot has drifted to the right of the line then move the bot to the left */ if(rightlsensor==ws && leftlsensor==bs) { speedirr(512,cw); speedirl(512,aw); } /* if the bot has encountered a black line or surface orthogonal to its path then stop*/ if(rightlsensor==bs && leftlsensor==bs) { speedirr(0,cw); speedirl(0,cw); } if(mode!=0) break; } // loop to perform obstacle avoidance while(mode==1) { /* if the bot has encountered an obstacle normally first move the bot backwards*/ if(rightosensor==ob && leftosensor==ob) { speedirr(1000,aw); speedirl(1000,aw); // for a small amount of time Delay10KTCYx(2); // until the left sensor avoids the obstacle while(leftosensor==0) // turn to the the right to check for a path {speedirr(1000,aw); speedirl(1000,cw); } } /* if the left sensor detects an obstacle then turn to the right to avoid it*/ if(rightosensor==nob && leftosensor==ob) { speedirr(1000,aw); speedirl(1000,cw); } /* if the right sensor detects an obstacle then turn to the left to avoid it*/ if(rightosensor==ob && leftosensor==nob) { speedirr(1000,cw); speedirl(1000,aw); } // if both sensors dont detect any obstacle then move forward if(rightosensor==nob && leftosensor==nob) {

Page 236

Introduction to Robotics with Revobot

speedirr(1000,cw); speedirl(1000,cw); } if(mode!=1) break; } // loop to perform sumobot while(mode==2) { // if bot is drifting out of the ring normally then move backwards if(rightlsensor==ws && leftlsensor==ws) { speedirr(1000,aw); speedirl(512,aw); // for sometime Delay10KTCYx(800); // then turn right speedirr(512,aw); speedirl(512,cw); // for sometime Delay10TCYx(2); } /*if the bot is drifting towards the left and out of the ring then move backwards*/ if(rightlsensor==bs && leftlsensor==ws) { speedirr(512,aw); speedirl(512,aw); // for sometime Delay10KTCYx(2); // then turn right speedirr(0,aw); speedirl(512,cw); // for sometime Delay10TCYx(2); } // if the bot is drifting towards the right and out of the ring if(rightlsensor==ws && leftlsensor==bs) // then move backwards { speedirr(512,aw); speedirl(512,aw); // for sometime Delay10KTCYx(2); // then turn left speedirr(512,cw); speedirl(0,cw); // for sometime Delay10TCYx(2); } /* if the bot is somewhere inside the ring then.....track down the opponent*/

Page 237

Introduction to Robotics with Revobot

if(rightlsensor==bs && leftlsensor==bs) { /*if opponent is straight in front go forward to push the opponent out of the ring*/ if(rightosensor==ob && leftosensor==ob) { speedirr(512,cw); speedirl(512,cw); } // if opponent is on the bots left then turn left if(rightosensor==nob && leftosensor==ob) { speedirr(512,cw); speedirl(512,aw); } // if opponent is on the bots right then turn right if(rightosensor==ob && leftosensor==nob) { // rotate right speedirr(512,aw); speedirl(512,cw); } // if the opponent is not vicinity start search if(rightosensor==nob && leftosensor==nob) { // rotate right speedirr(512,aw); speedirl(512,cw); // for a random period of time Delay10KTCYx(rand()); // move forward speedirr(512,cw); speedirl(512,cw); // for a random period of time Delay10KTCYx(rand()); } } if(mode!=2) break; } // loop to perform pit avoidance using 2 sensors while(mode==3) { // if no pit is detected by 2 sensors then move forward if(rightlsensor==nopit && leftlsensor==nopit) { speedirr(512,cw); speedirl(512,cw); }

Page 238

Introduction to Robotics with Revobot

/* if the bot has detected a pit on the right then move back and turn to the left*/ if(rightlsensor==pit && leftlsensor==nopit) { speedirr(200,aw); speedirl(1000,aw); Delay10KTCYx(700); speedirr(512,cw); speedirl(512,aw); } /* if the bot has detected a pit on the left then move back and turn to the right */ if(rightlsensor==nopit && leftlsensor==pit) { speedirr(700,aw); speedirl(512,aw); Delay10KTCYx(700); speedirr(512,aw); speedirl(512,cw); } /* if the bot has encountered a pit in front of the robot then move back taking a small turn */ if(rightlsensor==pit && leftlsensor==pit) { speedirr(400,aw); speedirl(1000,aw); } if(mode!=3) break; } // loop to perform wall following with wall on left while(mode==4) // note:please keep the left sensor facing to the left and right sensor facing the front { // if the only left sensor detects no wall if(leftosensor==nowall ) // then move towards wall { speedirr(512,cw); speedirl(211,cw); } while( rightosensor==wall ) // then turn sharply towards the right to avoid the 90 degree bend in the wall { speedirr(512,aw); speedirl(512,cw); }

Page 239

Introduction to Robotics with Revobot

// if the bot drifts towards the wall then turn away from the wall if(leftosensor==wall ) { speedirr(211,cw); speedirl(512,cw); } if(mode!=4) break; } // loop to perform wall following with wall on right // note: please keep the right sensor facing the right and left sensor facing the front while(mode==5) { // if the right sensor detects no wall then move towards the wall if(rightosensor==nowall ) { speedirr(211,cw); speedirl(512,cw); } /* if the left sensor detects a wall then turn sharply towards the left to avoid the 90 degree bend in the wall */ while(leftosensor==wall ) { speedirr(512,cw); speedirl(512,aw); } // if the bot drifts towards the wall then turn away from the wall if(rightosensor==wall ) { speedirr(512,cw); speedirl(211,cw); } if(mode!=5) break; } // loop to perform line follower using 1 sensors /*note: here the bot tries to follow the interface between the black line and the white surface*/ while(mode==6) { /* if the right sensor detects a black surface then turn towards the right */ if(rightlsensor==bs ) { speedirr(0,aw); speedirl(512,cw); } /* if the right sensor detects a white surface then turn towards the left */ if(rightlsensor==ws )

Page 240

Introduction to Robotics with Revobot

{ speedirr(512,cw); speedirl(0,aw); } if(mode!=6) break; } // loop to perform lightfollower while(mode==7) { /*compare the ldr values with threshold setting potentiometers to generate digital output*/ acquire_ldr_digital_values() ; // if light is detected in front of the bot then move forward if(rightldr==light && leftldr==light) { speedirr(512,cw); speedirl(512,cw); } /* if light is detected on the left of the bot then turn to the left to follow the light*/ if(rightldr==nolight && leftldr==light) { speedirr(512,cw); speedirl(512,aw); } if(rightldr==light && leftldr==nolight) // if light is detected on the right of the bot then turn to the right { speedirr(512,aw); speedirl(512,cw); } /* if no light is detected in the vicinity of the bot then keep turning till light is detected in the bots vicinity*/ if(rightldr==nolight && leftldr==nolight) { speedirr(512,aw); speedirl(512,cw); } if(mode!=7) break; } } }

Page 241

Introduction to Robotics with Revobot

CHAPTER 16
Support

Detailed troubleshooting Revobot website.

guides

are

update

on

the

Please visit http://www.revobot.in/support latest copy of our trouble-shooting guide.

to obtain the

Robhatah also provides phone and email support for the Revobot. Please call our support personnel at +91 80 4092 9235 or email at support@robhah.com to get in touch with our Support personnel.

Page 242

Introduction to Robotics with Revobot

INDEX

AC, 46

color codes, 26

AC., 47
Active, 25 Active and Passive Components, 25 Active components, 25, 38 Actuators, 98 Alternating Current. See AC anode, 9 Bevel Gears Gears, 119 Biomorphics, 136 Bipolar Junction Transistor, 39 BLD SWITCH, 210 Breakdown voltage, 32 BRIDGE RECTIFIERS, 52 Brushless DC Motor, 115 Capacitors, 30, 31 Capacitors in parallel, 35 Capacitors in series, 34 cathode, 9 CENTER-TAPPED transformer, 49 circuit, 27

Conductance, 16
Cooperative Robotics, 133 Coupling, 121

Current, 13 current splitting, 15


DC, 46 Diodes, 37 Direct Current. See DC

Domestic Power socket,


48

Domestic Power socket: Body, 48


dopant, 30 dry cells, 11 Electric Current, 13 Electric Power, 23 Electrical circuit, 43 Electrical Potential Difference, 9

Electrical resistance, 16
Electrical Resistance, 16 Electrolytic Capacitors, 33 Electromagnet, 104 Eliminator, 49

Page 243

Introduction to Robotics with Revobot

FILTER CIRCUITS, 55 FULL-WAVE RECTIFIER, 52 FULL-WAVE RECTIFIERS, 52 Gear Ratios, 120 Gears, 117 Ground, 46 GYROSCOPE, 72 half cycle, 54 Half-Wave Rectifier. See RECTIFIER Helical Gears, 118 Humanoids, 132 Humidity Sensors, 96 Hydraulic, 101 Inductor, 35 Industrial Robots, 128 INFRAINFRA-RED, 63 Kirchhoff's Current Law, 60 Kirchhoff's Voltage Law, 61 Laws of Robotics, 126 Light Dependent Resistor, 30 Light emitting diode, 38

Ohms Law, 20 Op-amps, 42 operational amplifier, 41

parallel, 12
Parallel Connection, 29 Passive, 25 Passive components, 25 peak value, 55 photo resistor, 30 PICDEMFS USB Tool, 209 Pneumatic, 99 potential, 9

potential divider, 13
Power, 23 POWER TRANSFORMER, 49 PULSATING DC, 52 Rangefinder, 62 reactive, 43 Rectifier, 50 RECTIFIER, 50

resistance, 16
Resistance, 16 Resistance values, 26

Mobile Robots, 129 Motors, 107

Resistors, 26
roboticist. roboticist , 126

Neuromorphics, 136

Page 244

Introduction to Robotics with Revobot

Series connection, 12, 29


servo motors., 114

Thermistors, 30 Torque, 121 transistor, 38 Variable capacitance diode, 38 Voltage, 9 Voltage regulation diode, 37

Short circuit, 15
Solenoids, 106 Spur Gears, 118 STEP-DOWN transformer, 49 Stepper Motor, 111 STEP-UP transformer, 49

voltage regulator, 13
Worm gears, 119 Zener Diode, 37 zeroth law, 126

switching regulator, 13
Tantalum Capacitors, 34

Page 245

Das könnte Ihnen auch gefallen