EEWeb Pulse - Volume 20

26
PULSE EEWeb.com Issue 20 November 15, 2011 Vincent Greb EMC Integrity, Inc. Electrical Engineering Community EEWeb

description

Interview with Vincent Greb – President of EMC Integrity, Inc.; 10 Important Things to Consider Before EMC Testing Your Product; Smart Phone Design: Projected Capacitance Fueling Innovation; State Machine Design; RTZ – Return to Zero Comic

Transcript of EEWeb Pulse - Volume 20

Page 1: EEWeb Pulse - Volume 20

PULSE EEWeb.comIssue 20

November 15, 2011

Vincent GrebEMC Integrity, Inc.

Electrical Engineering Community

EEWeb

Page 2: EEWeb Pulse - Volume 20

Contact Us For Advertising Opportunities

[email protected]

www.eeweb.com/advertising

Electrical Engineering CommunityEEWeb

Digi-Key is an authorized distributor for all supplier partners. New products added daily. © 2011 Digi-Key Corporation, 701 Brooks Ave. South, Thief River Falls, MN 56701, USADigi-Key is an authorized distributor for all supplier partners. New products added daily.

www.digikey.com/techxchange

It’s all about connections.

The user-to-user forum is for everyone, from design engineers to hobbyists, to discuss technology, products, designs and more. Join the discussions that match your interest or offer your expertise to others.

Join the discussion now at:

discussions

hobbyists

engineers

industry experts

resourceslinks

technical documentswhite papers

reference designs

application notes

community

power

microcontroller

lighting

wireless

sensor

students

Page 3: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 3

TABLE O

F CO

NTEN

TSTABLE OF CONTENTS

Vincent Greb 4PRESIDENT OF EMC INTEGRITY, INC.Interview with Vincent Greb - EMC Expert

10 Important Things to Consider BeforeEMC Testing Your Product BY VINCE GREB

Featured Products

Smart Phone Design: Projected 16Capacitance Fueling InnovationBY JOHN CAREY WITH CYRESS

State Machine Design 22BY RAY SALEMI

RTZ - Return to Zero Comic 25

8

An introductory guide to EMC for part-time compliance professionals.

A detailed look at projected capacitance touchscreen technology.

The first of a series of articles about state machines as a foundation for digital design.

14

Page 4: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 4

INTERVIEWFEA

TURED IN

TERVIEW

Vincent GrebEMC Integrity, Inc.

Vincent Greb - President of EMC Integrity, Inc.

How did you get into electronics/engineering and when did you start?As a physics major in college, I was given the opportunity to work at a storm research lab. This got me into a lab/engineering environment and some contacts there set me up with an internship at an R&D company in Albuquerque, New Mexico. Because I had some familiarity with lightning, I was assigned to work on a couple of projects that were related to electromagnetic pulse (EMP). I gained some valuable experience and worked under some excellent senior-level engineers, but was still struggling trying to figure out what

area of electronics to pursue. I got a huge break when I was assigned to work under a senior EMC engineer who was an excellent mentor. I knew the test automation software that he needed to make his measurements, and as a result, I had the privilege of working for him for about six months. During that period, he taught me an immense amount about electromagnetic compatibility. When he left the company, I was asked to take over his position as the resident EMC expert. I certainly was no expert at that time, but from that point on I was doing EMC.

I worked for a couple companies

in Albuquerque before relocating to Colorado in 1989 where I began working for Ball Aerospace. I worked on some very interesting projects at Ball and learned a great deal, but wanted to get into the commercial world, so I went to work for a small commercial company. In the meantime, I was experiencing success “moonlighting” as an EMC consultant, so I formed EMC Integrity, Inc. in November of 1993. When I got laid off from my daytime job in May of 1994, I made the decision to go full time and make it on my own with EMC Integrity.

What was the company like in 1994?In the beginning EMC Integrity solely did design consulting. That was going very well but we needed a reliable lab to test the designs. There were a lot of requests from our customers to start an engineering lab, which we did in 1995. We later decided to turn it into a full compliance immunity test lab and received our first accreditation in 1997. We could perform immunity testing, engineering troubleshooting, debug, find and fix, and mitigation for clients. EMC Integrity quickly established a reputation for technical excellence and slowly began to increase in market share. However, we were somewhat limited because we could not perform formal emissions

Page 5: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 5

INTERVIEWFEA

TURED IN

TERVIEW

EMC Integrity, Inc. Facility - Longmont, Colorado

testing, so in 1998 we established a relationship with another company and we used their 10-meter chamber on second shift to offer our clients compliance-level emissions testing.

When did you decide that you needed to build your own 10-meter chamber?It was about 2004 when we decided that it just made sense to have all of the testing done under one roof, and we began plans to set up up our own 10-meter chamber. This required building our own facility, which we did. We opened the doors of our new building in February of 2006.

What was your business like after you built your 10-meter and moved to a new space?When we opened our doors, all we had to do was let the word out. It turns out there were a lot of people that wanted to use EMC Integrity based on our reputation, but did not like the idea of taking their product to an OEM’s lab and working second shift. Our clients were very pleased to have emissions and immunity testing under one roof, and business

grew pretty dramatically after that.

Our growth has also been spurred by our ability to do International Submittals for the Far East including Korea, Taiwan, Russia, and China. We are able to do this through our Nemko Partner Lab Program. Nemko is a Notified Body for EMC (among other things) in the European Union, and it’s great to have access to their expertise. Using their world-wide network, we can get clients’ products EMC-approved for anywhere in the world. Since Nemko also offers product safety testing, EMCI can offer clients a virtual one-stop shop for compliance testing.

With the new additions and expansions to your lab, did you have to build another building?After a few years in our new building, things were already getting crowded and we were working either second shifts or weekends to accommodate clients. After doing some trade-off studies, we determined the most cost-effective approach would be to add on to our existing building.

Our primary need was more bandwidth in our existing 10-meter, so the centerpiece of our expansion was a second 10-meter chamber. However, we didn’t simply duplicate what we already had. We built a chamber that would not only increase our bandwidth, but would allow us to test larger products. Thus, our new chamber has a 4-meter turntable, 8’ by 10’ access doors, much bigger support power, and a 16’ by 26’ shielded ante-chamber that resides beneath the turntable. This arrangement makes setup of even large, I/O-intensive products much easier.

Do you use more than one antenna mast in the new chamber?The new chamber has two antenna masts. We have a standard antenna mast that resides at the 10-meter distance covering the frequency range from 30 MHz to 1 GHz. We also have a second boresight antenna mast at the 3-meter distance. Boresight antennas are used for testing above 1 GHz, where signals become more directional. The standard antenna used from

Page 6: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 6

INTERVIEWFEA

TURED IN

TERVIEW

1-18 GHz is a broadband horn. The function of the boresight mast is to keep the antenna pointed at the unit under test as it travels from 1 to 4 meters in height.

