Pages

Monday, October 29, 2012

Cellphone-Based Device Control With Voice Acknowledgement

Here is a circuit that lets you operate your home appliances like lights and water pump from your office or any other remote place. So if you forgot to switch off the lights or other appliances while going out, it helps you to turn off the appliance with your cellphone. Your cellphone works as the remote control for your home appliances. You can control the desired appliance by pressing the corresponding key. The system also gives you voice acknowledgement of the appliance status.
Circuit description
Fig.1 shows the circuit for cellphone based device control with voice acknowledgement. It comprises microcontroller AT89C51, DTMF decoder MT8870, voice recording/playback device APR9600 and a few discrete components.

fig1
Microcontroller AT89C51 is at the heart of the circuit. It is a low-power, high-performance, 8-bit microcontroller with 4 kB of flash programmable and erasable read-only memory (PEROM) used as on-chip program memory, 128 bytes of RAM used as internal data memory, 32 individually programmable input/output (I/O) lines divided into four 8-bit ports, two 16-bit programmable timers/counters, a five-vector two-level interrupt architecture, on-chip oscillator and clock circuitry. A 11.0592MHz crystal (XTAL1) is  used to provide basic clock frequency for the microcontroller. Capacitor C3 and resistor R3 form the power-on reset circuit, while push-to-on switch S20 is used for manual reset.

Port pins P1.0 through P1.7 of the microcontroller are configured to get the input from push-to-on switches S1 through S8. Pins of Port P1 are pulled high via resistor network RNW1. Port pins P2.0 through P2.4 are configured to receive the decoded DTMF signal from DTMF receiver MT8870. The functions of the corresponding switches (S1 through S8) and cellphone keys are shown in Table I.



The DTMF decoder is used for decoding the mobile signal. It gets DTMF tone from the mobile headset’s speaker pins and decodes it into 4-bit digital signal. The DTMF decoder is operated with a 3.579MHz crystal (XTAL2 )  In DTMF receiver MT8870 (IC3), capacitor C12 is used to filter the noise and resistors R6 and R7 help to amplify the input signal using the internal amplifier.

Pin 16 of IC3 connected to resistor R5 provides the early steering output. It goes high immediately when the digital algorithm detects a valid tone pair (signal condition). Any momentary loss of signal condition causes ESt to return to low state.
Pin 17 of IC3 connected to capacitor C11 is bidirectional, acting as steering input/guard time output (St/GT). A  steering logic VTStdetected at St causes the device to register the detected tone pair. The guard time output resets the external steering time constant, and its state is a function of ESt and the voltage at St.

Port P3 pins P3.6 and P3.7 of IC1 are configured to select the control source for the devices. These are connected to DIP switches S17 and S18 and pulled high via resistors R2 and R1, respectively. Here, we are using two control sources, switches and mobile’s key. DIP switches S17 and S18 select the control sources as shown in Table II.



Pin 2.5 of Port P2 is configured to show the rest status. That is, if none of the control sources is selected by DIP switches S17 and S18, LED1 glows. Resistor R14 limits the current through LED1. 

Voice acknowledgement is provided by the APR9600 (IC2). It is a single-chip voice recording and playback device that can record and play multiple messages at random or in sequential mode for 60 seconds. The user can select sample rates with corresponding  quality recording lengths. Microphone amplifier, automatic gain control (AGC) circuits, internal anti aliasing filter, internal output amplifier and message management are some of the features of the APR9600. 

Here the APR9600 is configured in random-access mode, which supports two, four and eight messages of fixed durations. The length of each message is the total recording length available divided by the total number of memory segments/tracks enabled. 

Audio processor APR9600 can store up to eight voice messages. Port P0 pins and P2.7 are configured to communicate with IC2. Port P0 pins trigger selection of the message. Port pin P2.7 is the input signal to identify whether the voice message is playing or not.
Pins P3.0 through P3.5 of Port P3 control the devices with the help of relays RL1 through RL6 via relay driver IC4.

