Many embedded systems have substantially different design constraints than desktop computing applications. No single characterization applies to the diverse spectrum of embedded systems. However, some combination of cost pressure, long life-cycle, real-time requirements, reliability requirements, and design culture dysfunction can make it difficult to be successful applying traditional computer design methodologies and tools to embedded applications. Embedded systems in many cases must be optimized for life-cycle and business-driven factors rather than for maximum computing throughput. There is currently little tool support for expanding embedded computer design to the scope of holistic embedded system design. However, knowing the strengths and weaknesses of current approaches can set expectations appropriately, identify risk areas to tool adopters, and suggest ways in which tool builders can meet industrial needs.Most educational
institutions' administrators are concerned about student irregular attendance. Truancies can affect student overall academic performance. The conventional method of taking attendance by calling names or signing on paper is very time consuming and insecure, hence inefficient. Radio Frequency Identification (RFID) based attendance system is one of the solutions to address this problem. This system can be used to take attendance for student in school, college, and university. It also can be used to take attendance for workers in working places. Its ability to uniquely identify each person based on their RFID tag type of ID card make the process of taking the attendance easier, faster and secure as compared to conventional method. Students or workers only need to place their ID card on the reader and their attendance will be taken immediately. With real time clock capability of the system, attendance taken will be more accurate since the time for the attendance taken will be recorded. The system can be connected to the computer through RS232 or Universal Serial Bus (USB) port and store the attendance taken inside database. An alternative way of viewing the recorded attendance is by using HyperTerminal software. A prototype of the system has been successfully fabricated.


TABLE OF CONTENT Chapter No Title Page No

1. Introduction 1.1Background 1.2 Definition of a Microcontroller 2. Microcontrollers circuits and connection 2.1 Pin configuration 2.2 Reset circuit 2.3 Bit memory 2.4 Input-output units 2.5 Serial communication 2.6 Timer unit 2.7 LCD Interfacing 2.8 Power supply system 2.8.1 TRANSFORMER 2.8.2 RECTIFIER 2.8.3 REGULATOR 3 RFID module . 3.1 History of RFID


9 10 11 14 14 15 15 16 16 17 17 18 18 19 19 20 22 23 24 25 28 29 29 29 29 30 31 32 33 34 35 38 38 39 39 40 42 49 49 49

3.2 RFID Reader 3.3 RFID Tag 4 Components of RFID 4.1 Antenna 4.2 TAGS (Transponders) 4.3 RF Transceiver 5. Logical Structure 5.1 Explanation 5.1.1 Microcontroller 5.1.2 MAX232 5.1.3 LCD 5.2 Circuit Diagram 5.2.1 About 89C51 Microcontroller 5.2.2 IC 7805 5.2.3 Disc Capacitor

6. PCB Construction 6.1 Basics about PCB
7. Working of RFID module 7.1 Basic Working 7.2 Software Tools 7.3 Microcontroller Program 8. Advantages 8.1 Advantages of RFID Over Bar Coding 8.2 Advantages

8.3 Disadvantages 9. Conclusion 10 References .

49 50 51



These integrated circuits contained both processor and peripherals.  Home automation products like thermostat.1 BACKGROUND Circumstances that we find ourselves in today in the field of microcontrolle r s h a d t h e i r beginnings in the development of technology of integrated circuits.Copiers. Further increasing of thevolume of the package resulted in creation of integrated circuits.That is how the first chip containing a microcomputer or what would later known as a MCROCONTROLLER. such as inertial guidance systems. That was a prerequisitef o r p r o d u c t i o n o f m i c r o p r o c e s s o r s . including routers timeservers and firewalls  Computer printers.  Disk drives (floppy disk drive and hard disk drive)  Engine controllers and antilock brake controllers for automobiles. timers and other. air conditioners sprinkles andsecurity monitoring system.  House hold appliances including microwave ovens. inputoutput lines.  Cellular telephones and telephonic switches. washing machines.1. l o g i c 6 .  Avionic.  M e a s u r e m e n t e q u i p m en t s u c h a s d i g i t a l s t o r a g e o s c i l l o s c o p e s . This development has made it possible to store hundreds of thousands of transistors into one chip. EXAMPLES OF EMBEDDED SYSTEM:  Automated tiller machines (ATMS).  Medical equipment . flight control hardware / software and letter integrated system in aircraft and missile. TVsets DVD players/recorders.  Computer network equipment. a n d t h e f i r s t c o m p u t e r s w e r e m a d e b y a d d i n g e x t e r n a l peripherals such as memory.

analyzers and spectrum analyzers. washing machines. The current proposal addresses only a few of these technical areas. Basically there are two reasons for this trend: programs for embedded systems become more complex (and hence are difficult to maintain in assembly language). the remote control you are using probably has microcontrollers inside that dodecoding and other controlling functions.microwave ovens. Various technical areas have been identified where functionality offered by processors (such as DSPs) that are used in embedded systems cannot easily be exploited by applications written in C. small hand held computer With P1M5 and other applications. toys . usage of different memory spaces. where automation is needed. and processor models for embedded systems have a decreasing lifespan (which implies more frequent re-adapting of applications to new instruction sets). 1. The code re-usability achieved by C-level programming is considered to be a major step forward in addressing these issues.  Personal digital assistants (PDA’s).  Multimedia appliances: internet radio receivers.. are small controllers. They are also used in automobiles.For example. etc.. low level I/O operations and others.  Programmable logic controllers (PLC’s) for industrial automation andmonitoring. i. as the name suggests. Embedded processors are often used to analyze analogue signals and process these signals by applying filtering algorithms to the data received. Examples are fixed-point operations.e. In the fast growing market of embedded systems there is an increasing need to write application programs in a high-level language such as C. TV set top boxes. They are like s i n g l e c h i p computers that are often embedded into other systems to function as processing/controlling unit.  Stationary video game controllers. Typical applications can be found in all wireless 7 ..  Wearable computers.2 Definition of a Microcontroller Microcontroller.