Do you have any EMC advice for a product designer?Test early. Test as soon as you can. What often happens is that compliance testing is not performed until the end of the product design cycle. The closer you get to product completion, the more the design solidifies. Consequently, your options for change are reduced. A lot of people don’t realize that unless a product is designed to meet electromagnetic compatibility requirements, there is about a 95 percent chance that it will fail. There is a huge value in identifying problems earlier in the project development cycle. If you identify a problem early, you can engineer a solution. If you wait until the design cycle is completed, oftentimes you are forced to implement some sort of “band-aid” fix. In addition to being a more cost-effective approach, addressing compliance problems early also greatly reduces the possibility that product shipment schedules will be delayed.

Do you see more problems in radiated immunity or conducted immunity?I think that it is 50/50. While these tests are related, they are really two different animals. Radiated immunity is higher frequency than conducted immunity. Radiated immunity is a free-field type of test where conducted is lower frequency, and designed to simulate the current that would be induced on cables if they were exposed to a lower frequency EM field. However, a lot of times if you see problems on one, you will see problems on both.

What direction do you see your business heading in the next few years?The future looks to be quite bright. With our increased throughput capability and our larger chamber, we are very well set to test larger and higher-end information technology equipment, medical systems, measurement systems, and industrial electronics. We have also begun testing intentional transmitters which are devices that intentionally transmit radio frequency energy to other devices. This all presents EMC Integrity with a huge opportunity for growth.

What challenges do you foresee in your industry?I think one of the biggest challenges faced in not only the compliance industry, but the electronics industry in general, is education. My story of how I got into EMC is very common among EMC engineers. Nearly all of us were mentored under EMC gurus who were kind enough to take the time to teach us the fundamentals of the discipline. Most engineers who graduate haven’t even heard of electromagnetic compatibility, compliance requirements, or compliance testing. There are a few universities in the country which have introduced EMC courses in their curricula, but the majority of universities only mention EMC in passing, if at all. As a result, most electrical engineers start doing designs at companies with no idea of how to design for compliance. So now you’re back to the scenario of having product shipment delayed by compliance issues, band-aid fixes rather than engineered solutions, and the cost overruns associated with both of these. The biggest challenge is definitely education.

EEWebElectrical Engineering Community

Join Todaywww.eeweb.com/register

Page 7: EEWeb Pulse - Volume 20

To request a free evaluation board go to:

Avago Technologies, an industry leader in IGBT Gate Drive technology solutions introduces our Next Generation series!

Based on BCDMOS technology Avago can deliver higher peak output current, better rail-to-rail output voltage performance and faster speed than previous generation products. The increased drive and speed along with the very high CMR (common mode rejection) and isolation voltage will enable you to build more efficient and reliable motor drive and power conversion systems. In addition the SO6 package which is up to 50% smaller than conventional DIP packages facilitates smaller more compact design.

www.avagotech.com/optocouplers

Avago Technologies Optocoupler Solutions

2 Times Faster, 50% Smaller, True Rail-to-Rail Output Voltage IGBT Gate Drives

Benefits

• Suitable for wide range of IGBT class for different market applications

• High output peak current for fast and efficient IGBT operation

• Rail-to-rail output voltage for reliable IGBT operation

• Lower system power budget

• Suitable for bootstrap power supply operation

• Reduce dead time and improve system efficiency

• Prevent erroneous driving of IGBT in noisy environment

• 40%-50% smaller than DIP package for space and cost savings

Applications

IGBT/MOSFET Gate Drive

AC and Brushless DC Motor Drives

Renewable Energy Inverters

Industrial Inverters

Switching Power Supplies

Page 8: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 8

PROJECTFEA

TURED PRO

JECT10 Important Things

to Consider Before EMC Testing Your Product

By Vincent Greb

Electromagnetic interference and compatibility (EMI/EMC) is a specialized discipline which can best be described as an esoteric hybrid between physics and electrical engineering. Having devoted nearly my entire career to the field, I find it utterly fascinating. But I have observed that many engineers who are forced to deal with it find the field completely frustrating. It comes complete with its own requirements, test equipment, test methodologies, trouble-shooting techniques, and even its own vernacular. Because it is such a specialized area, many companies aren’t large enough to employ a full-time compliance engineer. Consequently, compliance tasks are often delegated to electrical or mechanical engineers or technicians, many of whom aren’t as familiar with the field as they would like to be. As such, they sometimes find it difficult to assess whether or not an EMC test lab will be a good fit for their company’s products.

Compounding the problem is the fact that, in my 25 years of experience, I

have observed that if a product has been designed without taking EMI/EMC into consideration, there is a 95% probability that the product will fail at least one of the tests required for EMC compliance. Thus, there is a good chance that you will be doing iterative testing at an EMC lab. The better the fit between your company and your test lab, the better for everyone involved.

Many engineers focus primarily on emissions. This is understandable, since the Federal Communications Commission (FCC) only requires compliance with emission limits for sale of digital devices in the United States. However, for sale in other economic areas, most notably the European Union and Korea, compliance with immunity standards is also required. As more countries develop and become larger players in the global economy, they continue to adopt standards requiring compliance with both EMI/EMC emission and immunity. All product development teams should realize that EMC does and will continue to play a prominent

role in global compliance, and would do well to consider its implications on the cost, schedule, and marketability of their products.

The purpose of this article is as stated in the title: It will give technicians, engineers, engineering managers, and program managers 10 important things to consider before having EMC compliance testing done on their products. These range from assessing the technical capabilities of a lab to logistical considerations, as well as common technical oversights made in the EMC design of a product.

I should point out that some of these considerations may not apply to your particular product. Some of these recommendations deal with commercial testing (e.g., FCC, CE Mark), while others will apply to MIL-STD, aerospace, and RTCA testing.

Lab Requirements

Consideration #1. Make sure the EMC lab you are considering is accredited. For EMC test labs in the

Page 9: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 9

PROJECTFEA

TURED PRO

JECT

United States, there are two main laboratory accreditation agencies: National Voluntary Laboratory Accreditation Program (NLVAP) and American Association for Laboratory Accreditation (A2LA). NVLAP is a branch of the National Institute of Standards and Technology (NIST), and is therefore a branch of the U.S. government. A2LA is a private, nonprofit organization. While there are other companies that can audit and accredit labs, NVLAP and A2LA are by far, the most established and recognized names in the U.S. An EMC test lab should be accredited by either NVLAP or A2LA to ISO17025: 2005, which is the ISO standard for test and calibration laboratories.

So what does it mean to have an “accredited lab?” Presumably, you’re looking for an EMC test lab as an independent, third-party evaluation of your product to the EMC standards that apply to your product. Well, accreditation is the third-party assessor of the lab. It is a process that provides a degree of insurance that the lab in question has the correct test facilities, test equipment, procedures, processes and personnel to correctly perform the testing in accordance with applicable standards.

Labs should be happy to provide you with two documents to support their claim of being an accredited lab: a certificate and a scope. The certificate is a one-page document which will provide such information as the name of the accrediting agency (NVLAP or A2LA) and the standard to which the lab has been assessed (ISO/IEC 17025: 2005). The scope of accreditation

is usually a multi-page document which lists the tests for which the lab has been approved. It is probably a good idea to verify that the tests you are considering are included under the lab’s scope.