A speaker is connected to IC2 for audio output. The speaker output drives the mic input of the mobile for audio acknowledgement. An electret microphone MIC1 is connected to IC2 to record the voice in IC2. LED2 flashes to show the busy status of IC2 during recording and playback. The audio messages to be recorded in APR9600, by using trigger switches S9 through S16, are shown in Table III. SPST switch S19 is closed for recording and switch S19 is opened for playback. 
Recording and playback 
To record the voice in IC2, follow Table III. Close SPST switch S19 to make pin 27 of IC2 low. Thereafter, press and hold switches S9 through S16 to record corresponding voice messages. LED2 flashes to indicate audio recording.

For playback of any device status, open SPST switch S19 and press the corresponding switch (S9 through S16). The recorded audio can be heard from the speaker connected to pins 14 and 15 of IC2. Fig.2 shows the pin configuration of mobile headset.


Software

The program (Device_Control.BAS) for the microcontroller is written using BASCOM microcontroller programming software. In the program, first, initialise the port (P0-P3) for corresponding controls. Thereafter, declare the variables for the program. After declaration, assign some initial value to variables. Here, microcontroller ports are initialised to make all the devices ‘off’ initially.

After that, the main function checks through ‘Do’ loop which control source has been enabled by using DIP switch pins. If you select switch S17, it searches the input from the mobile only. If you select switch S18, it searches the input from the switches (S1 through S8) only. If you enable both switch S17 and switch S18, it searches the inputs from switches and mobile. Else, the rest-status LED1 glows. Refer to Table II to select the control source. 
The mobile signal is decoded into the DTMF signal by IC3. The DTMF output for each mobile key (used in this project) pressed is shown in Table IV.
After getting the input from the switches or mobile, the program goes to the device_action subroutine and executes the corresponding action (refer Table I). 

The device_action subroutine changes the status of the device and calls the voice_alert subroutine. The voice_alert subroutine checks the device status and device name from the source input and controls the corresponding pins of IC2. First, it selects the voice signal for the device name. After playing that, it selects on/off status of corresponding device as mentioned in Table III. 

If you press ‘*’ key followed by the device number on your mobile handset, it will not change the status of that device and inform the current device status. If you press device number followed by ‘*’ key on your mobile handset, it will change the status of that device and inform the changed device status. ‘#’ key controls the voice_control subroutine and acts like a mute key.

PIC16F877A-Based Temperature Monitoring System

Temperature monitoring and  control is important in industry environments. Sensors are widely used for measurement of temperature. Usually, a temperature sensor converts the temperature into an equivalent voltage output. IC LM35 is such a sensor. Here we describe a simple temperature measurement and display system based on LM35 sensor and PIC16F877A microcontroller. The temperature in degrees Celsius is displayed on a 16×2 LCD.

Fig.1 shows the functional block diagram of the PIC16F877A-based temperature monitoring system. The key features of this system are:

1. Continuous monitoring of temperature with 1-second update interval (which can be varied in the program).

2. Temperature measurement using LM35 precision integrated-circuit sensor.

3. Precise analogue-to-digital conversion using in-built 10-bit analogue- to-digital converter (ADC) of PIC16F877A microcontroller.

Hardware description


Fig.2.shows the circuit  of the temperature  monitoring  system. The circuit mainly consists of the LM35 temperature sensor, PIC16F877A microcontroller and HD44780 controller based 16×2 LCD.

fig2
The output of the sensor is fed to the internal ADC of the microcontroller. Pin 2 of the microcontroller (RA0/AN0) is channel-1 of the internal ADC. The analogue voltage output of the sensor is converted into its equivalent digital value by the ADC and then its equivalent degree Celsius value is calculated by the software. The calculated temperature value is displayed on the LCD.
LM35 sensor. Fig.3 shows the pin configuration of LM35. It is a precision integrated-circuit centigrade temperature sensor whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in degree Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. For each degree Celsius change in temperature, the sensor output changes by 10 mV.