• • Field Programmability. currently leaving programmers with no option but to handcraft most of their algorithms in assembly language.Many embedded processors have multiple distinct banks of memory and require that data be grouped in different banks to achieve maximum performance. The C language (as defined in ISO/IEC 9899:1999) does not provide support for fixed-point arithmetic operations. As a result. this Technical Report specifies basic support for multiple address spaces. The development package of 8 . The key features of microcontrollers include: • • High Integration of Functionality. • Easy to UseAssembly language is often used in microcontrollers and since they usually follow RISCarchitecture. the instruction set is small. to read data from two separate memories in a single cycle to maximize execution speed. Once the program is tested to be correct then large quantities of microcontrollers can be programmed to be used in embedded systems. is critical to their operation. Ensuring the simultaneous flow of data and coefficient data to the multiplier/accumulator of processors designed for FIR filtering. and in order to achieve the necessary speed. In order to allow the programmer to declare the memory space from which a specific data object must be fetched. for example. embedded processors are often equipped with special hardware for fixed-point data. This Technical Report specifies a fixed-point data type for C. for instance.devices. Microcontrollers sometimes are called single-chip computers because they have on-chip memory and I/O circuitry and other circuitries that enable them to function as small standalone computers without other supporting circuitry. optimizing compilers can utilize the ability of processors that support multiple address spaces. The common data type used in filtering algorithms is the fixed-point data type. definable in a range of precision and saturation options. Optimizing C compilers can generate highly efficient code for fixed-point data as easily as for integer and floating-point data. Flexibility Microcontrollers often use EEPROM or EPROM as their storage device to allow field programmability so they are flexible to use.

. lecturer will give a piece of attendance paper and students will check their name and then will sign on it. To handle a large amount of student may be problem especially to get the attendance. Normally. RFID technology differs from bar codes. backpack or purse. When activated. Technology spread very fast. In our country. The problem also will happen when lecturer forget to bring the attendance paper to class. this technology already been used for several years in certain place such as in Highway using card ‘Touch N Go’ and our government also apply this technology by using RFID as I.microcontrollerso f t e n i n c l u d e s a n a s s e m b l e r . 9 . RFID can read the tag using RF. animal. there is not impossible if RFID will replace the barcode system in today’s life. a s i m u l a t o r . RFID tags are not an "improved bar code" as the proponents of the technology would like you to believe. or person. wallet. right through your clothes. a p r o g r a m m e r t o " b u r n " t h e c h i p a n d demonstration board. process to get attendance in majority universities still used the manual process. the attendance paper need much time to sign by all students especially for class with a lot of student. Now. The manual process means that when start the class/lecture.C (identification card). the tag transmits data back to the antenna. lecturer will take back the attendance paper and keep it as a record. The suitable solution for this problem is by design a system that will record attendance automatic. Nowadays. RFID (radio frequency identification) is a new technology that incorporates the use of electromagnetic or electrostatic coupling in the radio frequency (RF) portion of the electromagnetic spectrum to uniquely identify an object. they prefer to used Barcode which is cheaper than RFID. Besides the RFID tag consist of unique ID for each tag. Some packages include a high level language compiler such as a Compiler and more sophisticated libraries. An RFID system consists of three components: an antenna and transceiver (often combined into one reader) and a transponder (the tag). meaning that the RFID reader can be read from a distance. there are lots of universities around our country and each of the university consists of student up to 10 thousand. Some places. The antenna uses radio frequency waves to transmit a signal that activates the transponder. At the end of class. Students need to write their name on a piece of paper and sometimes student will take change to cheat in process getting the attendance. In few years later. The technology used in RFID has been around since the early 1920s. Students also forget to sign that attendance and they were assuming absent that class.

. port2. INT1: External interrupt for timer1 T0: Timer0. The pins of the micro controller are explained below Reset: It resets total microcontroller.1 PIN CONFIGURATION: We have 4 ports in 8051 micro controller.ALE: Address latch enable which is used to access the address locations from external memory. port1. . INT0: External interrupt for timer 0. port3 which canbe accessed as i/o ports. T1: Timer1. TXD: It transmits data in serial communication.CHAPTER 2 MICROCONTROLLER CIRCUITS AND CONNECTIONS: 2. They are port0. RXD: It receives data in serial communication.

or more wires. That way is called as BUS. A i s connected to Vcc in case of 8051. With the help of this oscillator we will deduce the execution speed in terms of bytes/ sec. gives the user the ability to acess a n u m b e r o f bit variables. T h e r e a r e t w o t y p e s o f b u s e s : a d d r e s s a n d d a t a b u s .3 BIT MEMORY: The 8051.It generates 12 clock pulses /machine cycle.PSEN: Program store enable which is used for storing programmingcode into the external memory. EA: External Access: 64 KB of ROM is the limit for external memory. Capacitors provide charge for crystal oscillator.2 RESET CIRCUIT: Reset circuit of microcontroller Capacitor is storing charge permanently until we use it. If we are not connecting any external memory to micro controller. 16. T h e f i r s t one consists of as many lines as the amount of memory we wish to address and the other one is as wide as data. 2. T h e s e v a r i a b l e s m a y b e e i t h e r 1 o r 0 . The user may make use of these variables with commands such as SETB and CLR. Physically. it represents a group of 8. in our case 8 bits or the . Crystal Oscillator is used to generate a carrier signal with stable frequency. It is important to note that Bit Memory is really a p a r t o f I n t e r n a l R A M . 2. being a communication oriented microcontroller.