You can also check out the accreditation status of a lab yourself by going to the appropriate web site. The NVLAP web site lists the accredited labs by state. The A2LA site doesn’t provide such a list, but rather allows you to search for a lab by name, area or other related criteria. The links to the appropriate page for NVLAP and A2LA are as follows:

NVLAP: http://ts.nist.gov/standards/scopes/ect.htm

A 2 L A : h t t p : / / w w w. a 2 l a . o r g /dirsearchnew/newsearch.cfm

Is accreditation proof positive that the lab can do your testing? No, but it is a good first step in the right direction.

Consideration #2. For commer-cial radiated emissions testing, does the lab you are consider-ing use a 10-meter chamber or an open area test site (OATS)? When radiated emissions testing was first required for commercial electron-ics (around 1980), an OATS was the only approved way to make the measurements. However, as the radio frequency (RF) spectrum became more cluttered, OATS test-ing became much less reliable. Most notably, the advent of broad-band television is spelling the end of many OATS around the country. The advancement of ferrite and anechoic technology has made 10-meter chambers a viable option. So

what are “semi-anechoic 10-meter chambers?” A qualified 10-meter chamber will meet all the require-ments of an OATS, but is isolated from the external electromagnetic environment. And even though 10-meter chambers are still termed “alternate test sites” by ANSI C63.4, they are much better test sites for five main reasons:

Volumetric site attenuation. Open area sites are only required to meet site attenuation at the center of the turntable. Thus, a site can meet its normalized site attenuation (NSA) requirement and still have serious problems with repeatability and reproducibility of data because a NSA is so limited in scope. Chambers, on the other hand, are required to meet volumetric site attenuation, which is a much more stringent requirement. Not only do chambers need to comply with NSA at the center of the turntable, but at the front of the turntable, the left side of the turntable, and the right side of the turntable. This requirement encompasses a volume rather than a line, and indicates how uniform the “quiet zone” of the site is. The ability to meet the volumetric site attenuation requirement is a significant component that contributes to the repeatability and reproducibility of test data.

Reduced test time. Open Area Test Sites (OATSs) have always had the problem of having to determine whether or not an emission is an ambient or actually emanating from your product. To help mitigate this, many open area sites were built in remote areas, which meant increased transit time to and from the facility. However,

Page 10: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 10

PROJECTFEA

TURED PRO

JECT

broadband noise emanating from power lines often makes emission measurements below 200 MHz difficult, and sometimes impossible. In addition, the proliferation of cellular telephones, pagers, and now broadband high-definition television (HDTV) is taking up larger portions of the RF spectrum, and making emissions measurements at many OATSs more time-consuming and less reliable.

Provided that the unit under test can be set up within 30 minutes, a full-compliance radiated emissions scan from 30 MHz to 1 GHz takes only two hours in a correctly configured 10-meter chamber, as compared with six to eight hours at a typical OATS.

Reduced cost. Chambers typically have a higher hourly rate than open area sites. However, the fact that the work can be accomplished in much less time makes the cost of doing emissions testing in a chamber significantly less than an OATS. In performing a cost comparison, don’t forget to factor in the extra cost of the time for the personnel to support the testing.

Greater repeatability of test data. Open area sites are subject not only to increasing ambient noise, but also to changes in the physical environment around the site. High humidity, rain, and snow can dramatically alter test results, often making them appear higher (or lower) than they actually are. This can result in increased test time, making the manufacturer spend additional time and money reducing an emission which is being enhanced by the environment at the test site. That simply cannot

happen at a qualified indoor chamber, whose measurements are not dependent on the environment. If you see an emission, it is coming from your product or the associated support equipment.

Greater confidence that your product is truly compliant. The basic procedure for radiated electric field emissions testing is as follows: pre-scan, maximization/quasi-peak (QP), cable maximization, final QP. A large part of getting a good set of final data begins with the pre-scan, as this is the basis for the list of frequencies that will be QPed and maximized. The following table compares how the pre-scan in a 10-meter chamber differs from that of an OATS (See Figure 1).

The pre-scan performed in a 10-meter chamber has eight times the resolution of a typical OATS. Not only do you have a better profile of your product (much faster), this is extremely valuable at frequencies above 500 MHz, where signals become increasingly directional. A highly directional signal could easily be non-compliant if measured, yet it might not even make the final QP list, given the lack of resolution of the OATS pre-scan data.

In addition, when testing at an OATS, the possibility often exists that an emission from your product

cannot be measured because it is obscured by the ambient noise. A well-meaning test facility could give you a passing report, however, when self-declaring, it is the manufacturer who has to deal with the implications of selling a non-compliant product. This scenario simply could not happen when using an indoor facility. If you see an emission, you know that it is coming from your product or support equipment and the problem can be dealt with much more easily and directly.

Consideration #3. Assuming the lab you are considering does have a chamber (as opposed to an OATS), will the radiated emissions testing from 30 MHz to 1 GHz be performed at a distance of 10 meters? If you’re looking to ship your product globally, the fact is that neither Taiwan nor Korea will accept 3-meter data from 30 MHz to 1 GHz. While other countries may accept 3-meter data, most do so only with caveats that have recently been added to the standards. In addition, in the event of a dispute between 3-meter and 10-meter data, 10-meter will always take precedence because it is closer to a far-field condition.

The biggest problem with 3-meter data is that you’re definitely in the near field below 100 MHz, which means the emissions will

Parameters 10-Meter OATS

Azimuth Positions (typical) 8 4

Antenna Heights (typical) 4 1

Polarities (typical) 2 2

Total number of measurement locations for pre-scan 64 8

Figure 1

Page 11: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 11

PROJECTFEA

TURED PRO

JECT

behave more erratically. This is due primarily to the fact that the fields generated by the UUT are interacting more with the receive antenna. The closer you are to far-field conditions, the more consistent your test results will be.

Consideration #4. Verify that the lab you’re considering can handle the power requirements of your unit under test, and possibly your support equipment as well. Often the lab will beat you to the punch on this, but if they don’t, be sure to bring it up. Many EMC tests require that different sorts of devices be placed in series with the input power to the unit under test. These devices include line impedance stabilization networks (LISNs) and coupling/decoupling networks (CDNs). It could save everyone a lot of time and effort if both you and the lab know whether or not the unit under test exceeds the current rating, voltage rating, or number of phases supported by these devices. A work-around may exist, but this also might entail additional lead time, as the lab may have to rent and/or calibrate special equipment required to do the testing.

Logistical

Consideration #5. If you have a large product, does the test lab have a loading dock? While there will be a number of things to consider when shipping large products to a test lab, whether or not the lab has a loading dock is a good measure of how well-equipped the lab is to test large products. Here are some other related considerations: Does the lab have a fork lift, and if so, what is its load rating? Does the lab have ample storage space to

store the shipping crates that will sit empty while the unit is being tested? In any event, make sure you coordinate shipping with the lab. If your product is scheduled to arrive prior to testing, make sure the lab is aware of this so they are ready to receive your product.

The 10 things to consider in this article have been written as an introductory guide to all those individuals

who do not have adequate time to devote

