Skip to main content

Embedded Systems: A Brief Introduction

· 6 min read
Josh Kaplan

Abstract. This article introduces the concept of embedded systems with a brief overview of microcontrollers and small low-cost computers for embedded applications.


Note

This article is part a series of notes I prepared for UCF mechanical and aerospace senior design students for the summer 2020 semester. I have chosen to publish the contents here in the hopes that it might be useful for students beyond a single semester.

So, what are embedded systems? At its simplest, an embedded system is any computer system that is embedded in some other type of system. The processor controlling your dishwasher is an embedded system. So is the computer in your car or in an airplane. GPS navigation devices, fitness trackers, televisions, medical devices, and video game consoles are all examples of embedded systems.

In this series, we'll cover a basic introduction to embedded systems from a mechanical and aerospace perspective. We won't be focused on designing embedded computers, but on using embedded computers and microcontrollers for mechanical applications. Throughout this series we'll be using a microcontroller called Arduino and a single-board computer (SBC) called a Raspberry Pi.

A microcontroller can be thought of as a computer that runs only one program. It typically has much of the same hardware as a computer, but has no operating system. Microcontrollers are usually designed to be low cost and intended to integrate with other hardware such as sensors and motors. Arduino is actually a series of microcontrollers, the model we'll be using is the Arduino Uno. The Arduino is programmed using the Arduino language, which is based on C++.

More information about Arduino can be found at https://www.arduino.cc.

The Raspberry Pi on the other hand is a single-board computer or SBC. In many ways the Raspberry Pi is more similar to your laptop or desktop computer than it is to an Arduino. It has an operating system called Raspbian, a variant of the Linux operating system. It comes pre-installed with a number of applications, can be programmed in almost any language, and can run multiple programs at once. Like Arduino, the Raspberry Pi is actually a series of devices, though the different Raspberry Pi models are more of generational iterations of the Pi than different models.

More information about the Raspberry Pi can be found at https://www.raspberrypi.org.

What We'll Cover

This series is divided into four modules. In Module 0, we'll briefly introduce embedded systems. We'll talk about how computers work and compare the Arduino Uno and the Raspberry Pi. We'll place specific emphasis on some of the specifications you'd see when selecting a microcontroller or SBC to help you understand how to make these choices for your own projects. Following this, we'll give a brief introduction to Arduino and Raspberry Pi. As two separate tutorials, we'll show you how to get up and running with the Arduino and the Raspberry Pi in a matter of minutes.

In Module 1, we'll begin to dive into Arduino. We'll introduce the language and some resources for diving deeper on your own. We'll discuss digital and analog input with hands on examples to get you started. Finally, we'll discuss output - using the Arduino to control a servo motor.

Module 2 is all about motor control. We'll discuss transistors and how than can be used to not only control motors buy many mechanical devices. We'll walk through the basics of motor control by setting up a simple control circuit and write the Arduino code to control the motor's speed. Then we'll move to more advanced topics by showing motor reversing with H-bridge circuits.

We conclude our core Arduino skills with Module 3 where we'll take a deeper dive into sensors. We'll discuss sensor resolution and mapping 10-bit analog inputs to physical measurements.

In Module 4, we'll explore Serial I/O (input/output) with Arduino to communicate between an Arduino and a computer over USB. We'll use a programming language called Python on a computer to read data from the Arduino and store it in a more familiar format. We'll also touch briefly on controller an Arduino from a laptop using Python.

Finally, in Module 5, we go through a few examples with the Raspberry Pi. We'll show you can use the GPIO (General Purpose Input Output) pins on the Pi to accomplish similar tasks that you've already done with the Arduino. Next we'll connect a Raspberry Pi to a computer over Wi-Fi and remotely control a connected Arduino. Finally, we'll go through a simple imaging example to show the potential of optical sensing.

How Computers Work

I'm not going to explain how computers work. There are countless resources on the internet and people who have explained these topics far better than I will do here. What I will do it provide some useful resources to help you learn the basics of how computers work and some extra content if you want to dive deeper.

Binary

Hardware and Software

Also checkout Harvard's CS50 Intro to Computer Science course: CS50 2019 - Lecture 0 - Computational Thinking, Scratch.

Arduino vs. Raspberry Pi

The Arduino and the Raspberry Pi are very different. As a microcontroller, the Arduino lends itself very well to hardware integration. It handles analog inputs and simulated analog outputs quite well out of the box. It works well for integration with analog sensors, motor control, and other hardware-heavy applications. The Raspberry Pi, on the other hand, lends itself well to software-focused applications. It can run many programs at once, supports most programming languages, and has the power of a full operating system. It works well for software heavy operations like image processing, video streaming, and complex autonomy.

Also keep in mind there are many different flavors of Arduino and a few different versions of the Raspberry Pi, in addition to a wide variety of other commercially available microcontrollers and SBCs. Each of these have different capabilities and performance. Do your research and make a decision that makes sense for your project.