The sensor can measure temperature in the range of 0 to 100°C, i.e., the output of the sensor varies from 0 to 1000 mV. The LM35 operates over the temperature range of -55° to +150°C, while the LM35C is rated for a -40°C to +110°C range (-10°C with improved accuracy).

Pin layout of the sensor is as follows:

Pin 1-VDD
Pin 2-Output of the sensor
Pin 3-VSS

PIC16F877A microcontroller. IC PIC16F877A is an 8-bit microcontroller with 8k×14-bit flash program memory, 368 bytes of RAM and many other extra peripherals like ADC, universal synchronous asynchronous receiver transmitter, master synchronous serial port, timers, compare capture and pulse-width modulation modules, and analogue comparators. It is based on the reduced instruction set computer (RISC) architecture.

The microcontroller processes the sensor output to compute the temperature in degree Celsius. The internal ADC of the microcontroller is used to convert the analogue output of the sensor into its equivalent digital value.

The internal ADC of the microcontroller has eight channels of analogue input and gives 10-bit digital output. In this project, the reference voltage to the ADC is the same as the supply voltage to the microcontroller, i.e., 5V. The resolution of the ADC can be calculated as follows:

Resolution = Vref / (1024-1) ...(as it is a 10-bit ADC)
                = 5/1023
                = 4.887 mV

It means that for 4.887mV change in the analogue input, the ADC output changes by binary ‘1’ with a reference voltage of 5V.

Analogue output of the sensor at its pin 2 is connected to Port A at RA0 for conversion into digital equivalent.


The LCD. A 16×2 LCD based on HD44780 controller is used for displaying the temperature. The control lines EN, R/W and RS of the LCD module are connected to pins RA1, RA2 and RA3 of Port A of the microcontroller, respectively. The commands and the data to be displayed are sent to the LCD module in the nibble mode from Port D of the microcontroller. The higher four bits of the LCD (D4 through D7) are connected to the lower nibble of Port D (RD0 through RD3).
Software description

The software code is written in ‘C’ language and compiled using Hitech C cross compiler in MPLAB IDE. The software performs the following operations in an infinite loop:

1. Initiate analogue-to-digital conversion and obtain the result

2. Calculate the equivalent voltage value from the ADC result

3. Calculate the temperature in degree Celsius from the voltage value

4. Display the temperature on the LCD

The voltage output (in volts) of the sensor is:

(ADC result × 5) /  1023

The temperature in degree Celsius is:

Sensor output × 1000 / 10  = Sensor output × 100

The Hitech C cross-compiler provides floating-point library support that is required for doing the above calculations.


MPLAB IDE and Hitech C compiler. MPLAB IDE is a very powerful software development tool for Microchip products (microcontrollers). It is available for download at www.microchip.com free of cost. It consists of tools like text editor, cross-assembler, cross-compiler and simulator.

Hitech C cross compiler is meant for Microchip PIC10/12/16 series of microcontrollers. Its Lite edition comes free with newer versions of MPLAB IDE like MPLAB v8.2 and v8.3. It can also be downloaded for free from www.htsoft.com.
Compiling the program using MPLAB IDE. The steps follow:

