Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Build versus Buy - Understanding the Total Cost of Embedded Design

11 ratings | 4.55 out of 5
Read in | Print | PDF

Overview

When developing an embedded system, deciding which technology to implement as the system’s primary controller is one of the first key engineering milestones. In addition to considering processor architectures, operating system capabilities, and other components, you must decide which portion of the system to design and which portion to buy off the shelf. By designing and building a custom controller, you can completely customize the end solution and optimize costs, but any design specification changes or oversights can cause lengthy and expensive delays. Alternatively, using an off-the-shelf platform increases the cost of goods sold (COGS), and you may pay for features that are not necessary for your design. Nevertheless, off-the-shelf systems typically offer a faster validation cycle and, therefore, shorter time to market. This tutorial outlines two options for developing a new controller – build or buy – and discusses the technical and financial risks associated with both.

Custom Embedded Design – The “Build” Approach

Before development, you must choose a processor technology, such as the five listed below, for the primary system controller.

  1. Microcontroller– Microcontrollers are extremely cost-effective and generally offer an integrated solution on a single chip, including I/O peripherals. They tend to contain very small amounts of on-chip memory, leaving little room for complexity and expansion. In addition, clock rates are typically in the tens of megahertz, and, therefore, you generally cannot achieve high-performance control loops.
  2. Microprocessor – With a microprocessor, clock rates are higher and there is usually an external memory interface, so performance and expandability are often not a concern. But your applications may require complex driver development because there are usually no on-chip analog peripherals. In addition, high-density packaging techniques such as ball-grid array (BGA) may lead to a need for more sophisticated manufacturing processes. This adds up to more difficult hardware debugging.
  3. Digital signal processor (DSP) – A DSP is a specialized microprocessor with additional instructions to optimize certain mathematical functions such as multiply and accumulate. DSPs are extremely useful for computationally heavy applications, but you usually need specialized knowledge to take advantage of this software capability.
  4. Application-specific integrated circuit (ASIC) – An ASIC chip is designed for a specific application rather than general-purpose programmability. ASICs are widely considered a superior technology for technical considerations such as power consumption and cost of goods. However, the extremely expensive ASIC development and fabrication process typically deters all except those with the highest-volume products.
  5. Field-programmable gate array (FPGA) – FPGAs provide an interesting middle ground between custom ASIC design and off-the-shelf technology. They offer a high level of specialization, but they are reconfigurable so you do not have the high fabrication cost that hampers ASIC development. Although you can use FPGAs for a variety of processing applications, complex FPGA design is uncommon because the VHDL programming paradigm is foreign to most embedded software developers who are more comfortable with sequential programming in C.

In many cases, a single processor technology inadequately addresses the needs of an application. Therefore, hybrid architectures have become increasingly popular in recent years. One such architecture is shown in Figure 1. The real-time processor manages network communication and a user interface while the FPGA manages interfacing to I/O components and high-speed control tasks. This hybrid architecture is becoming common in embedded system design.

 
[+] Enlarge Image

Figure 1. In this hybrid architecture, becoming common in embedded system design, a real-time processor manages network communication and a user interface while the FPGA manages interfacing to I/O components and high-speed control tasks.

After deciding on the processor technology, you must develop the I/O circuitry. If any of the signals in the embedded system are analog, you need analog-to-digital converters (ADCs), digital-to-analog converters (DACs), and corresponding software drivers. Numerous books address the complexity behind good analog circuit design. Therefore, this tutorial focuses on the embedded controller of the system although many of the concepts apply to I/O component selection as well.

Off-the-Shelf Embedded System – The “Buy” Approach

An alternative option is to purchase an off-the-shelf platform to develop the controller. Although you typically pay significantly more than the cost of the board components, you expect to reach the market much more quickly. In addition, these systems have smoother expansion paths, so addressing the inevitable feature creep that occurs after the first prototype is far less painful. As with processor technologies, there are several deployment technologies to consider for your embedded system.

  1. Unpackaged Embedded System– Available in several form factors (Mini-ITX, PC/104, and so on), unpackaged embedded systems tend to be the most cost-effective solution for off-the-shelf deployment. These systems also have a variety of processor architectures to choose from and a small set of operating system and I/O support. However, the software development tools for such a system are almost never integrated, and these systems typically require you to verify regulatory certifications such as EMI and CE compliance.
  2. Packaged embedded systems – In addition to featuring the same components as unpackaged embedded systems, packaged embedded systems deliver specifications for shock, vibration, operating temperature, and environmental certifications. These systems are generally more expensive, but they often come with integrated software development tools and a more extensive set of integrated I/O options.
  3. Industrial PCs – With readily available PC technology, industrial PCs offer the most comprehensive options for development tools and I/O capabilities. They provide many of the same specification and certification advantages as other packaged embedded systems, but this capability comes at a cost. These systems are significantly more expensive than the other two options.