to the field of EMC, but have nonetheless

been tasked with the job of managing product compliance.

Consideration #6. Verify that your hardware is completely functional at your facility prior to packing up and shipping to the test lab. This might sound trivial, but you’d be surprised at the number of times hardware arrives which is not functional because it was not checked out at the manufacturer’s location, or because it lacks a cable needed for correct operation. If you check the hardware out at your facility prior to testing, and package up that entire

system, you greatly reduce the potential for encountering problems when you arrive at the lab. If you’re mailing the product to the lab such that the lab will be testing it without client support, make sure you have included ample instructions on how the unit should be set up and configured for testing. In addition, make sure that the lab has the necessary information to contact someone from your facility in the event that an anomaly is encountered during testing.

Consideration #7. If your product is scheduled to undergo immunity testing, understand that some of this testing may be destructive. The two most common tests where hardware is damaged are surge immunity and electrostatic discharge. Surge immunity is a test designed to simulate the indirect effects of lightning or large switching transients induced on power inputs and possibly long I/O cables connected to the unit under test. Unless the power supply on your product is designed to withstand the energy in the surges that will be applied, it will most likely be damaged.

Electrostatic discharge (ESD) testing is designed to simulate both direct and indirect effects of this event. The direct effects can either be air or contact. Air discharge testing is performed on user-accessible parts of the product which are non-conductive, while contact discharge testing applies to conductive portions of the product, also user-accessible.

One frequently asked question is, “Are you going to discharge to connector pins?” If the reference

Page 12: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 12

PROJECTFEA

TURED PRO

JECT

standard is IEC 61000-4-2 (a.k.a., EN 61000-4-2), the answer is no. In other words, unless you are testing to some customer-specific requirement, Section 8.3.2 of IEC 61000-4-2 specifically excludes exposed connector pins to direct discharge. If the connector shell is metal, contact discharge is performed only to the shell, and not the connector pins. Similarly, if the connector shell is non-conductive, air discharge may be applied to the connector shell.

Consideration #8. During im-munity (or susceptibility) testing, how will your product be exercised and monitored? Many people only think of EMC in terms of emissions, during which a product needs to be continually exercised, but not necessarily monitored for correct performance. In my opinion, how-ever, immunity testing is more im-portant because it adds a lot more value to the product. Immunity test-ing looks at how the product will respond when exposed to an ad-verse, externally-impinged electro-magnetic environment. This could be a radiated RF field, transients in-duced on power and I/O cables, or electrostatic discharges. Radiated RF immunity testing can take any-where from four hours to a couple of days, depending on the test being performed. Watching a product for that period of time is extremely te-dious and that prolonged period of boredom could result in the sup-port person missing a problem that occurred during testing. A much more reliable solution to this prob-lem would be to write a script which not only exercises the product, but produces a noticeable error when an out-of-tolerance condition exists.

Visual alarms are good, but audible alarms are even better. The few hours dedicated to programming this feature will pay big dividends during the testing.

Common Technical Oversights

Consideration #9. If you are using an AC power line filter, make sure that you have installed it correctly. Many times, when trouble shooting an emissions problem, the primary source of radiation is the AC power cord. Emissions may be related to the power supply, or might be from higher frequency sources within the product (e.g., digital logic, clocks, or processors). Clients are often perplexed that the AC line can be “hot,” since they know there is an AC power line filter installed in their product! However, for a filter to work correctly, it must be properly installed.

Nearly all power line filters are designed to filter both differential mode (DM) and common mode (CM) noise. DM noise is line to line,

while CM noise is line with respect to some reference. Often, this reference is the chassis. If this is the case, in order for the filter to work effectively, it needs to be installed with a low impedance connection to chassis. If it is installed on a non-conductive surface, this can greatly inhibit filter performance for high frequency (i.e., common mode) noise. A good illustration of this is shown as a very simple common mode model in Figure 2.

The line to chassis capacitor in this filter is designed to provide a return path for noise currents generated within the chassis. This filter, in essence, sets up a current divider in which we would like I1 to be very large and I2 to be negligible. However, the higher the impedance between the filter and chassis, the less effective this current divider will be, and the greater the resultant current appearing on the AC power cord will be. The larger the magnitude of CM current on the AC power cord, the higher the radiated electric field emissions are going to be.

Figure 2: Simplified CM Model for Power Line Filter.

l1

lcml2

Z - Impedance toChassis

NoiseSource

Power Line Filter

(External AC Cord)

CHASSIS

Page 13: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 13

PROJECTFEA

TURED PRO

JECT

A common mistake is to rely on the green wire (i.e., safety) ground for a low impedance return path. Keep in mind that safety ground wires are installed to deal with safety-related problems at power frequencies, typically 50 or 60 Hz. The impedance of the wire is negligible at these frequencies, but since inductive reactance increases proportionally with frequency, it will most likely present an impedance of hundreds of ohms at or above 30 MHz.

Consideration #10. If your product has any shielded I/O cables, make sure that these shields are properly terminated. The typical purpose of a shield is to contain the high-frequency emissions generated on PCBs inside the box, which are propagating on the wires inside the shield. However, in order for the shield to be effective, it must have a low impedance return path to the noise source, which is in many cases, the chassis. If this

condition is not present, the CM currents will simply couple to the shield it will be excited to an RF potential with respect to the chassis, and it will end up radiating instead of the wires. A simplified CM model for this is shown in Figure 3.

Conclusions

Electromagnetic interference and compatibility is a very specialized discipline. However, being both specialized and a support engineering function, unless you work for a company large enough to support an EMC engineer, your company’s compliance is probably being handled by a technician or engineer who only deals with EMC as a sideline, as the need arises. The 10 things to consider in this article have been written as an introductory guide to all those individuals who do not have adequate time to devote to the field of EMC, but have nonetheless been tasked with the job of managing

Figure 3: Simplified CM Model for Shield Termination.

product compliance. If at least one of the suggestions given in this article will be of use to part-time compliance professionals, it will have achieved its goal.

Shield

I/O Cable

Z1

lcm

PCB

CHASSIS

Page 14: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 14

FEATURED

PROD

UCTS

FEATURED PRODUCTS

Digital Serial Analyzer OscilloscopeThe DSA8300 Digital Serial Analyzer is the most versatile tool for developing and testing communications, computers, and consumer electronics which utilize multi-gigabit data transmission. It is used for optical and electrical transmitter characterization as well as compliance verification for devices, modules, and systems used in these products.In addition, the DSA8300 is well-suited for electrical signal path characterization, whether for packages, PCBs, or electrical cables. With exceptional bandwidth, signal fidelity, and the most extensible modular architecture, the DSA8300 provides the highest-performance TDR and

interconnect analysis, most accurate analysis of signal impairments, and BER calculations for current and emerging serial data technology. Finally, with its exceptional signal fidelity and resolution, the DSA8300 is the gold standard for electrical and optical applications which require ultra-high bandwidths, very fine vertical resolution, low jitter, and/or exceptional time interval accuracy. For more information, please click here.

