Getting Hands-on with Embedded Firmware

by

Have you ever wondered what makes a fan spin, a microwave rotate, a lock engage, or a washing machine spin? Every day, we encounter dozens of items that would not function without the use of embedded firmware. In this post, I will introduce the various components of embedded firmware, and will share ways that you can get involved in embedded firmware development. 

What is Embedded Firmware Development?

Embedded firmware, or embedded systems, are single-purpose computer systems that are programmed for a specific task. They can be large or small computer systems that are built into a product, piece of hardware, or another computer system that perform some task useful to the product, equipment, or system. For example, an embedded system might spin a fan, turn on a motor, or turn a light on or off.

Embedded systems are programmed to perform their tasks from the time they are powered up until they are shut down. They cannot be changed, except in ways that the programmer intended.

Examples of Embedded Systems include:

  • Fans
  • Lights
  • Microwaves
  • Washing Machines
  • Cruise Control
  • Credit Cards
  • Locks
  • Guided Missiles
  • Heart Monitors (some are even open-source)
  • Mars Rover (priority inversion)

While embedded systems have a myriad of diverse uses, they still have several common features, including:

  • Real-time: They use real-time operating systems.
  • Small Sized: Many are used with small devices and therefore must be compact. 
  • Low Power: Many embedded systems work with devices that run on batteries, so energy conservation is efficient. While this feature isn’t as universal as many of the others, most embedded systems still tend to be focused on energy conservation. 
  • Cost-Effective: They are usually cheap because they are mass-produced.
  • Rugged: Many embedded systems are used in everyday, hands-on, or industrial settings, and therefore must be able to survive some wear and tear. For example, one of the systems I created was being operated in a factory where the workers wore gloves. Therefore, it was important that the control panel for the embedded system utilized hardware that would register a gloved finger touch. 
  • Quick boot: Embedded systems should never take more than a couple of seconds to reboot following a power outage or failure. For example, if your system operates a fan, if the fan doesn’t turn back on when the power returns, the user may think it is broken. 

What is a Real-Time Operating System? 

According to Wikipedia, “a real-time operating system (RTOS) is an operating system intended to serve real-time applications that process data as it comes in, typically without buffer delays. Processing time requirements (including any OS delay) are measured in tenths of seconds or shorter increments of time. A real-time system is a time-bound system that has well-defined, fixed time constraints. Processing must be done within the defined constraints or the system will fail. They are either event-driven or time-sharing. Event-driven systems switch between tasks based on their priorities, while time-sharing systems switch the task based on clock interrupts. Most RTOSs use a pre-emptive scheduling algorithm.” 

RTOSs are used when developing embedded systems. Most embedded firmware developers use an operating system called FreeRTOS. FreeRTOS was created in 2003, and is an open-source project that easily lets you customize your embedded firmware.

As the name implies, the most important component of any RTOS is the clock. Because they operate in real-time, RTOSs must be incredibly reliable and up to date. As an embedded firmware developer, whenever you begin developing or troubleshooting your system, the first thing you address is your clock because if the clock isn’t working, the RTOS isn’t either. 

Hardware

Embedded firmware typically requires two pieces of hardware: the circuit board and the chip. For the circuit board, most embedded firmware utilizes a printed circuit board (PCB). For the chip, there are four types that are most commonly used, including: 

  • STM32 (most common)
  • ESP32 (most common). The ESP32 is my personal favorite; it is a dual-core system with built-in Bluetooth and Wi-Fi that costs about $2. 
  • Arduino: Arduino chips are quite small, and typically operate while loops rather than RTOSs, as they require significantly less space. 
  • Raspberry Pi: While not very common, the Raspberry Pi is preferred by some developers because it runs Linux

Getting Started as an Embedded Firmware Developer

One of my favorite things about embedded firmware development is that it is one of the only software development jobs that allows you to step away from the computer and work with your hands. On my first day as an embedded firmware developer, I was given a soldering iron and told to solder some wires onto a chip. I had never seen a soldering iron, much less used one. However, it was not long until I was building the hardware for my embedded systems. 

If you are interested in learning more about embedded firmware, some of my favorite resources include: 

Adafruit: Adafruit has everything you need to create the hardware for your embedded systems, including: 

  • Soldering irons
  • Multimeters
  • Breadboards
  • JTag Debuggers
  • Kits (e.g. clocks, robots, wearables)

Digikey: Digikey sells anything you could possibly need or want or embedded firmware hardware construction, including: 

  • ESP32
  • STM32

Mark Rober’s Monthly Course: Mark Rober a former NASA Engineer and popular YouTuber, has a course on Monthly all about embedded firmware. 

ESP32 Channel on Reddit: Reddit is a great resource if you are looking for advice or answers to your questions. 

Embedded.FM Podcast:  This podcast is a great way to learn more about embedded firmware from embedded firmware developers. Even as a former embedded firmware developer, I still learn a ton from listening to this podcast. 

I never set out to be an embedded firmware developer; in fact, I started working in the field after I was transferred to the division to solve a staffing issue at my prior company. However, I quickly learned that embedded firmware development is hands-on, fun, and incredibly rewarding.

Leave a Reply

Your email address will not be published. Required fields are marked