Ics Fig 1

Is Raspberry Pi the Right Platform for Embedded Product Development?

Sept. 16, 2019
The Raspberry Pi was designed as a platform to teach computer science to students. Given its low cost and wide availability, is it suitable as a platform for commercial embedded products?

The low-cost Raspberry Pi single-board computer (SBC) was originally designed as a platform to teach computer science to students, but it has expanded into other applications, including use as an embedded platform. Having now shipped over 25 million units, an entire ecosystem has built up around this $35 computer.

Given its low cost and wide availability, does the Raspberry Pi make sense as a platform for commercial embedded products? In this article, we'll look at its suitability as a hardware platform for commercial products, discussing pros and cons and the types of products and applications that it’s best suited for.

We'll delve into considerations such as the choice of embedded operating system, software-development languages and environments, and how to optimize and expand the on-board hardware, including CPU, GPU, and GPIO interfaces. We’ll also cover strategies for use, including prototyping and low-volume applications, as well as use of the Raspberry Pi Compute Module. Finally, we'll look at some current alternatives and competitors to the Raspberry Pi and what we may expect to see in the future.

Background and Capabilities

The Raspberry Pi is a series of SBCs developed by the non-profit Raspberry Pi Foundation as a platform to promote computer-science education in schools and developing countries. Originally released in 2012, the computer is based around a Broadcom system-on-chip (SoC) that incorporates an Arm CPU, GPU, and RAM. It’s now a series of models ranging from the $5 Raspberry Pi Zero to the $35 Raspberry Pi 4 Model B (Fig.1).

The basic features of the Pi 4 Model B include:

  • 4-core Cortex A-72 CPU clocked at 1.5 GHz
  • Broadcom VideoCore VI GPU
  • 1, 2, or 4 GB of RAM
  • 2 USB 2.0 and 2 USB 4.0 ports
  • 2 HDMI video outputs
  • Analog and digital (HDMI) audio outputs
  • 1000-Mb/s Ethernet, 2.4/5 GHz wireless, and Bluetooth 5.0
  • Mass storage via a MicroSD slot

An interesting and perhaps lesser-known offering in the product line is the Raspberry Pi Compute Module. This variation of the Raspberry Pi is packaged in a 200-pin DIMM format that’s intended to be used as the computing core for consumer electronics products. More about this later.

There are a number of choices for the operating system to run. The Raspberry Pi Foundation provides Raspbian, a Debian-based Linux distribution that’s been optimized for the platform and includes a graphical desktop and access to hundreds of Linux-based applications. Other choices include Ubuntu and other Linux distribution, RISC OS, several versions of BSD Unix, Windows 10 IoT Core, and some unofficial ports of Android.

Strengths and Advantages

As a platform for embedded computing, the Raspberry Pi offers numerous advantages, including:

  • Low cost (starting at $5)
  • Low power consumption (typically no need for a cooling fan or heat sink)
  • Reasonable performance in terms of CPU, GPU, and memory
  • Wide availability from multiple resellers worldwide
  • Well-documented from hardware schematics to source code for most software
  • Large ecosystem of developers, users, and suppliers of add-on hardware
  • Proven design that’s in its third generation
  • Stable vendor (around for more than seven years) committed to guaranteed product lifetimes
  • Many operating-system options, most of which are open source and free of licensing costs

Weaknesses and Challenges

Sounds great, right? Not so fast. The Raspberry Pi also is beset by weaknesses and shortcomings that can be significant if you want to use it in a commercial product. Here are a few:

Cost

One criticism it often faces as a desktop is that the $35 cost is misleading, since you also need a keyboard, mouse, display, MicroSD card, and power supply, all of which adds significantly to the cost. Some of these aren’t relevant to embedded applications, but you will need to factor in the cost of all of the hardware needed outside of the basic board. Other than for the Compute Module, you also can't expect to get any volume discount on pricing.

Functionality

As an off-the-shelf consumer product, the functionality of the Raspberry Pi is fixed, unlike a custom board that could be designed for specific needs. The functionality onboard is defined (although there are ways to expand it), starting with the basic footprint of the printed circuit board (PCB). If you need more RAM or a faster CPU, no options are available to upgrade it.

Availability

It’s only available from a single source. While most of the design is open source, some of the details of the SoC are proprietary. (This is generally the case for all modern devices with a few exceptions like RISC-V).

Temperature

It’s qualified only for a commercial temperature range, which might make it unsuited for military, aerospace, automotive, or some industrial applications that need a wider temperature range. (The limiting factor seems to be the LAN9514 Ethernet/USB chip, which is qualified from 0 to 70°C, while the SoC is qualified from -40°C to 85°C.)

Roadmap

The product roadmap isn’t published. New models are generally only announced once they start shipping, but the Raspberry Pi Foundation is generally good at maintaining backward compatibility and existing models remain in production for some time. For example, the current 4B and the Compute Module 3+ will remain in production until at least January 2026.

Other Concerns

At the hardware level, the Raspberry Pi has some limitations that reflect some of the cost/performance tradeoffs that you should be aware of:

  • CPU and GPU share the same RAM (you can adjust how they are split).
  • USB interface is USB 2.0 (the Model 4B does support the newer 3.0 standard).
  • USB and Ethernet ports share the same bus and the same controller, limiting bandwidth (no longer the case with the Model 4B, which has true Gigabit Ethernet).
  • While analog and digital audio output is available, there’s no on-board audio input.
  • The system has no real-time clock and typically relies on a network connection to get the current time on power-up.
  • The default operating system, Raspbian, is aimed at desktop use and isn’t well-suited to embedded applications (though there are other alternatives that can be used).