Thin Energy Storage DevicesTo meet diverse customer needs in recent years, as battery devices must offer greater efficiency and functionality, Murata has focused R&D efforts on electronic double-layer energy devices. Technology introduced by CAP-XX, an Australian component design and manufacturing firm and Murata business partner as of 2008, has led to volume production of electronic double-layer energy devices with low resistance (mΩ level) in compact, slim packages. Optimization of electrochemical systems, including the electrode structure, enables flexible charging and discharging from high to low output at a range of temperatures. By

supporting momentary peak load, the components also level battery load and can drive high-output functions that are difficult for batteries alone. For more information, please click here.

turns the R&S RTO into a mixed signal oscilloscope (MSO). In addition to the usual two or four analog channels, the oscilloscope now features 16 digital logic channels with 400 MHz input frequency. Equipped with the MSO option, the R&S RTO allows time correlation between the instrument’s analog and digital sections. For more information, please click here.

Oscilloscope for Embedded DesignsA classic embedded design test case is to simultaneously observe both the analog signal at the A/D converter input and the digital signals at the output. Standard oscilloscopes with only analog channels cannot perform this task. The MSO option for the R&S RTO oscilloscope provides 16 digital logic channels while fully utilizing the benefits of the base unit for mixed signal analysis. In mid-2010, Rohde & Schwarz launched the R&S RTO high-performance oscilloscope. This instrument makes it easy for users to obtain accurate results quickly. A new function has now been added to significantly broaden the application range: A hardware option

Page 15: EEWeb Pulse - Volume 20

2.5A Regulator with Integrated High-Side MOSFET for Synchronous Buck or Boost Buck ConverterISL85402The ISL85402 is a synchronous buck controller with a 125mΩ high-side MOSFET and low-side driver integrated. The ISL85402 supports a wide input voltage range from 3V to 36V. Regarding the output current capability from the thermal perspective, the ISL85402 can typically support continuous load of 2.5A under conditions of 5V VOUT, VIN range of 8V to 30V, 500kHz, +85°C ambient temperature with still air. For any specific application, the actual maximum output current depends upon the die temperature not exceeding +125°C with the power dissipated in the IC, which is related to input voltage, output voltage, duty cycle, switching frequency, board layout and ambient temperature, etc. Refer to “Output Current” on page 13 for more details.The ISL85402 has flexible selection of operation modes of forced PWM mode and PFM mode. In PFM mode, the quiescent input current is as low as 180µA (AUXVCC connected to VOUT). The load boundary between PFM and PWM can be programmed to cover wide applications.The low-side driver can be either used to drive an external low-side MOSFET for a synchronous buck, or left unused for a standard non-synchronous buck. The low-side driver can also be used to drive a boost converter as a pre-regulator followed by a buck controlled by the same IC, which greatly expands the operating input voltage range down to 3V or lower (Refer to “Typical Application Schematic III - Boost Buck Converter” on page 5).The ISL85402 offers the most robust current protections. It uses peak current mode control with cycle-by-cycle current limiting. It is implemented with frequency foldback under current limit condition; besides that, the hiccup overcurrent mode is also implemented to guarantee reliable operations under harsh short conditions. The ISL85402 has comprehensive protections against various faults including overvoltage and over-temperature protections, etc.

Features• Ultra Wide Input Voltage Range 3V to 36V• Optional Mode Operation

- Forced PWM Mode- Selectable PFM with Programmable PFM/PWM Boundary

• 300µA IC Quiescent Current (PFM, No Load); 180µA Input Quiescent Current (PFM, No Load, VOUT Connected to AUXVCC)

• Less than 3µA Standby Input Current (IC Disabled)• Operational Topologies

- Synchronous Buck- Non-Synchronous Buck- Two-Stage Boost Buck

• Programmable Frequency from 200kHz to 2.2MHz and Frequency Synchronization Capability

• ±1% Tight Voltage Regulation Accuracy• Reliable Overcurrent Protection

- Temperature Compensated Current Sense- Cycle-by-Cycle Current Limiting with Frequency Foldback- Hiccup Mode for Worst Case Short Condition

• 20 Ld 4x4 QFN Package• Pb-Free (RoHS Compliant)

Applications• General Purpose• 24V Bus Power• Battery Power• Point of Load• Embedded Processor and I/O Supplies

FIGURE 1. TYPICAL APPLICATION FIGURE 2. EFFICIENCY, SYNCHRONOUS BUCK, PFM MODE, VOUT 5V, TA = +25°C

VOUTISL85402VCC

SGND

MODE

BOOT

VIN

PHASE

PGND

FSEXT_BOOST

EN

FB

COMP

VIN

AUXVCC

LGATEILIMIT

SS

SYNC

PGOOD

50

55

60

65

70

75

80

85

90

95

100

0.1m 1m 10m 100m 1.0 2.5

EFFI

CIE

NC

Y (%

)

LOAD CURRENT (A)

6V VIN

12V VIN

24V VIN

36V VIN

September 29, 2011FN7640.0

Intersil (and design) is a registered trademark of Intersil Americas Inc. Copyright Intersil Americas Inc. 2011All Rights Reserved. All other trademarks mentioned are the property of their respective owners.

Get the Datasheet and Order Samples

http://www.intersil.com

Page 16: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 16

John CareyDirector of Marketing

SmartPhoneDesignProjected CapacitanceFueling Innovation

User experience is the most critical feature shaping mobile phones today. When Apple launched the iPhone, they took touch technology to a completely new level. No longer were users required to physically push down on a screen to make an event happen—they could simply touch! Gestures such as pinching, zooming, stretching, panning, swiping, flicking and rotating became possible. The interaction capabilities with a mobile device completely changed. Furthermore, consumers no longer had to live with a bland operating system, something that just made calls and stored contacts—they had Apps!

The mobile phone today is a go-to gadget for taking photos, navigating in unfamiliar areas, listening to music, playing video games, sending emails and texts, and of course, making phone calls. Five years ago, phones were dominated by the need to have a keyboard, be it alphanumeric or full QWERTY. As the capability and usefulness of touching a screen grew, the need for the keyboard diminished. As that precious real estate became available, the size of the display was able to increase. A larger display correlated well to a user interacting with it for advanced functionality like

surfing the web, digital photography, personal navigation and gaming. Today, roughly 25 percent of the mobile phone market uses screens larger than 3.9 inches and 70 percent are larger than 3.5 inches. It is expected that the adoption of larger screens will continue, but there is a physical limitation in size that consumers will accept. Today’s largest screens are near 4.3 inches.

There is one critical piece of technology that is at the heart of enabling all of this functionality: Projected capacitive touch!

Projected Capacitance

Resistive touchscreens required the user to physically press on the screen and were not initially available in multi-touch. The technology does not lend itself to gestures. Furthermore, resistive stackups are poor for light transmissivity, which translates into a dimmer display, or cranking up the backlighting on the display at the cost of battery life. Resistive touchscreens are also mechanical systems that break down over time. While new multi-touch resistive screens appeared lately, they are not gaining traction for they still have many of the classic resistive issues and no longer a price advantage

Page 17: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 17

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

over capacitive.