The number of lines t i m e s ’ n u m b e r o f kilometers doesn't promise the economy of the project. These rules are called protocol. However. When working with ports.5 Serial communication: Beside stated above we've added to the already existing unit the p o s s i b i l i t y o f c o m m u n i c a t i o n with an outside world. a n d t h e t h i r d o n e i s used as a reference line for both the input and the output side. 2. if one man is speaking in French. It leaves us having to reduce the number of lines in such a way that we don't lessen its functionality. 2. and then to send data to. In order for this to work. and the other in English. o t h e r f o r r e c e i v i n g . Suppose we are working with three l i n e s o n l y . a n d t h a t o n e l i n e i s u s e d f o r s e n d i n g d a t a . .or take it from the port. First one serves to transmit address from CPU m e m o r y . One of the basic drawback i s t h e n u m b e r o f l i n e s which need to be used in order to transfer data.4 Input-output unit: Those locations we’ve just added are called “ports”. There are several types of ports: Input. For example. output or bidirectional ports. first of all it is necessary to choose which port we need to work with. a n d t h e second to connect all blocks inside the microcontroller. this way of communicating has its drawbacks.connection line. it is highly unlikely that they will quickly and effectively understand each other. Protocol is therefore defined in advance so there would not be any misunderstanding between the sides that are communicating with each other. we need to set the rules of exchange of data.

in order to utilize it in industry we need a few additionally blocks. Beside a microcontroller. E v e r y t h i n g i s s a m e a s w e have done in the initialization routine.2. protocol etc. Sending Commands to LCD To send commands we simply need to select the command register. so that by taking its value during periods T1and T2 and on the basis of their difference we can determine how much time has elapsed. This is a very important part of the microcontroller whose understanding requires most of our time. we can receive. send and process data. duration. But we will summarize the common steps and put the min a single subroutine.6 TIMER UNIT: Since we have the serial communication explained. or various peripheral control devices.7 LCD INTERFACING: Speeds. Select write operation. Wait for LCD to process the command. The internal operation of the LCD is determined by signals sent from the MCU. Timer unit generating signals in regular time intervalsHowever. Select command register. The basic unit of the timer is a free-run counter which is in fact a r e g i s t e r w h o s e numeric value increments by one in even intervals. and a few more elements which make up i n t e r f a c e l o g i c towards the elements of regulation (which will be discussed next). a microcontroller alone is not enough. Send enable signal. 2. One of those is the timer block which is significant to u s b e c a u s e it can give us information about time. we need a p r o g r a m t h a t would be executed. . Microcontroller outline with basic elements and internal connections For a real application. Following are the steps: • • • • • Move data to LCD port.

When an alternating voltage is applied across the primary coil . This flux induces voltage in secondary coil. Transformers are classified as: (a) Based on position of the windings with respect to core i. diode rectifier. linked by the common magnetic flux. Transformers play a major role in the transmission and distribution of ac power.a current flows in the primary coil producing magnetic flux in the transformer core. or equipment in the laboratory.8 POWER SUPPLY SYSTEM: Circuit of power supply The power supply consists of ac voltage transformer. Primary and secondary coils are wound upon the two cores of the magnetic frame. ripple filter.8. and voltage regulator. diode rectifier. The power supply consists of ac voltage transformer. The description of the components is shown below: 2.e.(1) core type transformer (2) shell type transformer (b) transformation ratio(1) step up transformer(2) step down transformer DC power supply exists in every electronic box whether it is a computer. power remains the same during the transformation. ripple filter. A transformer consists of laminated magnetic core forming the magnetic frame. and voltage .However.1 TRANSFORMER: The transformer is a static electro-magnetic device that transforms one alternating Voltage (current) into another voltage (current). TV. PRINCIPLE: Transformer works on the principle of mutual induction.2.

The power supply that we are building in this experiment is a linear power supply.. the circuit functions with analog signals. around a common magnetic core. In the experiment. A positive voltage i s needed on the p-side to make the diode conduct.3 REGULATOR: To make the output voltage as constant as possible. It can also be an IC component with voltage reference and feedback control circuit inside . IN4001 can block off large negative bias in thehundred voltage range. I t h a s t w o c o i l windings. ripple filter and voltage regulator. The most important thing to know is the polarity of the diode. 2. . The ratio of turns in the two windings determines the ratio of the input voltage and output voltage.w a v e rectifier or four diodes forming a full-wave rectifier or a bridge rectifier.. diode rectifier. In our kit. the primary and the secondary. The regulator consists of a voltage reference.8.g. we have a small transformer which can convert 230Vac from the wall plug to 6-12 V ac.2 RECTIFIER: The rectifier is based on p-n junction. In other words. The arrow is the p-side and the bar is the n-side.8. 2. The current flowing in the primary winding generates a time varying electromagnetic field which in turn induces an output voltage across the secondary winding. 1N4001 or IN4007 . e. The Transformer is an ac device. a Zener diode.transformer. You can read f r o m t h e specification sheet the characteristics of the diode. One can use a single diode f o r m i n g a h a l f . wea r e g o i n g t o u s e t h e p o w e r rectifyin g diode. one needs a regulator.

the reader unlocked the door. and a person can leave the store.Chapter 3 RFID MODULE 3.1 History of RFID It’s generally said that the roots of radio frequency identification technology can be traced back to World War II. received a patent for a passive transponder used to unlock a door without a key. Europe and Japan did research and presented papers explaining how RF energy could be used to identify objects remotely. Advances in radar and RF communications systems continued through the 1950s and 1960s. A card with an embedded transponder communicated a signal to a reader near the door. Charles Walton. When the reader detected a valid identity number stored within the RFID tag. 1973. There are a lot of advantages in RFID system. The Germans. memory capacity and their capability. But if the person doesn't pay and tries to walk out of the store. readers at the door detect the tag and sound an alarm. RFID readers and tags communicate through a distance using radio waves. Scientists and academics in the United States. The First RFID Patents Mario W. The problem was there was no way to identify which planes belonged to the enemy and which were a country’s own pilots returning from a mission. patent for an active RFID tag with rewritable memory on January 23. That same year. Cardullo claims to have received the first U. Americans and British were all using radar which had been discovered in 1935 by Scottish physicist Sir Robert Alexander Watson-Watt to warn of approaching planes while they were still miles away. and its footprint is small and usually use in car immobilizer applications where the IC has to fit in a tiny glass tube buried in the key. If someone pays for the item. included their price. which are still used in packaging today. The pure memory-based RFID chip without a co-processor is cheap. a California entrepreneur. RFID fast processing speed is also essential. size. have a 1-bit tag. Companies began commercializing anti-theft systems that used radio waves to determine whether an item had been paid for or not. Electronic article surveillance tags. the bit is turned off.S. Japanese. Walton licensed the . The bit is either on or off. RFID is commonly used to transmit and receive information without wires. Radio Frequency Identification (RFID) research and discovery began in earnest in the 1970s.

