Orange Unit: A Person-Centered Launch
Background Knowledge Probe
In chapter one, “Introduction to Electronic Circuits,” the background knowledge probe had you create a list of the electronics you make use of on a regular basis. As you did so, you considered who designed it, what parts might have been used inside and out to build and use it, and what you did with any items that started to work less than optimally.
- Now create a new list, this time documenting your daily-use computing devices such as laptops, tablet devices, and smartphones.
- What external and internal electronic components, such as resistors, capacitors, diodes, transistors, switches, sensors, LEDs, copper wires, pins and clips, integrated circuits, and printed circuit boards, come to mind as you think about your computing devices?
- What design choices and design objectives might have inspired the layout of the system and the various circuitry, mechanics, and artistry of its layout function, look, and feel?
- What have you done with any components that started to work less than optimally?
- Explore the hardware building blocks that make up all computers.
- Examine the operating system building blocks that provide the major software package that supports the basic functions of a computer and other computing devices.
Computer Hardware Building Blocks
Electronic components like resistors, switches, LEDs, variable resistors, capacitors, other diodes, photocells, transistors, and integrated circuits combine to create many of the everyday devices around us. These can be prototyped using , ultimately leading to the creation of printed circuit boards. All computers are initially made using these prototyping tools as they evolve from innovation and design, to testing, to production and marketing, and distribution.
Inside the case of every computer, we will find one or more printed circuit boards. The is the main board connecting computer parts. It brings together the many different electronic components we have studied, as well as the connectors, sockets, and ports that provide internal and external connections to other electronics.
All computers are made up of the same basic building blocks. In addition to the motherboard, there are several key parts of a computer’s hardware:
- The the core integrated circuit controlling and executing operations.
- , the integrated circuits that temporarily hold data until needed by the CPU or other processors.
- , which includes devices like hard drives, optical media such as DVDs, solid state drives, and flash drives even when power is turned off, but that cannot share data fast enough to work directly with processors.
- , the crossing guards that control the flow of data from inputs to processors, and from processors to outputs.
- that you connect to the computer using Universal Serial Bus, or port, port, jack, audio jack, and others, such as the Raspberry Pi port.
Processors: Do the thinking work
- CPU: The main thinker and boss for the computer
Memory: Hold data until needed by processors; faster than storage but more expensive
- RAM: The main system memory; it forgets when power is off
- Flash: Changes circuits in a way that remembers even without power (USB stick, solid state drive)
Controllers: Move data from inputs to processors and from processors to outputs
Mechanical changes to media to store data even when power is turned off
- Magnetic media: Uses positive and negative charges (e.g., hard drive)
- Optical media: Uses lasers to detect presence or absence of reflected light (e.g., CD and DVD)
Printed Circuit Boards
System or Motherboard: Main highway connecting components; edge connectors and sockets provide for expansion
- Memory module: Board with group of memory integrated circuits (e.g., DIMM)
- Expansion cards: Board with controller and integrated circuits to add capability to computer (e.g., video card, network card)
- Protects the building blocks from damage
- Holds the power supply used to turn wall power into the power used by components (desktop)
- Provides space for air to flow around and to cool components
- Provides a surface to disperse heat away from components (laptop)
- Input devices let users control the computer (e.g., keyboard and mouse, touch-sensitive devices)
- Output devices inform user what is happening (e.g., monitor, printer)
Computer Operating System Building Blocks
Operating systems are the software managing the various components of a computer’s basic functions, from coordination between the many applications that allow us to do our daily computer-based activities, to the used to span the boundary between programming code and the physical electronics. The building blocks of an operating system can be seen below:
Themes and Skins
- Pre-set package containing graphical appearance details. Supported in some versions of Windows and Linux. Available as third-party applications in other cases.
- Supported for many applications like web browsers.
- Changes the look and feel of many features at once (e.g., background colors, text font and size, icons, mouse cursor, etc.).
- The desktop environment is a collection of software that provides a predictable look and feel.
- Includes a Window Manager that controls the placement and appearance of windows, support icons, menus, etc.
- For some operating systems, such as Windows and macOS, the desktop environment is the branded look of the operating system and cannot be changed.
- This is the part of the graphical user interface that communicates with the kernel.
- Many operating systems allow remote interfacing with the window system, either directly or through third-party applications.
- Applications like , user managers, software managers.
- Applications like web browsers, text editors, photo and movie editors.
- Device and print drivers determine which hardware is “plug and play” ready.
- As the heart of the operating system, it is the go-between from applications to input/output controllers, memory, the CPU, and storage devices.
When working with a computer, names bring things together, hiding from view many of the hardware and operating system building blocks. I’m working right now on a MacBook Air. This laptop has all of the key hardware building blocks pulled together into a single system board within a laptop case. It is installed with the macOS operating system. On my desk is a Motorola moto e5 play smartphone. This also has all the key hardware building blocks pulled together into a single system board, this time within a smartphone case. It is installed with the Android mobile operating system based on a modified version of the Linux operating system kernel and other open source software. My spouse uses a Lenovo laptop much like the MacBook Air but with a few more I/O ports and a larger laptop screen. It is installed with the Microsoft operating system.
We typically merge the hardware and software together as one device with a means for bringing in human input, using software to collect and respond to that input, and to provide output back to the human.
All modern operating systems include both a graphical user interface (GUI) and a text-based shell known as a command-line interface (CLI) or terminal window. For the most part, we spend our computer time using a keyboard, monitor, and mouse/touchpad to work within these GUIs without even knowing we’re in an operating system that controls each and every action we take on that computer. It’s just the computer and we’re just trying to do our work with a range of applications like web browsers, email clients, and word processors.
Sometimes, though, we need access from a distance, and so we use remote desktop software. In some cases, remote desktop software is operating system independent, as is the case with the Virtual Network Computing (VNC) server installed on the Raspberry Pi Operating System by default, and that can be installed on almost all different personal computers and smartphones. In other cases, it is designed for a specific operating system, as is the case for Apple Remote Desktop (Apple) and Remote Desktop Protocol (Microsoft).
For many server computers, including devices like routers and a range of open-source content management systems (CMS), these are designed to serve as a simple, responsive web interface to a computer that otherwise runs headless. Headless means the computer is run without a monitor, keyboard, and/or mouse connected to it. The content management system provides us with a remote interface device to access and use certain tasks that would otherwise be accessed using a GUI through a keyboard, mouse, and monitor or through a remote desktop application.
Another common way to work with headless devices is through a Universal Asynchronous Receive and Transmit (UART) serial connection or an Internet-based secure shell (SSH) connection. These serve to provide a simple, text-based shell, also sometimes called a console or terminal window. Indeed, the Raspberry Pi starter kit provides a default backup to connect a personal computer to a server or microcomputer using a USB (Universal Serial Bus) to TTL (Transistor Transistor Logic) cable to facilitate UART communications as a way to assure troubleshooting when all other means for user interface with a device has failed. This is how we’ll start our work with the Raspberry Pi.
Where Does the OS Live?
The operating system is installed and maintained using a storage device like a hard drive or MicroSD card. But storage devices are like our old paperwork that we store up in an attic. We can’t do anything with it beyond just storing it there. When a computer is turned on, those instruction sets in the operating system which are immediately needed are moved out of storage and into random access memory (RAM). We sometimes call this booting a computer, also called boot up or start up. This startup sequence first does a safety check of the system, then looks to one or more possible locations for the master boot record or boot manager, which then takes over control to bring forward the next modules of operating system code needed.
The reason we need to boot up is because RAM can only store information as long as it has power and ground to complete the circuits used to input, store, and output the memory. This is compared to the older long term storage devices like hard drives, and to newer storage devices like secure digital (SD) cards and other flash memory, all of which have means for permanently writing memory to spaces on them while also allowing reading, deleting, and rewriting to those spaces as needed, albeit more slowly. RAM is like paper files within an arm’s reach of a computer we’re working on at the moment.
But as is the case with many of the papers we may have sitting in close reach of the computer on our desk, they still can’t be actually read and processed. To do this, a computer next moves sequences of code from dynamic RAM (DRAM), which can store larger amounts of data at a more affordable rate but that still works a bit too slowly for static RAM (SRAM), which doesn’t need to be refreshed and that is faster than DRAM. SRAM serves as a system cache that works closely with the Central Processing Unit, or CPU. Consider SRAM as those files immediately at hand, and the CPU as your brain, now processing the information you just read from the file in front of you.
At any given moment, where a segment of the operating system is “living” depends on what modules, functions, variables, iterations, and sequences of code are needed. It is moving from attic to desk to hand to brain to hand to brain to desk to hand to brain to desk to attic over and over billions of times per second.
The Kernel: The Heart of the Operating System
The operating system is the underlying program that we generally don’t even know really exists. We hear about it, for instance when we buy a computer running Microsoft Windows 10, or an Apple MacBook running macOS Sierra. And once in a great while we’re encouraged or required to install a new version of the operating system.
But generally we just see lots of text and graphics on a monitor, and we type on our keyboard, move around a pointer from one place to another using a mouse or touchpad or even sometimes the monitor itself. That’s the user interface side. But the heart of the operating system lives in the kernel.
- The kernel controls how applications get time on the CPU(s) of the computer. There was a day when the OS only allowed one application at a time to physically run on the computer. Imagine having to save your work in your text editor, exit, then open the spreadsheet to see your data, then exit, then reopen your text editor. Today operating systems are multi-tasking, allowing multiple applications to all “run” simultaneously. They do this using a very fast time sharing strategy, in which each application is allowed to submit threads, or small segments of programming code, to the operating system, requesting execution of that thread.
- The kernel controls memory access at several levels:
- Physical memory vs. virtual memory: Applications can easily eat up all available memory. To that extent, the OS must carefully control just how much memory is being used by a specific application. Further, when a user wants to do more than can be done with available memory, the operating system controls the movement of bits from physical memory to virtual memory or swap space, a special location on the hard drive configured to mimic, albeit very slowly, physical memory. Applications cannot directly access virtual memory, so when memory runs short, the OS spends a lot of time swapping bits between physical and virtual memory.
- Shared vs. private address space: Some operating systems conserve physical memory allocation by only loading shared segments of code (for instance from a library file) once, then pointing all applications to this shared address space. The problem is that sometimes a badly behaving application can overwrite a critical shared code with corrupted data. In the worst cases, this can lead to a general protection fault (a type of system error). Many modern operating systems therefore decide to make greater use of private address space, always loading segments of code again even if they already exist in memory.
- The kernel controls interactions with device controllers. Because there are many controllers manufactured for each type of input/output function (for instance, video controllers), an operating system cannot be expected to know how to interface with every one of them out of the box. Instead, each controller must come with its own device driver that can translate between the specific controller and the specific operating system. All hardware incompatibilities boil down to unavailable device drivers for the specific operating system.
- The kernel of the operating system determines which types of file systems are supported.
In all cases, it is the kernel of the operating system that does the core work of communication between electronics and programming code.
A Brief History of Operating Systems
In Microsoft and Apple operating systems, they’ve put together a tightly intertwined, large set of applications to cover all main aspects of the operating system, from user interface, to bundled applications to configure the computer, store, delete, and access files, to install and update applications, to set up screensavers, accounts, and passwords, to disk and monitor management, and so much more. And the operating system has the essential instruction sets needed to interact with the electronics of the computer within the kernel, the most basic level of the operating system.
Before there was Microsoft or Apple, there was Unix, a family of multitasking, multiuser computer operating systems. Unix was first developed by AT&T at Bell Labs research center in the 1970s, but then was split into a few different Unix systems. All are commercial, at least at some level, although some have been made more widely available than others. For the most part, Unix provides a distinction between the kernel of the operating system, primary bundled applications, the user interface, and any networked information systems used to pass data back and forth with devices beyond the kernel.
Very early in its development, Unix developers created the X-Window system to provide the ability to create graphical user interfaces. The developers also set up Unix to work on the Internet. In this way, even back in the ’70s and ’80s, Unix was able to have a graphical user interface to a headless computer using simple (actually called ‘dumb’ at the time) computers that served primarily as a text and sometimes graphical human interface device to the Unix core computer.
One company that entered into a licensing contract to use and build their own iteration of Unix was Apple, leading to the macOS.
Microsoft wrote their own text-based operating system, called MS-DOS, or Microsoft Disk Operating System. It was meant to support a personal (that is, only one user working only with directly attached devices) computer, and included the kernel, basic bundled applications, and a text interface. They then later added their own Windows graphical user interface extension to MS-DOS. Later still, they created a new version of the operating system called Windows NT (New Technology) that integrated the kernel, bundled applications, and graphical user interface into one, while still also staying compatible with earlier versions of Windows. Ultimately, they made the break to create newer versions of the Windows operating system, and eventually also adding back a new and improved text-based terminal window. But throughout, their choices on select keyboard options, labels, and other essential communications have contrasted with those of Unix, and thereby with those of Apple as well.
Moving into the early 1990s, Unix computers were relatively expensive, and therefore were purchased by, and used in, research labs. Then in 1991 University of Helsinki student Linus Torvalds purchased an Intel 80386-based clone of the IBM PC mini-Unix called MINIX. Later that year, he made public his first prototype of a Unix-like kernel operating system he called Linux. On March 14, 1994, he released version 1.0. From the start, he released Linux using Richard Stallman’s General Public License. Stallman, a free software advocate, created the GNU Project, a software development initiative. By combining the GNU Project essential bundled applications with the Linux core, Torvalds built and released a fully functioning operating system.
Over the years, different groups have worked to create distributions of specific GNU applications, other applications, and a Linux core. The oldest surviving distribution of Linux is called Slackware, created by Patrick Volkerding in 1992. Slackware 1.0 came on 24 floppy disks and was built on top of Linux kernel version 0.99. I started working in the Neuronal Pattern Analysis Group of the Beckman Institute at the University of Illinois Urbana-Champaign in 1993 and soon after began using Slackware and Linux along with the newly developing X-Mosaic graphical web browser as part of a team seeking to use the Internet to make publicly available raw electrophysiology data which was collected as part of various research projects.
Two common distributions of Linux are used as the starting point for a rich variety of child distributions. One is called Fedora, and originated in 1995, under the name Red Hat Linux. In 2003, the Red Hat trademark was used to create two branches: Red Hat Enterprise, with a combination of free and open source applications and commercial applications, and Fedora, a community-oriented distribution designed for “hobbyists.” Commonly used distributions with Fedora at their core include CentOS and Scientific Linux.
Debian GNU/Linux was first announced in 1993 by its founder, Ian Murdock. It has been developed to every extent possible as a completely non-commercial project, through collaboration with over 1000 volunteer developers. Widely used Debian-based alternatives include the overall most widely used distribution, Ubuntu, and Raspberry Pi OS, the default Debian-based alternative for the Raspberry Pi microcomputer.
There are two widely used commercial operating systems based on the Linux kernel today as well. In September 2008, Google launched its Android operating system using a modified version of the Linux kernel and various open source software designed for touchscreen mobile devices, and subsequently developed for Android TV, Android Auto, and Wear OS. The Android Open Source Project is used for development of its core source code, and apps for Android can therefore be developed by anyone for virtually any purpose and installed and run on Android devices. In May 2011, Google released the first Chromebook, running the Chrome OS. It is only available preinstalled on hardware from Google manufacturing partners. Its open source equivalent, Chromium OS, can be freely installed.
Specific to Raspberry Pi OS, each major new release of Debian results in a major new release of Raspberry Pi OS. The code name used for each major release of Debian is taken from Toy Story characters. In 2013, this was Wheezy, the penguin character by that name. In 2015, this was Jessie, the cowgirl character. As of June 2017, this is Stretch, the rubber octopus from Toy Story 3. As noted in these code name release dates, Debian works to be stable through a conservative update process. The stable release is held for about two years, although test releases become available via the new code name during the interim for those wanting early access for use and testing of new designs.
Exercise: Reviewing Your Computer
Take some time to dig into the hardware, operating system, and major installed software applications of your primary computer. While it’s often more difficult, if even possible, to open up your computer to look at the system or motherboard of the computer than it used to be, if you can safely do that, do so. You may have received some default documentation with your computer, either in print or digital. There may be “About this Computer” links available on the computer or on a vendor’s website. Some resources are best accessed through applications that came with your computer and that provide current notes which can account for potential updates that have since replaced the defaults that came with the computer.
Using these resources, create your own list of the physical components and operating system of your computer:
- Input/output devices, such as types of USB ports, Thunderbolt ports, audio, camera, Ethernet, Bluetooth, card readers, etc.
- Type and amount of random access memory (RAM)
- Storage devices
- Central processing unit (CPU) and, if included, graphic processing unit (GPU)
- Power source
- Operating system (OS) type and version.subversion/edition
- Windowing system, desktop environment, and themes/skins. For many computers today, these are highly integrated, so you may only see this as a singular graphical user interface system.
Take time to compare and contrast this with some of the other desktop and laptop computers that you or others around you use on a fairly regular basis.
Computers, microcomputers, and microcontrollers are an everyday part of life. The core components of these devices have remained the same, even as the specifications, standards, and physical and software implementations have been shaped and reshaped repeatedly over the last 50+ years. Knowing at least a bit about the items within all devices is essential as we serve professional and personal roles in the selection, implementation, innovation-in-use, and support of these devices in our varying contexts.
Before we move on to examining the Raspberry Pi microcomputer, take a few moments to watch this “teardown” video from electronics repair company iFixit. A product teardown is a common method for identifying the component parts of an electronic device, in order to better refurbish or repair devices of that same model. However, take caution and browse the resources available from iFixit before tearing down your own device, as the manufacturer may claim that such actions void your warranty. Moreover, for many newer devices, components are glued — not screwed — together, requiring specialized equipment to get inside the device.
In this teardown video, a 2018 MacBook Air is disassembled and evaluated. As you watch, make note of any parts you recognize. For even more detail, read the full teardown guide.
A breadboard used to be a board (sometimes literally a board for cutting bread) with nails pounded into it so that you could wrap wires around them to make experimental models of electric circuits. Today, the breadboard is a piece of plastic with holes in it. Underneath each hole is a metal clip. These metal clips connect together a specified set of holes ordered into a row or column. This way, pushing a piece of conductive material into one hole right away connects that material to things pushed into other holes that are joined together by that clip.
A perfboard is a thin, rigid sheet with holes but no metal clips on the other side. Instead, copper pads are used, to which conductors can be soldered. In some cases, as with the perma-proto breadboards from Adafruit, copper is further used to group together certain holes, mimicking the breadboard in a way that provides greater durability for prototyping work.
The printed circuit board found in a computer, which contains the principal components, along with ports and connectors to other devices. The term "motherboard" arose at a time when it was paired with one or more supporting printed circuit expansion boards, often referred to as daughterboards or expansion cards, in order to achieve the full general functioning of the computer. The motherboard is sometimes also referred to as system board or mainboard.
The CPU is the central processor of a computer. It is built of an ever-growing number of electronic circuits enabling it to carry out the basic arithmetic, logic, controlling, and input/output operation instructions for the computer. Over the decades, more electronic components have been placed on a single and increasingly small integrated circuit (IC) chip. Today's CPUs are actually multi-core processors, with one chip being constructed of two or more CPUs called "cores." It is on the CPU that instructions for the vast majority of programming code is actually run. The CPU uses three main steps: fetch, decode, and execute, after which the instruction is returned to a memory integrated circuit.
Memory is the part of a computer in which data or programming instructions are stored and retrieved. Memory is constructed using high-performance integrated circuit chips to increase performance as compared to storage devices such as hard drives and lower performance but less expensive flash drive integrated circuit chips. Much of this type of memory is volatile Random Access Memory (RAM), in which data is lost when power to the computer is turned off. There are multiple types of RAM: The higher cost but faster performing static RAM (SRAM) is used with the CPU to increase CPU performance, while the less costly but slightly slower dynamic RAM (DRAM), or more recently double data rate synchronous dynamic RAM (DDR SDRAM) is the main memory of computers. The Raspberry Pi Model 3 comes with 1 GB (Gigabyte) of DDR, while the Raspberry Pi Model 4 is available with 1GB, 2GB, or 4GB of DDR, making it very similar to today's smartphone and Chromebook computers. Many laptops today come with 4GB to 8GB of system memory.
There are a range of different data storage devices: hard drives (HDDs) constructed using magnetic charges placed on a set of spinning platters, DVDs using pits on a spinning platter read via laser, and flash memory integrated circuit chips, such as Solid State Drives (SSDs), USB flash drives, and SD cards, provide computers with long term storage of data and software applications. Storage devices are relatively slow, so programming instructions need to be moved from storage to memory using integrated circuits to be fetched, decoded, and executed by the processors of the computer. The Raspberry Pi kit includes an 8 GB MicroSD card storage device, although 16GB, 32GB, and 128GB MicroSD cards are available and can be used with the Raspberry Pi. In addition, it is sometimes helpful to make use of USB flash drives or USB hard drives with the Raspberry Pi to provide even more storage.
An integrated circuit that interfaces with one or more other devices on a printed circuit board. Besides the CPU, this can include input/output controller(s) and a graphic processing unit (GPU) controller. The Raspberry Pi Model 3 has two controllers, the System-on-Chip (SoC) controller that includes the CPU and computer memory, and a controller interfacing with the wired Ethernet and four USB ports.
Input devices let users control the computer (e.g. keyboard, mouse, touch-sensitive devices). Output devices inform the user of what is happening (e.g. monitor, printer).
Universal Serial Bus (USB) is a formal industry standard with specifications for cables and connectors, and also protocols for connections, communication, and power supply between electronic devices such as computers and peripherals. USB 1.x, 2.0, 3.x, and the upcoming 4 are generations of the standard and associated specifications. The USB port connector on a device is called the receptacle, while the connector on the cable is called the plug. There is a range of different USB connectors approved within USB committee specifications, including:
Standard format USB Type-A (common on computers, and used on the Raspberry Pi) and Type-B connectors (seen in a range of removable devices such as external hard drives and printers). Type-A receptacles on devices are color-coded white, indicating USB version 1 or 2 compliant low/full/high speed ports, or blue, indicating USB version 3.x SuperSpeed compliant ports.
Mini-A (common in cameras and some tablet computers) and Mini-B connectors.
Micro-A and Micro-B connectors, common in many mobile devices. For USB 3.x ports, a thin but wider Micro-B SuperSpeed plug is used.
USB-C is a formal connector specification, and does not necessarily implement USB 3.x standards.
Computers incorporate a range of audio/video interfaces, depending on vendor. Some of the most common interfaces currently in use include:
High-Definition Multimedia Interface (HDMI), a proprietary audio/video interface standard, currently at version 2.X. This is included as the display port on the Raspberry Pi Model 3 and Model 4 microcomputers.
DisplayPort (DP) is a VESA standard digital display interface, and is backward compatible with other interfaces such as HDMI. Apple computers use the Apple-designed Mini DisplayPort (mDP), although beginning in 2016 Apple began moving towards use of the USB-C connector.
Thunderbolt is the brand name of an interface standard developed by Intel and Apple. The standard allows the multiplex of individual data lanes from multiple connected devices to a single DisplayPort (DP) or Mini DisplayPort (mDP) (Thunderbolt versions 1 and 2) or USB-C (Thunderbolt version 3) connector.
An Ethernet port is an Institute of Electrical and Electronics Engineers (IEEE) standard connector for 100BASE-Tx/1000BASE-T full duplex Fast and Gigabit wired Ethernet communications using twisted pair CAT-5 and CAT-6 copper cabling.
A general purpose input/output, or GPIO, is a common, open-ended transmission mechanism used with integrated circuits on microcontrollers, microcomputers, and other printed circuit board electronics. Pins are provided to which female-ended wires can be connected. GPIO pins can be programmed as input (e.g., sensor data; ground) or output (e.g., state change; power) sources. GPIO pins can be preconfigured for special purposes, or can remain undefined until specified by a user at run time. In general, GPIO provides a means to tailor pins to fit specific design goals within applications, as well as reusability across applications.
The heart of the operating system. It is the go-between from applications between input/output controllers, memory, the Central Processing Unit (CPU) and storage devices.
A file manager is a software program that helps you manage all the files on your computer. For example, file managers allow you to view, edit, copy, and delete the files on your computer's storage devices. It is known as the File Manager within the Windows Operating System and as the Finder on the Mac Operating System. The file manager makes use of the Graphical User Interface (GUI). The same tasks you can complete with the file manager can also be done through the Command Line Interface (CLI) terminal.