Projected capacitive touch, on the other hand, allows for true multi-touch with gesturing in a smooth and seamless user experience. The costs of integrating projected capacitive touch are also rapidly decreasing. Within projected capacitive touch there are two major technologies for sensing fingers: self-capacitance and mutual-capacitance.

Capacitance is defined as the ratio of charge to potential on an electrically charged, isolated conductor. A capacitor is an electronic device used for storing charge. As such, self-capacitance measurement in a touchscreen design would be a measurement of an individual sensor’s capacitance.

In a self-capacitance touchscreen, the touch panel is made up of a grid of individual sensors. By measuring the self-capacitance of each sensor individually, the chip can get a steady-state reading of the system. A user placing his finger on the touch panel actually increases the self-capacitance of the nearby sensors. This is because capacitors in parallel sum together. By looking at all of the neighboring sensor data, advanced algorithms can then calculate the exact position of the finger, and begin to track it as it moves.

Self vs. Mutual Capacitance

Self-capacitance measurements are excellent because the sensors project the field quite a distance, which gives them a lot of signal. Inherently, self-capacitance measurements can be made very quickly, which allows for high switching frequencies and immunity to things

like AC noise. There is one fundamental issue though. Self-capacitance is not ideal for multi-touch. This is because of an issue known as ghosting, where there is ambiguity in the position of the two fingers of a screen. The problem becomes impossible with a third touch.

As today’s operating systems like Android and WP7 support four fingers and beyond, true ghost-free multi-touch is required in smart phones. This is why mutual-capacitance is so important. With the same amount of IO on a touchscreen chip, mutual-capacitance scanning can deliver higher accuracy and true unambiguous touch. Instead of having X+Y individual sensors (self-capacitance), mutual-capacitance measurements are made by measuring the mutual capacitance between the intersections of X and Y. This creates X*Y individual sensors on the screen. Best in class touchscreen controllers in the mobile space offer 32 sensor channels for achieving the ideal sensor pitch of 5mm. For a 16:9 aspect ratio, one would design this as 20 Tx by 12 Rx. This allows for 240 sensors on the screen versus just 32 with self-cap.

Mutual-capacitance touchscreens create a grid of horizontal and vertical sensors much like self-capacitance. However, rather than each sensor line being touch sensitive, only the intersections are actually sensors. This is accomplished by setting the sensors up as either Tx or Rx. The capacitance of any node Cm is 0A/d, where A is the area of intersection, and d is the distance between the two sensor lines. Cm can be measured by sending electrical current across the Tx lines. That current travels across the Tx sensor line to the point of crossing by the Rx line, and jumps across

Y0

Y1

Y2

Y3

Y4

Y5

Y6

Y7

Y8

Y9

Y10

Y11

X0 X1 X2 X3 X4 X5 X6 X7

CMCM CM

CMCM

f

Figure 1: Mutual-Capacitance

Page 18: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 18

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

via the electrical field to the Rx line. It then travels back to the chip. With sophisticated Tx and Rx schemes, the touchscreen device can measure the Cm of every intersection in the sensor (Figure 1).

When a finger comes into contact with the panel, it offers another path for electrical current to travel, so not all of the current travels back across the Rx line. Some escapes to ground through the user. As such, the measurement is reduced. The touchscreen device builds a heat map of the touch panel, and advanced algorithms can process the data to come up with finger position data for as many touches as the engineer would like.

While mutual-capacitance measurements are great for supporting unambiguous multi-touch, the signal from mutual-capacitance measurements is much lower compared with self-capacitance. So enabling advanced features like a stylus is very difficult with a mutual-capacitance measurement alone. This is because a stylus conducts very little capacitive change to the touch panel. This is why smart phones on the market today, which have a stylus, offer a stylus with anywhere from a 3mm to 6mm tip. These are almost like very small fingers. This makes it difficult for a user to do handwriting, as with Asian characters for instance.

Advanced Touch Features

Why can’t a multi-touch touchscreen device detect a smaller stylus? Back to the simple equation of capacitance! Capacitance is directly proportional to the area. As the tip gets smaller, so does the capacitive change invoked by the stylus. In a noise-free environment, one could crank up the sensitivity of the mutual-cap touchscreen device to see a smaller stylus. However, as soon as noise is introduced (e.g., by the display, environment, chargers), the idea would break down. That noise would be more powerful than the stylus signal.

Getting around this requires a device that is capable of both self and mutual-capacitance measurement, and the ability to switch dynamically between the two in application. This functionality gives the engineer the best of both worlds: unambiguous multi-touch recognition from mutual, and large signal from self-capacitance. However, this gives the user even more!

Self-capacitance and mutual-capacitance measure-ments can be used like differential signals to deliver other advanced features (Figure 2).

Self Capacitance (Cs) Details

Mutual Cap (Cm) Details

NO TOUCH DANGER

Baseline

BaselineCapacitive Raw Counts

Capacitive Raw Counts

Finger Detected

Finger Threshold

Finger Threshold Diff

NO Detect

Figure 2: Combining self-capacitance and mutual-capacitance

The first trick is waterproofing. Until recently, smart phones have struggled to offer capacitive touch that still works when a user’s fingers are sweaty or wet. The same is true for when rain or condensation is present on the screen. Mutual-capacitance just doesn’t work well with water because water conducts. So raindrops hitting the touch panel look like finger presses, and often phones or tablets will completely lock up when they are used in these conditions due to the baseline not resetting properly. By using differential signal analysis, the most advanced touchscreen controllers can switch between measurement modes to understand if there is a water condition present, and track fingers properly.

Hover is the latest technology in the touch world, and is quickly becoming pervasive. Delivering hover, much like 1mm stylus, requires switching between self and mutual-capacitance scanning methods. It is a new technology that allows the touchscreen device to track a user’s finger while it is hovering over the screen, not physically touching it. This feature allows the operating system to make decisions about a touch versus a press. For instance, assume the user is browsing a webpage, and there are multiple small links close together. The user could hover over the links to have that portion of the screen magnified, and then touch the appropriate link to click it (Figure 3).

Another interesting aspect of hover is its usage with 3D displays. A new trend that has emerged in display technology is the viewing of 3D mobile displays without glasses. With Hover technology, the user will be able to interact with his display in 3D!

Many mobile, App, and operating system developers are already working on integrating hover use cases into future releases of their products. It is anticipated to have a big impact on the mobile gaming revolution.

Page 19: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 19

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

System Design

As exciting as the use cases of touch are for mobile phones, there are also a lot of system design trends that are also changing. A typical system for a touchscreen is comprised of a chip, the touch panel or sensor, and the flex circuit that connects the sensor to the PCB. Traditionally designers have put the chip on the flex. This has been largely due to physical design constraints on the PCB. In some cases, the touchscreen device cannot deal with the longer transmission lines created between the sensor and the chip when not on the flex. A few devices do offer the ability to be placed in either location, but most are still too large to fit on the PCB. Best in class products are available in a Chip-Scale Package (CSP) so that they are physically small enough to sit on the PCB. The CSP controllers are a fraction the size of the BGA offerings, and mainstream handling of these packages is already realized.