The National Instruments NI Single-Board RIO and CompactRIO represent examples of an unpackaged embedded system and a packaged embedded system, respectively. Figure 2 shows the NI Single-Board RIO unpackaged embedded system and Figure 3 shows the NI CompactRIO packaged embedded system. 

Figure 2. NI Single-Board RIO is an example of an unpackaged embedded system.


[+] Enlarge Image

Figure 3. The NI CompactRIO is an example of a packaged embedded system.

Both systems have a similar system architecture. They both integrate a Freescale real-time processor with the VxWorks real-time operating system. The 5200 interfaces to a Xilinx FPGA via an internal PCI bus. In addition, the FPGA is tied directly to connectors for a variety of analog and digital I/O modules that you can connect to sensors, actuators, and communication buses. If you require highly customized I/O, you can design your own custom module. Figure 4 shows a block diagram view of the CompactRIO embedded system.

Figure 4. The CompactRIO System Block Diagram

The PXI platform from National Instruments is an example of an industrial PC architecture. PXI is the open, PC-based platform for test, measurement, and control. PXI provides a variety of processing and I/O options for embedded applications such as multi-core processors, high-resolution DC measurements, digitizers, motion control, image inspection, 6 GHz RF measurements and more. And there are a variety of other vendors that have industrial PCs that have slots for PCI cards that can be used to add measurement and control I/O to IPCs. 

FPGA technology can also be used within industrial PCs. National Instruments R Series FPGA plug-in devices are available in CompactPCI/PXI and PCI form factors to easily add customizable FPGA boards with integrated analog and digital I/O to your embedded system. R Series devices leverage Virtex II FPGAs as well as the latest Virtex-5 FPGA technology from Xilinx. All FPGAs within National Instruments products can be programmed with the LabVIEW FPGA Module. In addition, engineers can leverage existing VHDL code by integrating HDL code within LabVIEW FPGA.


[+] Enlarge Image

Figure 4. R Series FPGA I/O PCI board programmed by LabVIEW FPGA

Making the Decision – The “Hidden” Costs of Embedded Design

More often than not, technical capabilities are not the determining factor when deciding between build and buy. Rather, it usually comes down to a simple financial analysis. If the return on investment of the engineering cost incurred in product development is justified by eventual profits, then you have made a good decision.

To make an educated decision, you must accurately estimate the cost of building your own custom solution. This is never as simple as it seems; if you just add up the cost of the board components plus the hardware and software development time, you are grossly underestimating the total investment. You need to consider other “hidden” costs before you accurately assess the true cost of the job.

For example, manufacturing and inventory costs typically account for an additional 20 to 30 percent of the COGS of the system. In addition, on average about 30 percent of total software development time is spent on operating system, driver, and middleware development – though by choosing a packaged platform with integrated hardware and software, you can eliminate the need for this “board bring-up.” Also, you need to account for other hidden costs including environmental regulations, validation, end-of-life components, and last-minute specification changes forcing design alterations and complete redesigns. Finally, the least tangible but potentially most impactful cost is the opportunity cost of spending engineering time on designing this aspect of the system rather than other revenue-generating projects.

Once you assess the engineering investment, you can calculate a simple break-even financial analysis. Imagine you assign two engineers to spend nine months developing a custom board from specs to shipping, for an investment of approximately $300,000. Next, you spend $25,000 each on pre-equipment, prototyping, prerelease units, and tooling and other nonrecurring engineering expenses, raising the total investment to $400,000. After you complete this effort, the custom design cost of goods is $400 less than an off-the-shelf platform. Using Equation 1, you see that the investment breaks even at the 1,000th unit and is not profitable until you ship the 1,001st unit. Again, this does not account for the other “hidden” costs discussed above. However, if you choose a packaged embedded system, you can shorten your time to market, and the early profits pay for cost optimization and feature improvements. In this way, you amortize your investment over the life of the product rather than investing all of the money in up-front development.

Equation 1. You can use a simple equation to calculate the break-even point of any custom design.

Conclusion

So is the lesson to never develop a custom board? Certainly not. Rather, when you are assessing technologies that are crucial to your product’s success, save your hard work for the systems that will either reach very high volumes, require an extremely specialized form factor, or have very stringent technical requirements (such as ultralow power consumption). In areas where you can use off-the-shelf technology, let your suppliers take on the logistics and “hidden” costs so you can focus on differentiating technology to make your product better.

Learn more about NI Single-Board RIO

Learn more about NI CompactRIO.

Learn more about NI R Series Intelligent Data Acquisition

Learn more about PXI 

 

11 ratings | 4.55 out of 5
Read in | Print | PDF

Reader Comments | Submit a comment »

Expressing Thanks!
Just wanted to express my appreciation for this clear, and concise explanation. There are so many factors, and considerations when attempting to develop an original embedded device. I found this article to be very helpful. Cheers, Ryan C. Dean
- Ryan C. Dean, Intentionally Omitted. ehdyn81@gmail.com - Aug 24, 2007

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).