and other companies. A transponder encapsulated in glass could be injected under the cows’ skin. IBM sold its patents to Intermec. international standards. began using it to track reusable containers and other assets. When it ran into financial trouble in the mid-1990s. featuring smaller transponders. companies developed a low-frequency (125 kHz) system. High frequency offered greater range and faster data transfer rates. a lock maker. a bar code systems provider.56 MHz). UHF offered longer read range (up to 20 feet under good conditions) and faster data transfer. which was unregulated and unused in most parts of the world.theft device in cars. payment systems (Mobile Speedpass) and contactless smart cards. Low frequency transponders were also put in cards and used to control the access to buildings. but never commercialized this technology. Over time.56 MHz RFID systems are used for access control. A reader in the steering column reads the passive RFID tag in the plastic housing around the key. If it doesn’t get the ID number it is programmed to look for. Intermec RFID systems have been installed in numerous different applications.technology to Schlage Lock of San Francisco. But the technology was expensive at the time due to the low volume of sales and the lack of open. IBM engineers developed and patented an ultra-high frequency (UHF) RFID system. . Today. from warehouse tracking to farming. Later. This system is still used in cows around the world today. particularly those in Europe. In the early 1990s. Companies. the car won't start. IBM did some early pilots with Wal-Mart. companies commercialized 125 kHz systems and then moved up the radio spectrum to high frequency (13. They’re also used as an anti. 13.