While there are plenty of design challenges with a system as complex as a projected capacitive touchscreen, two of the biggest are noise from displays and chargers. Display noise looks different for every type of display, but is fairly uniform across the sensor. Charger noise is also quite a challenge. It doesn’t manifest itself until a finger is physically present on the screen (Figure 4).

No charger is alike, and neither are the noise profiles. Some give out broadband noise, some have center frequencies with harmonics. Noise has been seen as high as 80Vpp from some chargers. All of these noise sources exhibit themselves as phantom touches to the touchscreen controller. Dealing with these sources

requires advanced hardware and sophisticated noise suppression or avoidance algorithms. It is noteworthy that many of the top mobile vendors have banded together to create charger noise specifications: EN 62684-2010, EN301489-34v1.1.1.

Figure 4: Charger noise in touchscreens

Figure 3: “Hover” functionality

RBODY

RP1 RP2

RXCP1 CP2AC Mains

Charger

VCHG_NOISE

CEQVTX

ISNSR

CM

CGND

EGND

CF

Sensors

Much innovation is also centered on the sensor in mobile phones. This is because the sensor is actually the most expensive piece of the touchscreen system. Sensors can be built on either a glass or Polyethylene terephthalate (PET) substrate. The most common material used for patterning within the sensor is Indium Tin Oxide (ITO). ITO is a good conductor that is optically clear, nearly invisible. Techniques are available to make it invisible, be it through index-matching or dummy pattern filler. New technologies are emerging regularly as ITO material replacements, and sensor stackups are commonly being looked at for cost reduction options.

Traditional stackups are made of two layers. On PET for instance, this means two layers of PET. The bottom layer of PET carries the Tx part of the pattern while the top layer of the sensor carries the Rx. This all gets sandwiched together with Optically Clear Adhesive (OCA). Then this sensor gets physically laminated to the cover lens with the same material. Think of one layer of the pattern being oriented vertically while the other layer is oriented horizontally. At each intersection, an actual parallel-plate capacitor is formed, and every node is scanned independently.

While this stackup works very well for PET, such a stackup gets too thick and expensive on glass. The Dual-Sided Diamonds (DSD) sensor pattern is used more typically on glass. This pattern only uses one layer of glass but does require jumpers much like vias in PCB design. This process requires a layer of resin to act as

Page 20: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 20

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

an insulator and the process brings the cost of the glass sensor in line with the PET sensor (Figure 5).

In order to bring the cost of sensors down and to reduce the overall thickness of the phone, OEMs are excited about two new pervasive technologies. The first is true single layer sensor technology. In this technology, the sensor stackup is reduced to just one substrate layer and one layer of ITO, with no special insulation layers or jumpers. To do this properly, the touchscreen chip manufacturer needs to not only develop a unique sensor design, but also sophisticated algorithms to adjust for the changes in the pattern.

With each of these technologies, after the sensor is built, it must be physically laminated to the cover lens. This process is not cheap or as simple as it sounds. The second key sensor technology is Sensor-On-Lens, often called Direct Patterned Window (DPW). With this type of stackup, rather than depositing the ITO directly onto a separate substrate, many glass manufacturers are depositing directly onto the cover lens. Some mobile phone manufacturers are already in mass production with this technology today. It lowers the cost of the system, and makes the mobile phone thinner!

Dual LayerCOVER LENS

MH3

ITO

5

4

3

2

1

OCA

PET

OCA

PETITO

True Single LayerCOVER LENS

CY Proprietary

ITO

3

2

1

OCA

PET

“1.5” LayerCOVER LENS

Diamonds

Bridge

OCA

PET

InsulatorITO

Figure 5: True Single-layer Sensor

Display Integration

Making the sensor thinner and cheaper by reducing layers from the system is very attractive to mobile phone manufacturers. Display vendors are full steam ahead on integrating the sensor into their displays. This will simplify the supply chain, as well as reduce system cost and thickness. However, it will limit design flexibility. As such, many predict that On-cell and In-cell stackups will only hold a portion of the market once mature.

The two main display integration technologies are On-cell and In-cell. The definitions of each type of technology are a bit different depending on what type of display is being considered for instance: TFT, IPS, or OLED. However, they do hold the same principle that On-cell displays integrate the sensor layer above the color filter, while In-cell displays will integrate it underneath.

In a typical On-cell LCD, the touchscreen sensor layer is underneath the Polarizer and on the Color filter glass. The major challenge for On-cell is the amount of noise coupled from the display into the sensor. The touchscreen device needs to have sophisticated algorithms to deal with this noise (Figure 6).

LCD Module (LCM)Dual-Face Glass Processing

COVER LENSPolarizer (0.2mm)Touchscreen Sensor ITOColor Filter Substrate (0.5mm)Color FilterCommon ITO (VCOM)Liquid CrystalArray Substrate (0.5mm)Polarizer (0.2mm)

Figure 6: On-cell LCDs

Page 21: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 21

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

In-cell touchscreens are believed to offer the lowest cost display integrated touch solution at maturity. However, having the ITO layer on the bottom side of the color filter glass right on top of the Vcom layer poses issues. First the Vcom layer will act as a large ground and swamp the projected capacitive signal, reducing sensitivity if the glass isn’t thick enough. Second, the stackup creates a large parasitic capacitance, which means the Tx current supplied by the touchscreen device must be quite high. In-cell stackups obviously suffer noise challenges from being inside the display. Again, the touchscreen controller will need to deal with these issues. Today, In-cell remains a proof of concept and not a mass production solution.

Summary

While one cannot predict all of the innovations to come in this exciting space, one thing is certain. The way consumers interact with mobile devices has changed. Expectations of what a user should do when they see a display have changed. Consumers expect to touch

a display to control it. Consumers expect a particular type of response and feel. Expectations are only going to grow as the market continues to evolve and mature. At the heart of it all is projected capacitive touch technology, fueling innovation.

About the Author

John Carey is the Director of Marketing for TrueTouch at Cypress Semiconductor. John received his BSEE from Arizona State University, and his MSEE from California State University Fullerton. He has worked in design, sales, business development and product marketing. He lives in Seattle, WA with his wife and daughter, and enjoys tuning cars in his free time.

From design to service, Microtips offers a variety of competitively priced Liquid Crystal Display modules which includes standard character and graphic monochrome, passive and active color displays with white LED as well as custom LCD modules and complete OEM services.

For your own design needs please contact Microtips Technology: [email protected]

7” High Bright

240 x 160 COG w/LED Backlight

QVGA Green w/LED Backlight

LCD for Any Application

Microtips Technology

Automotive, Medical, Telecom, POS

Page 22: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 22

Ray SalemiVerification Consultant

State MachineDesign

State machines are a foundation of digital design. Eventually we all reach the point where we need to control our digital algorithm, and we almost

always turn to a state machine to do the job.

