The Evolution of the IoT CLIFF LLOYD Business Development Director, Logic Division, NXP
Designing for Rugged Environments
NXP’s
Big
JANUARY 2105
I.D.E.A.
Dual Configurable Logic Design Contest
Your Guide to Embedded MCUs and Development Tools. LINK HERE Everything you’re looking for in one place.
w w w. e m b e d d e d d e v e l o p e r. c o m
CONTENTS
CONTENTS
of nt Life
certain pment with, t,
Simple Steps to ImprovingAugSoftware Quality ust 1 5 pril 1 ADevelopment Facts of Software Life h1 any consumer electronics
M
ents ic Pres g o L P NX G R AN D
PRIZE
External drivers
s s Valen Clemen
g i B e h T
I/O
Microcontroller
Output_CLK Serial input
. A . .I D.E I/O I/O
Q A
Input_CLK
74HC595
unced
s Anno
The Big I.D.E.A. Contest 2015 International Design Engineering Award
Accelerometers:
Co (Sp rth $2 s. to the zes wo ruction advance win pri and inst ts will e rules ntestan as co h P d n te issio » Selec e Subm view th ere to ase. Click h sion Ph Submis m the froa L P ed gravity is form of acceleration, and so M ct O same not require the ts sele 15 - C testan device, LED driver from NXP, con APRILthe NPIC6C596A ne 30.at rest still has a downward sent to e an object Ju b y b ill level ofignprecision ging kits w which shift itregister for judfunctions similar to a » Descombines m ted acceleration. This fact enables an be sub that a fighter s must jet 74HC595 » Entrie with a high-voltage (HV) MOSFET driver.
Bringing Advanced An Sensor Functionality accelerometer measures acceleration Note that many of in 3 axes. It isIndustrial important to note that these systems do to Consumer, Embedded, Applications PHASE forand Figure 3 gives the output schematic one such ETION
Now, with the cascading, the same three pins on the microcontroller can be used to control up to 16 or 24 LEDs instead of just eight. The ability to cascade shift registers can reduce the total number of microcontrollers needed in the design, and that ., reduce size, too. can help lowerigcosts and I.D.E.A
g Award in r e e in g En l Design a n io t a n r tools 015 B 2015 Inte in the 2
Shift register
Winner
Designing for Rugged Environments Embedded Products in Offshore Oil Rigs
Figure 2. Cascading 74HC595 devices to drive more LEDs
torage register
ase tion Ph Comple
9-AXIS SENSOR FUSION Marc devices ary 1 can benefit from 9-axis Janu Using 9-axis sensor fusion—data from sensor fusion (see Figure 1).12 V an accelerometer, magnetometer, and For example, cell phones, gaming gyroscope—systems can accurately E entries AS ing for systems, health monitors, and wearable RY PH us draw $100 each.) 1 - ENT ial bonposition Y rth themselves in the world, ec o R p w (S A s . U ze N naire JAimplement electronics could high win pri tionvaluets will it ques including inclination and orientation as d subm ive contestan Fill in an added functions »such as three-dimension ch 15. F ar e. M before on Phas well as changes in position and rotation ubmissi test! the Spositioning gesture recognition, relative nce to the con » Adva d start (see Figure 2). Effectively, sensor fusion an r te gis to retracking. to other users, andClicmotion To k here Storage register Storage register E uses multiple sensors to fill in the blind S A H P ucts. ts achieve this, devices need 9-axis ’s prod ISSION Msensor ntestan ng NXP of Serial output sensors. . Ten co 1 - SUB l 15individual atic usispots ri H p C em A R h A process a sc efore data and the abilityMto b Shift register Shift register ce s u d ic at will pro schem stants ing for te e. w n o ra as C d h » .) it efficiently. 74HC595 on P onus 74HC595 00 each mpleti ecial b
12 V
more
ase sion Ph Submis
hase Entry P
me goes on
pers
Expanding Mobile NApplication Functionality D OUNCE accelerometer to determine how a needs to stay in NERS A N IN W system is oriented relative to “down.” withflight. Magnetic Gyroscopes GUST 1 they AURather, alue Prize V $3000 Output schematic PRIZE: D ue N al A V R need»aG cost-effective Prize $2000 LACE: ue ze Val This IRST P ri P 0 9-axis» Fsensor fusion Qn information can also be used 0 E: $15 D PLAC e u N al O C V E how level a system is. »S Prize to determine 0 implementation that 0 0 33 V alue E: $1 Prize V D PLAC : $500 » THIR Many handheld and portable devices NTION matches the needs Eof M LE O R AB » HON
“The idea behind the
ique ouser Big I.D.E.A. Design Contest XP’s un P an d M ring N oin NX Inatu some cases, a m 5 ,V, 8-bit register like the 74HC595 fe t s u te ctr on c e p n s ig e is to make the engineer s , thused to drivenLEDs a de crossbe A alog directly. This works p acan , Smart t line-u ic c g u o d L ro best when the p Figure 1. LEDs are specified for relatively low urable aware of use orientation to adjust the display consumer applications to improve theof the breadth Config g Dual voltage and forward current. LEDs that operate with r. includin e to match how the user is holding the w o user experience. With the availability P NXP’s product portfolio.” f V or require forward current Ts, and voltages higher than nds o6 MOSFE device. Devices commonly using this thousa in of new MagGyros, such as the KMX62G w ery typically require an external ce to 20 amA t evwill a chanthat exceeds GND functionality include cell phones, awards ne has h o it from Kionix, developers can use 6-axis ry w e , v s E ze of pridriver. worth tablets, and laptops. sensors (accelerometer + magnetometer) n. dollars petitio m o c e f th o l e to provide the equivalent of 9-axis v le outputs Figure 3. Output schematic for shift register with open-drain schematic for oneOpen-drain such
J
&
Don’t Lose Your Cool Important Ways to Approach Heat Management Reduce ESD Susceptibility Ways to Protect Your Electronic Designs
ives the output Another unique feature of an output (accelerometer + magnetometer Adding open-drain outputs to the shift register outputs e NPIC6C596A LED driver from NXP, accelerometer is the ability to tell if a creates a single-chip solution that eliminates thewhile reducing energy + gyroscope) mbines shift register functions similar to a device has been need for an external driver. Thisconsumption can yield significant Figureas 4 shows used in place of dropped. For example, by as much 90%.the NPIC6C596A with a high-voltage (HV) MOSFETreductions driver. in the bill of materials, since each output the 74HC595. when a laptop is resting on a table, it
hematic
Qn
33 V
4 12
The Evolution of the Internet of Things TI Prepares Customers for the IoT of Tomorrow
of the shift register can drive the LEDs directly.
The Big
Q & A: The Big I.D.E.A. Cliff Lloyd, NXP Semiconductors detects 1 G. However, if the laptop is
I/O
I/O I/O
Output_CLK
Storage register
Serial input Input_CLK
knocked off the table, it will detect 0 G as it falls to the floor (similar to how zero-gravity or weightless is simulated by putting a plane into freefall). This enables a system to detect if it is falling and at imminent risk of collision. In the case of a laptop, the system can proactively park
NXP’s Complete Solution CLIFF LLOYD, Business Development Director, Logic Division, for Sensor NXP Processing Applications Semiconductors, discusses Dual Configurable Logic and this Storage register
Serial output
Shift register NPIC6C596A
GND
24 30 38 46 54 60
I.D.E.A.
12 V
EFFECTIVELY, SENSOR FUSION USES Open-drain outputs Usinging Shift Registers drive LEDS directly MULTIPLE SENSORS TO FILL IN THE to SENSORS. Simplify LED Designs BLIND SPOTS OF INDIVIDUAL
Microcontroller
20 22
Figure 4. Output schematic for shift register with open-drain outputs
Shift register
NPIC6C596A
year’s Big I.D.E.A. (International Design Engineering Award).
66
The following interview was conducted in early January at the NXP offices
utput schematic for shift Figure 4. Output schematic for shift register with open-drain outputs. in San Jose by Glenn ImObersteg, President of Convergence Promotions. tput schematic for shift register with open-drain h open-drain outputs. Using shift registers to reduce size and BOM in LED designs
hows athe of the 74HC595 with the ases, 5V,NPIC6C596A 8-bit register used like in placeReplacing 595.can be used to drive LEDs NPIC6C596A eliminates the need 595 for external drivers, creating a his works best when the LEDs design that is more compact and
2
3
Figure 2.
the hard prevent
Many ot for acce power e tracker t minutes device c This sim improve range of
Magne
A magne fields. It identify analyzin rate of c magnet direction
4
TECH REPORT
The
EVOLUTION
of the Internet
of Things
By Jim Chase — Strategic Marketing, Texas Instruments The Internet of Things (IoT) is rapidly evolving. In order to attain the expected 50 billion connected devices in 2020, there is a need to understand the fundamental challenges in obtaining horizontal and vertical application balance. With more than 27 years in the high tech industry, Jim Chase has spent his career working with customers and helping them get in front of technology trends and challenges. As a trusted expert, he employs his system solutions approach to business and consumer cases worldwide. It is that methodology that has him creating solutions at Texas Instruments (TI) for the IoT and helping customers connect their products.
5
T
he Internet of Things (IoT) is generally thought of as connecting things to the Internet and using that connection to provide some kind of useful remote monitoring and control. This definition of IoT is limited, and references only part of the IoT evolution. It is basically a rebranding of the existing Machineto-Machine (M2M) market of today. The Internet of Things is best defined as:
An intelligent, invisible network fabric that can be sensed, controlled, and programmed. IoT-enabled products employ embedded technology that allows them to communicate, directly or indirectly, with each other or the Internet. In the 1990s, Internet connectivity began to proliferate in enterprise and consumer markets, but was still limited in its use because of the low performance of the network interconnect. In the 2000s, Internet connectivity became the norm for many applications and today is expected as part of many enterprise, industrial, and consumer products to provide access to information. However, these devices are still primarily things on the Internet that require more human interaction and monitoring through apps and interfaces. The true promise of the IoT is just starting to be realized—when invisible technology operates behind the scenes dynamically responding to how we want “things” to act.
6
To date, the world has deployed about 5 billion “smart” connected things. Predictions say there will be 50 billion connected devices by 2020 and in our lifetime we will interact in a trillionnode network. Those are really big numbers. How things are fundamentally deployed today is a barrier to realizing those numbers. The industry will only achieve the reality of 50 billion connected devices by simplifying how things connect and communicate today.
THE IOT OF TOMORROW: A SCENARIO The hotel where I have a reservation knows the approximate time of my arrival because I have allowed Apple and Google to track my location. It also knows that I am hot and sweaty from my trip because of the temperature and moisture sensors that are part of my smartwatch. The hotel room I will stay in is currently dormant—no lights, drapes closed, and the temperature is at optimized dormant levels. The valet knows it is me upon my arrival. He opens my door and the car adjusts the seat because it detects the valet. My preference is to carry my own bag, so I am not accosted by the bell captain. Once in proximity of the hotel lobby, a secure key app is available on my smartphone. By the time I reach the elevator, the room temp has adjusted to coincide with my smartwatch sensors. The light level, music, and privacy settings are to my requirements. As I approach my room, the secure key app unlocks the room door. Once settled for the night, the room detects the lights are turned out, and it changes the temperature setting to my sleep preferences.
TECH REPORT In this scenario, I am wearing multiple sensors and actuators, like a watch vibration for alerts. Every room in this particular hotel chain also has multiple sensors and actuators as well as the rental. I am not interacting with my smartphone touchscreen constantly to direct these connected things to take actions even though it is one gateway for my activity. There will be millions of people doing this every day. We will be living in the data.
THE IOT OF TODAY Manufacturers have been connecting things to the Internet before we called it the Internet. By the mid1990s, web servers were being added to embedded products. Current M2M manufacturers have been integrating Internet-connected systems into highvalue asset tracking, alarm systems, fleet management and the like for more than 15 years. These M2M systems are challenging
Every person on the planet will be able to “author” his or her own life environment, even though they know basically nothing about the underlying technology. This vision of IoT will not happen right away. The scale required will only be achieved by creating a lowest common denominator: a simple messaging scheme that everyone on the planet will agree to. It will have to be digitally organic, imitating nature. At present, technology protocols and data structures are limited by their design complexity as well as security, extensibility, and much more. Our connected devices will have to become easier to use even though the complexity of the devices will increase. The line between analog and digital will blur. Every person on the planet will be able to “author” his or her own life environment, even though they know basically nothing about the underlying technology.
to build even though some are based on industry standard protocols. However, it is getting easier to integrate M2M systems as more powerful processors are incorporated into the end nodes. Since these processors support high-level operating systems and languages, the platform can leverage intelligent frameworks. These systems are typically tied into high-end business service layers and are managed by a network operations center (NOC). Consumers already have connected things like thermostats, energy meters, lighting control systems, music streaming and control systems, remote video streaming boxes, pool systems, and irrigation systems, with more to come. Most of these systems have some connectivity through a website so that a user can manage them through a standard web browser or a smartphone app, which acts as a personal NOC.
7
motion sensor inputs on the sprinkler The scale controller, so other motion control required for vertical integration needs to be used to transfer data to another cloud server. the IoT will Then the two cloud servers need to be only be “glued� together somehow. Hopefully, both system integrations allow for some achieved small amount of additional control. by creating However, hope is never a good word in electronic systems. An additional a lowest vertical application written in Perl, common Python, PHP, or another programming Take for example a sprinkler control denominator: language on a server can program system. It can have a level of intelligence a connection that allows motion to a simple Consumers already have connected things likedelay thermostats, energy meters, lighting control systems, music so it knows when to water based on the sprinkler zone (or other logic messaging sensors and Internet weather data under the user may want). This is not easy eamingprogrammable and control control. systems, remote video streaming boxes, pool systems, and irrigation systems with However, it does unless you are an expert and therefore scheme that not know anything about motion sensors not lead to rapid deployment. ore to come. Most of these systems have somewillconnectivity through a Web site so thateveryone a user can on manage around a house that might indicate a reason to delay the zone to avoid This need to connect vertical the planet em through a standard Web browser or a smartphone app, which acts as a personal NOC. drenching the dog or kids. There are no integrations has led to the formation of While both the industrial and consumer scenarios are exciting, deployment is not simplified since they are all disparate vertical systems. The systems may use the exact same protocols and OS underpinnings, but the communications layers are inconsistent. Each also uses open application programming interfaces (APIs) without a horizontal connection, which would lead to easier cross-application integration.
Texas Instruments
will agree to.
gure 1. IoT-enabled home with connected devices and appliances working invisibly for consumers.
8
c
TECH REPORT
3
new web services like IFTTT.com (If This Then That) and zAPIer.com that allow a user to graphically glue disparate vertical systems together. However, this requires users to sign up for yet another service to find out if they have an API interface that meets the specific vertical integration needs. These platforms are set up to provide basic “recipes” such as “IF I get an email from my wife, THEN send a text to my phone.” It is assumed that greater flow control will come later. Back to the previous example, assuming the sprinkler system has a delay control API, one can glue the recipe into place: IF motion, THEN delay the sprinklers. That is three different services, three sign-ins (which will also have to be managed inside the third service), three different smartphone apps and several points of failure. Now, what if the user wants to integrate this recipe with his or her calendar so the yard is dry for an outdoor family gathering? The scenario becomes more complicated. While the applications discussed above are interesting, they also do not lead to rapid IoT deployment. Sure, there will be an uptick in the maker communities as well as some new vertical applications and carrier additions, but the IoT is not about simple vertical one-off texts or tweets. That creates interesting demos, but it lacks scalability and integration across vertical systems. The IoT should enable notifications, but it also needs a simple way for devices to run programs and respond to other devices or services to create a sophisticated application without using a complex programming environment.
THE IOT: VERTICAL AND HORIZONTAL BALANCE It is hard to argue that the Internet as we know it today (technically HTTP) was born of altruistic intent by Tim Berners-Lee to connect everyone around the world with an open platform. Prior, there were only proprietary enterprise networks with little to no sharing of information—the verticals of the preInternet days. ARPANET put some basic plumbing and “messaging” protocols in place to get the party started. The architecture was robust and the vertical spin-offs became the Defense Data Network (DDN) and the National Science Foundation Network (NFSNET). Through public and private industry funding, NFSNET eventually became a major part of the Internet backbone. In the Internet of today there are vertical applications on a fundamentally basic platform of connectivity and information passing. Today, manufacturers have a multitude of vertical application requirements. Some may be altruistic, but most have money behind their requirements. Without that, there would be no next steps. However, there will be an altruistic requirement to gain horizontal balance. The IoT of tomorrow will be the largest horizontal system architecture ever created. Vertical applications will continue to exist; however, the fundamental lowest levels of connectivity and information passing will need to be ubiquitous and invisible in all applications. Additionally, horizontal balance will require the IoT to look more like an organic system. When cells replicate,
9
they pass fundamental information from one cell to another in the form of DNA. Cells combine to form a hierarchy of automatic mechanisms that use a nervous system to build and protect its cellular architecture – the body’s form of horizontal integration. A human has trillions of cells that are very resilient and can work for 100+ years without a “reboot.” It is no wonder why organic systems are being studied as a basis for fundamental information and device architecture.
of course, that we eventually all agree on the fundamental “currency” of the IoT.
GETTING THE IOT READY Preparing the lowest layers of technology for the horizontal nature of the IoT requires manufacturers to deliver on the most fundamental challenges, including: • Connectivity: There will not be one connectivity standard that “wins” over the others. There will be a wide variety of wired and wireless standards as well as proprietary implementations used to connect the things in the IoT. The challenge is getting the connectivity standards to talk to one another with one common worldwide data currency.
One also might conclude that the Internet has the characteristics of an organic system. However, the Internet of today has most of its traffic aggregated into a few very large data pipes. The original Internet was a much “flatter” looking • Power management: More things within entity and more peer-to-peer in nature. the IoT will be battery powered or use Bandwidth requirements were fairly low energy harvesting to be more portable with the largest consumer of bandwidth and self-sustaining. Line-powered being simple messaging traffic. Media- and equipment will need to be more energy time-critical data forced the emergence efficient. The challenge is making of big pipes. Client-server architecture is it easy to add power management dominant today, primarily driven by content to these devices and equipment. aggregators and big pipe companies. As Wireless charging will incorporate the industry progresses there will be a connectivity with charge management. gradual shift back to the original flatter architecture. Fat pipes will not go away • Security: With the amount of data as heavy bandwidth and time-critical being sent within the IoT, security is a requirements will still exist. However, must. Built-in hardware security and when trillions of connected devices exist use of existing connectivity security in the IoT, there will be numerous paths protocols is essential to secure the IoT. for data flow. The aggregate bandwidth of Another challenge is simply educating this massive peer-to-peer platform will far consumers to use the security that exceed the performance of the fat pipes. is integrated into their devices. Since there will be no way to regulate the network, it will become completely • Complexity: Manufacturers are neutral and basically invisible. Our great looking to add connectivity to devices grandchildren will not even know what an and equipment that has never been “Internet connection” was. That assumes,
10
TECH REPORT A human has trillions of cells that are very resilient and can work for 100+ years without a “reboot.” It is no wonder why organic systems are being studied as a basis for fundamental information and device architecture. connected before to become part of the IoT. Ease of design and development is essential to get more things connected especially when typical RF programming is complex. Additionally, the average consumer needs to be able to set-up and use their devices without a technical background. • Rapid evolution: The IoT is constantly changing and evolving. More devices are being added everyday and the industry is still in its naissance. The challenge facing the industry is the unknown. Unknown devices. Unknown applications. Unknown use cases. Given this, there needs to be flexibility in all facets of development. Processors and microcontrollers that range from 16–1500 MHz to address the full spectrum of applications from a microcontroller (MCU) in a small, energy-harvested wireless sensor node to high-performance, multi-core processors for IoT infrastructure. A wide variety of wired and wireless connectivity technologies are needed to meet the various needs of the market. Last, a wide selection of sensors, mixed-signal and power-management technologies are required to provide the user interface to the IoT and energy-friendly designs. The IoT is expected to transform how we live, work and play. From factory automation and automotive connectivity
to wearable body sensors and home appliances, the IoT is set to touch every facet of our lives. We will “author” our life with networks around us that constantly change and evolve based on our surroundings and inputs from other systems. It will make our lives safer with cars that sense each other to avoid accidents. It will make our lives more green with lighting systems that adjust based on the amount of daylight from windows. It will make our lives healthier with wearables that can detect heart attacks and strokes before they happen. There is a long road ahead to the IoT of 2020. But one thing is for sure, it is going to be amazing.
TEXAS INSTRUMENTS AND THE IOT With the industry’s broadest IoT-ready portfolio of wired and wireless connectivity technologies, microcontrollers, processors, sensors and analog signal chain and power solutions, TI offers cloud-ready system solutions designed for IoT accessibility. From high-performance home, industrial and automotive applications to batterypowered wearable and portable electronics or energy-harvested wireless sensor nodes, TI makes developing applications easier with hardware, software, tools and support to get anything connected within the IoT. Learn more at www.ti.com/iot.
11
Simple STEPS to IMPROVING
Software QUALITY Mark Moran – Chief Technical Officer, Atollic Inc.
12
TECH REPORT
Immutable Facts of Software Development Life
E
xperience shows us that there are certain attributes of the software development cycle that we must not only live with, but strive to improve. We may not like it, but we must embrace these realities: > Code footprints inevitably grow as time goes on > Factors out of the control of developers and project managers frequently compress project schedules > Software will always have defects > The further a project progresses, the more costly it is to find defects and bugs > From the dawn of human time, good tools are the way to survive and prosper
13
In almost every application, more lines of code are added every year to support ever-increasing demand for features. Defect rates, measured by defects per line of code, remain approximately (and stubbornly) constant over the years, unless extraordinary measures are taken. Steve McConnell, in his well-regarded tome, Code Complete, estimates the following: • There is an “industry average” of 15-50 defects per 1000 lines of code (your mileage may vary; embedded apps might have a little less than this rate). Some defects may be benign, and some may turn into those “million-dollar bugs.” • The post-testing version of Windows code has about 0.5 defects/1000 lines. • The extraordinary measures used to test and debug Space Shuttle code has shown that there are 0 defects within specific 500K line blocks of code, although this is not uniformly scalable to the millions of lines code in the entire system. There will be always be bugs in software—be it newly written or welltested legacy code, Open Source, or brought-in code from reputable vendors. Finding bugs always takes time, and time is always of the essence in every software development project.
14
From the time a line of code is written, any bug that line may cause gets more expensive to find as every day passes. Finding defects early in development is far cheaper than dealing with them in debug and test, or in the hands of an unhappy customer.
Finding Those Bugs and Find Them Early There is no silver bullet or magic formula in bug eradication; bug elimination is a layered process using a variety of tools. The compiler and linker are traditionally considered the first lines of defense, followed by printf() and JTAG type hardware tools. By the time you get to the debugging stage with your arsenal of familiar tools like blinking LEDs, printf(), and JTAG debuggers, the bugs are getting expensive to find and the pressure to complete the project is at its highest. What can be done to make this phase of the project as short as possible? The answer: deploy defect-revealing, bug-squashing technology early on.
Code Review Formal code review is a well-known bug elimination methodology. This process asks development engineers to study each other’s code, comment on potential problems, decide which to fix or defer, and assign tasks of fixing and testing appropriately. This is one of the best methodologies for finding and eliminating bugs while they are still inexpensive to fix.
TECH REPORT Formal code review is somewhat timeand labor-intensive, which is the principle reason why it is not always done by every development team. In an ideal world, code review would be focused on application specific issues, like timing scheme correction, guaranteed packet transfer, and data integrity preservation. Important but easily fixable static construct issues should really be taken care of prior to the point where the team sits down to read and discuss the code and make their decisions.
MISRA-C rules and recommendation have been adopted only after being extensively discussed and voted on by a team of highly experienced experts in the field of embedded software development. The application of MISRA-C rules and recommendations has been shown to dramatically improve code quality and reliability, as well as providing a more consistent “readability” to the code. ii
This is where automatic code inspection can be used very effectively-before formal code review. The Atollic TrueSTUDIO C/C++ IDE includes a MISRA-C checker, which can automatically apply formal coding rules to C code constructs using the MISRA®-C standard. The MISRA-C rules base is the product of hundreds of man-years of experience in writing safety critical C Code. MISRA was originally developed to meet the safety-critical needs of the automotive industry, but is now being applied as the definitive best practice coding standard for C development.
The key question at this point is whether or not you can use TrueSTUDIO static analysis tools quickly and reliably to derive useful information without spending a lot of time. The answer: absolutely.
“What if I’m not writing safety critical code?” you ask. Well, you want your code to work as you expect it to work, regardless of whether or not your application requires formal safety critical certification. And following the MISRA rules will help you avoid common defects in software that may turn into bugs down the road.
Using a Code Inspection Tool in Day-to-Day Embedded Development
One mouse click kicks off an exhaustive static analysis that applies the entire MISRA-C 2004 rules base and recommendations to the code. Of course, you may configure which code modules in your application that you want checked, which specific rules and recommendations you wish to apply, and other settings based on your needs and the way you work. One of the best things about this inspection utility is that you can do all of this without ever leaving the IDE. Apart from convenience, this offers additional productivity benefits, as we will see in the following section.
Finding defects early in development is far cheaper than dealing with them in debug and test, or in the hands of an unhappy customer.
15
Turning Inspection Results into Improved Code Not all static code-checking tools based on MISRA-C are alike. Many static code-checking tools produce results similar to a list of compiler like warnings (so 1980s). TrueSTUDIO not only produces copious data, but the results are well organized into tables and charts, turning raw data into information that you can use at a glance. The integration of TrueINSPECTOR into the IDE allows you to do things like go to the line of code in the editor that caused the rules violations by clicking on that
16
violation entry in the report, making for easy investigation and cross reference. Rules violations are accompanied by a specific example of “good” code and “bad” code in the TrueINSPECTOR output. Warning: Consistent use of TrueINSPECTOR may cause you to become a C programming “language lawyer” and safety critical power user. Results of the static analysis can be easily exported from the IDE into standard file formats for record keeping, sharing among team members and use in formal code review.
TECH REPORT
How do you know the rules and recommendations of MISRA-C have really been checked in your code? TrueINSPECTOR itself has been rigorously checked by testing programs designed to specifically determine the efficacy of static code analysis tools. The results speak for themselves.
Benefits to the User What do you, the developer, get out of all of this? After all, features and capabilities are all well and good, but how does this improve your software build process? “Imagine all the people,” as John Lennon used to say. Using TrueSTUDIO static code analysis is like having the full weight of the MISRA-C committee reviewing your code—with all of their years of experience, the database of all the problems they have encountered with C code constructs, all the cumulative wisdom gained over the years. Your full confidence that static code constructs have been thoroughly examined, giving you an opportunity to address these prior to formal code review. This will speed up the process as discussion of an entire class of potentially dangerous software defects is eliminated prior to full team code reviews. This allows the team more time to be devoted to applicationspecific issues and design issues knowing full that they have a solid foundation built on sound C code constructs.
From the time a line of code is written, any bug that line may cause gets more expensive to find as every day passes.
17
Don’t Ignore the Code Complexity Factor Code complexity is an important, yet often overlooked code metric. Complexity is something that every developer recognizes, but it is difficult to quantify. TrueINSPECTOR calculates cyclometric complexity metrics for your code, which are presented in easyto-interpret, at-a-glance tables. Many companies have standards regarding code complexity. Such standards can be monitored and checked quickly and easily by TrueINSPECTOR, making sure that adherence to standards is positive and enforceable.
18
TECH REPORT
Code is “written one time, and read many times” as the saying goes. Studies have shown that code that is hard to read probably contains more defects that may hide serious bugs. It is certainly more time consuming, frustrating, and expensive to maintain, extend and change as the situation demands. Further, the probability of introducing a new bug while attempting to bug fix, modify or extend a complex block of code is considerably higher than trying to do the same thing on less complex code blocks.
Your Software Is Broken and You Need to Fix It All software has defects. Finding those defects before they become important bugs later can save time, frustration, and cost. Atollic TrueSTUDIO gives you another tool in your kit to bring attack the never-ending task of assuring software quality. Many of the perceived barriers to using such and approach are effectively addressed by ease of use and configuration, advanced presentation of results, and productivity benefits of having a tool within the IDE, where the development action takes place. At the end of the day, your code can only benefit by being constructed along the lines of time-tested methods and recommendations that have proved themselves in the most demanding embedded applications.
The probability of introducing a new bug while attempting to bug fix, modify or extend a complex block of code is considerably higher than trying to do the same thing on less complex code blocks.
i Code Complete, June 2014, McConnell ii MISRA, Development Guidelines for Vehicle Based Software, November 1994 (PDF version 1.1, January 2001), Rivett, “Emerging Software Best Practice and how to be Compliant”, Proceedings of the 6th International EAEC Congress July 1997
19
GRAND PRIZE
NXP Logic Presents Clemens Valens
The
Big
I.D.E.A.
2015 International Design Engineering Award
J
oin NXP and Mouser in the 2015 Big I.D.E.A., a design contest featuring NXP’s unique product line-up across the spectrum,
including Dual Configurable Logic, Smart Analog, MOSFETs, and Power. Everyone has a chance to win thousands of dollars worth of prizes, with awards at every level of the competition.
Entry Phase
Submission Phase
Completion Phase
Winners Announced
January 1
March 1
April 15
August 1
JANUARY 1 - ENTRY PHASE » Fill in and submit questionnaire. (Special bonus drawing for entries before March 15. Five contestants will win prizes worth $100 each.) » Advance to the Submission Phase. Click Click here here to to register register and and start start the the contest! contest!
MARCH 1 - SUBMISSION PHASE » Contestants will produce a schematic using NXP’s products. (Special bonus drawing for schematics before April 15. Ten contestants win prizes worth $200 each.) » Selected contestants will advance to the Completion Phase. Click here to view the Submission Phase rules and instructions.
APRIL 15 - COMPLETION PHASE » Design kits will be sent to contestants selected from the Submission Phase. » Entries must be submitted for judging by June 30.
AUGUST 1 - WINNERS ANNOUNCED » GRAND PRIZE: $3000 Prize Value » FIRST PLACE: $2000 Prize Value » SECOND PLACE: $1500 Prize Value » THIRD PLACE: $1000 Prize Value » HONORABLE MENTION: $500 Prize Value
Designing for RUGGED
ENVIRONMENTS
Embedded Products in Offshore Oil Rigs Design Challenges
Design Solutions
While drilling for oil and gas on oil rigs, the content of the extracted media needs to be analyzed in”rea1-time” to control pressure and drill pipe speed, as well as eliminate dangerous situations. The equipment also needs to operate both above and below water at varying temperatures and great depths.
»
Data storage on mSATA-module
»
TQ Systems QoriQ embedded module (Freescale P2020 QoriQ™P2 platform MCU) provides:
»
A reliable NOR-Flash to boot from
»
PCIexpress line for the connection to the mSATA device
»
SPI-Bus for second NOR-Flash
Other requirements include:
22
»
Maximum reliability, highest mean time to failure (MTTF)
»
FPGA-interconnection via Local Bus for lowest latency
»
Highest possible operating temperature
»
»
Withstand vibrations up to 30g
3x Ethernet interfaces (1x to measuring board, 1x for SWupdate, 1x for data upload)
»
Fast (low-latency) connection to a FPGA for serial interfaces
»
ECC for DDR3 to detect and correct bit-failures
»
Smallest possible size, because of very limited available space
»
Double-precision FPU for calculation of ADC-Data
»
Storage of data on rugged media
»
Industrial grade temperature range: -40°C to +85°C
»
Second NOR-Flash device for maximum data retention and firmware update
»
Ruggedized connector system for highest reliability
TECH REPORT
Save Design Time and Money TQMP2020 embedded modules with Freescale QorIQ MCU: »
Are the smallest in the industry without compromising quality and reliability
»
Bring out all the processor signals to the TE connectors
»
Can reduce development time by as much as 12 months
»
The TQMP2020 module comes with a Freescale QoriQ™ Power Architecture® MCU and supports Linux and QNX operating systems
»
The full-function STKP2020 Starter Kit is an easy and inexpensive platform to test and evaluate the TQMP2020 module
FOR MORE INFORMATION on the TQMP2020 and other modules, or to purchase modules or starter kits: www.convergencepromotions.com/TQ-USA. www.convergencepromotions.com/TQ-USA. TQ-USA is a brand of modules distributed in North America by Convergence Promotions
23
Kionix is a ROHM Group Company http://www.kionix.com http://www.kionix.com jchong@kionix.com jchong@kionix.com
Bringing Advanced Bringing Advanced Sensor Functionality
SENSOR
to Consumer, Embedded, and Industrial Applications
FUNCTIONALITY
to Consumer, Embedded, and Industrial Applications Kionix, Inc. Worldwide Headquarters 36 Thornwood Drive Ithaca, NY 14850 (607) 257-1080 (voice) (607) 257-1146 (fax) info@kionix.com
SENSORS PLAY A KEY ROLE IN ENABLING MODERN ELECTRONICS to more intelligently act within their environment. A cell phone, for example, uses sensors to detect when a user is holding the device toKionix, his Inc. oris aher so it can save power by turning off the display. ROHMear Group Company Through sensor fusion technology, where data from multiple sensors is used in combination, even more advanced features can be enabled.
24
TECH REPORT
S
ensors are popping up everywhere. A wide range of consumer electronics devices make extensive use of sensors, including smartphones, tablets, and gaming equipment. To capitalize upon the growing gaming market, set-top box vendors are beginning to integrate sensor-based gaming capabilities into their systems. Perhaps the largest growth sector for intelligent sensing is the Internet of Things. This market is focused on extending awareness and connectivity everywhere and includes everything from wearable devices such as pedometers and portable medical equipment to complex industrial systems that can self-monitor themselves and their environment. The benefits of embedding sensors are apparent, but designing in sensors presents multiple challenges to OEMs. Some sensors must be continuously monitored, putting a load on the system’s main applications processor. Data processing algorithms are often compute-intensive as well. Developers must minimize device size and power consumption. Finally, sensor design and algorithm development requires expertise an OEM may not have readily available in-house.
SENSOR HUBS For many applications, a dedicated sensor hub provides a compact way to integrate sensor monitoring and analysis capabilities in a cost-effective manner that minimizes power consumption. As its name states, a sensor hub has the ability to accept inputs from multiple sensors such as accelerometers, gyroscopes, magnetometers, and pressure sensors. It also has an integrated MCU to handle real-time algorithm processing. For existing systems, baseband and applications processors are power hungry components often called upon to do many tasks. Consider the use case of a cell phone running a video call with full video to the display while managing a cellular connection, streaming audio to a headset via Bluetooth, providing Wi-Fi hotspot capabilities to a tablet, and tracking the device’s GPS location. In many instances, it is advantageous to offload the real-time monitoring of sensors for features like orientation positioning and drop detection away from the applications processor to a more efficient sensor hub.
A SENSOR HUB HAS THE ABILITY TO ACCEPT INPUTS FROM MULTIPLE SENSORS SUCH AS ACCELEROMETERS, GYROSCOPES, MAGNETOMETERS, AND PRESSURE SENSORS. IT ALSO HAS AN INTEGRATED MCU TO HANDLE REAL-TIME ALGORITHM PROCESSING.
25
Kionix is built on the advanced computing capabilities of the ARM Cor-
0 architecture. It offers the right level of processing performance to effi-
THE KX23H SENSOR HU
y monitor multiple sensors and implement complex analysis algorithms.
being on’thas enough headroom to perform all of the functionality required for a
ble to power
SENSOR FUSION
ed application such as a pedometer or heart monitor without the need for One of the primary benefits of using a
rocessor for
ditional However, applications processor.
To help OEMs introduce advanc
sensor hub is the ability to perform what is known as sensor fusion. In its generic measure Figure 1. sense, sensor fusion refers to combining omeone picks data from multiple sensors to yield SOR FUSION le or during information that cannot be captured by acceleromFigure 1 each sensor separately. A good example of ously monitored. Here the sensor When hub can manage the devicethe isn’t being actively fusion is the use of two cameras to of the using avaluable sensortohub the the ability tosensor perform what zed lowprimary power rate benefits while lettingof the main used, it isapplications powerisdown calculate the three-dimensional position of pact of this power efficiency is especially noticeable processor for intervals to refers own as sensor fusion. In applications its generic sense, sensor fusion to combining an object. n-approach where the device turnssave on when a person power. However, in order to detect rom yield information that cannot ose. multiple sensors to use or measure movement (e.g., when ecialized applications that don’tseparately. require the sophisticasomeone picks up the example device from a ptured by each sensor A good e CPU integrated into the sensor hub may all as a pedometer), the table or provide during use Figure 2. nsor fusion is the use of two cameras to calculate the needs to be continuously es required. For example, a sensoraccelerometer hub like the KX23H Here the sensor hub can dimensional position ofmonitored. anof object. he advanced computing capabilities the ARM Cormanage theto sensor ffers the right level of processing performance effi- data at an optimized One way of looking at the “1+1>2” result of sensor power rate while letting the main sensors and implement complex low analysis algorithms. nroom is to realizeallthat sensor hasprocessor itsablind spots. applications sleep. The impact to perform of theevery functionality required for of this power efficiency is especially hder as a the pedometer or heartof monitor without the need for or change in Figure 2 challenge measuring motion One way of looking at the “1+1>2” result noticeable for features like wake-onns processor. of sensor fusionof is to realize that every tation. When an accelerometer laying onturns a table at rest, the effect approachiswhere the flat device on when sensor has its blind spots. Consider person brings his or her hand close. ty causes an accelerationato be detected in the Z direction with no force on the challenge of measuring motion or Y axes. If the accelerometer is tipped, the acceleration due to gravity is or change in orientation. When an Additionally, in specialized applications efits of using a sensor hub is the ability to perform what accelerometer is laying flat on a table that require the sophistication buted on the X and Y axes asdon’t well, allowing one to measure motion and at rest, the effect of gravity causes n. In its generic sense, sensor fusion to combining of arefers smartphone, the CPU integrated tation. if the accelerometer ismay placed back on the an table and then acceleration to be detected in the ors to yieldHowever, information that cannot into the sensor hub provide all the Z direction with no force on the X- or sor separately. A good example flat processing required. For d while still remaining on thecapabilities table, the acceleration due to graviY-axes. If the accelerometer is tipped, the se of two cameras to calculate the example, a sensor hub like the KX23H ways acts fully on the Z axis whileisthe and Y axes due to gravity is distributed from Kionix builtacceleration on the advancedon the Xacceleration on of an object. the X- and Y-axes computing capabilities of the ARM gnatat thezero. “1+1>2” resultthe of sensor Thus outputs remain the same and there is noonindication of as well, allowing one to measure motion and orientation. very sensor has its blind spots. Cortex-M0 architecture. It offers the However, if the accelerometer is placed Figureto 2 of measuring motion or change in right level of processing performance back on the table and then rotated while celerometer is laying flat on a tableefficiently at rest, themonitor effect of multiple sensors and still remaining flat on the table, the implement ration to be detected in the Z direction with nocomplex force on analysis algorithms. Inc. | 36 Thornwood Drive, Ithaca, NY 14850 | +1 (607) 257-1080 | info@kionix.com 3 acceleration due to gravity always acts It also has celerometer is tipped, the acceleration due to enough gravity isheadroom to perform fully on the Z-axis, while the acceleration all of the functionality required for a Y axes as well, allowing one to measure motion and on the X- and Y-axes remain at zero. targeted application such as a pedometer the accelerometer is placed back on the table and then Thus the outputs remain the same or heart monitor without the need for an ning flat on the table, the acceleration due to graviand there is no indication of motion or additional applications processor. he Z axis while the acceleration on the X and Y axes outputs remain the same and there is no indication of
ded, and industrial designs, Kio features of the KX23H include:
• HIGH PERFORMANCE—Bu
at 32 MHz, the KX23H offloa
system’s main applications p
• ON-CHIP ACCELEROMETE
design, the accelerator integ with a 256-byte FIFO/FILO
to 1uA. It also features FlexS ic adjustment of power and of the device.
• POWER EFFICIENCY—In s
uA. It also offers an efficient 6 mA @ 32 MHz.
• OPTIMAL LEVEL OF INTEG
and processing, the KX23H d
general-purpose processor, l
unnecessary cost and reduce
Kionix, Inc. | 36 Thornwood Drive, Ithaca
26
rive, Ithaca, NY 14850 | +1 (607) 257-1080 | info@kionix.com
3
TECH REPORT
UB change in orientation. In this situation, the accelerometer has a blind spot. The addition of data from gyroscope or magnetometer would allow one to compensate for this blind spot and identify the device’s motion and orientation.
control pointing devices and augmented reality displays.
ced sensor functionality to consumer, embed-
KX23H SENSOR HUB onix offers the KX23H sensor hubTHE (Figure 3). Key
To help OEMs introduce advanced sensor functionality to consumer, embedded, and industrial designs, Kionix offers the KX23H sensor hub (Figure 3). Key features of the KX23H include:
Another example of how sensors can uilt on a 32-bit ARM Cortex-M0 core running complement each other is an eCompass application. For a traditional compass, the magnetic rod is aligned with the earth’s magnetic field, and the user inherently levels the housing to obtain a stable reading for magnetic north. In an electronic compass, the signal is typically detected on three orthogonal magnetic sensing elements, and slight variations in tilt or level significantly alter the readings on the three axes and hence the interpretation of direction. An accelerometer is used to measure the tilt relative to gravity and so paired with a magnetometer the two can accurately compute magnetic north.
ads real-time sensor fusion algorithms from a HIGH PERFORMANCE—Built on
processor.
a 32-bit ARM Cortex-M0 core running at 32MHz, the KX23H offloads real-time sensor fusion algorithms from a system’s main applications processor.
Figure 3.
ER—Based on Kionix’s highest performance
grated into the KX23H provides 16-bit resolution ON-CHIP ACCELEROMETER—Based on
Kionix’s highest performance design, the buffer and very low power consumption down accelerator integrated into the KX23H provides
16-bit resolution with a 256-byte FIFO/FILO Set Performance Optimization, allowing dynambuffer and very low power consumption down
Figure 3
to 1uA. It also features FlexSet Performance noise parameters to match the state and activity
One form of sensor fusion that is commonly used in portable devices is known as nine-axis sensor fusion. Nineaxis sensor fusion combines the tri-axis data from three different sensors— accelerometer, magnetometer, and gyroscope—to accurately determine a device’s orientation and motion in 3-D space. In this way, the blind spots of each sensor are filled in using information from the other sensors. Nine-axis sensor fusion brings value to consumers by providing a level of functionality that enables devices to accurately track themselves in 3-D space. With this accuracy, many new features can be introduced such remote
Optimization, allowing dynamic adjustment of power and noise parameters to match the state and activity of the device.
POWER EFFICIENCY—In sleep mode, the ARM core consumes only 2.5 sleep mode, the ARM core consumes only 2.5uA. It also offers an efficient operational power of 1.5mA @ 32kHz and just 6mA @ 32MHz.
t operational power of 1.5 mA @ 32 kHz and just
OPTIMAL LEVEL OF INTEGRATION—Designed for sensor monitoring and processing, the KX23H doesn’t integrate the extraneous capabilities of a general-purpose processor, like a USB port or large memory banks that add unnecessary cost and reduce power efficiency. In addition, because the accelerometer and Cortex-M0 are paired, they can work more efficiently than a CPU with an external accelerometer.
GRATION—Designed for sensor monitoring
doesn’t integrate the extraneous capabilities of a
like a USB port or large memory banks, that add
e power efficiency. In addition, because the ac-
a, NY 14850 | +1 (607) 257-1080 | info@kionix.com
4
27
uding: SCREEN ORIENTATION—Signals when the user has rotated the device and the screen orientation should be changed. SMALLER FOOTPRINT—The KX23H
SCREEN ORIENTATION—Signals when
small 3mm x 3mm x 0.9mm package.
screen orientation should be changed.
FREE FALL—Determines a deviceinis (Figure 4).the This isand imoffers a greatwhen deal of functionality a falling the user has rotated device the
portant for devices like laptops that have a hard disk drive. If falling can be THE CHALLENGE FALL—Determines when a device identified in time,OVERCOMING the hard drive can be parkedFREE to minimize damage. It can OF SOFTWARE is falling (Figure4). This is important for devices like laptops that have a hard disk drive. If falling can be identified in time, the hard drive can be parked to minimize damage. It can also be used to assist in detection and trigger an alert when a person falls. Lastly, it can be used to monitor for drops for purposes such as managing warranty claims.
also be used to detect and OEMs trigger alert Traditionally, have an had to designwhen a person falls. ONCE A
sensor algorithms from scratch or port DESIGN IS generic code to their chosen applications PEDOMETRY—Accurately measures steps taken by a user. STABLE, processor. This means OEMs are responsible for developing, testing, KIONIX IS MOTION WAKE and UP—Many devices can be put to sleep when they are not verifying their own monitoring and ABLE TO analysis algorithms. This presents a in motion. With this feature, systems can quickly wake once a user picks up COST-DOWN challenge for many OEMs that don’t have their own design resources or inOEM’S theAN device. PEDOMETRY—Accurately measures house expertise. This is typical for many DESIGN TO steps taken by a user. companies in the IoT space that are still TAP/DOUBLE TAP DETECTION—Detect the direction of a user tapping on CREATE A emerging and don’t have the volumes to MOTION WAKE UP—Many devices can be justifywhether internal algorithm CUSTOM a device and identify it isdevelopment. a single or double tap. put to sleep when they are not in motion. The ability to partner with an expert and DEVICE THAT With this feature, systems can quickly offload sensor design can substantially wake once a user picks up the device. ACHIEVES reduce system architecture and design complexity. POWER AND TAP/DOUBLE TAP DETECTION—Detect COST SAVINGS the direction of a user tapping on a device To help speed time-to-market, Kionix and identify whether it is a single or NOT POSSIBLE offers a full suite of sensor software, double tap. ranging from device drivers for Windows, WITH A Android, and Open Source systems to SOFTWAREWhile many of these algorithms may its extensive Sensor Fusion Library that seem straightforward to implement, BASED MCU will be optimized for the ARM Cortex-M0 there are subtle issues that can architecture of the KX23H. Kionix is an DESIGN.
ix, Inc. | 36
28
expert in motion sensing for a wide range ThornwoodofDrive, Ithaca, NY 14850 | +1 (607) application nodes and has developed a comprehensive library of applicationspecific algorithms based on its extensive in-field experience, including:
significantly impact the customer experience. For example, the difference 257-1080 | info@kionix.com between whether the device is flat or vertical can affect the screen orientation algorithm. In such cases, special care must be taken to improve user experience and responsiveness while preventing jitter or false identification of orientation. In other cases, some device functions might interfere with motion detection. For example, the vibration from certain
TECH REPORT ring tones from the speaker can, to an accelerometer, be quite similar to a finger tapping, thus triggering false tap events. Only through careful algorithm design can these situations be minimized and the user experience maintained.
THE PATH TO ASIC
Figure 4.
Figure 4
5
One of the key advantages Kionix brings to high-volume OEMs is a clear path to cost down the sensor hub to a custom device. An ASIC is often the lowest cost and most power-efficient route to implementing sensor-based functionality. However, ASIC design typically takes between 12 and 24 months and assumes that an OEM already has most of the IP in place to create the ASIC. This adds a delay that can be detrimental in the fastchanging consumer electronics industry by making OEMs late to market when introducing innovative new features or optimizations. Instead, OEMs can lead the market by quickly implementing new features using the flexibility and programmability of the KX23H. This has the advantage of enabling OEMs to test features in the market and optimize them. Furthermore, any unexpected issues that arise can be addressed before the design has been committed to silicon. Once a design is stable, Kionix is able to cost-down an OEM’s design to create a custom device that achieves power and cost savings not possible with a software-based MCU design. Thus, OEM’s are able to leverage the benefits of both low-risk design, a quick-to-
market approach, as well as high-volume economies of scale. OEMs can also leverage Kionix’s comprehensive portfolio of sensors that share a common sensor fusion library. Kionix sensors offer excellent noise levels, accuracy, and robustness to ensure the best reliability and performance for today’s demanding applications. To further simplify design, Kionix’s roadmap for its sensor hub products includes integrating more of the sensor solution for its customers over time. With its strong customer support team, Kionix is able to deliver turnkey solutions, both for new designs and existing applications. This includes working with OEMs to develop custom algorithms that can be preloaded onto the sensor hub during manufacturing calibration. In this way, OEMs can focus on their value-add rather than having to reinvent their own sensor IP. With the KX23H sensor hub, OEMs can leverage the flexibility and programmability of the ARM Cortex-M0 paired with the high performance of its embedded accelerometer to bring new features and functionality to market quickly and at a lower risk. The KX23H is ideal for augmenting the existing capabilities of a system at a lower cost and power footprint via the sensor hub approach, as well as providing main processor functionality to those targeted applications requiring motion processing and computation capabilities in a small, low power package.
29
Kionix is a ROHM Group Company http://www.kionix.com jchong@kionix.com
Expanding the Functionality of
Bringing Advanced Sensor Functionality to Consumer, Embedded, and Industrial Applications
MOBILE
APPLICATIONS
with Magnetic Gyroscopes
Kionix, Inc. Worldwide Headquarters 36 Thornwood Drive Ithaca, NY 14850 (607) 257-1080 (voice) (607) 257-1146 (fax) info@kionix.com
Kionix, Inc. is a ROHM Group Company
By John Chong, Vice President of Product and Business Development, Kionix
30
TECH REPORT
BEING ABLE TO DETERMINE A DEVICE’S position and movement is becoming a standard feature in many portable systems. Systems such as cell phones and tablets use the 6-axis data from accelerometers and magnetometers to enable key functions that make consumer electronics interfaces easier and more intuitive to use. Next-generation devices are moving to 9-axis sensor fusion employing gyroscopic capabilities to further improve the user experience. For example, a health monitor can track users more accurately when it can differentiate between activities like walking, swimming, and running. Gyroscopic data also enables new interface capabilities, such as gesture recognition, where a user can flick his or her wrist to bring up the display.
31
M
Figure 1.
any consumer electronics devices can benefit from 9-axis sensor fusion (see Figure 1). For example, cell phones, gaming systems, health monitors, and wearable electronics could implement high valueadded functions such as three-dimension gesture recognition, relative positioning to other users, and motion tracking. To achieve this, devices need 9-axis sensor data and the ability to process it efficiently.
9-AXIS SENSOR FUSION
Note that many of these systems do not require the same level of precision that a fighter jet needs to stay in flight. Rather, they need a cost-effective 9-axis sensor fusion implementation that matches the needs of consumer applications to improve the user experience. With the availability of new MagGyros, such as the KMX62G from Kionix, developers can use 6-axis sensors (accelerometer + magnetometer) to provide the equivalent of 9-axis output (accelerometer + magnetometer + gyroscope) while reducing energy consumption by as much as 90%.
An accelerometer measures acceleration in 3 axes. It is important to note that gravity is a form of acceleration, and so an object at rest still has a downward acceleration. This fact enables an accelerometer to determine how a system is oriented relative to “down.”
EFFECTIVELY, SENSOR FUSION USES MULTIPLE SENSORS TO FILL IN THE BLIND SPOTS OF INDIVIDUAL SENSORS.
32
Using 9-axis sensor fusion—data from an accelerometer, magnetometer, and gyroscope—systems can accurately position themselves in the world, including inclination and orientation as well as changes in position and rotation (see Figure 2). Effectively, sensor fusion uses multiple sensors to fill in the blind spots of individual sensors.
Accelerometers:
This information can also be used to determine how level a system is. Many handheld and portable devices use orientation to adjust the display to match how the user is holding the device. Devices commonly using this functionality include cell phones, tablets, and laptops. Another unique feature of an accelerometer is the ability to tell if a device has been dropped. For example, when a laptop is resting on a table, it detects 1 G. However, if the laptop is knocked off the table, it will detect 0 G as it falls to the floor (similar to how zero-gravity or weightless is simulated by putting a plane into freefall). This enables a system to detect if it is falling and at imminent risk of collision. In the case of a laptop, the system can proactively park
TECH REPORT
MANY USES HAVE BEEN DEVELOPED FOR ACCELEROMETERS, INCLUDING INCREASING POWER EFFICIENCY. Figure 2.
the hard drive head in a safe position to prevent damage to the drive or data. Many other uses have been developed for accelerometers, including increasing power efficiency. Consider that a fitness tracker that has not moved in a few minutes is likely not being used. The device can then power itself down. This simple use case can substantially improve battery life across a wide range of applications.
Magnetometers: A magnetometer measures magnetic fields. It can be used in a compass to identify the Earth’s magnetic field. By analyzing the magnitude, direction and rate of change of the detected field, a magnetometer can be used to find the direction of magnetic north.
As a standalone sensor, however, a magnetometer is typically unable to identify the direction of magnetic north. A traditional compass uses a magnetic rod with a bearing that restricts the rod to align in one dimension; proper leveling of the housing allows the user to best align the rod with magnetic north. In an electronic magnetometer, 3-axis of sensing is used to compute the direction and magnitude of the magnetic field. Any tilt between the magnetometer axes and the measured signal will cause error in the reported direction of the field. A handheld device can use both an accelerometer and magnetometer to determine magnetic north. This is achieved by identifying the tilt of the device using the accelerometer and using this information to supplement the reading from the magnetometer.
33
Gyroscopes:
OF THE THREE TYPES OF SENSORS, GYROSCOPES ARE THE LARGEST AND MOST EXPENSIVE.
An accelerometer at rest on a desk can sense that the device is at rest. However, if you rotate the system with the accelerometer at the center of the rotation, the accelerometer will not be able to detect the movement. This is effectively a blind spot for the accelerometer. If the system has access to a gyroscope, the gyroscope can detect the rotation. Unfortunately, implementing gyroscopic technology is difficult to justify for many applications. Of the three types of sensors, gyroscopes are the largest and most expensive. Although the sensor provides useful information, too often the cost, size, and/or power consumption
KMX62G
Micro-Amp Magnetic Gyro
Figure 3.
1 2
Includes power consumed by Atmel ATUC128L4U operating at 48 MHz executing at 3MIPS to produce gyro output Via sensor fusion software
34
of a physical gyroscope exceeds the value it represents. For these reasons, developers have often had to limit position and orientation functionality to the 6-axis data provided by an accelerometer plus magnetometer.
THE KMX62G MAGGYRO Today, advances in software algorithms and low-noise, low-latency sensors make it possible to simulate gyroscopic output using data from only an accelerometer and magnetometer. This is the approach used in MagGyros, where the system computes a device’s rotational direction and speed based on knowledge of its previous position. In other words, when a system can track orientation over time, it can extrapolate rotational data.
TECH REPORT To enable developers to bring gyroscopic capabilities to a wide range of new applications, Kionix offers the KMX62G MagGyro. The KMX62G takes Kionix’s KMX62 acceleromator/magnetometer and enhances it with industry-leading sensor fusion software and autocalibration algorithms (see Figure 3). This makes the KMX62G more than just an acceleromator/magnetometer. It is the industry’s first highly accurate gyroscopic emulator, providing 9-axis positioning capabilities.
THE KMX62G OFFERS SEVERAL KEY BENEFITS TO OEMS: The Right Level of Accuracy: Because it estimates rather than directly measures rotational speed, the accuracy of a MagGyro is not as high as that of a physical gyroscope. However, gyroscopic accuracy comes into play most often when distance is involved, such as when flying a plane: being off by one degree over 100 miles can put you far off course. Close activities such as gesture recognition, on the other hand, can tolerate relatively large errors. Thus, consumer electronics applications focused on the user experience do not require the scientific levels of accuracy of a physical gyroscope. Power: A physical gyroscope is always resonating, which means it continuously draws power. Typically, a physical gyroscope operates at 2.5 V or greater and consumes 4000 to 7000 μA (see Figure 4). Note that this is for the gyroscope alone.
Power #1 Reason
Physical Gyro 4000-‐7000µA
• 1/5th to 1/10th of power consump,on of physical gyro
µA·∙MagGyro Sensors 450µA MicroController 500µA
Opera'on Voltage
• Gyro (typ) > 2.5V • MagGyro (typ) >1.8V
Figure 4: Original Slide 14 from uAMagGyro
Kionix, Inc. ©2013 All Rights Reserved
Figure 4.
With the KMX62G MagGyro, the accelerometer + magnetometer sensors consume 450 μA. Even when the power required for the microcontroller executing the software algorithms is taken into account (~500 μA), the entire MagGyro operation is less than 1000 μA. Thus, the KMX62G achieves 5X to 10X better energy efficiency compared to a physical gyroscope. Start Up Time: Because they consume so much power, systems often turn off the gyroscope as often as they can. However, a physical gyroscope can take between 50 and 100ms for the output to stabilize. Thus, a power-efficient implementation with a physical gyroscope results in slow responsiveness that can negatively impact the user experience.
35
BY DESIGNING ITS ALGORITHMS FOR A HIGH QUALITY EXPERIENCE, KIONIX ENABLES THE KMX62G TO BRING NEW FUNCTIONALITY COST-EFFECTIVELY TO A WHOLE NEW REALM OF APPLICATIONS. From startup, the KMX62G takes approximately 15-20ms to start outputting 9-axis data. This arises from the need to collect first samples and process them. Once the data pipeline has been established, this delay effectively goes away. However, for many applications, the low energy draw of the KMX62G enables the device to be running most of the time, eliminating any start up delay for those applications or use cases where this matters. Cost: The KMX62G can be implemented for substantially less cost than an equivalent 9-axis solution with a physical gyroscope. It provides an excellent intermediate solution between not having a physical gyroscope and offering features based on 9-axis positioning.
PERFORMANCE AND QUALITY The performance of a MagGyro is highly dependent upon the quality of its components. Consider that in order to simulate a gyroscope, the MagGyro algorithms use the sensor data from both an accelerometer and magnetometer. Noise in either sensor will quickly
36
erode the accuracy of the gyroscopic calculations. In addition, the same sensor data is then used in sensor fusion algorithms to compute 9-axis positioning. This means the error from these sensors may be compounded. Thus, low noise performance in both the accelerometer and magnetometer is essential to achieving accuracy in 9-axis system. Synchronization between the sensors is also critical. If the reading for the accelerometer is associated with a reading from the magnetometer captured at a different time, an error can result in the MagGyro output. Designing a tight circuit to ensure accurate synchronization of these sensors can be difficult when using external components. To simplify design, many designers prefer to eliminate synchronization issues by using a single component like the KMX62G that combines the accelerometer and magnetometer together. In addition, the latency of magnetometers can vary depending on their underlying technology. The magnetometer in the KMX62 has one of the lowest latencies on the market. This enables the accurate synchronization of data between the accelerometer and magnetometer and results in high performance of Kionix’s MagGyro solution. The final piece of the KMX62G MagGyro is the software implementation of the simulated gyroscopic algorithms. There are numerous functions that make up
TECH REPORT these algorithms, and the quality of the implementation determines the system’s overall performance and, in consequence, the user experience. These algorithms are implemented on a host processor or sensor hub. An Application Programming Interface (API) is provided to simplify product design. Supported platforms include Qualcomm’s Snapdragon and Atmel’s AVR UC3 and ARM-based SAM D20. The KMX62G is also certified for Windows 8 and 8.1. Accurate MagGyro algorithms are fairly complex in their implementation. For example, averaging of signals reduces noise. However, averaging takes time, impacting latency and responsiveness. To maximize accuracy, Kionix utilizes adaptive software that dynamically adjusts averaging. When the system is moving quickly and small errors aren’t as noticeable, averaging is reduced to improve responsiveness. Similarly, when movements are smaller and responsiveness is less important, averaging is increased to improve accuracy. This provides an optimal user experience based on how the system is currently being used. This focus on human use cases is part of the value Kionix offers with its KMX62G MagGyro. It excels in human perception and user experience applications. It does this by trading off a little of its performance and in return enhances the user’s experience. By designing its
algorithms for a high quality experience, Kionix enables the KMX62G to bring new functionality cost-effectively to a whole new realm of applications. One other factor to consider when evaluating sensor fusion algorithms is the data processing requirements. Key metrics to consider are MIPS, code space, and RAM space. Algorithms that consume too many system resources can actually add cost to the system. If they place too much of a load on the host processor or sensor hub, they may even impact the primary function of the device and degrade the overall user experience. In terms of software loading, the MagGyro algorithm requires less than 3 MIPS. It addition, it can run on systems with as little as 128 KBytes of Flash and 32 KBytes of RAM. This is all that is needed for sensor calibration, magnetic anomaly rejection, sensor fusion and synthetic gyroscope calculations. This is a reasonable load for the value of being able to provide 9-axis data including gyroscopic functionality. With the availability of the KMX62G MagGyro, there is now a cost-effective option for next-generation consumer electronics systems that can benefit from gyroscopic capabilities. By trading off an appropriate level of performance, the KMX62G offers lower cost, higher power efficiency, and a smaller footprint compared to systems based on physical gyroscopes.
37
Don’t Lose Your
COOL 38
TECH REPORT
Important ways to approach heat management
W
hen you watch a movie on your laptop, the fan almost immediately starts to sound like a jet engine, and feels warm enough to start a fire. Similarly, if you leave your smartphone in the glove box in the summer, it won’t work until it cools down. Keeping electronics a reasonable temperature is
not magic, although it may feel like it at times as the rules and situations are not very familiar to electrical engineers. The effects of heat on electronics are also somewhat difficult to predict and often can be better understood using statistics, such as mean time between failures to show the lifetime averages.
39
Power consumption versus resistance
The effects of heat on electronics vary greatly, and they are not always negative.
When current flows through a resistor, power is dissipated in the form of heat. Resistors are rated for the amount of power they can dissipate before they burn out or burn up. Electronics are filled with transistors that turn on and off at literally unimaginable speeds but in some ways act as resistors. Transistors are typically understood to be in two states: open, wherein no current flows, or closed, wherein the resistance is nominally zero and current flows unimpeded. However, sometimes reality does not exactly match the concept. For example, when a transistor is open, there is a small leakage of current through what is considered a very high resistance burning a small amount of power. When the transistor is closed, the resistance is not truly zero, and that minor resistance also adds to the total used power. However, the greatest amount of power used is during the transition between the two states. Although assumed to be a perfect square wave for most considerations, clock
40
Affect of heat expansion
signals have finite edge widths where a transistor is partially on and partially off. During this time, a current is flowing yet the resistance is much higher than when the transistor is in the closed state. In the large view, the amount of power in one clock cycle for that transistor is miniscule. However, when you multiply that one transistor by the hundreds of millions, or even billions of transistors in a processor, it jumps phenomenally. Multiply that by the billions of cycles per second and suddenly the trivial amount of power consumed has become a serious concern. Designers have tried many different methods to reduce the power consumed by making the clock edges sharper, at the expense of increased cost and electromagnetic emissions, or by decreasing the voltage level, which increases the susceptibility to spurious signals or digital errors. Many processors now are able to shut down portions of the chip when not in use to decrease power usage. This is very helpful, yet does not decrease the peak power usage.
TECH REPORT In addition to avoid burning holes in desks, there are many reasons why we care about how much heat is being generated by electronics. The effects of heat on electronics vary greatly, and they are not always negative. For example, the chemical reactions within batteries tend to work better at room temperature. Yet batteries store better at cooler temperatures and becoming too hot while running can lead to catastrophic and explosive results.
TEMPERATURE RATINGS Most electronics have a minimum and maximum temperature rating, typically 0C to 70C for commercial applications. The minimum temperature rating of electronics is usually not an issue except during the winter when electronics are left in the car or attic. Most of the concern related to cold is either the condensation that could be formed when bringing the electronics into the warmth, much like glasses fogging when coming inside, or the rapid expansion of traces and connections when electricity flows reheat them. Fortunately, these problems are easily avoided by either keeping electronics at a reasonable temperature or letting them come to room temperature before using them. The damage caused by heat has some similarities with those with cold. Much as a cold part coming to room temperature causes unequal expansion of the different materials, changing from room temperature to levels better suited for baking cakes also causes different
expansions. As different materials have different coefficients of thermal expansion, some materials will expand much more than others and break connections. Another issue created by excessive heat is the increased resistance of copper, which creates a spiral effect and can contribute to runaway conditions. Even if the circuit remains functional and the temperature levels off at acceptable levels, the increased temperature and resistance means that more power is being used by the circuit to accomplish the same things, thus decreasing the overall efficiency. While copper increases its resistance with increasing temperatures, the silicon substrate of most integrated circuits is also susceptible to heat, causing it to lose its semiconductor properties over a certain threshold. This leads to completely unpredictable behavior changes in the circuit. Finally, excessive heat can also encourage whiskering—a concern that has already increased due to the transition back to lead-free solder.
HEAT MANAGEMENT There are a myriad of ways to approach heat management. The simplest could be to reduce the amount of heat created by your product. Microprocessor manufacturers over the last two decades have struggled with keeping the temperature of their products at a reasonable level as they produce a large amount of heat in a very small area. As mentioned, decreasing the voltage, and therefore power consumption, has been very successful in the past. There
41
are other ways to decrease the power output at more of a board versus IC level. Any power conversion is a great opportunity to find savings in heat and efficiency, such as replacing a low dropout voltage regulator with a switching regulator. This has its own trade-offs like efficiency for cost and electromagnetic noise, however, it is a viable option. Other ways to increase efficiency are to reduce any bit-banging that may be required on any embedded microcontrollers. By choosing systems that are able to handle complex or difficult data management in hardware, the amount of required instruction cycles is reduced, allowing more time to go into sleep mode, wherein the chip has time to cool. • Heat Mediation There are times that the amount of heat generated cannot be reduced, at which point the heat must be removed. The first step of heat remediation is to set goals. Establish what levels are acceptable, then identify which devices are most susceptible to heat, as well as what devices create the most heat. If these items are not documented, it is difficult to balance the different tradeoffs that will be necessary in the design process. Also, without a set goal, there is no way to know when it has been achieved.
• Environmental Conditions Directly after setting those goals, establish your constraints. While all electronics ideally would be placed directly in the flow of dry, cold, clean air, the reality is that most electronics are in very tough environments – e.g. cellphones reside next to warm bodies, computers are placed in dusty office corners with restricted airflow, and embedded systems are placed in airplane locations with wildly oscillating pressure, temperature, and humidity conditions. Defining these constraints requires flexibility. Make sure you know the space availability, any I/O requirements, whether or not these items will be in contact with air, and whether there will be a place to mechanically and thermally connect to the enclosure. Also, determine if there will be encapsulating material such as potting on any of the ICs. Write these items down along with the items that you can change, so that all your variables are clearly defined. While this document should be well-organized and clear, it is also a working document that will certainly change as requirements are refined. • Heat Simulation Tools Simulation tools are more prevalent today, and there are many heat
Microprocessor manufacturers over the last two decades have struggled with keeping the temperature of their products at a reasonable level as they produce a large amount of heat in a very small area.
42
TECH REPORT simulation tools available to get general ideas of how devices will heat up and where that heat will go. These are powerful but limited by the same issue plaguing any computer program, that of garbage in, garbage out. When properly used, these can provide a general concept of where to start and what needs changing; however, they are only as accurate as the information provided. • Natural Convection Natural convection is an inexpensive solution that allows your electronics to cool, and it should be the first choice. If the device is not producing enormous amounts of heat and there is flexibility in the spacing of the enclosure, you may be able to passively cool it. This is a fantastic option as there is no fan to power or to get clogged. However, it requires even more exactness in other portions of the heat management technique. Placement and orientation of the heat-producing and heat-sensitive components needs to be managed, taking into account that heat rises. To oversimplify the matter, do not put all of the heat-producing components directly below all of the heat-sensitive components. Also, if in an enclosed space, determine if the passive method will continue to work after the ambient temperature has increased due to the heat producing ICs. • Heat Sinks To increase the effectiveness of passive or active heat removal, heat sinks are sometimes used. A heat sink can be the oddly shaped metal piece attached to a computer processor, but it can also
Heat Dissipation
be the circuit board attached to the IC. A properly laid out and drilled PCB can quickly move heat away from the IC and spread it throughout the board. It is important to remember that heat sinks do not make heat disappear; all they do is expedite the movement of heat from one point to another. In a tight enclosure, where the ambient temperature will rise with the heat put out by an IC, a heat sink will not change the overarching issue of the ambient temperature getting too warm. The idea is that a heat sink that is touching a very large heat mass—for example, the atmosphere—will cause such an inconsequential increase of temperature to that mass that it can be assumed to have no effect whatsoever on the temperature. • Fans If the heat needs to be actively drawn away from something, fans are triedand-true solutions, but carry their own concerns. They draw their own power, which may negatively affect other aspects of the design, plus they can be
43
When testing for temperature reliability, try to emulate real-world conditions as much as possible.
noisy, need to be cleaned on occasion, and will leave your product susceptible to damage if they fail. If possible, avoid fans, but if not possible, use them with caution. When testing for temperature reliability, try to emulate real-world conditions as much as possible. Temperature testing is not purely about surviving certain temperatures, it includes other variables such as air flow, humidity levels, and concurrent physical strains. A product that has been tested up to one hundred degrees Celsius with forced air does not indicate whether or not that product will, in an enclosed environment without forced air, heat itself up to even
higher temperatures. Actual tests, like computer simulations, are subject to the same rule of garbage in, garbage out. If the parameters are not correctly setup, then the test results will not be helpful. Yet another aspect of engineering that must be taken into consideration when designing is that temperature control and testing are not the be-all and end-all of any product design. A welldesigned product will balance all of the needs of the project in an efficient, cost-effective solution to best provide a solution for your customer. Creating a device that always runs well below the temperature threshold but is too bulky to be conveniently used is a failure compared to a device that runs barely within the temperature threshold and has a convenient form factor. However, creating a device that has a great interface but survives less than three days under normal operating conditions is an absolute failure. Keep heat management in your personal toolbox and pull it out every once in a while during the design to make sure that you are on the right track, not just designing another fancy looking brick.
Garbage in – garbage out
Advanced Assembly was founded to help engineers assemble their prototype and lowvolume PCB orders. Based on years of experience within the printed circuit board industry, Advanced Assembly developed a proprietary system to deliver consistent, machine surface mount technology (SMT) assembly in 1-5 days. It’s our only focus. We take the hassle out of PCB assembly and make it easy, so you can spend time on other aspects of your design. 20100 E. 32nd Pkwy #225 | Aurora, CO 80011 | www.aapcb.com www.aapcb.com| 1-800-838-5650
44
Your Circuit Starts Here. Sign up to design, share, and collaborate on your next project—big or small.
Click Here toHERE Sign Up CLICK
REDUCE
ESD Susceptibility
E
very person who has purchased computer components or any bare electronics is familiar with the silvery sheen of the antistatic bag. While it is common knowledge that electrostatic discharge (ESD) is bad for electronics, fewer are those who understand why. That nearly instantaneous transfer of electrons from one point to another, whether eliciting yelps of pain, or causing a temporary blanking of a TV monitor, or resulting in a cell phone that either restarts or decides to never start again, ESD is a part of everybody’s life. And it’s not very pleasant for people or electronics. While these discharges cannot be eliminated, there are steps that can be taken to protect any electronics that you design.
46
TECH REPORT
Static electricity can come from a myriad of sources, but most people are familiar with the static electricity generated by their own bodies. When walking across the carpet, or shifting in a chair, a person’s body will physically pick up or lose electrons via the triboelectric effect. As the carpet and chair are not conductive, the electrons will not flow back to where they came from, but will build up. This will put the body at a different voltage potential from those objects around it. Static discharge is the equalization of charges on two entities that come together. If there is a greater electron density on one object than another, then when they touch, the electrons will try to equalize so there is the same density on both objects. If the
two objects are conductive, the equalization process happens quickly. Technically, that equalization is an electrical current because electrons are flowing. Enough electrons moving quickly enough will produce a current that is noticeable and sometimes painful or destructive. For this reason, discharges are most frequent and noticeable when touching metal, as metal is very conductive and allows for a rapid transfer, in other words, a large current. A larger build-up in potential difference will also lead to larger currents. In dry weather, it is very common for there to be significantly more electric shocks than other times. This is due to the dryness increasing the resistance between objects, creating a greater insulated barrier.
While these discharges cannot be eliminated, there are steps that can be taken to protect any electronics that you design.
47
If there is an audible snap sound when there’s a discharge, then the voltage difference was at least approximately 5,000 volts.
The ideal level of conductance is a balance between the two extremes. While there needs to be a low enough resistance to allow the electrons to flow and reach that equilibrium, it has to be a high enough resistance to make certain that this flow is too low to cause any damage. While certain ESD bags for components are only designed to resist the accumulation of static electricity, other ESD bags are dissipative in nature so they will constantly and slowly make sure that the bag is at the same voltage potential as its surroundings. On the other end, conductive ESD bags are also used. These will change voltage potentials more quickly but protect their contents by routing the current through the bag itself and not through any of its contents. While the main focus has thus far been about current due to direct contact, ESD can be induced by electromagnetic waves or pulses, an indirect source. If a device is going to be in an electromagnetically active area, then you need to avoid or
48
protect inadvertent antenna traces. A strong enough electromagnetic pulse can create a voltage differential across a long trace that will induce a damaging current. It’s reasonable to ask at what level of discharge is damaging. This is a difficult question to answer because there are many factors, which depends on the setup of the circuit. However, if there is an audible snap sound when there’s a discharge, then the voltage difference was at least approximately 5,000 volts. If you can feel it, it’s above approximately 2,000 volts. Unprotected integrated circuits can be destroyed at potentials less than 2,000 volts. It should be noted that the voltage potential is not itself what typically causes the problem but the current that melts or destroys portions of the circuit. That being said, there would be no current without the voltage, and this topic causes a fair amount of confusion. The damage that is caused by ESD varies depending on the circuit and where the discharge occurs on the circuit board or integrated circuit. The most common damage that occurs to practically all types of electronics is simply the damage caused by overcurrent. A very fast, yet high amount of current can melt silicon and literally blow traces off of circuit boards, basically creating shorts or opens where they should not be. In today’s prominently complementary metaloxide-semiconductor (CMOS) based technology, silicon-controlled rectifier (SCR) latchups are a major concern.
TECH REPORT Due to the intrinsic design of CMOS circuits, without proper safeguards, a high voltage can activate a normally benign parasitic structure within the silicon substrate. This parasitic structure is, in essence, a thyristor between power and ground that will conduct high amounts of current through the substrate until all power is removed or the channel has burned itself open. This connection does not necessarily have to be between power and ground, however, those have the greatest potential of causing irreversible damage. There are several different models that are used in testing the susceptibility of electronics to ESD. These models are for simulating a discharge from a human body to a device, a conductive object to a device, and a charged device discharging to another object. The model for transference from a human body to a device is called the Human Body Model and is simulated by discharging
Human Body Model
a 100pF capacitor through a 1.5kOhm resistor to the device being tested. It is easiest to remember this model to think that the 1.5kOhm resistor is to simulate the resistance level of skin. For a conductive object, the model is called the Machine Model and instead of a 1.5kOhm resistor, a .5uH inductor is used and the capacitor is 200pF. As this lets a significantly greater current flow, the Machine Model is generally considered to be more stringent. The final model, in which a device is charged, most likely from the triboelectric effect while sliding through packaging on it’s way to be placed, is called the Charged Device Model. This test is performed by electrically isolating the device and then connecting it to a high voltage source, bringing the overall potential up. Once the device has been charged, it is mechanically touched by a grounded probe. Like the Machine Model, this is considered a more stringent test as it does not have a limiting resistor.
Machine Model
49
Charged Device Model
Reducing issues with ESD should involve a two-fold approach. The environment in which a product is made, from manufacturer to distributor, should be designed specifically to reduce the build up of static. Also, products need to be able to survive the world of the consumer, so these products must be hardened against the static that they will confront once they are with the end user. There are certain tried and true methods that will help with either aspect but their application depends on the situation, budget, and standards. A two-dollar toy will not have seventy cents worth of ESD hardening added to the circuitry. However, a control board for a fighter plane that will be in an incredibly noisy environment while needing to maintain a zero percent failure rate requires that can a significant amount of time and money be invested to ensure the board has been appropriately hardened.
50
To make a working environment ESD safe, there are a multitude of approaches. At the workbench, having a properly grounded mat and strap can make a significant difference. If this is not sufficient, there are commercially available ionizers that neutralize the charges on nonconductive objects. Take care in the implementation of ionizers, though, as they can actually compound the problem if setup incorrectly. There are also special ESD garments that can be worn by workers to also reduce the build up on their bodies as they move about the workspace or shift on their chairs and desks. Further methods to reduce static build up as workers move around the production floor is a specialized floor coating. Unsurprisingly, carpet is a non-ideal floor surface if dealing with electrostatically sensitive devices. To ESD harden individual devices is a bit more difficult as the methods have to be more carefully tailored to the device, its performance requirements, and its environments. Despite this, there are general tips that can be used, even if the implementation varies. Before pursuing these tips, however, first view the data sheets of the more sensitive integrated circuits to see if there are counsels specific to those devices. They may have recommendations that emphasize or contradict the general tips. The biggest step for the device itself is prevention, which is done through proper grounding. If the electronics are kept at the same voltage level as its environment, there won’t be
TECH REPORT the opportunity to develop a voltage differential. If the electronics are embedded in a larger system, then providing adequate grounding between the different aspects of the system will help significantly. For smaller, embedded devices that reside in user’s pockets, it is much more difficult to ground them properly as they’re floating and usually encased in nonconductive enclosures. These enclosures could technically be made of a dissipative or ESD-resistant material, but this will create trade-offs with the other aspects of the materials, such as durability. For those devices that do have a physical connection to power and ground, properly grounding the electronics and the chassis will cause any discharge to be routed directly to the power ground, not the electronics. With proper grounding in place, then methods for decoupling the circuit from potential surges is the next step. The simplest method, which is also rather effective, is to implement decoupling capacitors at places where a discharge
is most expected. These capacitors are usually placed between power and ground near the integrated circuits, which serves the dual purpose of compensating for any dips in the voltage as the circuit pulls more current while also shunting any high-frequency noise directly to ground. These capacitors are also typically placed on any communication lines that leave the device itself and are accessible to the outside world. As people are plugging and unplugging their connections, such as USB or audio jacks, there can be discharges down those lines. The biggest problem with capacitors in this situation, though, is how they can affect high-speed communication signals. In the case of the USB, a capacitor on the signal lines could significantly slew the signal, rendering the USB useless. Any high-frequency line will be adversely affected by a capacitor, so other methods must be considered. Aside from capacitors, there are many other devices that can be used to protect electronics, varistors and transient-voltage-suppression (TVS) diodes being prominent on this list. Varistors, which conduct only at highvoltage levels, can be placed between any line of concern and ground. If there is a spike of high voltage that exceeds the clamping voltage, the varistor will switch on, shunting that surge directly to ground. TVS diodes are functionally similar to varistors in that they shunt any high-voltage surges while acting like an open at lower voltages. TVS diodes typically have a faster response time than varistors but in general are not capable
For small, embedded devices that reside in user’s pockets, it is much more difficult to ground them properly as they’re floating and usually encased in nonconductive enclosures.
51
of handling such high power spikes. Both of these, while effective, still have their own drawbacks. Despite not being designed as capacitors, these both have intrinsic capacitance and small, yet finite amounts of leakage current. While these are both designed to be minimal, it will require custom calculations to determine if they will cause adverse affects on your circuits. While they may provide a shunting effect, they’re also not immune to being destroyed in discharges, so they must be sized to accommodate the current that they’re expecting. Another method, besides shunting to ground, is to simply reduce the amount of electricity that can flow down a trace or lead. This is very simply done by putting a resistor in series of whichever line needs protection. This is a highly discouraged method for any lines that are anticipated to have non-negligible amounts of current. Otherwise the
resistors will simply be turning power into heat, which is rarely a good idea. However, if the line is a simple communications line with no possibility of current flow, then it is a simple way to make sure that if a voltage is induced on the line, it will be absorbed more by the resistor than the circuit behind it. Electrostatic discharge and its effects are an interesting topic with many potential problems and an equal number of potential solutions. Knowing the advantages and disadvantages of each solution ensure sound engineering decisions that protect products from the wildly varying voltages found in the real world. While a one-size-fits-all solution would be ideal, that is rarely found in the engineering. Running basic calculations, implementing solutions, and thoroughly testing using different models will help in the never-ending goal of making products more robust.
Advanced Assembly was founded to help engineers assemble their prototype and lowvolume PCB orders. Based on years of experience within the printed circuit board industry, Advanced Assembly developed a proprietary system to deliver consistent, machine surface mount technology (SMT) assembly in 1-5 days. It’s our only focus. We take the hassle out of PCB assembly and make it easy, so you can spend time on other aspects of your design. 20100 E. 32nd Pkwy #225 | Aurora, CO 80011 | www.aapcb.com www.aapcb.com| 1-800-838-5650
52
Join Today CLICK HERE
eeweb.com/register
Q A &
54
INDUSTRY INTERVIEW
“The idea behind the Big I.D.E.A. Design Contest is to make the engineer aware of the breadth of NXP’s product portfolio.”
The Big
I.D.E.A. CLIFF LLOYD, Business Development Director, Logic Division, NXP Semiconductors, discusses Dual Configurable Logic and this year’s Big I.D.E.A. (International Design Engineering Award). The following interview was conducted in early January at the NXP offices in San Jose by Glenn ImObersteg, President of Convergence Promotions.
55
Tom Wolf in his video series on logic says that the configurable logic has been around since the ‘60s—is that right?
To watch Tom Wolf’s Dual Configurable Logic video, click the image below:
Yes, in one form or another. They were originally programmable where you blew fuses—as such, they were dedicated to a particular application. Then they had configurable logic in the form of PLAs, where they were mass-programmed in the factory for a particular application. But those types again were dedicated to a particular application. Later on, they came out with the FPGA (Field-Programmable Gate Arrays) so the engineer or the manufacturing site could program them when they needed them. And again, once they were programmed, they were set for that particular application.
CLICK CLICK HERE HERE
We’ve come a long way from the early programmable devices to today’s configurable logic though, haven’t we? Our configurable logic devices are not programmed by anybody—they are configured by the layout of the PCB so you can put the same device down in different locations on the PCB and depending on how the PCB is laid out, the part would perform the function it is configured to perform in that location.
What part did NXP play in the configurable logic idea? We developed the idea about 6 years ago, around 2009.
56
Last year, you introduced the AXP Logic family, which was a breakthrough product. Can you tell me a little bit about AXP? Yes, we saw a downward migration in voltage from 3.3V to 1.8V to 1.2V to 0.8V. There were no logic devices on the market that were specified down below 1.2V. Yet, we saw on new ASIC product road maps that the new processes are going down to 0.8V and that in the future, they would not be able to support devices operating at 3.3V. So there will be a need for a lower operating voltage logic device. Now you don’t see many products on the market today, but there will be in the years to come. In a couple of years, there will be a greater need for the lower voltage AXP family.
A year after the introduction of the AXP family, you introduced dual configurable logic. Can you tell us a little bit about the need for that and why you introduced a dual configurable product on the heels of the AXP? That’s a very good question. When we introduced the AXP family, the first part we introduced was a configurable part. When we ran a design contest to encourage engineers to become familiar with using the part, we realized from their submissions that there was a need for multiple parts that were different on the PCB. So in the past, you could buy an AND gate and if you needed two AND gates, you would buy two in the same package so you could save space; however, if you needed an AND gate and an OR gate, you would have to buy two different devices—each packaged
INDUSTRY INTERVIEW separately in their own package—and put them on the PCB, which took up a lot of space. So we thought, why don’t we offer a combination of devices in a single package? So we started doing that, but in logic, there are about 50 or 60 different functions and you can’t possibly make a combination of all those 50 or 60 functions. We did an analysis and it turns out there would be over 400 different combinations, and there would be no way we could offer all of these different combinations of logic functions. So we decided to take a look at doing a family of dual configurable logic devices, so that the engineer can configure each of the parts individually. That way, they can not only get the 400-plus different functions, but they can get even more. That’s how we came up with the idea.
How do the multiple functions in the package reduce system costs, inventory control, and operations like qualification? The benefits of the dual configurable logic device are significant in many areas. For example, for the design engineer, he can save both space and power because you only have to put one part on the board instead of two. In addition to the physical space the package itself takes up, you will also save the clearance space that is required around each package since they can’t be placed physically touching each other. Also, the power consumption of a dual configurable logic device is less than the total power consumed by two individual gates. Other benefits for the design engineer are that he does not have to
order individual, specific functions and wait for them to arrive, he can take a configurable device and configure it in the function that he needs at any time.
Apart from the space and power savings of the device, what are some of the other benefits of the dual configurable logic device? From a purchasing and logistics point of view, both the purchasing manager and the logistics manager need to manage only one device. Also, from a cost perspective, better pricing can sometimes be obtained from purchasing higher volumes of one specific device rather than having the volume spread over a number of different devices.
Are there any other benefits to the customer when they use a dual configurable logic device? Yes. From a production and assembly point of view, a pick-n-place machine needs a dedicated magazine for each device type or component that is being placed on the PCB. For example, if an application requires 5 different logic devices, then you need 5 magazines to be reserved and loaded with the 5 different logic devices. However, by using the dual configurable logic device, only one magazine needs to be reserved for the logic component as its function is determined by the PCB layout—thus, freeing up the other 4 magazines for other components.
Our configurable logic devices are configured by the layout of the PCB so you can put the same device down in different locations on the PCB.
Do you know of any company that is using configurable logic for increased assembly efficiency?
57
When it comes to design, the engineer can save both space and power because you only have to put one part on the board instead of two.
58
Yes and, as a matter of fact, when I visited them this past fall, they said they now encourage their design engineers use configurable logic devices as much as possible in place of individual logic gates.
to encourage him to use them. Thus, we have included some power MOS devices, load switches, and ESD and filtering devices in our design contest. Of course, the center of the design contest is the dual configurable logic.
The 74AUP2G57 is the centerpiece of the new “Big I.D.E.A” Design Contest that just launched. The idea behind this design contest is to pull together logic with other standard products from NXP—load switches, ESD protection and filtering components, small signal MOSFETs, and small signal diodes. What was the rationale behind this?
How will the submitted designs be judged and are there any ways the engineers can increase the number of points they can receive?
The idea behind this design contest is to make the engineer aware of the breadth of NXP’s product portfolio. Whenever you have an application, the heart of the application, the chip or ASIC—no matter what it is—it doesn’t stand alone. It has components connected to both its inputs and outputs. For example, when you have a device with a push button or connector, you have to have some way of protecting the chip from any possible damage from ESD. To do so, you need some ESD protection devices to protect the chip/ASIC’s inputs. On the back end you will most likely have to drive something like a light bulb, a relay, motor, display, etc. Thus you might need a power MOS device or a load switch. The dual configurable logic design contest is intended to not only make the design engineer familiar with the dual configurable logic device but also to make him aware of the other components and
The engineers that submit their designs will get a certain amount of points for creativity, and will get additional points for documentation and demonstration. The demonstration can be performed by either submitting a video, showing curve traces, or sending in the modeling files. If they use some of the other components we have suggested, like ESD protection diodes, they will receive a 20% multiplier. The same goes for the use of power MOS, load switches, and some of the protection diodes. Finally, because this contest is being co-sponsored by Mouser, if they use the MultiSIM Blue program to do the schematic capture and simulation, they will receive an additional 20% multiplier. The engineers can actually double their score by using all of these other components in the contest.
Thank you, Cliff. We’re looking forward to seeing some exciting and creative applications from this contest later this year. To view the Big I.D.E.A Contest page, click the link below: www.thebigidea2015.com
Learn more
JOIN THE
Today
EVOLUTION. 2005 1945 1905
Evolve to app-based control with AIR for Wiced Smart! Get “mobile smart” in 3 easy steps: Get your AIR for Wiced Smart dev kit at your distributor of choice. (See our website for a current list.) Develop your wireless link and basic app using our exclusive Atmosphere development tool. With our AIR for Wiced Smart module on board, proceed in record time to a prototype and final, mobile-app development!
If you’re ready to evolve from fixed control panels populated with dials, buttons, keypads, and LCD displays to mobile-app based control of your embedded product – check out Anaren’s AIR for Wiced Smart module, featuring Broadcom’s Wiced Smart Bluetooth® chip (BCM20737). Not only does our small-footprint, SMT, and pre-certified all-in-one module save you the time, effort, and trouble of designing your own radio... It’s supported by our industry-exclusive Atmosphere development ecosystem that lets you develop your basic embedded code and app code in one, easy-to-use development tool – for a far speedier product development cycle and time-to-market. Follow the steps at left to join the evolution, right now! www.anaren.com/AIRforWiced 800-411-6596 In Europe: 44-2392-232392
CLICK HERE
Using
Shift Registers to
SIMPLIFY LED Designs
By Michael Lyons, NXP Semiconductor
60
TECH REPORT
S
hift registers can help reduce size and BOM in designs that use LEDs.
By providing I/O expansion, they enable the use of smaller, less expensive microcontrollers. In some cases, the shift register can be used to drive the LED directly and thus eliminate the need for external LED drivers. This adds to the savings, and makes it possible to drive a wider variety of LEDs.
61
Figure 2. Cascading 74HC595 devices to drive more LEDs
Now, with the cascading, the same three pins on
hift registers to reduce BOM in LED designs
emiconductor
duce size and BOM in providing I/O expansion, aller, less expensive cases, the shift register can directly and thus eliminate drivers. This adds to possible to drive a wider
In designs that use LEDs, shifter registers can be very useful. For instance, if the system includes a sevensegment display, a single indicator, or an array of LEDs that form a grid or panel, a standard 8-bit shift register can be used to allow a low pin-count microcontroller to drive multiple LEDs.
best when the LEDs are specified for relatively low Using the 74HC595 for I/O expansion voltage and forward current. LEDs that operate w means that it takes only three MCU forward curre voltages higher than 6 V or require control pins to20 drive eight LEDs. that exceeds mAup willtotypically require an exter Reducing the number of control pins driver. makes it possible to use an MCU with a lower pin count, and that can yield a Open-drain outputs smaller, more cost-effective design. Also, Adding open-drain outputs to the shift register because the 74HC595 includes a serial creates several a single-chip solution eliminates the output, devices can bethat cascaded need for an external driver. This can yield significa together. Figure 2 gives the layout.
12 V
External drivers
I/O Microcontroller I/O I/O
Output_CLK
Storage register
Serial input Shift register
Input_CLK
74HC595
shifter registers can be f the system includes a Figure 1. An 8-bit 74HC595 shift register driving multiple LEDs single indicator, or an array Figure 1. An 8-bit 74HC595 shift register driving multiple LEDs. r panel, a standard 8-bit to allow a low pin-count Using the 74HC595 for I/O expansion means that ultiple LEDs. it takes only three MCU control pins to drive up to
Figure 1 gives an example. A single 5V
. A single 5V 74HC595 puts and serial or I/O expansion for the a is applied to the serial clocked in via the input is loaded, the output he storage register and utputs. External drivers, 5, then activate the
the microcontroller can be used to control up to Serial data is applied toof the serial input 16 or 24 LEDs instead just eight. The ability to of the 74HC595 and clocked in via cascade shift registers can reduce the total numb the input clock. Once the 74HC595 is of microcontrollers needed in the design, and tha loaded, the output clock applies the can help lower costs and reduce size, too. data to the storage register and to the parallel and serial outputs. External In somecontrolled cases, a 5 by V, 8-bit register like the 74HC5 drivers, the 74HC595, can be used to drive LEDs directly. This works then activate the corresponding LEDs.
eight LEDs. Reducing the number of control pins 74HC595 shift register, with serial inputs makes it possible to use an MCU with a lower pin andthat serial parallel outputs, provides count, and can or yield a smaller, more costI/O expansion for the microcontroller. effective design.
reductions in the bill of materials, since each outp Now, cascading, the same of thewith shiftthe register can drive the LEDs directly. three pins on the microcontroller V can be used to control up12to 16 or 24 LEDs instead of just eight. The ability Open-drain outputs to cascade shift driveregisters LEDS directly can reduce the total number of microcontrollers needed in the design, and that can help lower costs and reduce size, too. I/O
Also, because the 74HC595 includes a serial output, several devices can be cascaded together. Figure 2 gives the layout.
Microcontroller I/O I/O
Output_CLK
Storage register
Serial input 12 V Input_CLK
Shift register NPIC6C596A
External drivers
Figure 4. Output schematic for shift register with open-drain o I/O Microcontroller I/O I/O
Output_CLK
Storage register
Storage register Serial output
Serial input Input_CLK
Shift register
Shift register 74HC595
74HC595
Using shift registers to reduce size and BOM in L
Figure 2. Cascading 74HC595 devices to drive more LEDs
Figure 2. Cascading 74HC595 devices to drive more LEDs.
62
Now, with the cascading, the same three pins on the microcontroller can be used to control up to 16 or 24 LEDs instead of just eight. The ability to cascade shift registers can reduce the total number of microcontrollers needed in the design, and that
Figure 3 gives the output schematic for one such device, the NPIC6C596A LED driver from NXP, which combines shift register functions similar to 74HC595 with a high-voltage (HV) MOSFET driv
Output schematic
o ber
at
that exceeds 20 mA will typically require an external driver. outputs Figure 3 gives the output schematic for oneOpen-drain such Adding open-drain outputs to the shift register device, the NPIC6C596A LED driver from NXP, creates a single-chip solution that eliminates the which combines shift register functions similar to a need for an external driver. This can yield significant 74HC595 with a high-voltage (HV) MOSFETreductions driver. in the bill of materials, since each output of the shift register can drive the LEDs directly.
Figure 3. Output schematic for shift register w outputs
Figure 4 shows the NPIC6C596A us the 74HC595.
12 V
Output schematic Qn
595
TECH REPORT
Open-drain outputs drive LEDS directly
33 V
w
I/O
with ent rnal
Microcontroller I/O I/O
Output_CLK
Storage register
Serial input Input_CLK
GN
Storage register Serial output
Shift register NPIC6C596A
Shift register NPIC6C596A
GND Figure 4. Output schematic for shift register with open-drain outputs
Figure 3. Output schematic for shift register with open-drain outputs.
Figure 4. Output schematic for shift register with open-drain outputs. Figure 3. Output schematic for shift register with open-drain outputs
Using shift registers to reduce size and BOM in LED designs
ant
Figure 4 cases, shows athe of the 74HC595 with the In some 5V,NPIC6C596A 8-bit register used like in placeReplacing put the NPIC6C596A eliminates the need the 74HC595. 74HC595 can be used to drive LEDs for external drivers, creating a directly. This works best when the LEDs design that is more compact and are specified for relatively low voltage has a lower bill of materials. and forward current. LEDs that operate with voltages higher than 6V or require NPIC6C devices have open-drain forward current that exceeds 20mA will outputs that are tolerant to 33V. Each typically require an external driver. output is designed to sink 100mA and there is no limit on ground current. Open-drain outputs All the outputs can actively sink Adding open-drain outputs to the shift Storage register 100mA simultaneously. The outputs register creates a single-chip solution that Serial output include current-limiting circuitry, eliminates the need for an external driver. Shift register which sets a 250mA maximum on This can yield significant reductions in the NPIC6C596A the sinkable current, and each output bill of materials, since each output of the also includes thermal protection. shift register can drive the LEDs directly. Having these protections means outputs the NPIC6C596A device can be Figure 3 gives the output schematic for used to drive a wider range of LEDs one such device, the NPIC6C596A LED than the 74HC595, including LEDs driver from NXP, which combines shift that operate at higher voltages register functions similar to a Z4HC595 LED designs 2 and with higher forward current. with a high-voltage (HV) MOSFET driver.
h
oa ver.
63
Protection Features
edge of the input clock. The delay Figure 5 shows the behavior of the provides a longer data hold time, which current-limiting circuitry on the openimproves timing margin and makes it drain outputs of the NPIC6C596A. The easier to cascade many shift registers. circuitry limits the maximum current each output can sink. As the drain voltage The NPIC6C596 and NPIC6C4894 can 6 shows how the open-drain outputs of the Replacing the 74HC595increases, with the NPIC6C596A the drain source Figure current be used between 4.5V and 5.5V, making NPIC6C596A provide thermal protection. The clamp eliminates the need fordecreases. external drivers, a the Thiscreating protects outputs and them suitable for 5.0 V control logic current is proportional to temperature. As design that is more compact and has a lower bill of the components they are driving. Atinversely 25 interfaces. The NPIC6C596A can be the temperature increases, the output resistance materials. °C, the output clamp is typically activated from 2.3Vcurrent to 5.5V, so it can be used increases, thus limitingused the drain source when the drain source current is 250 mA. with 5.0V, 3.3V, and 2.5V control logic and preventing damage to the output and the NPIC6C devices have open-drain outputs that are NPIC6C devices operate At 25 °C, the All output typically tolerant to 33 V. Each output is designed to sink 100 components it drives. interfaces. 6 shows how the open-drain limits the drain source from current-40 to 120 mA. mA and there is no limitFigure on ground current. All the to +125°C and with an input
outputs the NPIC6C596A provide outputs can actively sink 100 mA of simultaneously. The thermalcircuitry, protection. current is outputs include current-limiting which The sets clamp 0.3 a 250 mA maximum oninversely the sinkable current, and to temperature. proportional each output also includes protection. Having Asthermal the temperature increases, the 0.2 these protections means the NPIC6C596A device output resistance increases, thus can be used to drive a wider range of LEDs than I (A) limiting the drain source current and the 74HC595, including LEDs that operate at higher preventing damage to the output 0.1 voltages and with higher forward current.
clock frequency of at least 10MHz.
NPIC6C LED drivers are available in industry-standard SO and TSSOP 5V 10 V packages, as well as the space-saving 15 V DQFN leadless package, which is up 20 V to 76 percent smaller than a TSSOP 25 V and the components it drives. At V and 40 percent smaller30than a QFN. 25°C, the output typically limits the Protection features DQFN packages also include a heat 0 25 6 shows how 75 125 Figure the open-drain outputs of the Replacing the 74HC595 with the NPIC6C596A drain source current to 120mA. -25 T (ºC) and are the packages of choice Figure 5 shows the behavior of the currentsink NPIC6C596A provide thermal protection. The clamp eliminates the need for external drivers, creating a Figure 6. Thermal protection in NPIC6C596A limiting circuitry on the open-drain outputs of the for space-constrained applications inversely proportional to temperature. As design that is more compact and has a lower bill of NPIC6C596A. The circuitry the maximum Thelimits NPIC6C596 and NPIC6C596A delaycurrent isthat use higher currents. Automotive the temperature increases, the output resistance materials. Multiple current each output canthe sink. As the drain voltage serial output to the next fallingoptions variants are the alsodrain available. increases, thus limiting source current DS
AMB
Table 1 shows the NPIC6C LED drivers available increases, the drain source current decreases. This preventing damage to the output and the NPIC6Cand devices have open-drain that are NXP. Theand NPIC6C596 and the NPIC6C596A protects the outputs the components they outputs from components it drives. At 25 °C, output typically to 33 V. Each output is designed to 100 aresink 8-bit solutions, while the NPIC6C4894 is athe 12-bit are driving. Attolerant 25 °C, the output clamp is typically limits the drain source current to 120 mA and there is no limit on ground current. All the solution. All include a serial output for cascading. mA. activated when the drain source current is 250 mA. outputs can actively sink 100 mA simultaneously. Data is The propagated through the shift register outputs include current-limiting circuitry, which sets 0.3 of the input clock. With the on the rising edge 0.4 a 250 mA maximum on the sinkable current, and NPIC6C595 and the NPIC6C4894, the same rising each output also includes thermal protection. edgeHaving is used to clock data to the serial output QS. 0.3 5V -40º C 0.2 these protections means the NPIC6C596AThe device NPIC6C596 and NPIC6C596A delay the serial I (A) 10 V -10º C can be used to drive a wider range of LEDs than to the next I (A) 15 V output falling edge of the input clock. 0.2 25º C the 74HC595, including LEDs that operate at higher 20 V 80º C The delay provides a longer data hold time, which 0.1 25 V voltages and with higher forward current. 125º C improves timing margin and makes it easier to 0.1 30 V cascade many shift registers. Protection features 0 0 -25 25 75 125 0 10 20 T (ºC) Figure 5 shows the behavior 30 of the currentV (V) The NPIC6C596 and NPIC6C4894 can be used Figure 6. Thermal protection in NPIC6C596A limiting circuitry on the open-drain outputs of the 4.5 and Figure 5. Current-limiting behavior in NPIC6C596A between 5.5 V, making them suitable for 5.0 NPIC6C596A. The circuitry limits the maximum V control logic interfaces. The NPIC6C596A can be Figure 6. Thermal protection in NPIC6C596A. Figure 5. Current-limiting in NPIC6C596A. current behavior each output can sink. As the drainused voltage from 2.3Multiple to 5.5 V, options so it can be used with 5.0, 1 shows the NPIC6C drivers available increases, the drain source current decreases. 3.3, This and 2.5 VTable control logic interfaces. AllLED NPIC6C from NXP. The NPIC6C596 and the protects the outputs and the componentsdevices they operate from -40 to +125 °C and with an NPIC6C596A are 8-bitof solutions, while the NPIC6C4894 is a 12-bit are driving. At 25 °C, the output clamp is typically input clock frequency at least 10 MHz. solution. All include a serial output for cascading. activated when the drain source current is 250 mA. Data is propagated through the shift register on the rising edge of the input clock. With the 0.4 DS
DS
DS
64
AMB
TECH REPORT Conclusion
number of suppliers, including NXP. Shift registers that are equipped with open-drain outputs, like the NPIC6C series from NXP, go a step further, because they eliminate the need for external LED drivers.
When LEDs are part of the design, shift registers make it possible to use a smaller, less expensive microcontroller. Standard 8-bit shift registers like the 74HC595 are available from a
More about the NPIC6C series can be found at: http://www.nxp.com/products/logic/family/NPIC/#overview Table 1. NPIC6C LED drivers from NXP http://www.nxp.com/products/logic/family/NPIC/#overview Type number
Format
Supply voltage (V)
NPIC6C595 4.5 to 5.5 Table 1. NPIC6C LED8-bit drivers from NXP Type number
fmax (MHz)
Tamb (째C)
QS clock
10
-40 to +125
Rise
Format
Supply voltage (V)
fmax (MHz)
Tamb (째C)
QS clock
NPIC6C596 NPIC6C595
8-bit 8-bit
4.5 to 5.5 4.5 to 5.5
10 10
-40 to +125 -40 to +125
Fall Rise
NPIC6C596A NPIC6C596
8-bit 8-bit
2.3 to 5.5 4.5 to 5.5
10 10
-40 to +125 -40 to +125
Rise Fall
NPIC6C4894 NPIC6C596A
12-bit 8-bit
4.5 to 5.5 2.3 to 5.5
10 10
-40 to +125 -40 to +125
Rise Rise
Packages SO16, TSSOP16, DQFN16 Packages SO16,
TSSOP16, SO16, DQFN16 TSSOP16, DQFN16 SO16,
TSSOP16, SO16, DQFN16 TSSOP16, DQFN16 SO20,
TSSOP20, SO16, DQFN20 TSSOP16, DQFN16 SO20,
NPIC6C4894 12-bit 4.5 to 5.5 10 TSSOP -40 to +125 as wellRise TSSOP20, NPIC6C LED drivers are available in industry-standard SO and packages, as the spaceDQFN20 saving DQFN leadless package, which is up to 76 percent smaller than a TSSOP and 40 percent smaller than a QFN. DQFN packages also include a heat sink and are the packages of choice for space-constrained applications that use higher currents. Automotive variants are also available. NPIC6C LEDLED drivers are available in industry-standard SO and TSSOP packages, as well as the spaceTable 1. NPIC6C Drivers from NXP. saving DQFN leadless package, which is up to 76 percent smaller than a TSSOP and 40 percent smaller Table 2. Package options for NPIC6C LED drivers than a QFN. DQFN packages also include a heat sink and are the packages of choice for space-constrained Package suffix D currents. Automotive PW D PW applications that use higher variants are BQ also available. 16-pin
16-pin
16-pin
20-pin
20-pin
Table 2. Package options for NPIC6C LED drivers Package suffix
D
PW
BQ
D
PW
16-pin
16-pin
16-pin
20-pin
20-pin
SOT109-1
SOT403-1
SOT763-1
SOT163-1
SOT360-1
Width (mm)
6.00
6.40
2.50
10.30
6.40
Length (mm)
9.90
5.00
3.50
12.80
6.50
Height (mm) Package
1.75 SOT109-1
1.10 SOT403-1
1.00 SOT763-1
2.65 SOT163-1
1.10 SOT360-1
Pitch Width(mm) (mm)
1.27 6.00
0.65 6.40
0.50 2.50
1.27 10.30
0.65 6.40
Length (mm)
9.90
5.00
3.50
12.80
6.50
Package
Height (mm) options for 1.75 1.10 1.00 2.65 1.10 Table 2. Package NPCIC6C LED drivers. Conclusion Pitch (mm) 1.27 0.65 0.50 1.27 When LEDs are part of the design, shift registers make it possible to use a smaller, less expensive 0.65 microcontroller. Standard 8-bit shift registers like the 74HC595 are available from a number of suppliers, including NXP. Shift registers that are equipped with open-drain outputs, like the NPIC6C series from NXP, Conclusion go a step further, because they eliminate the need for external LED drivers. When LEDs are part of the design, shift registers make it possible to use a smaller, less expensive microcontroller. Standard 8-bit shift registers like the 74HC595 are available from a number of suppliers, More about the NPIC6C series can be found at http://www.nxp.com/products/logic/family/NPIC/#overview
65
NXP’s Complete Solution for
MOTION-BASED, ALWAYS-ON
Sensor Processing Applications This all-in-one solution, based on the ultra-low power LPC54102 microcontroller, provides everything needed to bring sensor-based motion and other sensor-processing applications to market quickly. NXP has partnered with Bosch Sensortec to offer an integrated solution that makes it easy to incorporate motion/inertia and other sensor data into a variety of end applications. The solution includes sensors for 6- and 9-axis motion vectors as well as temperature, proximity and ambient light.
66
TECH REPORT SENSOR PROCESSING/MOTION
The sensor shield board includes:
The LPC54102 Sensor Processing/Motion Solution includes everything you need to add motion and other sensor-based features to your applications. Using the ultra-low-power, dual-core LPC54102 microcontroller, it provides a scalable solution for a family of connected sensor-based products.
• Bosch Sensortec BMI0155 intertial measurement unit, BMC150 digital compass, BMM150 magnetometer, and BMP280 pressure/temp sensors
Solution Includes:
• ACKme AMS002 Bluetooth LE module
• Reference hardware including the LPCXpresso54102 board and a sensor shield with nine sensors and Bluetooth LE wireless connectivity
• Headers for easy prototyping of additional SPI and I2C sensors
• Bosch BSX Lite sensor fusion middleware • Bosch sensor drivers • LPC Sensor Framework to simplify sensorprocessing and support additional sensors • Complete reference documentation
FLEXIBLE, EXPENDABLE REFERENCE HARDWARE The Solution’s LPCXpresso54102 development board includes: • Large set of pinouts for measurement and prototyping • Built-in Hi-Speed USB debug probe (Link2) and support for external debug probes • On-board 1.8/3.3V or external power supply options for LPC54102 • Built-in MCU power consumption and supply voltage measurement for LPC54102 MCU and sensor shield board • UART, I2C and SPI port bridging form LPC54102 target to USB via Link2 probe
• MAX44000 ambient light/proximity sensor • Vishay VSOP98260 IR remote control sensor/driver
• Sensor Interface & Data Processing The Solution includes NXP’s Sensor Framework and the Bosch BSX Lite sensor fusion middleware needed to compute Euler orientation data (heading, roll, pitch and yaw), linear acceleration, gravity, and quaternion using 6- and 9-axis accelerometer, magnetometer and gyroscope data. The LPC Sensor Framework software provides an easy to use, modular software approach that handles sensor initialization, calibration, sensor interfacing for getting raw data, timing/bundling/batching of raw and processed sensor data, interfacing with the Sensor Fusion Library, power management, and providing a clear command/processed-data interface to either the user application or a host processor over I2C or SPI.
WEBINAR USB Type-C is a new Connector Standard billed as the ‘Last Connector’, that will allow multi-function signaling (e.g. USB, Display Port, etc.) to pass over a small form factor, compact, high reliability connector. NXP’s offers a broad portfolio of best-in-class solutions for this emerging market, including USBPower Delivery, X-Bar Switches, Microcontrollers, Authentication, AC/DC adapter components and Load Switches and ESD/EMI solutions. This webinar will give an overview of the Type-C interface and NXP solutions. To register, click the link below:
https://webinar.techonline. https://webinar.techonline com/19368?keycode=xxxxxx com/19368?keycode=xxxxxx
67
Click Here
Click here
M o v i n g To w a r d s a
David Elien VP of Marketing & Business Development, Cree, Inc.
Clean Energy
Let There Be
LIGHT
FUTURE
How Cree reinvented the light bulb
— Hugo van Nispen, COO of DNV KEMA
Cutting Edge
SPICE
Modeling
MCU Wars 32-bit MCU Comparison
+
Cutting Edge Flatscreen Technologies
+
New LED Filament Tower
View more EEWeb magazines— CLICK HERE Click Here
Power Developer O ct o b er
201 3
From Concept to
Reality
Sierra Circuits:
Designing for
Durability
A Complete PCB Resource
Wolfgang Heinz-Fischer Head of Marketing & PR, TQ-Group
TQ-Group’s Comprehensive Design Process
Freescale and TI Embedded Modules
+
Ken Bahl CEO of Sierra Circuits
PLUS: The “ Ground ” Myth in Printed Circuits
+
+
PCB Resin Reactor
ARM Cortex Programming
Low-Power Design Techniques