brock

Monday, October 29, 2012

RFID-Based Security System


A radio-frequency identification (RFID) based access-control system allows only authorised persons to enter a particular area of an establishment. The authorised persons are provided with unique tags, using which they can access that area.

The system is based on micro controller AT89C52 and comprises an RFID module, an LCD module for displaying the status and a relay for opening the door. Fig.1 shows a user trying to open the door by placing an RFID tag near the RFID reader.

Radio-frequency identification

 You might be familiar with RFID systems as seen in access control, contactless payment systems, product  tracking and inventory control, etc. Basically, an RFID system consists of three components: an antenna or coil, a transceiver (with decoder) and a transponder (RF tag) electronically programmed with unique information.
Fig.1 shows a typical RFID system. In every RFID system, the transponder tags contain unique identifying information. This information can be as little as a single binary bit or a large array of bits representing such things as an identity code, personal medical information or literally any type of information that can be stored in digital binary format. 
fig1
The RFID transceiver communicates with a passive tag. Passive tags have no power source of their own and instead derive power from the incident electromagnetic field. Commonly, at the heart of each tag is a microchip. 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. 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. This effect is utilised by the tag to communicate its information to the reader. 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.
Antenna. Fig.2 shows the internal diagram of a typical RFID antenna. An RFID antenna consists of a coil with one or more windings and a matching network. It radiates the electromagnetic waves generated by the reader to activate the tag and read/ write data from it.
fig2
Antennae are the conduits between the tag and the transceiver which control the system’s data acquisition and communication. These are available in a variety of shapes and sizes. Often, the antenna is packaged with the transceiver and decoder to become a reader, which can be configured either as a hand held or a fixed-mount device. The reader emits radio waves in ranges of anywhere from 2.54 cm (one inch) to 30 metres or more, depending upon its power output and the radio frequency used. When an RFID tag passes through the electromagnetic zone, it detects the reader’s activation signal. The reader decodes the data encode din the tag’s integrated circuit (silicon chip) and the data is passed to the host computer for processing.
Tags (transponders). Fig.3 shows the internal structure of a typical RFID tag. An RFID tag comprises a microchip containing identifying information and an antenna that transmits this data wirelessly to the reader. At its most basic, the chip will contain a serialised identifier, or licence plate number, that uniquely identifies that item, similar to the way many bar codes are used today.
fig3
There are three types of tags: active, passive and semi-passive.
Passive tags have no internal power source. These draw their power from the electromagnetic field generated by the RFID reader and then the microchip can send back information on the same wave. The reading range is limited when using passive tags.
Active transponders have their own transmitters and power source, usually in the form of a small battery. These remain in a low-power ‘idle’ state until they detect the presence of the RF field being sent by the reader. When the tag leaves the area of the reader, it again powers down to its idle state to conserve its battery. As a result, active tags can be detected at a greater range than passive tags.

Semi-passive tags have their own power source that powers only the microchip. These have no transmitter. They rely on altering the RF field from the transceiver to transmit their data.

There are three ways for data encoding into tags:

1. Read-only tags contain data, which is pre-written onto them by the tag manufacturer or distributor.

2. Write-once tags enable a user to write data to the tag one time in production mor distribution processes.

3. Full read-write tags allow new data to be written to the tag as needed and later other data can be rewritten over the original data.

RF transceiver. The RF transceiver is the source of the RF energy used to activate and power the passive RFID tags. It 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, 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 back-scatter signal from a passive RFID tag.
Circuit description

Fig.4 shows the circuit of the RFID based security system. The compact  circuitry is built around Atmel AT89C52 microcontroller. The AT89C52 is a low-power, high performance CMOS 8-bit microcomputer with 8 kB of Flash programmable and erasable read only memory (PEROM). It has 256 bytes of RAM, 32 input/output (I/O) lines, three 16-bit timers/ counters, a six-vector two-level interrupt architecture, a full-duplex serial port, an on-chip oscillator and clock circuitry. The system clock also plays a significant role in operation of the microcontroller.
fig4
An 11.0592MHz quartz crystal connected to pins 18 and 19 provides basic clock to the microcontroller. Power-on reset is provided by the combination of electrolytic capacitor C4 and resistor R1. Switch S1 is used for manual reset. Port pins P2.0 through P2.7 of the microcontroller are connected to data port pins D0 through D7 of the LCD, respectively. Port pins P3.7 and P3.6 of the microcontroller are connected to register-select (RS) and enable (E) pins of the LCD, respectively. Read/write  pin of the LCD is grounded to enable for write operation.