Because of this, many EDA tools recognize when the RTL designer is creating a state machine and use this information to improve their simulation and synthesis results. Once a tool recognizes a state machine in your design, it can deliver a list of features that are not available for generic logic. For example, synthesis tools can change the state machine encoding to improve synthesis results, while simulators can render the state machine and provide debugging and coverage information. Tools such as Mentor’s Precision High-Reliability synthesis engine can even add error correcting information to allow the state machine to power through single-event upsets and jump to the next correct state. However, none of these features will work if the software can’t recognize the state machine. While EDA tool manufacturers support a wide variety of state machine coding styles, it’s still possible to write code that can’t be recognized as a state machine, either by software tools or by humans.

This is the first of a series of articles that will talk about state machine today. We’re going to start with the most basic topic, naming our states and identifying the state variable.

Every state machine has a register that holds the state. This register feeds the logic that creates the state machine output. The register also combines with input signals to figure out the next state. In this article, we’ll examine techniques for coding a state machine to make it easy to debug and reuse. As an example, we’ll use a simple traffic light state machine:

people_slow

walk_request==0

yellow_int=1;dont_walk_int=1;

red_int=1;dont_walk_int=1;

red_int=1;walk_int=1;

red_int=1;flash_dont_walk_int=1;

green_int=1;dont_walk_int=1; walk_request==1

people_gocars_slow cars_stop

cars_go

1

2

Figure 1

Page 23: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 23

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

The first thing you’ll notice about this state machine is that the states have descriptive names. The machine sits in the cars_go state until someone presses the walk_request button. Then it slows the cars, stops them, and lets the pedestrians walk. It then warns the people that the light is about to go back to green, and then goes back to green. This is a simple illustrative state machine. In a real-world state machine we’d need to use a counter to keep the states in each state long enough to be useful.

We want to capture the readability of the state names in our code. This will make it easier to debug, and we’ll be able to put the state variables into the waveform viewers of some simulators to see the current state on a wave form. We can create this name-to-state mapping in VHDL and in Verilog (SystemVerilog’s approach is similar to VHDLs).

In VHDL we create a state type that lists the names of the states. Then we declare our state variables to be of the state type. The code looks like this:

or allow for error-correcting codes. Or the designer could have the synthesis tool use a binary encoding for a more compact solution.

We can do a similar thing with Verilog:

4344454647484950515253545556

ARCHITECTURE fsm OF light_controller_vhd IS

TYPE STATE_TYPE IS ( cars_go, cars_slow, cars_stop, people_go, people_slow );

-- Declare current and next state signals SIGNAL current_state : STATE_TYPE; SIGNAL next_state : STATE_TYPE;

Figure 2

Lines 45-50 specify a VHDL type called “state_type” and create values that can be placed in that type. This serves two purposes: it makes the state machine easy to read, and it lets the compiler catch cases where you mistyped the value. This is more difficult to do if you were using raw numbers for your state types.

Notice that this code doesn’t specify the coding for the state machine; it leaves the coding up to the synthesis tool, or up to the needs of the designer. A designer could tell the synthesis tool to code this state machine as a one-hot if it was necessary to catch single event upsets

404142434445464748

parameter cars_go = 3’d0, cars_slow = 3’d1, cars_stop = 3’d2, people_go = 3’d3, people_stop = 3’d4;

reg [2:0] current_state, next_state;

Figure 3

This code uses Verilog parameters to attach names to numbers, and then later code can use the names to put the numbers into the state diagram. The numbers in this example are suggested encodings for the states. Most synthesis tools can override these state encodings to create whichever encoding the designer wants to see.

For completeness, here is the same thing in SystemVerilog. Notice that SystemVerilog has adopted VHDL’s numberless approach:

38

39

40

41

42

43

44

45

// State encodingtypedef enum cars_go, cars_slow, cars_stop, people_go, people_slow state_t;state_t current_state, next_state;

All of these ways of writing the state machine make it much easier to write the next-state logic and the output logic. Here is the next state logic for this state machine written in Verilog and VHDL. (See Figure 5)

This is very easy to read—much easier than if we hand named the states “s0,” and “s1” as I have seen in some code. Now, when you come back to this state machine in six months, you’ll remember what you were doing when you designed it.

Figure 4

Page 24: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 24

TECHN

ICA

L ARTIC

LETECHNICAL ARTICLE

Figure 5

Today we looked at ways to create synthesis-friendly state machines that are easy to understand and reuse. In the next article, we will look at coding Mealy and Moore state machines and our options for dividing next-state logic and output logic.

About the Author

Ray Salemi is a veteran of the EDA industry and has been working with Hardware Description Languages

since he joined Gateway Design Automation—the company that invented Verilog. Over the course of his career he has worked at Cadence, Sun Microsystems, and Mentor Graphics. Ray is currently an Applications Engineer Consultant with Mentor Graphics.

38394041424344454647484950515253545556575859

BEGIN CASE current_state IS WHEN cars_go => IF (walk_request = ‘1’) THEN next_state <= cars_slow; ELSEIF (walk_request = ‘0’) THEN next_state <= cars_go; ELSE next_state <= cars_go; END IF; WHEN cars_slow => next_state <= cars_stop; WHEN cars_stop => next_state <= people_go; WHEN people_go => next_state <= people_slow; WHEN people_slow => next_state <= cars_go; WHEN OTHERS => next_state <= cars_go; END CASE;END PROCESS nextstate_proc;

383940414243444546474849505152535455565758596061

begin : next_state_block_proc case (current_state) cars_go: begin if (walk request==0) next_state = cars_go; else if (walk request==1) next_state = cars_slow; end cars_slow: begin next_state = cars_stop; end cars_stop: begin next_state = people_go; end people_go: begin next_state = people_slow; end people_slow: begin next_state = cars_go; end default: next_state = people_go; endcaseend // Next State Block

VHDL Verilog/SystemVerilog38394041424344454647484950515253545556575859

BEGIN CASE current_state IS WHEN cars_go => IF (walk_request = ‘1’) THEN next_state <= cars_slow; ELSEIF (walk_request = ‘0’) THEN next_state <= cars_go; ELSE next_state <= cars_go; END IF; WHEN cars_slow => next_state <= cars_stop; WHEN cars_stop => next_state <= people_go; WHEN people_go => next_state <= people_slow; WHEN people_slow => next_state <= cars_go; WHEN OTHERS => next_state <= cars_go; END CASE;END PROCESS nextstate_proc;

383940414243444546474849505152535455565758596061

begin : next_state_block_proc case (current_state) cars_go: begin if (walk request==0) next_state = cars_go; else if (walk request==1) next_state = cars_slow; end cars_slow: begin next_state = cars_stop; end cars_stop: begin next_state = people_go; end people_go: begin next_state = people_slow; end people_slow: begin next_state = cars_go; end default: next_state = people_go; endcaseend // Next State Block

VHDL Verilog/SystemVerilog

EEWebElectrical Engineering Community

Join Todaywww.eeweb.com/register

Page 25: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 25

RETURN TO

ZERORETURN TO ZERO

Page 26: EEWeb Pulse - Volume 20

EEWeb | Electrical Engineering Community Visit www.eeweb.com 26

RETURN TO

ZERORETURN TO ZERO

Contact Us For Advertising Opportunities

[email protected]

www.eeweb.com/advertising

Electrical Engineering CommunityEEWeb