. It is possible to configure an RFID reader so that it sends the radio pulse only in response to an external event.3. RFID readers come in many size. Like the tag themselves. most electronic toll collection systems have the reader constantly powered up so that every passing car will be record ed. RFID readers are usually on. For example. the reader’s RF signal can contain commands to the tag.56MHz. Because of the major application used in worldwide. Historically. Nowadays lot of RFID reader sold with multiple brands such as Mifare.2kHz for example). Most systems available on the world market at present operate at one of the following frequencies or frequency ranges: below 135 kHz (125 kHz. for some applications.8GHz. and even passwords. Thus.2 RFID Reader The RFID reader sends a pulse of radio energy to the tag and listens for the tag’s response. RFID scanners used in veterinarian’s offices are frequently equipped with triggers and power up the only when the trigger is pulled. The tag detects this energy and sends back a response that contains the tag’s serial number and possibly other information as well. The largest readers might consist of a desktop personal computer with a special card through shielded cable. but so-called multimode readers that can read many different kinds of tags are becoming increasingly popular. and therefore each of them is more appropriate for certain types of application or certain countries. UHF (860/960 MHz). In simple RFID systems. The operating and control characteristics are different for each of these frequencies. the reader’s pulse of energy functioned as an on-off switch. 13. However. in more sophisticated systems. instructions to read or write memory that the tag contains. this is unnecessary and could be undesirable in battery-powered devices that need to conserve energy. RFID reader were designed to read only a particular king of tag. 134. The smallest readers are the size of a postage stamp and are designed to be embedded in mobile telephones. many systems require the simultaneous use of more than one operating frequency. and Philip. 2. continually transmitting radio energy and awaiting any tags that enter their field of operation. Hitachi.45GHz and 5. On the other hand. Such A reader would typically have a network connection as well so that it could report tags that it reads to other computers.

although they can help achieve more accuracy and better detection range. . when needed. also known as the transponder (derived from the terms transmitter and responder). essentially a microprocessor chip. We will refer to chip less tags explicitly. The most common tags today consist of an Integrated Circuit with memory. usually a small battery. Chip less tags are more effective in applications where simpler range of functions is all that is required. whereas active tags require a power source. holds the data that is transmitted to the reader when the tag is interrogated by the reader. Passive tags require no internal power source. we will use the term tag to mean Integrated Circuit-based tag.3. From here on out. RFID tags come in two general varieties which are passive and active tag. at potentially lower cost than their Integrated Circuit-based counterparts.3 RFID Tag The tag. thus being pure passive devices (they are only active when a reader is nearby to power them). Other tags are chip less and have no onboard Integrated circuit.

The reader emits radio waves in ranges of anywhere from one inch to 100 feet or more. which controls the system's data acquisition and communication. a sensor device can activate the field.1 ANTENNA The antenna emits radio signals to activate the tag and read and write data to it. When an RFID tag passes through the electromagnetic zone. which can be configured either as a handheld or a fixed-mount device. interrogator). Often the antenna is packaged with the transceiver and decoder to become a reader (a. Antennas are available in a variety of shapes and sizes. it detects the reader's activation signal. If constant interrogation is not required. depending upon its power output and the radio frequency used.a. . or mounted on an interstate tollbooth to monitor traffic passing by on a freeway.k. The reader decodes the data encoded in the tag's integrated circuit (silicon chip) and the data is passed to the host computer for processing. The electromagnetic field produced by an antenna can be constantly present when multiple tags are expected continually. they can be built into a door frame to receive tag data from persons or things passing through the door.Chapter 4 COMPONENTS OF RFID A basic RFID system consists of three components: An antenna or coil • A transceiver (with decoder) • A transponder (RF tag) electronically programmed with unique information These are described below: • 4. Antennas are the conduits between the tag and the transceiver.

weight. Tags come in a variety of types. which is pre-written onto them by the tag manufacturer or distributor. batch or lot number. as well as on fixed assets such as trailers. (2) "Write once" tags enable a user to write data to the tag one time in production or distribution processes. (3) Full "readwrite" tags allow new data to be written to the . etc. an unlimited list of other types of information can be stored on RFID tags. destination and history (such as the temperature range to which an item has been exposed). or license plate number. totes. containers.Antenna 4. this may include a serial number. with a variety of capabilities. Any updates to that information would have to be maintained in the application software that tracks SKU movement and activity. cases or pallets for identification purposes. This increases the options for the type of information that can be encoded on the tag. however is that RFID tags have a higher data capacity than their bar code counterparts. An RFID tag can be placed on individual items. These are generally the least expensive tags because they cannot have any additional information included as they move throughout the supply chain. ownership. In fact. At its most basic.2 TAGS (Transponders) An RFID tag is comprised of a microchip containing identifying information and an antenna that transmits this data wirelessly to a reader. A key difference. the chip will contain a serialized identifier. Key variables include: "Read-only" versus "read-write" There are three options in terms of how data can be encoded on tags: (1) Read-only tags contain data such as a serialized tracking number. depending on application needs. including the manufacturer. that uniquely identifies that item. similar to the way many bar codes are used today. but perhaps other data such as a lot or batch number. Again.

e. RFID TAGS Data capacity The amount of data storage on a tag can vary. Form factor The tag and antenna structure can come in a variety of physical form factors and can either be selfcontained or embedded as part of a traditional label structure (i. For example. On the other hand. .tag as needed—and even written over the original data. cartons on the pallet have RFID tags inside bar code labels that also provide operators human-readable information and a backup should the tag fail or pass through non RFID-capable supply chain links. While these are the most costly of the three tag types and are not practical for tracking inexpensive items. a pallet may have an RFID tag fitted only to an area of protected placement on the pallet itself.. Of course. ranging from 16 bits on the low end to as much as several thousand bits on the high end. future standards for electronic product codes (EPC) appear to be headed in this direction. the tag is inside what looks like a regular bar code label—this is termed a 'Smart Label') companies must choose the appropriate form factors for the tag very carefully and should expect to use multiple form factors to suit the tagging needs of different physical products and units of measure. the higher the price per tag. the greater the storage capacity. Examples for the latter capability might include the time and date of ownership transfer or updating the repair history of a fixed asset.

low-frequency tags are cheaper than ultra high. But they use more power and are less likely to pass through some materials. performance and application requirements. In a sense.frequency (UHF) tags. While the tag requirements for compliance mandates may be narrowly defined. such as fruit.Passive versus active “Passive” tags have no battery and "broadcast" their data only when energized by a reader. come with a cost. at close range. . Frequencies Like all wireless communications. will use the less expensive passive tags. the EPC movement is combining the data standards embodied in certain bar code specifications. such as the UPC or UCC-128 bar code standards. including an emerging standard for the tags themselves. UHF frequencies typically offer better range and can transfer data faster. That means they must be actively polled to send information." an emerging specification for RFID tags. EPC represents a specific approach to item identification. including both the data content of the tag and open wireless communication protocols. such as the RFID-based tracking and compliance programs emerging in the consumer goods retail chain. paper. active tags are much more likely to be used for high-value items or fixed assets such as trailers. where the cost is minimal compared to item value. Most traditional supply chain applications. In general. "Active" tags are capable of broadcasting their data using their own battery power. UHF tags might be better for scanning boxes of goods as they pass through a bay door into a warehouse. Compared to low-frequency tags. Again. Today. and very long read ranges are required. it is likely that a variety of tag types will be required to solve specific operational issues. cardboard or clothing products. This organization has provided significant intellectual leadership toward the use and application of RFID technology. The extra capability and read ranges of active tags. they are several times more expensive than passive tags. UHF tags are typically best suited for use with or near wood. They are ideal for scanning objects with high water content. versus 15 feet or less for most passive tags. this means that the read ranges are much greater for active tags than they are for passive tags—perhaps a read range of 100 feet or more. EPC Tags EPC refers to "electronic product code. You will want to work with a company that is very knowledgeable in tag and reader technology to appropriately identify the right mix of RFID technology for your environment and applications. however. use less power and are better able to penetrate non-metallic substances. there are trade-offs among cost. For instance. with the wireless data communication standards that have been developed by ANSI and other groups. readers and business applications first developed at the Auto-ID Center at the Massachusetts Institute of Technology. there are a variety of frequencies or spectra through which RFID tags can communicate with readers.

3 RF Transceiver: The RF transceiver is the source of the RF energy used to activate and power the passive RFID tags. .4. the transceiver is commonly referred to as an RF module. The RF transceiver controls and modulates the radio frequencies that the antenna transmits and receives. The transceiver filters and amplifies the backscatter signal from a passive RFID tag. The RF transceiver may be enclosed in the same cabinet as the reader or it may be a separate piece of equipment. When provided as a separate piece of equipment.

1 Explanation: 5.2 MAX232: Microcontroller communicates with the PC using its inbuilt Serial Port. The voltage levels are 0 & 5 Volts. 5.1.1 Microcontroller: It is the Heart of the circuit.1. We will be using PHILIPS P89V51RD2 microcontroller. but for the controller to communicate with the PC we are using RS232 protocol so for .Chapter 5 Logical Structure 5. The controller communicates with the RFID reader & the PC using RS232 protocol for which MAX 232 IC is required. which is a 40 pin microcontroller with 32 I/O lines. The controller that we will be using is PHILIPS P89V51RD2 .

pin 2 or pin 15. FEATURES: • 5 x 8 dots with cursor • Built-in controller (KS 0066 or Equivalent) • + 5V power supply (Also available for + 3V) • 1/16 duty cycle • B/L to be driven by pin 1. 16 characters LCD.V.K (LED) • N.3 LCD: We will be using 2-Line.1. This will be used to display the real time. scan successful or not and other such details. optional for + 3V power supply .converting the CMOS (0-5) voltage levels into RS232 (±12) voltage levels we will be using MAX 232. 5. pin 16 or A.

5.2 Circuit Diagram .

Three 16-bit timers/counters.2. 14.5. 4. 11.2. 64 kB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming). The Flash program memory supports both parallel programming and in serial In-System Programming (ISP). Second DPTR register. The capability to field/update the application firmware makes a wide range of applications possible. 5 V Operating voltage from 0 to 40 MHz 5. 3. 80C51 Central Processing Unit. SPI (Serial Peripheral Interface) and enhanced UART. PCA (Programmable Counter Array) with PWM and Capture/Compare functions. Parallel programming mode offers gang-programming at high speed. 5. 7.2 Description The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and 1024 bytes of data RAM. Another way to benefit from this feature is to keep the same performance by reducing the clock frequency by half. thus dramatically reducing the EMI.1 Features 1. A key feature of the P89V51RD2 is its X2 mode option. The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and 1024 bytes of Data RAM. ISP allows a device to be reprogrammed in the end product under software control. 10. The design engineer can choose to run the application with the conventional 80C51 clock rate (12 clocks per machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the same clock frequency. 13.1. 15. Supports 12-clock (default) or 6-clock mode selection via software or ISP. TTL. 9. Low EMI mode (ALE inhibit). . reducing programming costs and time to market.1.and CMOS-compatible logic levels. Programmable Watchdog timer (WDT).1 ABOUT P89V51RD2 MICROCONTROLLER 5. A key feature of the P89V51RD2 is its X2 mode option. Eight interrupt sources with four priority levels. 12.2. 6. 2. 8. Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each).

