The relationship between firmware and hardware is being redefined, making it impossible for the mechanical engineer and firmware developer to operate in a vacuum.
Firmware development is becoming one of the dominant factors in design timelines. The software’s complexity has increased to the point where it often eclipses that of hardware, primarily because it is taking over much of the work previously done by hardware.
Design engineers often see firmware as the riskiest aspect of development, but this has in no way diminished its use. The software brings such dynamism and flexibility to the design process and the devices and machines it empowers that it has become a defining technology. The flexibility alone opens multiple design paths to advanced functionality.
The fact is, this technological shift has created an inescapable link between software and hardware that did not exist before. The bond between the two, however, requires engineers to work differently.
For example, most designs today involve some sort of programmable device. Mechanical engineers must be aware of what’s involved in programming these devices to effectively design hardware.
“In many cases, if I am designing hardware, I have to ask myself how it will work with software,” says David Palchak, a product engineer at MindTribe, an engineering firm specializing in the development of innovative technology products. “What will the software have to do, and is that a reasonable demand? And if it is a particularly complex interaction, it is easier for me to design the hardware, write the firmware drivers, and then pass it off to someone who writes higher-level applications. This way, I am transferring the knowledge of what the hardware does and how the overall system is supposed to work.”
To ensure clear communication of design concepts, there must be good interplay between the hardware and firmware sides of a project. Frequently, the best way to achieve that is for the mechanical designer to understand firmware and to be able to take over some critical software roles if necessary. It’s also important for the firmware engineer to understand the hardware and why something needs to be done a particular way. Achieving the desired functionality and performance depends to a large extent on the way the software is written.
A Balancing Act
The benefits of the new relationship between hardware and firmware can have a major impact at the component level, with such devices as sensors. For example, firmware has significantly improved analog circuitry. Engineers have learned to use the software to optimize A/D converters, speeding up their sampling rates and allowing them to be moved up the signal chain, closer to the source. Using extensive averaging techniques, firmware can also extend the range of an A/D converter.
“If you have a 12-bit converter and your samples contain noise, you can average out the noise,” says Palchak. “You can increase your reading resolution to 14 or 16 bits just by averaging. But you have to average a lot of samples, and that’s not something that was feasible before microcontrollers and firmware took over.”
In some cases, you can use a less expensive or lower performing sensor and then compensate for its shortcomings by doing advanced signal processing in firmware. This allows you to juggle performance and price to meet the requirements of your design.
Firmware can also help with sensor calibration. The software allows designers to select a sensor that has less than optimal performance in a particular area. “Maybe a sensor doesn’t have great temperature stability, but you can calibrate that in firmware,” says Palchak. “You know how the performance of a sensor is affected when it gets cold. With a calibration curve, you can adjust the sensor’s values. So you can take an inexpensive sensor that is affected by temperature and use firmware to compensate for that and get a much better reading.”
Tools of the Trade
There are a number of tools that aid, simplify, or improve firmware development. In general, evaluation kits (EVs) are readily available from most manufacturers. EVs allow you to begin firmware development early in the design cycle.
For example, the Kionix Accelerometer Application and Firmware Development Kit provides a simple environment in which to begin the development of applications and firmware that incorporate Kionix accelerometers. The development kit provides a common interface to Kionix evaluation boards and software that lets you display and record acceleration data. In addition, the kit’s graphical register map allows you to see and change the contents of control registers.
There are also families of tools available for microcontrollers from different vendors. “A lot of engineers here at MindTribe like the IAR Embedded Workbench series of compiler and debugging tools,” says Palchak.
The IAR Embedded Workbench is an integrated development environment for building and debugging embedded applications, and it includes a C/C++ compiler. The toolkit supports a wide range of ARM devices, hardware debug systems, and RTOSs, and it generates compact and efficient code.
Finally, there is National Instruments’ LabView. This leading graphical programming platform enables the development of test, measurement, and control applications.
Embedded Product Offerings
Texas Instruments’ Scalable Sitara ARM9 MPU
Texas Instruments’ four new Sitara ARM9 microprocessors (MPUs) integrate a variety of connectivity options to provide developers of embedded industrial, medical, and consumer devices with flexible architectures to support multiple industry-specific peripherals and interfaces. The AM1808, AM1806, AM1707, and AM1705 MPUs include serial ATA (SATA) and universal parallel port (uPP) interfaces, as well as TI’s Programmable Real-Time Unit (PRU), which offers configurable I/O control, enabling extended peripheral capabilities and custom interfaces. The hardware and software scalability of the AM1x devices are coupled with a suite of software and development tools that enable designers to reduce their product’s time to market.
Features and Benefits
• 375 and 450 MHz ARM9 options
• PRU interface offers user configurability
• Ability to implement and tune standard, custom, and “lite” versions of common and proprietary serial interfaces, such as UART and CAN
• PRU offloads the ARM9 to improve application processing capacity, reduce overall power consumption, eliminate latency, and improve real-time responsiveness
Analog Devices’ ADXRS450 Digital iMEMS Gyroscope
The ADXRS450’ angular rate (rotational)sensor features an advanced, differential quad-sensor design that enables it to operate accurately under intense shock and vibration conditions. The MEMS gyroscope’s low-power operation makes it effective for applications such as robotics, industrial instrumentation, avionics, and stabilization for high-speed trains.
The sensor has sensitivity to linear acceleration specified at only 0.03°/sec/g, acceleration rectification of 0.003°/sec/g2, a noise-rate density specification of 0.020°/sec/√Hz, and power consumption of 6 mA under typical conditions. Other features include internal temperature compensation over an extended industrial temperature range and an optional ceramic vertical-mount package that enables three-axis sensing on a single PCB without daughterboards.
Features and Benefits
• SMT-compatible vertical-mount package reduces costs because all axes are sensed on the same PCB board.
• High-vibration rejection over a wide frequency range allows for stable readings in harsh environments.
• Internal temperature compensation enables greater stability over extended industrial temperature range.
• The 2,000-g powered shock survivability delivers greater reliability.
• The –40°C to 105°C operating range is suitable for most industrial and other harsh environments.
The FUTEK LLB130
Miniature Load Button
The LLB130 is a miniature load button designed for press or inline compression applications. The sensor is made of 17-4 PH stainless steel, with a 0.38 in. OD. These load cells deliver ±0.5% nonlinearity and 0.002 in. nominal deflection. The company also offers options for external matched output. All packages include USB 210, extended software, and system calibration.
This model is suited for a variety of applications, from measuring and controlling equipment to precision mechanics, clamping, tool manufacturing, and apparatus engineering. The miniature load cell can be installed easily, and because of the small dimensions, it is well suited for use in restricted structures for both static and dynamic measurements.
IAR Systems Software
Contributing Editor Tom Kevan is based in New Hampshire and is DE’s mechatronics, PLM, and systems expert. Send your comments about this article to DE-Editors@deskeng.com.