1. Create project file and add source files. In the menu bar, click Project→ Project Wizard. The project wizard dialogue box appears. Click ‘Next.’ In ‘Next’ window, select the device as PIC16F877A from the drop-down menu. Click ‘Next’ and select ‘Hitech Universal Tool’ suite from the drop down menu. Click ‘Next,’ name your project file as ‘tempr’ and specify its location. The file is automatically saved with ‘.mcp’ extension. Click ‘Next’ and add source files tempr.c, lcd.c and delay. c to your project. If you want to create the source files on your own, you can skip the above step. Click Next→ Finish button. Now your project is created and the source files are added to your project.
2. Create and add source files of your own. After creating the project, proceed with typing the code. Open a new text file by clicking ‘New’ in ‘File’ menu. Type the code in the text editor and save it with ‘.c’ extension. You can create source files tempr.c, delay.c and lcd.c in this manner. After typing and saving the code, you have to add the source files to your project. In ‘Project’ menu, click ‘Add Files to Project’ and then add the files by browsing them from the location they are saved in.
3. Configure the system. To configure features like type of oscillator and WDT, click ‘Configure’ menu and then click ‘Configuration Bits.’ In the configuration bits window, select the type of oscillator as XT, and disable all other features like watchdog timer, power-up timer and brownout detect.
4. Compile the project. To compile the software, click ‘Build’ option in ‘Project’ menu. The software is compiled and ‘Build Successful’ message appears in the output window. After successful compilation of the program, the file tempr.hex is generated.

Downloading the software into the chip. After compiling the software, the hex file generated can be downloaded into the chip either using a locally made programmer (like JMD programmer) or Microchip’s programming kit (PICKit2, PICKit3, ICD2, ICD3, etc).

We have used Microchip MPLAB ICD2 (in-circuit debugger) to burn the program into PIC16F877A microcontroller.

The programming can be done from MPLAB IDE itself by selecting the kit (MPLAB ICD2) from ‘Programmer’ menu in the menu bar. If you use a JMD programmer, the hex file can be downloaded into the chip using WinPic800 software. The configuration bits have to be separately configured in WinPic800.


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. 

How to Create and Submit Your Blogger Sitemap to Google

It is very important to generate and submit blogger sitemap to Google, Yahoo and Bing. But here a question arises that what is a sitemap? A sitemap is a digital map of all your contents on a blog or website. It is important to create such a sitemap which can be easily understand by search engines.

If you have added your sitemap to Google Webmaster Tools then all your contents will be indexed by Google and they may appear in search results very frequently. There are various types of sitemaps like rss.xml sitemaps, atom.xml sitemaps, video sitemaps, etc. But here I will tell only atom.xml sitemap, because it is very easy to generate and submit. Follow the below steps to start.

1. To submit your sitemap to Google sign in to Google Webmaster Tools. I am assuming that you have verified your blog ownership.

2. Select your blog and on the left side click Site Configuration >> Sitemap and click the red button on the right side which says Add/Test Sitemap.



3. Copy/Paste the below sitemap in the box.

• atom.xml?redirect=false&start-index=1&max-results=500

Click submit and you've done. It will take time to index all your posts. Once it is verified you will see your submitted and indexed webpages in blue and red colors as seen in the above image.

Now a very important thing you should keep in mind. The above sitemap generated is only for 500 posts. After every 500 post you have to submit a new sitemap. See below examples.

• Sitemap for less than 500 posts.

• atom.xml?redirect=false&start-index=1&max-results=500

• Sitemap for more than 500 posts but less than 1000 posts.


atom.xml?redirect=false&start-index=501&max-results=500

•  Sitemap for more than 1000 posts but less than 1500 posts.

atom.xml?redirect=false&start-index=1001&max-results=500

From above example you can see that after every 500 post you have to submit a new sitemap in addition to old sitemaps so that all your post should get indexed by Google.

Saturday, October 27, 2012

Wireless Equipment Control Using AT89C51


Here is a microcontroller based wireless equipment controller that can switch on or switch off up to four devices at a desired time interval set by the user in the transmitter. The devices can be controlled remotely from a distance of up to 30 metres from the transmitter. In the transmitter, an  LCD module is used to show the device numbers and preset control time for the devices (00 to 99 seconds). Concepts of wireless RF communication and automation with AT89C51 microcontroller are used here. 

The system is small, simple, cost-effective and good for wireless control of home appliances or industrial instrumentation.

Block diagram

The system comprises a transmitter and a receiver as described below.