All the data is sent to the LCD in ASCII format for display. Only the commands are sent in hex form. Register-select (RS) signal is used to distinguish between data (RS=1) and command (RS=0). Preset VR1 is used to control the contrast of the LCD. Resistor R6 limits the current through the backlight of the LCD. Port pins P3.0 (RXD) and P3.1 (TXD) of the microcontroller are used to interface with the RFID reader.

When an authorised person having the tag enters the RF field generated by the RFID reader, RF signal is generated by the RFID reader to transmit energy to the tag and retrieve data from the tag. Then the RFID reader communicates through RXD and TXD pins of the microcontroller for further processing.

Thus on identifying the authorised person, port pin P3.2 goes high, transistor T2 drives into saturation, and relay RL1 energises to open the door for the person. Simultaneously, the LCD shows “access granted” message and port pin P1.7 drives piezobuzzer PZ1 via transistor T1 for aural indication.

If the person is unauthorised, the LCD shows “access denied” and the door doesn’t open. LED2 and LED3show presence of the tag in the RFID reader’s electromagnetic field.

To derive the power supply, the 230V, 50Hz AC mains is stepped down by transformer X1 to deliver a secondary output of 15V, 500 mA. The transformer output is rectified by a full-wave rectifier comprising diodes D1 through D4, filtered by capacitor C1 and regulated by ICs 7812 (IC2) and 7805 (IC3). Capacitor C2 bypasses the ripples present in the regulated supply. LED1 acts as the power indicator and R2 limits the current through LED1.

CODE:

Time-Controlled Switch Using PIC16F72

A time-controlled switch is an automatic timer switch that turns an appliance ‘on’ for the desired time duration. After the preset time duration, the timer automatically switches off, disconnecting the appliance from the power supply. The time duration for which the appliance should be ‘on’ can be set from 1 to 99 minutes. 

This switch obviates the need to continuously monitor the appliance—an advantage over the manual switch. It can be used to switch on or switch off any electrical home appliance at a predetermined time. Switching an appliance on or off in a timely manner increases the life of the appliance and also saves power consumption. 

The switch also finds industrial applications, where the machines which control the processes can be run for the desired time.

Circuit description
Fig. 1 shows the circuit of the time-controlled switch using PIC16F72 microcontroller. It comprises microcontroller PIC16F72 (IC1), regulator 7805 (IC2), two 7-segment displays (LTS542) and a few discrete components. 
fig1
Microcontroller PIC16F72 is the heart of the switch. It is an 8-bit, low-cost, high-performance, Flash microcontroller. Its key features are 2 kB of Flash program memory, 128 bytes of RAM, eight interrupts, three input/output (I/O) ports, three timers and a five-channel 8-bit analogue-to-digital converter (ADC). There are 22 I/O pins, which are user-configurable for input/output on pin-to-pin basis. Architecture is RISC, and there are only 35 powerful instructions. 

System clock plays a significant role in operation of the microcontroller. A 4MHz quartz crystal connected between pins 9 and 10 provides the basic clock to the microcontroller (IC1). 

Two 7-segment displays (DIS1 and DIS2) are used to display the time in minutes. Port pins RB2, RB3, RA0, RA1, RA2, RB1 and RB0 are connected to segment pins ‘a’ through ‘g’ of display DIS1, respectively. Ports pin RC6, RC7, RC1, RC2, RC3, RC5 and RC4 are connected to segment pins ‘a’ through ‘g’ of display DIS2, respectively. 
Switches S2 (start/stop), S3 (select), S4 (decrement) and S5 (increment) are connected to port pins RB4 through RB7 of the microcontroller, respectively. Port pin RC0 of the microcontroller is used to control relay RL1 with the help of transistor T1. When port pin RC0 is high, transistor T1 drives into saturation and 12V-relay RL1 energises to connect the load to power supply. Diode D5 acts as a free-wheeling diode. 

