White Paper: Atmel® Design Tools Make Complex Sensor Designs Accessible
There is a tremendous opportunity for today's engineers to integrate sensors into new designs and applications that until recently were impractical. Sensors are used to measure a specific physical effect and typically provide the results in raw form over an interface to a controller. They allow for monitoring, controlling, regulating and warning in a rapidly growing new batch of applications. What appears to be simple, however, is anything but. Designing with sensors can be expensive, time consuming, and difficult to achieve, especially given trends to use multiple sensors in the same design simultaneously.
Currently, one of the fastest growing and most interesting segments is the inertial and environmental sensors market, driven by dramatic improvements in cost/performance resulting from the use of microelectromechanical systems (MEMS) technologies. For two decades MEMS sensors have experienced a dramatic drop in price based on burgeoning volumes. Whereas early growth was fueled by their increased use in automotive control and medical disposable applications, explosive growth took place just a few years ago when their small size, lower price point, and increased performance made MEMS accelerometer sensors ideal for portrait to landscape orientation in mobile devices and as controllers for gaming platforms.
However, while MEMS sensors are experiencing increased demand due to the impressive improvements in cost, size, and performance, there is an increasing need to support this adoption into new markets and applications with improved tools for microcontrollers. This need for support on development is magnified by the requirement to use more than one type of sensor in many applications. This is driven by the mechanics of the sensor, where each type of sensor detects a specific physical property, but has blind spots that must be covered by other sensors. The flexible combination of multiple data types is where support from the microcontroller is required.
To make an electronic compass, for example, a magnetometer measures the magnetic field and an accelerometer measures the orientation (relative to the Earth's gravity) of the board that holds the magnetometer. The results of the measurements are fused together to calculate true magnetic headings correcting for errors resulting from angle the device is held or mounted. It’s not just a matter of understanding how to get data out of the sensors, but how to combine that data correctly. It can be even more difficult when the accelerometer comes from one company and the magnetometer from another.
As MEMS popularity grew based on shrinking price, small size, and improved performance, several new design considerations were outside the normal expertise level of PCB designers. Suddenly, they had the burden of understanding how the sensors work, how to use them, and how to perform mathematical calculations on raw data from multiple sources on the fly, while translating it into meaningful scientific information and engineering units.
In response to customer demands for an easier way, Atmel® began to work with a number of sensor companies to create a development environment that would allow engineers to bypass weeks and months of research, calculation, calibration, and trial and error. From this collaboration, Atmel has developed a new software support suite integrated to the latest version of the AVR Studio® IDE that makes integration of sensors and MCUs easy.
A Microcontroller/Sensor Partnership
A microcontroller uses sensors to understand and interact with the world around it. Accelerometers are used in auto collision protection systems to determine when to deploy an airbag. Motor controllers measure vibration to determine if or when service is needed, and an RF joystick uses a gyroscope and accelerometer to measure motion as input to a game. Conversely, sensors require microcontrollers to translate the raw data into usable information. To that end, Atmel is partnering with leading sensor manufacturers to provide development tools that make selecting Atmel MCUs the easiest and best-performing choice for designers. The partners and their primary focus are:
Company | Primary Focus |
Asahi Kasei Microdevices (AKM) | Magnetometer / Compass |
Bosch Sensortec | Acceleration and Pressure |
Honeywell | Magnetometer / Compass |
Invensense | Angular Rate Gyroscope |
Kionix | Accelerometer |
Osram | Light and Proximity |
The collaboration between Atmel® and these six sensor companies is yielding sample applications, projects, and code that allow sensors and microcontrollers to work efficiently together, and the design engineer receives pre-optimized pieces of code and a set of tools that enables speed and unprecedented ease.
Time to market is slashed by allowing designers to point and click to select diverse sensors optimized for their particular application, bypassing the expertise requirement and time involved in solving mathematical calculations, calibrating, and translating raw data often from multiple sources. Atmel and its partners are placing sensors into applications where previously it was too difficult and time consuming, or those that previously required huge production volumes to justify the effort. Now customers can accomplish complex product choice and design work without frustration and the need for full-time support.
Simplifying Designs
Atmel's Xplained Development Platform combines modular evaluation kits and powerful software in AVR Studio, all supporting a wide range of AVR XMEGA® and UC3 products to deliver fast, easy and fun prototypes and designs. AVR Studio® 5 supports all 8- and 32-bit AVR microcontrollers and includes Visual Studio Editor, a C/C++ Compiler, Assembler, Linker, Debugger and Simulator, and the ATMEL AVR® Software Framework library of C functions.
Atmel’s AVR Xplained development boards together with the Sensors Xplained, Security Xplained and TempSensor Xplained expansion boards allow popular combinations of devices to be quickly evaluated, and provide low-cost and easy-to-use boards to get you started.
To date, Atmel Sensors Xplained evaluation kits for rapid prototyping include:
Inertial One:
Accelerometer – Bosch Sensortec/BMA150
Gyroscope – Invensense/ITG-3200
Compass – AKM/AK8975
ATAVRSBIN1 (US $54)
Inertial Two:
Accelerometer – Kionix/KTXF9
Gyroscope – Invensense/IMU-3000
Compass/HMC5883L
ATAVRSBIN2 (US $54)
Pressure One:
Barometric Pressure – Bosch Sensortec/BMP085
ATAVRSBPR1 (US $24)
Each kit uses interface and driver support that is integrated with the standard AVR Studio® 5 development suite, example applications, and support for common processing routines.
The Sensors Xplained Software Library is an extension service within the Atmel AVR® Software Framework (ASF). It provides a high-level C language API for sensor control, data control and events. No sensor device-specific code is required in applications, and all device output values are converted to standard units (with raw data available)
Software application can be used with a variety of hardware platforms with no source code modification. Standard interfaces allow different sensor models to appear the same and be used interchangeably. All sensor drivers are included in the library, but only necessary modules are linked into the final system image, Hardware selection automatically includes the appropriate driver and initialization.
Sensor API functions provide results in real-world scientific (SI or engineering) units. Automatic scaling is based on the current device settings and more complex results are calculated based on lower-level sensor readings. The interfaces can optionally return “raw” sensor values read directly from device.
The platform delivers:
Hardware
Designers can mix and match different microcontroller and sensors. Applications, for example, might begin with an XMEGA® MCU. When and if the application grows too large to fit on the XMEGA, the designer can easily move to either a larger XMEGA or to one of the UC3 devices. Code does not need to be rewritten to talk to sensors from the new microcontroller, but easily transitions to any Atmel device.
Access to Higher Functions
Atmel® provides the necessary drivers that perform data conversion and math. The development engineer simply requests output measurements in engineering units that they can immediately use directly in an application.
Enabling Real Data Fusion
Finally, the collaboration enables real data fusion. Many applications require measurements of more than one parameter at the same time. For example, an accurate compass heading requires a combination of accelerometer and magnetometer data—which in this case is handled within the sensors API functions. To respond to a request for magnet headings, data is taken from the accelerometer and magnetometer simultaneously, math calculation is performed behind the scenes, and the output is a reading of, for example, 47 degrees from magnetic north.
The IDE features point and click menu options and built-in help files. Sensor drivers are created so that the designer no longer worries about programming an I2 C sequence to talk to the accelerometer, they just allow the library functions to do it automatically. The overwhelming power of the system is neatly hidden in the background. Anyone with experience in writing C code can use the projects and immediately and modify them for their own application-specific requirements. Now there is an easy-to-use tool that allows design engineers to extract information from sensors and rapidly harness sensors within their application. Gone are the mystery, confusion, and pain of developing systems using sensors in combination with microcontrollers. A standard interface eliminates hardware dependencies of specific sensors, allowing engineers greater freedom in sensor choice and ease of use. Sensors can be tried in a myriad of applications without spending an inordinate amount of time and money in initial development. Applications can be up and running in minutes rather than weeks or months. The development environment takes the pain out of developing systems using sensors and in combination, microcontrollers — making it easy, fun, and inexpensive. ■
Sponsored by
Learn more about Atmel, USAElectronic Products Magazine