8V-5.2 IC 7805 7805 is a voltage regulator integrated circuit. 5V (4.2. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels. 5.2V) Name Input Ground Output . The voltage regulator IC maintains the output voltage at a constant value. It is a member of 78xx series of fixed linear voltage regulator ICs. 7805 provides +5V regulated power supply.The P89V51RD2 is also In-Application Programmable (IAP). The xx in 78xx indicates the fixed output voltage it is designed to provide. allowing the Flash program memory to be reconfigured even while the application is running. The voltage source in a circuit may have fluctuations and would not give the fixed voltage output. Pin Diagram: Pin Description: Pin No 1 2 3 Function Input voltage (5V-18V) Ground (0V) Regulated output.

Crimped or straight leads. . You'll recall that the basic definition of a capacitor is two conductors separated by an insulator (dielectric) of some kind.5. Imagine a thick coin of some kind.3 Disc Capacitor A ceramic disc capacitor is a capacitor constructed with a ceramic disc as the dielectric. but made of ceramic. As a charge is driven onto one plate of a capacitor.2. voltage) builds. the extra charge there builds up an electric field. Just dip the capacitor into a phenolic or epoxy to coat it and it's ready to go. please? Use the link below to view some pictures. If you coat each face with metal and attach a lead to it. Note that the edges of the disc are left uncoated. Let's build one to see how it works. And the leads are a dead giveaway to their through-hole use. are insulated by the disc. You will (of course) have a ceramic disc. therefore. which are conductive now. and all this will make a lot more sense. you'll have the basic construct. except for the labels. These caps are used in tuning or decoupling applications in RF circuits. and the two faces. Charge (and. Each charge arriving on one plate forces a charge off the other plate.

2-wire serial interface. hours. hours. The clock/calendar provides seconds. 8. Real time clock counts seconds. Automatic power-fail detect and switch circuitry Consumes less than 500 nA in battery backup mode with oscillator running.and year with leap year compensation valid up to 2100. The DS1307 has a built-in power sense circuit which detects power failures and automatically switches to the battery supply. day of the week. . 40°C to +85°C. Available in 8-pin DIP or SOIC.DC power is provided to the device on these pins. minutes. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator.2. The end of the month date is automatically adjusted for months with less than 31 days. date of the month. and year information. 6. Programmable squarewave output signal 5.5. When 5 volts is applied within normal limits. 2. month. SIGNAL DESCRIPTIONS: VCC. GND . VCC is the +5 volt input. 7. 56 byte nonvolatile RAM for data storage.4 RTC(REAL TIME CLOCK) FEATURES: 1. including corrections for leap year. Optional industrial temperature range. DESCRIPTION The DS1307 Serial Real Time Clock is a low power. 4. Address and data are transferred serially via a 2-wire bi-directional bus. the device is fully accessible and data can be written and read. Recognized by Underwriters Laboratory. full BCD clock/calendar plus 56 bytes of nonvolatile SRAM. 3. month. minutes. date. 9. day.

32 kHz).Battery input for any standard 3-volt lithium cell or other energy source. The nominal write protect trip point voltage at which access to the real time clock and user RAM is denied is set by the internal circuitry as 1. . The SQW/OUT pin is open drain which requires an external pullup resistor. X2 .SDA is the input/output pin for the 2-wire serial interface.5 volts for proper operation. the SQWE bit set to 1.However.Connections for a standard 32. In this configuration. The SDA pin is open drain which requires an external pullup resistor. the Timekeeping function continues unaffected by the lower input voltage.768 kHz quartz crystal. 8 kHz. reads and Writes are inhibited.When enabled.0V DC) at VBAT. VBAT . The internal oscillator circuitry is designed for operation with a crystal having a specified load capacitance (CL) of 12. Battery voltage must be held between 2. As VCC falls below VBAT the RAM and timekeeper are switched over to the external power supply (nominal 3. the SQW/OUT pin outputs one of four square wave frequencies (1 Hz.SCL is used to synchronize data movement on the serial interface. SQW/OUT (Square Wave/ Output Driver) .When a 3-volt battery is connected to the device and VCC is below 1. the X1 pin is connected to the external oscillator signal and the X2 pin is floated. SCL (Serial Clock Input) .25 x VBAT nominal. SQW/OUT will operate with either Vcc or Vbat applied. A lithium battery with 48 mAhr or greater will back up the DS1307 for more than 10 years in the absence of power at 25 degrees C. SDA (Serial Data Input/Output) . X1.5 pF.0 and 3. 4 kHz.25 x VBAT.


assembly. PCBs are much cheaper and faster for high-volume production since production and soldering of PCBs can be done by automated equipment. Alternatives to PCBs include wire wrap and point-to-point construction. Much of the electronics industry's PCB design. or PCB. though they require more layout effort and higher initial cost. A PCB populated with electronic components is a printed circuit assembly (PCA). There are some steps for PCB designing: 6. and quality control needs are set by standards that are published by the IPC (Association Connecting Electronics Industries) organization. PCBs are often less expensive and more reliable than these alternatives. 34 . also known as a printed circuit board assembly or PCB Assembly (PCBA). tracks or signal traces etched from copper sheets laminated onto a non-conductive substrate.Chapter 6 PCB CONSTRUCTION After checking the system on the breadboard.1 Basics about PCB: A printed circuit board. Printed circuit boards are used in virtually all but the simplest commercially produced electronic devices. It is also referred to as printed wiring board (PWB) or etched wiring board. is used to mechanically support and electrically connect electronic components using conductive pathways. now it was time to design it on PCB.

the user gets the access. When an RFID tag comes in this range. The new record is stored by the microcontroller to grant future access. If a different tag is scanned through the reader. There is a coil inside the RFID tag and when it is influenced by magnetic field.Chapter 7 Working of RFID MODULE 7. (For more details. LCD displays ‘you have shown different ID’. This RFID based secured access system also has many additional features. is received by the microcontroller. he gets immediate access through it. it sends an identity code to a device for further processing. This code is treated as an ID for the user and is stored as an array in the microcontroller. The serial code of the tag is identified by the reader module and is sent to P89V51RD2 for checking. A new user needs to press the switch to register after which his identity is verified twice with RFID tag. This serial code. the reader detects it and sends a unique code of the tag serially.1 Basic Working Low frequency RFID works on the principle of radio waves and at the frequency of 125 KHz. In beginning. If the identity (serial number of the tag) of the user is matched with the one already stored in this system. the user is prompted to scan his tag or ID. refer interfacing RFID with AT89C51). The RFID tag is used as an identity for a particular user. consisting of 12 bytes. the user is granted access though the system. If the ID is matched with this code. If the ID is matched by the microcontroller. 35 . The system also shows ‘Error’ if the tags do not match during verification.

Flash Magic To transfer programs into Microcontrollers at appropriate baud rate 36 .compile and execute the LPC2148 NXP programs in embedded C 2.Above Fig. Passive tags have no power source of their own and instead derive power from the incident electromagnetic field. Keil Software To write. When the Tag enters the generated RF field it is able to draw enough power from the field to access its internal memory and transmit its stored information.2 Software Tools 1. When the transponder Tag draws power in this way the resultant interaction of the RF fields causes the voltage at the transceiver antenna to drop in value. The Tag is able to control the amount of power drawn from the field and by doing so it can modulate the voltage sensed at the Transceiver according to the bit pattern it wishes to transmit. Commonly the heart of each tag is a microchip. 7. Shown is a RFID transceiver that communicates with a passive Tag. This effect is utilized by the Tag to communicate its information to the reader.

Programming Microcontroller through Flash Magic 37 .

0x31.0x31.0x37.0x30.0x30.0x44.0x46.0x0D. .0x0A.0x31.0x41.x<16.0x41.0x30. while(1) { for(x=0. code char sourabh[] = {0x02. return 1.h" #include "string.0x43. break.h" #include "serial.0x30.0x03}.0x38.0x45. lcd_puts("ATTENDANCE delay(1000).0x31.0x36. for(x=0. unsigned int compare() { unsigned char match = 0.x++) { 38 CONFIRMED").0x41.0x46.0x42.0x03}. } match = 0.0x30. char rx_data[16].7.0x0A.h" #include "rtc.0x46.0x30.0x34.0x39.0x0A.0x30.0x30.x<16.0x37.H> #include "lcd.x++) { if(rx_data[x] == ashish[x]) match = 1.0x33.0x36. else { match = 0.0x44.0x43.0x0D.3 Microcontroller Program //Program to interface RFID with 8051 microcontroller (P89V51RD2) /*RFID main program*/ #include <reg51.0x31.h" code char ashish[] = {0x02.0x33.0x30.0x34. code char dhruv[] = {0x02. unsigned char x. } } if(match) { lcd_clr().0x03}.0x0D.

else { match = 0. } } if(match) { lcd_clr(). 39 ATTENDANCE SYSTEM"). return 2. while(1) { lcd_puts("PLEASE SWYPE YOUR CARD").if(rx_data[x] == dhruv[x]) match = 1. lcd_puts("ATTENDANCE delay(1000). } if(!match) return 0. lcd_clr().x++) { if(rx_data[x] == sourabh[x]) match = 1. serial_init(). for(x=0.x<16. break. . lcd_puts("ATTENDANCE CONFIRMED"). match = 0. Rtc_Init(). lcd_init(). lcd_puts("RFID BASED delay(2000). } } void main() { unsigned int r. break. return 3. else { match = 0. delay(1000). } CONFIRMED"). } } if(match) { lcd_clr().

} } /*Program to Display on LCD*/(LCD read and write commands) sbit RS = P3^6. Rtc_Get_Time().i++) for(j=0. } delay(2000). } void lcd_cmd(unsigned char val) 40 . r=0. sfr ldata = 0x80. lcd_puts(" ASHISH "). sbit EN = P3^7. lcd_clr(). for(x=0.x<16. lcd_cmd(0xC0). r = compare(). void delay(unsigned int time) { int i. Rtc_Get_Time().x<16.i<time. lcd_puts(" SOURABH "). r=0. Rtc_Get_Time(). for(i=0.x++) rx_data[x] = ser_rxc(). if( r == 1) { lcd_clr().x++) rx_data[x] = 0x00. lcd_cmd(0xC0). lcd_puts(" DHRUV ").for(x=0.j++). lcd_clr(). r=0. lcd_cmd(0xC0).j. } else if( r == 3) { lcd_clr(). } else if( r == 2) { lcd_clr().j<114.

{ RS = 0. ldata = val. ldata = val. delay(1). } } void lcd_clr() { lcd_cmd(0x01). lcd_cmd(0x80). lcd_cmd(0x01). } void lcd_init() { lcd_cmd(0x38). while(*str) { lcd_data(*str++). delay(1). EN = 1. } void lcd_puts(unsigned char *str) { unsigned char i=0. EN = 0. i++. EN = 0. delay(1). lcd_cmd(0x06). if(i == 16) lcd_cmd(0xC0). } void lcd_data(unsigned char val) { RS = 1. lcd_cmd(0x0C). } 41 . EN = 1.

.j. lcd_data(temp1).temp. min. SDA = 0. sbit MSB = ACC^7.sec. SCL = 1.min. unsigned char c. void delay_ms(unsigned int time) { int i. } } void start() { SDA = 1. // to set unit digit. 0x22. lcd_data(temp2). for(i=0.i++) { for(j=0.i<time. hour. // to set decimal digit. temp2 = (s & 0x0f) + 0x30. delay_ms(1). } void write(unsigned char val) { 42 // initialize the value of sec. } void stop() { SDA = 0. SCL = 1. SDA = 1.. .../*Program to display the time through RTC*/(RTC=real time clock) sbit SDA = P2^5.. 0x17 }. } void wt_lcd(unsigned char s) { unsigned char temp1.. sbit LSB = ACC^0. unsigned char time[4] = { 0x20.temp2. delay_ms(1).j<114.hour. unsigned int i. temp1 = ((s & 0xf0)>>4) + 0x30. sbit SCL = P2^4.j++).

delay_ms(1). delay_ms(1). delay_ms(1). SDA = val & 0x80. SCL = 0. SCL = 1. delay_ms(1).unsigned char a. } SDA = 0. // 1 0 0 0 0000 43 . } unsigned char read(void) { unsigned char j. delay_ms(2). SCL = 1. delay_ms(1). delay_ms(1). SDA = 1. SCL = 0. SCL = 0. } unsigned char last_read(void) { unsigned char j.j<8. SDA = 1.j++) { SCL = 1. delay_ms(1). SCL = 1. delay_ms(1).a<8. temp = temp << 1. return(temp).a++) { SCL = 0. SDA = 1. } SDA = 1. delay_ms(1). delay_ms(1). delay_ms(1). delay_ms(1). for(a=0. delay_ms(1). delay_ms(1). SCL = 0. for(j=0. temp = temp | SDA. delay_ms(1). val = val << 1.

sec = read()..j<8. stop(). start(). for(i=0.for(j=0. wt_lcd(sec). write(0x00). } return(temp).j++) { SCL = 1. SDA = 1. temp = temp | SDA. 44 .. SCL = 0. } void Rtc_Get_Time() // reading from rtc. write(0x00). write(0xD0). delay_ms(1).i<3. delay_ms(2). wt_lcd(min). start(). temp = temp << 1. lcd_cmd(0xC0). write(0xD1). { start(). delay_ms(1). lcd_data(0x3A). hour = last_read(). delay_ms(1). lcd_data(0x3A). stop(). stop(). wt_lcd(hour). } void Rtc_Init() { SCL = 1. write(0xD0). min = read().i++) write(time[i]). delay_ms(1).

delay_ms(1). } 45 .