To derive the power supply for the circuit, the 230V, 50Hz AC mains is stepped down by transformer X1 to deliver a secondary output of 12V, 500mA. The transformer output is rectified by a full-wave rectifier comprising diodes D1 through D4, filtered by capacitor C4 and regulated by IC 7805 (IC2). Capacitor C5 is used to bypass the ripples present in the regulated supply. LED2 gives power-‘on’ indication. Resistor R19 limits the current through LED2. Switch S1 is used for manual reset.

Set the time using switch S4 for decrement and switch S5 for increment. The time is indicated on 7-segment displays DIS1 and DIS2. To start timing count-down, press start/stop switch S2. Relay RL1 energises to switch on the appliance and LED1 glows. If you press start/stop switch S2 again, the count-down process will stop and relay RL1 de-energise to switch the appliance off. 

CODE:

Top 6 Trends in Test & Measurement

The new generation of consumer electronics devices converge Internet connectivity, wireless communications, high-fidelity audio and HD video into a single device. To keep up with the times, different strategies have been adopted by test and measurement manufacturers and design houses. Take a look ..
 1. FPGA-enabled instrumentation
With the increase in system-level tools for field-programmable gate arrays (FPGAs) over the last few years, an increasing number of manufacturers are including FPGAs in instrumentation. What’s more, engineers are given the choice to reprogram these FPGAs according to their requirements. So test engineers can embed a custom algorithm into the device to perform in-line processing inside the FPGA, or even emulate part of the system that requires a real-time response.

Satish Thakare, head-R&D, VLSI division, Scientech Technologies, explains the traditional challenges that led to this trend: “Designers and manufacturers have to face a lot of challenges to make the product available in the market in a short time. Using a hardware-based approach does not serve the purpose as the designer has to redesign the hardware for every product. Even conventional methods will not serve the purpose as it works on the sequential method. So the designers need a kind of technology that allows them to change the functionality without changing the hardware while being able to upgrade the product on the go.”

Thakare goes on to explain the solution: “The obvious choice for the designer is to use reconfigurable hardware, i.e., FPGA. A benefit of using the FPGA in the instruments is that it offers high reliability, low latency, reconfigurability, high performance, embedded digital signal processor (DSP) core and true parallelism.”

Apart from digital functions, some FPGAs have analogue features. Some mixed-signal FPGAs may have integrated analogue-to-digital converters and digital-to-analogue converters.

Mahendra Pratap Singh, business development manager, TTL Technologies, adds, “Logic blocks can be configured to perform complex combinational functions and also include memory elements, which can be simple flip-flops or more complete blocks of memory. The architectural flexibility, customisation flexibility and cost advantage put FPGAs ahead of complementary technologies.”

The most common test instrument in the industry with this capability is the digitiser, which allows faster processing of digitised data.


2. Wireless standards outbreak

As new wireless standards like the WLAN 802.11ac, WiMAX, LTE and high-throughput 802.11ad roll out, it becomes even more challenging for test engineers in India and around the globe. Bharti Airtel has already launched its 4G service in Kolkata, making India one of the first countries in the world to commercially deploy this cutting-edge wireless technology. As RF and wireless applications expand to become general-purpose, the instrumentation segment might also begin to mirror this trend with the adoption of RF instrumentation to such a level that it becomes as important as our digital multimeters.
A common problem that test engineers face with the explosion of different standards is that they have to continuously set up different test platforms for each standard. 
Sadaf Arif Siddiqui, technical marketing specialist at Agilent Technologies, provides more insight: “A test engineer working on fast emerging standards may have to bear the pain of setting up different test instruments and different test platforms or software. Moving to an easy-to-use, upgradeable and multi-standard vector signal analysis software and instruments such as X-series analysers will reduce this pain and test times to a large extent, thereby optimising the test time and costs.” 

3. Increased use of wireless devices at the workplace
Tablet computers and smartphones have become so popular that they have a significant presence at the workplace too—not as devices under test but as part of the test system. While the computing power made available by these devices is notable, they cannot replace the PC and related measurement platforms like PXi. Instead, these devices are suitable for data consumption and report viewing, and system monitoring and control.

