brock

Monday, October 29, 2012

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.