Four pushbutton switches (S1 through S4) are used as inputs to select the devices and set the time-out in the transmitter section. These are designated as up, down, enter and run keys, respectively. The time-out data is transferred over the RF wireless link to the receiver section.


The 8-bit AT89C51 microcontroller is the main controlling part of the transmitter section. It is connected to the LCD module, input switches and encoder IC (HT12E). The device control program is stored in the memory of the microcontroller to control the devices as per the time-out settings  done through input switches S1 through S4.


A two-line, 16-character LCD module shows the status of the main program that is running inside the microcontroller.

The HT12E is an 18- pin DIP package encoder IC that encodes 4-bit data and sends it to TRX-434 RF transmitter module.
The TRX-434 RF transmitter module uses a digital modulation technique called amplitude-shift keying (ASK) or on-off keying. In this technique, whenever logic ‘1’ is to be sent, it is modulated with carrier signal (434MHz). This modulated signal is then transmitted through the antenna. The waveforms in Fig. 2 depict the ASK concept. 

fig2
Receiver section. Fig.3 shows the block diagram of the receiver section.

The 12V DC supply, used along with a 5V regulator, can be provided by a 12V battery or power adaptor.

The RX-434 radio receiver module receives the ASK signal from TRX-434. The HT12D decoder demodulates the received address and data bits. IC CD4519 is a quadruple two-input multiplexer that selects the appropriate data bits to control the devices.
fig3
The ULN 2003 relay driver consists of seven npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching the inductive loads. The collector-current rating of a single Darlington pair is 500 mA.
Circuit description
Transmitter circuit. Fig.4 shows the transmitter circuit. The microcontroller reads the input data from switches S1 through S4 at its port-2 pins 21 through 24 and displays it on the LCD. Port 3 provides read data to the encoder IC HT12E at pins 10 through 13. The microcontroller is programmed to control input and output data.

When the push button switches (S1 through S4) are open, logic ‘0’ is constantly fed to the respective port pins of the microcontroller. When any of the buttons is pressed, logic ‘1’ is fed to the respective port pin of the microcontroller.
fig4
The device control program stored in the memory of the microcontroller activates and executes as per the functions defined in the program for respective input switches.

Data inputs AD8 through AD11 (pins 10 through 13) of HT12E are connected to the microcontroller. Pins 1 through 8 (A0 through A7) of the IC are address inputs. Shorting them address pins using switches to either Vcc or Gnd enables different address selections for data transmission. Here we have connected them to 5V. Since address pins are connected to 5V, the address is set to 255d (in decimal). If you were to connect all the address pins to ground, the address would be 000d. Thus there are 256 possible addresses available. So you can set up switches to control one or more of the encoder address pins.

Pin 14 is a transmit-enable (TE) input pin. The encoder will send data only when pin 14 is connected to ground. Whenever a button is pressed, logic ‘0’ is sent to this pin through the microcontroller, thus activating it and enabling transmission.

Pin 17 is the data-out (Dout) pin that sends a serial stream of pulses containing the address and data. It is connected to the data input pin of the TRX RF module.

The time-out control is set using input keys S1 through S4 to turn on/off the devices at predetermined time. The default time for all the devices is ‘00’ seconds. So using ‘up’ key you can increment time by one second, and using ‘down’ key you can decrement time by one second down. At the same time, the LCD module shows the current status of increments and decrements.

When the time-out for a device is set, press ‘ent’ key so that the program control transfers to the next device for time-out settings. In the same way, the remaining three time-out settings must be done before pressing ‘run’ key. When ‘run’ key is pressed, it executes the device control program subroutine in the microcontroller and the program automatically collects the time-out information entered by the user and sends the processed data to encoder IC HT12E. The encoder IC sends the data to Din (pin 2) of the RF transmitter module. The data is transmitted by the TRX-434 module to the receiver section through the antenna.