National Instruments’ Automated Test Outlook 2012 explains: “The explosion of mobile devices like tablets and smartphones provides compelling benefits to engineers, technicians and managers involved in automated test who need remote access to test status information and results. While today’s technology offers solutions for monitoring or remote reporting via mobile devices, test organisations will need new expertise to unite the networking, Web services and mobile app portions of the solution.”

4. Software-defined instrumentation
As the complexity of products continues to increase, their testing becomes much more challenging. Test engineers now require test systems that are flexible enough to support the wide variety of tests that must be performed on a single product while being scalable enough to encompass a larger number of tests as new functionality continues to be added.

“Increasingly, the functionality of complex devices is being defined by the software embedded in them. This is challenging for many test engineers because most standalone instruments cannot change their functionality as fast as changes in the device under test (DUT) due to the fixed user interface and firmware that must be developed and embedded in the instrument. Thus test engineers are turning to a software-defined approach to instrumentation, so that they can quickly customise their equipment to meet specific application needs and integrate testing directly into the design process,” says Eric Starkloff, director of NI Test Product Marketing.

Thakare shares two major advantages of software-defined instrumentation: “First, it can dramatically reduce the number of hardware components in all the mixed-signal designs, which means smaller chip size for system-on-chip implementation. Second, it can provide automatic adjustment or compensation for circuit component variations due to temperature dependence, ageing and manufacturing tolerances.” 
Software-defined instrumentation looks to become an essential component of scalable and highly performing test systems. Singh agrees by saying, “We predict a bright future for software-defined instrumentation. Software-defined instruments, also known as virtual instruments, are modular hardware with user-defined software giving the flexibility to combine standard and user-defined measurements with custom data processing using common hardware components. This flexibility is useful for electronic devices like advanced navigation systems and communication devices like smartphones to integrate diverse capabilities and adopt new communication standards.”

5. Use of multicore and parallel test systems
As the complexity and functionality of electronic devices grow exponentially (in sync with Moore’s law), so does the cost of testing them. Minimising the cost of test can be challenging, but one way is to test more with less. The inherent parallelism that is made available by the graphical programming paradigm of software like LabVIEW from National Instruments and FlowStone DSP from DSP Robotics helps engineers immediately benefit from multicore processors and overcome the complexity associated with traditional text-based languages.

The trend of increasing clock speed to get better performance ended back in the early 2000s. Since then, processor manufacturers have implemented alternate technologies to ramp up performance while keeping the clock speeds around 3 GHz. These technologies include the use of processors with multiple cores on a single chip, hyperthreading, wider buses and hyper transport. Moreover, the advancement of the process node to the current 22nm process by utilising 3D transistors has resulted in significantly faster, leaner and more efficient processors for use in embedded controllers and modular instrumentation.

Denver D’Souza, senior technical consultant at National Instruments India, says, “The reality that transistor density doubles every 18 months has led to significant advances in the performance of electronic devices. This is evident not only in the latest Intel Core i7 processors but in the shrinking of technology such as 64GB solidstate drives, which are now the size of a postage stamp. These technological advances translate into considerable cost reductions.”

6. Merging of EDA tools and hardware test platforms
The extremely competitive environment in which electronics companies work now is shown by how next-generation communication protocols are barely labeled as standards before they can be seen in the market. For instance, the 802.11ac solutions have already been brought out by Broadcom even though it is yet to be ratified. In situations like these, companies go all out to get a jumpstart on the competition, and what better way to do this than to merge design and testing in order to accelerate the ‘time to market’.

Adesh Jain, applications consultant at Agilent Technologies, explains why the traditional method is slow: “Traditionally, for any complete electronic product to be ready for the market, each component of the complete system is first designed and verified with EDA tools, then prototypes are fabricated and tested, before the final product is released to the market. If discrepancies are found in the hardware at later stages, the whole cycle has to be repeated, which would result in loss of time as well as money for any organisation.” 

Proper verification at earlier stages reduces this time and effort to a great extent. The tests, specs, algorithms and plots used in the early stages of EDA are the same as measured on the test bench. The aim is to merge both the worlds and see if it is possible to save the design engineers’ time by streamlining the flow and thus improve productivity while reducing the time to get the product out to the market.