Professional Documents
Culture Documents
1. INTRODUCTION
1.1 What is Embedded System : An embedded system is a special-purpose system in which the computer is completely encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal computer, an embedded system performs predefined tasks, usually with very specific requirements. Since the system is dedicated to a specific task, design engineers can optimize it, reducing the size and cost of the product. Embedded systems are often mass-produced, so the cost savings may be multiplied by millions of items. Handheld computers or PDAs are generally considered embedded devices because of the nature of their hardware design, even though they are more expandable in software terms. This line of definition continues to blur as devices expand. 1.1.1 Examples of embedded systems automatic teller machines (ATMs) avionics, such as inertial guidance systems, flight control hardware/software and other integrated systems in aircraft and missiles cellular telephones and telephone switches computer equipment such as routers and printers engine controllers and antilock brake controllers for automobiles home automation products, like thermostats, air conditioners, sprinklers, and security monitoring systems handheld calculators household appliances, including microwave ovens, washing machines, television sets, DVD players/recorders medical equipment handheld computers videogame consoles
1.3 Harsh Environment: Many embedded systems do not operate in a controlled environment. Problems are excessive heat, protection from vibration, shock, lightning, power supply fluctuations, water, corrosion, fire, and general physical abuse. For example, in the Mission Critical example application the computer must function for a guaranteed, but brief, period of time even under non-survivable fire conditions.
1.4 Life cycle support: First a need or opportunity to deploy new technology is identified. Then a product concept is developed. Concurrent product and manufacturing process design, production, and deployment follow this. But in many embedded systems, the designer must see past deployment and take into account support, maintenance, upgrades, and system retirement issues in order to actually create a profitable design. Some of the issues affecting this life-cycle profitability are discussed below. 1.4.1 Component acquisition: Because an embedded system may be more application-driven than a typical technology-driven desktop computer design, there may be more leeway in component selection. For example, the cost of a component generally decreases with quantity, so design decisions for multiple designs should be coordinated to share common components to the benefit of all.
1.4.3 Logistics and repair A failure of the computer can cause the entire system to be unusable until the computer is repaired. In many cases embedded systems must be repairable in a few minutes to a few hours, which imply that spare components and maintenance personnel must be located close to the system. A fast repair time may also imply that extensive diagnosis and data collection capabilities must be built into the system, which may be at odds with keeping production costs low. Because of the long system lifetimes of many embedded systems, proliferation of design variations can cause
2.1 Parallel port 2.1.1 Parallel port basics: In computers, ports are used mainly for two reasons: Device control and communication. We can program PC's Parallel ports for both. Parallel ports are mainly meant for connecting the printer to the PC. But we can program this port for many more applications beyond that. Parallel ports are easy to program and faster compared to the serial ports. But main disadvantage is it needs more number of transmission lines. Because of this reason parallel ports are not used in long distance communications. Let us know the basic difference between working of parallel port and serial port. In serial ports, there will be two data lines: One transmission and one receive line. To send a data in serial port, it has to be sent one bit after another with some extra bits like start bit, stop bit and parity bit to detect errors. But in parallel port, all the 8 bits of a byte will be sent to the port at a time and an indication will be sent in another line. There will be some data lines, some control and some handshaking lines in parallel port. If three bytes of data 01000101 10011100 10110011 is to be sent to the port, following figures will explain how they are sent to the serial and parallel ports respectively. We can understand why parallel port communication is faster compared to that of serial. In the PC there will be D-25 type of female connector having 25 pins and in the printer; there will be a 36-pin Centronics connector. Connecting cable will combine these connecters using following convention. Pin structure of D-25 and Centronics connecters are explained bellow.
2.1.1 Connectors
Normally, data, control and status registers will have following addresses. We need these addresses in programming. Register Data register (Base Address + 0) Status register (Base Address + 1) Control register (Base Address + 2) Note: All the parallel ports do not have bidirectional capability. Earlier parallel ports had only output enabled in data pins since printers only inputs data. But latter, to make parallel port capable of communicating with other devises, bidirectional ports are introduced. By default, data port is output port. To enable the bidirectional property of the port, we need to set the bit 5 of control register. LPT1 0x378 0x379 0x37a LPT2 0x278 0x279 0x27a
To know the details of parallel ports available in your computer, follow this procedure: Right click on My Computer, go to "Properties".
Select the tab Hardware, Click Device manager. You will get a tree structure of devices. In that Expand "Ports (Com1 & LPT)".
Double Click on the ECP Printer Port (LPT1) or any other port if available.
LPT
You will get details of LPT port. Make sure that "Use this Port (enable)" is selected.
Select tab recourses. In that you will get the address range of port. To start programming, you will need a D-25 type Male connector. Its pin structures can be found in the connector as follows:
2.1.2 Pins
outport() function sends a word to port, inport() reads a word from the port. outportb() sends a byte to port and inportb() reads a byte from the port. If you include DOS.H header, these functions will be considured as macro, otherwise as functions. Function inport() will return a word having lower byte as data at PORTID and higher byte as data at PORTID+2. So, we can use this function to read status and control registers together. inportb() function returns byte at PORTID. outport() writes the lower byte to PORTID and higher byte to PORTID+1. So this can be used to write data and control together. outportb() function write the data to PORTID. outport() and outportb() returns nothing. Let us start with inputting first. Here is an example program, copy it and run in Turbo C or Borland C without anything connected to parallel port. Then you should see
bit data :
no.
7654 XXXX
bit :
no. XXXX
7654 0XXX
3210 (0x08 )
2.1.3 Interfacing of Seven Segment with Parallel port: Apparatus: Seven segment C-5611, Parallel Port Connector cord, Jumper Wires Bread Board. Procedure: 1. Open windows 98 as OS 2. Connect the male connector of the parallel port cord to the PC 3. Now connect the Female Connector of cord with seven segment C-5611 as shown in table. Table 2.1.1: Connection between Seven Segment and Female Connector
Seven No.
Segment 1 2 3 4 5 6 7 8 9 10
actuated by an electrical current. The current flowing in one circuit causes the opening or closing of another circuit. Relays are like remote control switches and are used in many applications because of their relative simplicity, long life, and proven high reliability. They are used in a wide variety of applications throughout industry, such as in telephone exchanges, digital computers and automation systems.
2.2.1 How do relays work? All relays contain a sensing unit, the electric coil, which is powered by AC or DC current. When the applied current or voltage exceeds a threshold value, the coil activates the armature, which operates either to close the open contacts or to open the closed contacts. When a power is supplied to the coil, it generates a magnetic force that actuates the switch mechanism. The magnetic force is, in effect, relaying the action from one circuit to another. The first circuit is called the control circuit; the second is called the load circuit.
2.2 example
2.2.1 b. Power Relay: or double-pole units. The power relay is capable of handling larger power loads 10-50 amperes or more. They are usually single-pole
2.2.2
2.2.3 These active semiconductor devices use light instead of magnetism to actuate a switch. The light comes from an LED, or light emitting diode. When control power is applied to the devices output, the light is turned on and shines across an open space. On the load side of this space, a part of the device senses the presence of the light, and triggers a solid state switch that either opens or closes the circuit under control. Often, solid state relays are used where the circuit under control must be protected from the introduction of electrical noises. Advantages of Solid State Relays include low EMI/RFI, long life, no moving parts, no contact bounce, and fast response. The drawback to using a solid state relay is that it can only accomplish single pole switching.
2.2.3 Applications:-
2.3 L293D
2.3.1 Description: The L293D is a monolithic integrated high voltage, high current four channel vriver designed to accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoids, DC and stepping motors) and switching power transistors. To simplify use as two bridges is pair of channels is equipped with an enable input. Aspirate supply input is provided form the logic, allowing operation at a low voltage and internal clamp diodes are included. This device is suitable for use in switching applications at frequencies up to 5 KHz. The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking.
Near Ground
A Versions . . . 2 mV Typ
A Versions . . . 15 nA Typ Maximum-Rated Supply Voltage . . . 32 V(26 V for LM2902) Open-Loop Differential Voltage Amplification . . . 100 V/mV Typ 2.4.2 Description: These devices consist of four independent high-gain frequency-compensated operational amplifiers that are designed specifically to operate from a single supply over a wide range of voltages. Operation from split supplies also is possible if the difference between the two supplies is 3 V to 32 V (3 V to 26 V for the LM2902), and VCC is at least1.5 V more positive than the input common-mode voltage. The low supply-current drain is independent of the magnitude of the supply voltage.
Applications include transducer amplifiers, dc amplification blocks, and all the Conventional operational-amplifier circuits that now can be more easily implemented in single-supply-voltage systems. For example, the LM124 can be operated directly from the standard 5-V supply that is used in digital systems and easily provides the required interface electronics without requiring additional 15-V supplies.
2.5 AT89C2051 2.5.1 Description: The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2 Kbytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high density nonvolatile memory technology and is compatible with the industry standard MCS-51 instruction set and pinout. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2 Kbytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 is
2.5.1
Pin Diagram
2.5.3 Pin Description: 2.5.4 Port 1: Port 1 is an 8-bit bidirectional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pullups.P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 output buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pullups. Port 1 also receives code data during Flash programming and program verification. 2.5.5 Port 3: Port 3 pins P3.0 to P3.5, P3.7 are seven bidirectional I/O pins with internal pullups. P3.6 is hard-wired as an input to the outputof the on-chip comparator and is not accessible as a general purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C2051 as listed below: VCC Supply voltage. GND Ground.
Port 3 also receives some control signals for Flash programming and programming verification. RST Reset input. All I/O pins are reset to 1s as soon as RST
2.5.3 Oscillator Connections Notes: C1, C2 = 30 pF 10 pF for Crystals C1, C2 = 40 pF 10 pF for Ceramic Resonators
3. START VISION
Vision includes a project manager which makes it easy to design applications for an ARM based microcontroller. You need to perform the following steps to create a new project: Start Vision and Create a project file. Select a CPU from the Device Database. Create a new source file and add this source file to the project. Add and configure the startup code for the Device. Set tool options for target hardware. Build project and create a HEX file for Device programming.
The section provides a step-by-step tutorial that shows you how to create a simple Vision project. 3.1 Create a Project File: To create a new project file select from the Vision menu Project New Project. This opens a standard Windows dialog that asks you for the new project file name.We suggest that you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the file name for the new project, i.e. Project1. Vision creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. You can see these names in the Project Workspace Files. 3.2 Select a Device: When you create a new project Vision asks you to select a CPU for your project. The Select Device dialog box shows the Vision device database. Just select the microcontroller you use. We are using for our examples the Philips 80C51RD+ controller. This selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool configuration.
Note: You may select the Extended Linker (LX51) and Extended Assembler (AX51) in this dialog. The extended Linker and Assembler is available in the Keil Professional Developer's Kit and gives you additional features such as variable banking or user class names. When you create a new project, Vision may automatically add the correct device specific CPU startup code for you. On some devices, the Vision environment needs additional parameters that you have to enter manually. Please carefully read the information provided under Description in this dialog, since it might have additional instructions for the device configuration. Once you have selected a CPU from the device database you can open the user manuals for that device in the Project Workspace Books page. These user manuals are part of the Keil Development Tools CD-ROM that should be present in your CD drive.
3.3 Create New Source Files: You may create a new source file with the menu option File New. This opens an empty editor window where you can enter your source code. Vision enables the C color syntax highlighting when you save your file with the dialog File Save As under a filename with the extension *.C. We are saving our example file under the name MAIN.C.
Once you have created your source file you can add this file to your project. Vision offers several ways to add source files to a project. For example, you can select
3.4 Add and Configure the Startup Code: The STARTUP.A51 file is the startup code for the most 8051 CPU variants. The startup code clears the data memory and initializes hardware and reentrant stack pointers. In addition, some 8051 derivatives require a CPU initialization code that needs to match the configuration of your hardware design. For example, the Philips 8051RD+ offers you on-chip xdata RAM that should be enabled in the startup code. Since you need to modify that file to match your target hardware, you should copy the STARTUP.A51 file from the folder C:\KEIL\C51\LIB to your project folder. Group Project Files File group allow you to organize large projects. For the CPU startup code and other system configuration files you may create a own file group in the Project Components,
Environment, Books dialog box. Use the New (Insert) button to create a file group named System Files. In the project window you may drag and drop the STARTUP.A51 file to this new file group.
Now, the Project Workspace Files lists all items of your project. To open a file for editing, double click on the file name in the Project Workspace. You may need to configure the startup STARTUP.A51 in the editor.
3.5 Set Tool Options for Target: Vision lets you set options for your target hardware. The dialog Options for Target opens via the toolbar icon or via the Project - Options for Target menu item. In the Target tab you specify all relevant parameters of your target hardware and the onchip components of the device you have selected. The following the settings for our example are shown.
void delay(unsigned int a) { unsigned int i; for(i=0;i<a;i++) { } } void clockwise(unsigned int pulse) { unsigned int i; while(P1_4==1) { P3=0x55; if(P1_2==0) if(pulse>=2) { pulse=pulse-10; P2=0xF7; delay(500); P2=0xFB; delay(500); P2=0xFD;
delay(10000); P2=0x00; delay(10000); P2=pwlevel(pulse); } for(i=pulse;i>0;i--) P1_6=P1_7=1; for(i=800-pulse;i>0;i--) P1_6=P1_7=0; } } void Anticlockwise(unsigned int pulse) { unsigned int i; while(P1_5==1) { P3=0xAA; if(P1_2==0) if(pulse>=2) { pulse=pulse-10; P2=0xF7; delay(500); P2=0xFB; delay(500); P2=0xFD; delay(500); P2=0xFE;
4. ROBOTICS
4.1 Introduction to Robotics In practical usage, a Robot is a mechanical device which performs automated physical tasks, either according to direct human supervision, a pre-defined program, or a set of general guidelines using artificial intelligence techniques. Robots are typically used to do the tasks that are too dirty, dangerous, difficult, repetitive or dull for humans. This usually takes the form of industrial robots used in manufacturing lines. Other applications include toxic waste cleanup, underwater and space exploration, mining, search and rescue, and mine finding. Recently however, robots are finding their way into the consumer market with uses in entertainment, vacuum cleaning, and lawn mowing. A robot may include a feedback-driven connection between sense and action, not under direct human control, although it may have a human override function. The action may take the form of electro-magnetic motors or actuators (also called effectors) that move an arm, open and close grips, or propel the robot. The step by step control and feedback is provided by a computer program run on either an external or embedded computer or a microcontroller. By this definition, a robot may include nearly all automated devices. Ask a number of people to describe a robot and most of them will answer they look like a human. Interestingly a robot that looks like a human is probably the most difficult robot to make. It is usually a waste of time and not the most sensible thing to model a robot after a human being. A robot needs to be above all functional and designed with qualities that suit its primary tasks. It depends on the task at hand whether the robot is big, small, is able to move or nailed to the ground. Each and every task means different qualities, form and function; a robot needs to be designed with the task in mind.
4.2.1 Mobile Robots: Mobile robots are able to move, usually they perform task such as search areas. A prime example is the Mars Explorer, specifically designed to roam the mars surface. Mobile robots are a great help to such collapsed building for survivors Mobile robots are used for task where people cannot go. Mars Explorer image needs to be searched. Either because it is too dangerous of because people cannot reach the area that
Robots are not only used to explore areas or imitate a human being. Most robots perform repeating tasks without ever moving an inch. Most robots are working in industry settings. Especially dull and repeating tasks are suitable for robots. A robot never grows tired; it will perform its duty day and night without ever complaining. In case the tasks at hand are done, the robots will be reprogrammed to perform other tasks.
Autonomous robots are self supporting or in other words self contained. In a way they rely on their own brains. Autonomous robots run a program that gives them the opportunity to decide on the action to perform depending on their surroundings. At times these robots even learn new behavior. They start out with a short routine and adapt this routine to be more successful at the task they perform. The most successful routine will be repeated as such their behavior is shaped. Autonomous robots can learn to walk or avoid obstacles they find in their way. Think about a six legged robot, at first the legs move ad random, after a little while the robot adjust its program and performs a pattern which enables it to move in a direction.
4.2.5 Biology: Robots are often modeled after nature. A lot of BEAM robots look remarkably like insects. Insects are easy to build in mechanical form. Not just the mechanics are in inspiration also the limited behavior can easily be programmed in a limited amount of memory and processing power. Two basic ways of using effectors are to move the robot around (locomotion) or to move other objects around (manipulation). This distinction divides robotics into two mostly separate categories: mobile robotics (moving) and manipulator robotics (grabbing).Joints connect parts of manipulators. The most common joint types are: rotary (rotation around a fixed axis) prismatic (linear movement) A parallel robot is one whose arms (primary axes) have three concurrent prismatic joints or both prismatic and rotary joints. Degrees of freedom (DOF) means axes of
4.3.1Robot Before the 1960s, robot usually meant a manlike mechanical device (mechanical man or humanoid) capable of performing human tasks or behaving in a human manner. Today robots come in all shapes and sizes, including small robots made of LEGO, and larger wheeled robots that play robot football with a full-size ball. What many robots have in common is that they perform tasks that are too dull, dirty, delicate or dangerous for people. Usually, we also expect them to be autonomous, that is, to work using their own sensors and intelligence, without the constant need for a human to control them. Looked at this way, a radio controlled aero plane is not a robot, nor are the radio controlled combat robots that appear on television. However, there is no clear dividing line between fully autonomous robots and human-controlled machines. For example, the robots that perform space missions on planets like Mars may get instructions from humans on Earth, but since it can take about ten minutes for messages to get back and forth, the robot has to be autonomous during that time.
4.3.1 Where did the word robot originate? The word robot was introduced in 1920 in a play by Karel Capek called R.U.R. or Rossum's Universal Robots. Robot comes from the Czech word robota, meaning forced labour or drudgery. In the play, human-like mechanical creatures produced in Rossum's factory are docile slaves. Since they are just machines, the robots are badly treated by humans. One day a misguided scientist gives them emotions, and the robots revolt, kill nearly all humans and take over the world. However, because they are unable to reproduce themselves, the robots are doomed to die. 4.3.2 What are the Laws of Robotics? The term robotics was coined in the 1940s by science fiction writer Isaac Asimov. In a series of stories and novels, he imagined a world in which mechanical beings were mankind's devoted helpmates. They were constrained to obey what have become known as Asimov's Laws of Robotics: 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 Law.
Now consider the following cards where the rule is every time I go to Paris I go by plane. Which cards have to be turned over to test this? Again, think about your answer before turning the card over.
The answer to the first question is that you have to turn over the E to see if it has an even number on the back and you have to turn over the 7 to check that it does not have a vowel on the back. In an experiment, only 12% of people got this second part right (did you?). The answer to the second question is much easier. Of course you have to turn over the Paris card to check that it has the word plane on the back, but now its much more obvious that you have to turn over the train card to make sure it does not have Paris on the back. In the experiment mentioned above, 60% of people got the second part right. These problems are logically the same, so the experimenters drew the conclusion that the meaning of the symbols is an important part of problem solving. Since robots have very poor language capabilities, their ability to use this kind of reasoning is very limited. Another of the great problems in robotics is getting them to see. Although it is easy to put a camera on a robot, it is much more difficult to get the robot to understand what is in an image. Most humans have miraculously good vision. We are able to resolve great ambiguity in scenes. It has proved much more difficult to get robots to understand
AUTONOMOUS ROBOT Autonomous robots run a program that gives them the opportunity to decide on Autonomous robots are self supporting or in other words self contained. In a way they rely on their own brains to perform depending on their surroundings. At times these robots even learn new behavior. They start out with a short routine and adapt this routine to be more successful at the task they perform. The most successful routine will be repeated as such their behavior is shaped. Autonomous robots can learn to walk or avoid obstacles they find in their way. Think about a four legged robot, at first the legs move ad random, after a little while the robot adjust its program and performs a pattern which enables it to move in a direction The program we develop is as follows:
void display(unsigned short path1); void main() { unsigned short path=1; int i=0; char txt[5]; Lcd_Init(&PORTC); Lcd_Cmd(Lcd_CLEAR); Lcd_Out(1, 1, "Autonomous Robot"); // Initialize LCD connected to PORTC
PORTB.f0=1; PORTB.f1=0;
void display(unsigned short path1) { char txt[5]; ShortToStr(path1,txt); Lcd_Cmd(Lcd_CLEAR); Lcd_Out(1, 1, "Autonomous Robot"); Lcd_Out(2, 1, "Path"); Lcd_Out(2, 6, txt); }
CONCLUSION
An engineer must have a good practical as well as theoretical knowledge. He must be technically sound as book knowledge is incomplete. The technical training was an educative as well as interactive. We learned how to make the people learn. Technical lectures presented by the professional technicians related to topics like Robotics, Assembly language were really interesting and healthy to learn the industrial trends. The additional activities such as a session on Aptitude questions and presentations related to the topics provided the chance for overall development of an engineer. It made us learn about the importance of teamwork. Linux Soft center is a true platform to initiate the step towards professionalism in an engineers life. I am thankful to all the faculty members and Linux soft in charge for supporting my work and for providing a right track.
REFERENCES : http://www.societyofrobots.com http://www.wikipedia.com http://www.epanorma.net http://www.electronicsteacher.com Embedded Systems Muhammad Ali Mazidi Data Sheets
Iam Manish Sharma B.E (E&C) final year student pursing Degree from Kautilya Inst.Of Tech. Engg. ,sitapura, Jaipur .I belong to a Rural village Jatwara in Karouli District. I got 78.83% in Secondary, and 71% in Senior Secondary both of which I have completed from Rajasthan Board, Ajmer . In B.E My aggregate percentage till fifth Sem is 72% my field of interst is Digital Electronics and Communication Engineering. playing cricket and music are my hobbies. Hard working and punctuality are my strong points where as loose temper is my negative point.