Work in harsh environment 8. Can be hidden 3. 2. especially in high-speed operations such as carton sortation. "Write" capabilities: Because RFID tags can be rewritten with new data as supply chain activities are completed. 5. 4.2 Advantages 1. Greater data capacity: RFID tags can be easily encoded with item details such as lot and batch.3 Disadvantges 1. weight. reducing the labor required to scan product and allowing more proactive. More automated reading: RFID tags can be read automatically when a tagged product comes past or near a reader. RFID tags can be read through materials without line of sight. tagged products carry updated information as they move throughout the supply chain. 3. Improved read rates: RFID tags ultimately offer the promise of higher read rates than bar codes. Short range 3. etc.Chapter 8 Advantages 8. 8. Cost 46 . No "line of sight" requirements: Bar code reads can sometimes be limited or problematic due to the need to have a direct "line of sight" between a scanner and a bar code. real-time tracking. Lack of standards! 2. Store data on a tag 2.1 Advantages of RFID Over Bar Coding 1.

Saving attendance in a computer allows easy verification and longer record keeping. a TV screen or a PC interface.It is this MMI that often represents the most costly investment in the system’s development. 47 .RFID module comprising of a RFID Reader and a RF Tag avails an easy implementations option and is a farless tedious bid.interms of both time and money.Many of the embedded systems are managed by human controllers by some sort of man machine interface-for example a cash register. The possibilities in this field are only limited by our imagination. right from the time we work out on tread mills to the cars that we drive today.a cell phone.CHAPTER 9 CONCLUSION Embedded systems have virtually entered every sphere of our life. The project RFID based attendance system has a ID number and related details which are sent to computers. It is a simple method and is reliable.

"Understanding Card Data Formats". Specification and Design of Embedded Systems. www. Gajski. 6. “8051 and embedded system” by Mazidi and Mazidi. 1994. All datasheets from www. 1992.co. Sanjiv Narayan & Jie Gong. Wikipedia (online). 2009.datasheetcatalog. 3. 4. HID Corporation. Radio-frequency identification. Academic Press. 5. Jack Ganssle. Daniel D.References 1.triindia. 2. Frank Vahid. San Diego. PTR Prentice Hall..com 7. Art of programming Embedded Systems. Technology Basics White Paper. Wikimedia Foundation.in 48 . Inc. Englewood Cliffs NJ. 2009.

Sign up to vote on this title
UsefulNot useful