Finally, the Arm CPU isn’t x86-compatible, so it’s unable to natively run commercial applications that are only available for the x86 platform. While emulation solutions exist, these tend to be slow on the Raspberry Pi hardware. Fortunately, most embedded applications have no requirement to run these types of applications.

Addressing Drawbacks

Despite these drawbacks, the Raspberry Pi might still make sense for embedded development. Here are some ways to address the potential limitations discussed above.

The Raspberry Pi Compute Module (Fig. 2) is specifically intended to be used on commercial products. It has a smaller footprint and removes some of the on-board circuity and connectors that may not be needed. It also provides more GPIO ports. Typically, you will design a custom carrier board that provides the required functionality, physical layout, and connectors, making use of the Compute Module as a low-cost computing core. Sales distributors offer volume pricing and longer guarantees of product lifetime for the Computer Module than for the consumer Raspberry Pi models.

If you don't have an in-house hardware design team, there are vendors that can design carrier boards. Some hardware vendors with applications like Geppetto even allow you to design a custom board with only limited hardware design knowledge.

Performance limitations can be addressed by using the latest Raspberry Pi 4 B, which offers more CPU performance than earlier models. To optimize the use of CPU and memory, it’s recommended to use efficient compiled languages like C or C++. Interpreted or just-in-time (JIT) compiled languages like Python and Java will tend to have a larger footprint and resource usage.

ICS often uses the Qt framework, which is ideally suited for embedded applications—particularly those with touchscreen-based user interfaces. Qt features a simple declarative language called QML, or Qt Markup Language, that’s typically used for the user-interface portions of the application. The remainder of the application is written in C++. Qt, when using QML, offloads much of the rendering to the GPU via OpenGL, which is ideal on the Raspberry Pi platform.

Embedded applications should run under an operating system intended for embedded. Many flavors of embedded Linux are available. While you can roll your own from scratch, I highly recommend using the Yocto embedded framework to configure and build your own customized distribution. It’s open source, well-documented, and supports the Raspberry Pi.

Some of the hardware limitations of the Raspberry Pi can be addressed by add-on hardware. The Pi has a MIPI DSI interface for LCD displays (two are provided on the Compute Module). Hardware like audio input can be added via USB or the GPIO ports (for example, there’s support for I2S audio). External battery-backed-up real-time clocks are available that can connect via GPIO.

The filesystem is typically run from a MicroSD card. For optimal performance, you should have a high-quality and high-speed rated SD card.

To avoid the need for managing SD cards, particularly in a system that may have many devices, you can explore the option of using a network boot. In conjunction with this, a Power Over Ethernet (PoE) module was recently released for the Raspberry Pi, allowing it to be powered over the same cable as the network connection and avoiding the need for a local power source.

The Raspberry Pi can be a good solution for low-volume products where the non-recurring engineering (NRE) costs of a custom board would otherwise be prohibitive. It can also make sense as a solution for initial prototypes or developing a proof of concept, which could later be migrated to a custom board (or possible a Raspberry Pi Compute Module).

Finally, for price-sensitive applications or products that require a small footprint, the Raspberry Pi Zero becomes be a good option.

Alternatives and Competitors

The popularity of the Raspberry Pi has spawned a market segment for low-cost SBCs. Dozens of alternatives are now available, many with similar names like Banana Pi and Orange Pi. While none of these are fully hardware compatible with the Raspberry Pi, most try to distinguish themselves in some way, such as price, performance, different CPU architectures, or more hardware interfaces. Many are aimed at the rapidly growing IoT market. Here are just a few examples:

  • The BeagleBoard series of embedded boards includes the original BeagleBoard, the BeagleBone Black, and the new Pocket Beagle. These are designed specifically for embedded applications; the higher-end boards offer more performance (at a higher cost) than the Raspberry Pi.
  • Pine64 is a family of SBCs that started with a Kickstarter crowdfunding campaign. It’s now available in three models. The same company also developed the Pinebook netbook computer.
  • MinnowBoard offers a series of four different SBCs that feature an x86-compatible Intel Atom processor.
  • ODROID is a series of SBCs that, as the name suggests, can run the Android operating system as well as Ubuntu and other Linux distributions.
  • Intel NUC is a series of small (4 × 4 inch) mini PCs, mostly intended as a desktop computer replacement. They can also be used for embedded applications.
  • Arduino is a series of single-board microcontrollers popular with students and hobbyists. This platform can be suitable for embedded applications where a full operating system isn’t required and a microcontroller is better suited, such as those requiring fast boot times or real-time processing.

These Raspberry Pi alternatives can be worth exploring, with the caveat that many vendors and products are appearing and disappearing on a regular basis. Thus, you run the risk of building your design around a product that may shortly disappear from the market. Even some large players like Intel have introduced and then later discontinued products.

One solution is to offer a Raspberry Pi as an add-on to the main processor in a device. Displays from NEC, for example, provide a slot for an optional Raspberry Pi Compute module. This can be used to allow Raspberry Pi applications to run, in addition to the built-in core functions that the device runs on its main processor. By running the applications off-board, it isolates less-trusted third-party application code from the main system.

The Takeaway

While not originally designed as a platform for commercial products, the low cost and wide availability of the Raspberry Pi makes it suitable for many embedded applications if you’re aware of its limitations and avoid some potential pitfalls.

When I originally drafted this article in early June 2019, I included some thoughts on the possibility of seeing a Raspberry Pi version 4. While no details had been made public, my wishlist included USB 3.0,

true Gigabit Ethernet, more RAM, and greater CPU and GPU performance. On June 24, 2019, the Raspberry Pi 4 Model B was announced, and included all of these features and more. With roughly three times the performance of the Raspberry Pi 3B+, two 4K video outputs, and availability of up to 4 GB of RAM, all at the same base price, the new model is destined to become even more popular for embedded applications.

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!