Receiver circuit. Fig. 5 shows the receiver circuit. The RF receiver (RX- 434) module can receive the signal transmitted by the transmitter from a distance of up to 9 metres (30 feet). The range can be increased up to 30 metres using a good antenna. 
fig5
Dout pin of RX-434 RF module is connected to Din pin of decoder IC HT12D (IC4). Din pin of IC4 receives address and data bits serially from the RF module. Decoder IC4 separates data and address from the received information. It accepts data only if the received address matches with the address assigned to encoder IC1 (HT12E). We have used ‘1111’ as the permanent address for communication. Pins 1 through 8 of IC4 are address pins and therefore 256 possible addresses are available. The address on the encoder and decoder ICs must match for the data to be valid.
The HT12D decoder receives serial addresses and data from the encoder that are transmitted by a carrier signal over RF medium. The decoder compares the serial input data three times. continuously with its local addresses. If no error or unmatched codes are found, the input data codes are decoded and transferred to the output pins. VT pin (valid transmission) goes high to indicate a valid transmission. The HT12D provides four latch-type data pins whose data remains unchanged until new data is received. 

Data pins D8 through D11 (pins 10 through 13) of the decoder send 4-bit data to CD4519 multiplexer IC5.
fig6
CD4519 multiplexer. This IC provides four multiplexing circuits with common select inputs (SA and SB); each circuit contains two inputs (An, Bn) and one output (On). It may be used ton select 4-bit information from one of the two sources.

There are eight input lines (A0 through A3 and B0 through B3), of which four (A0 through A3) are permanently connected to Vcc through resistor R19, while the rest four (B0 through B3) are connected to the data output lines of the decoder (IC4).

The select inputs can be connected to either Vcc or VT pin (pin 17) for latch or momentary mode-selection section. Jumper switch (Js) is used to select between latch and momentary operation. When latch mode is selected, data present at the output pins is latched, i.e., they remain the same and the respective relay energises until the next change is made in the mode selection. When momentary mode is selected, data present at the output pins is available as long as VT  pin remains active-high. As soon as VTpin becomes active-low, the respective relay de-energises.

The latched output data from multiplexer CD4519 is fed to relay driver IC ULN2003, to control up to four devices through the relays (RL1 through RL4). VT pin is connected to LED4 through IC6 to indicate the status of VT signal when it is active-high.

Software program


The software flowchart programmed in the microcontroller of the transmitter section is shown in Fig. 6. It is written in Assembly language and compiled using ASM51 software to generate the hex code. The hex program can be burnt into the AT89C51 microcontroller by using any standard programmer available in the market. We have used TopView programmer from Frontline Electronics to program the microcontroller.

The software program is designed to accept the input from the user as well as control the devices. It identifies the key pressed and displays the key code on the LCD module.

In the program, the LCD module is initialised first. As soon as the time-out is set, all the four devices turn on initially, then a particular device turns off at preset time. In this project, the timeout range is 00 to 99 seconds, which can be easily modified to extend the time duration in the delay subroutine of Assembly code.

Port 0 is configured as output port and interfaced with the RF module through encoder IC1. Port 1 is used for LCD interface and port 2 is used for the input from push-to-on switches.

Circuit operation

When the system is switched on, the startup message “press any key” appears on the LCD screen. When any key is pressed by the user, the LCD displays the message “to set time out press ent!”. Pressing ‘ent’ key displays the following messages on the LCD with a cursor blinking near the first device ‘D1_T’:

D1_T= D2_T=
D3_T= D4_T=

Use ‘up’ and ‘down’ keys to set the time for controlling the devices. The set time for each device on the LCD screen looks like this:

D1_T=10 D2_T=20
D3_T=30 D4_T=40

Now press ‘ent’ key followed by ‘run’ key. A device control subroutine executes and sends the data to the RF module, which transmits the data through ANT antenna. You can set maximum of 99 seconds as the control time for the device. If you set it to 00, a particular device is turned on for infinite time.