What Is Raspberry Pi?
Why Did the Raspberry Pi Come About?
In under 10 years, the Raspberry Pi has passed into the lingua franca of hobbyists and professional electronics engineers alike. This credit-card-sized computer, powered by an Arm processor, has gone through several iterations that also spawned a miniature, cut-down version. Having now sold over 40 million units [1] (2021), it became the UK’s best-selling computer in 2015 [2]. The record it broke was held by the Sinclair ZX Spectrum [3], a rubber-keyed black box that contributed to the home computing revolution of the 1980s. And, to understand why it came about at all, it is necessary to look back at that decade of the childhood of its creator, Eben Upton.
With industry regularly complaining of a lack of STEM (Science, Technology, Engineering, Math) recruits, people like Eben Upton [4] asked what had led to the dearth in programming-competent, engineering-interested students (Figure 1). Like many children born in the 1970s, Eben grew up during the home computing boom of the 1980s. 8-bit processors, such as the Z80 and 6502, were used to build computers that were cheap enough for private purchase. However, perhaps the most critical element was that, when switched on, the user was confronted by a flashing cursor: no windows, no mouse, no start-up sound. The responsibility lay with the user to decide what to do next. Many would load a game from a cassette tape, which required entering the LOAD command at a minimum. But, at some point, many decided to turn their hand to programming these devices using the programming language each of them supported: BASIC.
This sweet spot in computing history was critical in launching the careers of many of today’s engineers. By the 1990s, games consoles from Nintendo and Sega were addressing those who just wanted to game. Due to their business model, their consoles were designed not to be programmable by the user. If you wanted to write a game, you’d need special tools from the console’s manufacturer [5]. Similarly, with the uptake in PCs and the Windows operating system, the need to program to make the computer do what you wanted also slid into the background, resulting in a generation of users, not programmers.
It seemed clear that if the STEM shortage were to be tackled, today’s kids would need access to the type of accessible, programmable computers that Eben had experienced during his childhood.
The Raspberry Pi Is Born
Initially, Eben played around with an Atmel ATmega644 similar to how the Arduino started [6]. However, the challenge with microcontrollers is that users need a computer to program them, and C/C++ is not the most straightforward programming language for complete beginners to learn or school teachers to teach. The goal was to introduce a computer that could be used in schools, similar to the BBC Micro that pupils in UK schools had grown up with in the 1980s [7]. These had been incorporated into the curriculum to teach programming and IT skills. The Raspberry Pi should be capable of doing the same.
Furthermore, programming and computing had come on a long way since the 1980s. Whereas BBC Micros were networked with one another via Econet [8], today’s future programmers would need Internet connectivity. And programming languages don’t necessarily need to be written; graphical programming tools, such as Scratch, provide the required principles for young learners without the challenges of fixing programming language grammar.
Perhaps most important was the price, pegged at a target of $35 [9]. The aim was to place a reasonable amount of computing power into peoples hands that, should it get damaged, the loss would be bearable. Employed by Broadcom at the time, Eben saw potential in a new compact, powerful Arm-based system-on-chip (SoC), the BCM2835. It seemed the ideal starting point with an integrated graphics processing unit (GPU) and the standard peripherals used in PCs (USB). However, the first alpha version design came in at around $110, a long way from the target price. Further rounds of optimization, such as implementing audio using a pulse-width modulated (PWM) output instead of a dedicated audio chip, brought the total cost down. Perhaps the Raspberry Pi’s best feature, the GPIO header, was actually added at this point, suddenly making it capable of controlling motors and interfacing with peripherals.
What Can a Raspberry Pi Do?
Since its inception, the credit-card-sized Raspberry Pi has demanded little from its user that any PC and smartphone owner doesn’t already have. The board can be powered by a smartphone charger (although the power demands of the most recent designs require slightly heftier versions). The mouse and keyboard are connected via USB, while a monitor can be attached to the HDMI interface. The first generation boards also supported a composite video output, but this was deprecated with the introduction of the second generation design.
A range of Linux-based operating systems (OS) are available that must first be written to an SD card, although preprogrammed SD cards are also available. The initial OS was Raspian (now named Raspberry Pi OS), a Debian-based distribution, with Ubuntu being added more recently. Microsoft also offers Windows IoT Core, a slimline Windows targeting Internet-of-Things applications. There is also support for RISC OS, originally created for the Arm-based Archimedes computers that followed the BBC Micro, and media centre system distributions such as LibreELEC.
The Raspberry Pi OS full image includes a range of software applications that enable users of any age to get started. Younger users wanting to get to grips with programming can use the visual Scratch environment. Much like LOGO [10] from the BBC Micro era, simple procedures can be described and set in loops, while responses to simple inputs can also be implemented. For those looking for a programming language, Python is also available. An exciting but perhaps often overlooked program is the synthesizer Sonic Pi [11], and its simple programming language allows polyphonic music to be created. Finally, Wolfram and Mathematica provide powerful tools for tackling scientific and engineering problems using mathematics.
The OS also includes a web browser and a store where additional programs and apps can be downloaded. For those interested in playing games, there is also a version of Minecraft included. Python can also be used to program the game, allowing objects to be inserted and manipulated in the blocky 3D world.
Editor's note: In November 2023, Elektor published a comparison: Raspberry Pi 5 vs Raspberry Pi 4.
Which Raspberry Pi Is Best for Me?
Over the past 10 years, four different generations of the Raspberry Pi have been introduced in the credit card format. During that time, the amount of memory and the processor’s performance in the SoC have steadily improved. If you’re just starting out on your journey, you’re well advised to invest in the most recent Raspberry Pi 4 models [12,13] (Figure 2). The user experience is better, thanks to the faster processor, especially when using the web browser and browser-based applications, such as Node-RED [14]. It also supports two 4k HDMI monitors, features gigabit Ethernet and dual-band WLAN, and offers both USB 2.0 and 3.0. With a wide range of cases available, the board can be easily and safely integrated with any external circuitry with which you may wish to interface.
If your focus is more on using the Raspberry Pi as an alternative to a classical computer, the new Raspberry Pi 400 [15] is an excellent choice (Figure 3). The computer is integrated into a QWERTY keyboard housing, requiring just a mouse and monitor to be connected to get started. Complete packages also include a power supply and getting started guide.
Not everyone needs a monitor for their planned application, especially if you’re looking to integrate a Linux-based machine into something like an industrial machine or robot. For such use cases, the Raspberry Pi Zero, first introduced in 2015, is worth considering. Also available with WLAN [16], this compact version retains the 40-pin GPIO interface for controlling motors or communicating with I2C and SPI peripherals.
The Raspberry Pi Pico was also introduced in 2021, but this breaks away from the Linux-powered platforms of its forebears (Figure 4). The Pico features an RP2040 microcontroller that integrates two Arm Cortex-M0+ processors, cores that are not suited to running Linux. Instead, the Pico can be considered as an alternative to Arduino boards, although its performance is good enough for low-end machine learning (ML) using TensorFlow Lite [17].
How Can the Capabilities be Extended?
Thanks to the standardized GPIO header, several HATs and other extension boards are available to extend the capability of your Raspberry Pi. Comparable with Shields for Arduino products, they range from the basic to the complex. Prototyping is simplified with the JOY-iT ProtoShield+ [18] that offers solderable connections, screw terminals, and 0.1” headers. Operating the Raspberry Pi from a battery is simplified with the JOY-iT StromPi3 [19], enabling a wider voltage range input than just 5 V to be supported. As well as informing you when the battery source requires charging, it also includes a real-time clock (RTC), allowing the Raspberry Pi to retain correct time without Internet access.
There are also options for those looking to improve the audio output quality. The HiFiBerry [20] uses high-quality Burr-Brown digital-to-analog converters (DAC) and integrates with the ALSA mixer controls used in Linux. Other HATs include relays for home automation and control, CAN and RS-485 interfaces, and I2C breakout boards [21].
Raspberry Pi boards also include two flexible printed circuit (FPC) interfaces. One of these supports DSI, a digital video output interface used with LCD panels. A range of sub ten-inch displays allow the construction of standalone applications, such as weather stations or media centers, coupled with touch-screen interfacing. The other interface is a video input, for which there is also a range of cameras available (Figure 5). The Raspberry Pi Camera Module V2 [22] can be used to implement video streaming, time-lapse photography, or even image recognition together with ML tools. For those wanting to capture what happens in their garden at night, infrared cameras are also available [23].
What's Next?
With no clear roadmap provided by the Raspberry Pi Foundation, we can’t say what the next generation of boards will look like. As the SoC provider, Broadcom continues to develop their technology, so more performance from more cores will most likely be available. There is also a good chance that the graphics capability will receive an upgrade too. Memory technology has also moved forward, so maybe there will also be a move to LPDDR5 SRAM. Reading blogs, forums, and online articles, the move to micro HDMI seems to have upset many people, but it is hard to see how replacing them with full-size HDMI connectors can be accommodated in the tiny form factor.
One beneficial upgrade would be a move away from the SD card to UFS storage. Smartphones and, to a degree, automotive is moving this way already, so it would be a surprise if Broadcom did not support it. Alternatively, integrated support for an M.2 NVMe SSD as a module or soldered package could make hundreds of gigabytes of storage readily available. Other upgrade opportunities lie with Wi-Fi 6, but it is doubtful that such a move would provide any meaningful benefit to users.
Outside the field of education and the maker scene, industrial users have turned to Raspberry Pi in large numbers. With the growth in machine learning algorithms used in vision systems, a board featuring an AI accelerator of some kind would make sense.
It’s fair to say that everyone was dumbfounded to see the release of a piece of new silicon at the recent launch of the Raspberry Pi Pico. Perhaps this should be taken as a sign that a Raspberry Pi 5 will be kitted out with a surprise too.