Computers are super intriguing to me. My interactions with them professionally and personally have defined most of my life. I am interested in everything about them from hardware to software and whatever is in between. This is one of the reasons why I have decided to kick off working on electronics and embedded systems again.

An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electrical system (Wikipedia)

The aim of this article is to explain what embedded systems are, why I am interested in them, and how anyone can start working with them too. I will also be sharing some resources I have found to be helpful.

Why

Apart from my background in electronics engineering and curiosity about embedded systems, I am also (re)starting the embedded journey for the following reasons:

  • Building foundational knowledge for other related fields I care about including IoT, Robotics, and Energy Management.
  • Learning about software in embedded systems will help me in my day to day as a software developer as I’ll pick up more languages, learn new design principles, new methods of debugging, etc. This is particularly interesting to me as writing low level code for micro-controllers is less forgiving than building Web APIs and Apps. Bugs are more costly as they could crash your hardware and there is little to help you if you don’t write “good” code.
  • Building things for myself should prove to be an exciting use of my spare time. Getting into the habit of inventing things can’t hurt.

What Are Embedded Systems, For Real?

Embedded systems are single purpose computers. They are computers built to perform a specific task. They are a bit different from the multi-purpose computer systems we use on a day to day basis like phones or personal computers. Embedded systems can also be found in larger computer or mechanical systems performing singular functions. Examples of embedded systems include digital watches, thermostats, or smart IoT devices like the Nest Thermostat.

Embedded systems engineers are comfortable working with hardware and/or software to create useful systems.

Hardware

These are the physical components of embedded systems including the microcontrollers, sensors, actuators, chassis, and other components you can see.

Microcontrollers

One of the most important parts of the hardware of a system is the microcontroller. It serves as the brain and is the part that is programmed with the function of the embedded system. Microcontrollers come in various forms and have various capabilities, depending on the need of the system.

A microcontroller is a compact integrated circuit designed to govern a specific operation in an embedded system . A typical microcontroller includes a processor, memory and input_output (I_O) peripherals on a single chip. (Techtarget)

A standard microcontroller has various parts that help it function including the CPU, memory (RAM and ROM), ADCs (Analog to Digital Converters) and DACs (Digital to Analog Converters), and so on. You can learn more about the different parts of a microcontroller here.

Structure of a microcontroller Basic Structure of a Microcontroller (Electronics Hub)

Microcontrollers are connected to other electronics devices like sensors and actuators to read data, process it, and also sometimes to produce outputs or actions.

An example of a microcontroller is the ATmega328 which can be found on the popular Arduino Uno development board.

ATMega328 Microcontroller ATmega328 Microcontroller (Wikipedia)

A good way to get started on microcontrollers is to use development boards which have microcontrollers built on them.

Development Boards

These are printed circuit boards (PCBs) which have Microcontrollers along with GPIOs (General Purpose Input and Output pins) and other components that can help you quickly prototype and build embedded systems of various complexities. They are a great way to get started on building embedded systems and simple DIY projects.

Different companies provide multiple types of microcontroller development boards with a wide range of feature sets. Examples could include boards with WiFi, Ethernet, or Bluetooth capabilities. Some also come preconfigured with other useful things like relays or microphones.

Popular examples of microcontroller boards include the Arduino and Tessel 2 boards.

Electronics

When building embedded systems, you would inevitably have to interact with other hardware and electronics ranging from sensors to LEDs and motors. These also include electronics like resistors and capacitors which help to make other components in the system work as intended.

These electronics, together with the programmed microcontroller (usually on a printed circuit board) are what work together to form a complete and useful embedded system.

Arduino Uno Arduino Uno microcontroller board with various components (Wikipedia)

Software

This is the intangible part of the embedded system. It is the set of instructions which the embedded system is told to carry out. This software is usually stored in the microprocessor or microcontroller.

For example, the piece of code below is used to tell the Arduino board to continuously blink an LED:

int ledPin = 13;                // LED connected to digital pin 13

void setup()
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}

The full code and tutorial for the above code can be found on the Arduino website.

Languages

Software for embedded systems can be written in various languages depending on the platform. As a result of the resource constraints faced when building embedded systems, speed and proper memory management are considered when picking a language to work with. The language should also have low level access to hardware. Luckily a lot of languages do this really well. Popular ones include C, C++, Rust, Go, and Ada. In modern times, higher level languages like Java, Python, and JavaScript are also being used for embedded systems.

C and C++ are still the most popular choices for building embedded systems as a result of the low level access to hardware that the languages provide.

Useful Resources

Electronics

Software

Embedded Systems

Conclusion

Embedded engineering is a really broad field. If you read all the way to the end you’re probably as excited as I am to learn more about the field and actually build stuff. Let me know if you have any ideas, thoughts or questions by sending a mail or leaving a comment.