Let's bring in the power!

So we have ourselves an Embedded System featuring processor(s), FPGA(s) or a combination of the two, memory, inputs and outputs, great, but it won't do much without some juice! Time to bring in the power!

Embedded Systems can be powered in many different ways, a few which immediately come to mind that we are all familiar with are batteries or a power jack from a plug pack for example but there are many other options such as Ethernet via what is known as Power over Ethernet, PoE, or even USB.

12V, 5A DC Plug Pack

So let's assume we have ourselves a 12V, 5A DC Plug Pack, can we then just route this voltage along a thick track to all of our components? No! Unless you are fond of seeing smoke and potentially flames ooze above your PCB! Why is that so?

Well it comes down to the fact that each chip in the circuit has a particular voltage rating for it to work correctly, anything too high will cause damage and too low will cause it to not function at all. Many components also need a certain amount of current flowing as well and for low power devices this could be in the order of nA (nano amperes).

We now have ourselves a system which requires different voltages and currents and so what we need is a power delivery system capable of supplying the required voltages and currents within our system.

Before delving further, what do we mean exactly by power? Power is another useful quantity regularly quoted in electronics that refers to the energy delivered per second, a high powered device simply then delivers more energy per second and the units for power are Watts [W].

Let's take a simple example to see this in action. Say we have ourselves an embedded system composed of a microcontroller an LED, a push button and a touch screen LCD shown pictorially in a block diagram below:

A simple Embedded System

Note that I've also included the current and voltage requirements for each comp0nent. As we now know the various voltages and currents the power supply has to deliver, we can begin to design a power delivery system.

A Simple Power Supply

So, from the above we require a power supply capable of delivering 5V for the LCD and 3.3V for the LED, push buttons and microcontroller. We also need to deliver a current of at least 543mA, but to be safe we should build ourselves a beefier power supply and provide 1A.

We also need factor in additional current for when we turn the system on as we have higher current draw on boot known as inrush current. We won't dive into the specifics of why here, but suffice to say the system has a dynamic period on startup before the currents and voltages settle.

Let's tackle this from the top down starting with a block diagram zooming in on the power supply recalling that the power originates from a 12V, 5A DC plug pack:

Power Supply System

Note that we start with a 12V source voltage from our DC jack which then connects to two devices known as Regulator 1 and Regulator 2 which step down to the required voltages of 3.3V and 5V. Note that we also commonly referred to these as voltage rails used by the circuit.

Introducing Regulators

components responsible for shifting voltages/currents up/down within a power supply system are known as regulators. In our system we require regulators which step the voltage down from 12V to 5V and 3.3V. Now, it's important to note that we could also connect the 12V to a regulator which steps down to 5V and then connect another regulator which steps the 5V down to 3.3V as below:

An alternative power supply

Types of Regulators

For the moment regulators can be considered as block boxes capable of efficiently converting voltages and currents to set values. We have two main types of regulators at our disposal which are linear regulators and switch mode regulators. Let's begin by considering the simpler of the two, linear regulators.

A linear regulator provides a very stable voltage output, it does this by varying its resistance based on the input voltage and the load.

Resistance is simply a property which quantifies how much opposition to charge a medium presents. Every single medium which current flows through opposes charge to some extent, some more so than others. A medium which allows current to flow easily is known as a conductor while the opposite is known as an insulator. The simplest load a circuit can have is a resistor which is a component whose sole purpose is to oppose charge with a rated resistance value in units of Ohm's [Ω].

The simplest circuit

Shown above is such a circuit where a 12V voltage source drives a 100k resistor. While we're here we may as well quickly cover Ohm's Law which elegantly states that the voltage dropped across a resistor is proportional to the current flowing through the circuit and the resistance:

And let's also pay our tributes to the man behind this discovery:

Georg Simon Ohm

Okay so what does a linear regulator then look like in the real world?

3 terminal thru-hole linear regulator
4 terminal surface mount linear regulator

It may look like either of the linear regulators shown above where the first kind would soldered through holes (hence the name) on the board while the second one would be soldered to pads (on the surface).

On a PCB we would also typically have components known as capacitors connected across the input and output pins. Capacitors are components which store electronic charge on plates which are used in many many applications, for regulators they simply smooth the voltages observed on the input and output (more on capacitors later).

Linear regulator circuit

One small bit of terminology before we move onto the other variety and that is Low Drop Out regulators. In an office setting you may hear hardware engineers casually mention an LDO. What they are referring to is a linear regulator which efficiently steps down a voltage where the low dropout part refers to the input and output voltages being particularly close in value.

A switch mode regulator provides a voltage output which has ripple on it. The output voltage is therefore not as stable as a linear regulator, however, the benefit of a switch mode type is that it is much more efficient that the linear variety. By efficiency we simply mean less energy is wasted within the regulator component itself leaving more of the input power available to the load.

Switch Mode Output Voltage Ripple

The reason why we see a ripple at the output is due to the internal operation of a switch mode regulator, which as the name suggests involves switching. The basic idea is that we charge a capacitance up to the desired voltage and then discharge it in a cycle to get as close to the target voltage as possible, it also turns out that this process is very efficient.

For switch mode regulators we have many kinds with the main ones used known as buck converters, which step down the voltage, and boost converters which step up the voltage.

Bringing it all together

Using what we have now learnt we can design a power supply using the best of both worlds (efficiency and a very clean 3.3V rail), a linear regulator rated for 3.3V and a buck converter rated for 5V using the second topology we considered which would look like this:

Complete power supply system

The 5V rail would then connect to the LCD and the 3.3V rail would connect to the MCU, LED and pushbutton.

Just before we wrap up we typically use physically large regions of copper for power supply connections as they have less resistance than thinner traces. This allows more efficient power delivery (less energy is converted to heat in the wires).

Summary

  • Power supplies deliver the required voltages and currents to all of the components within the embedded system
  • Power refers to the energy delivered per second
  • Resistance defines the opposition to charge
  • The two main types of regulators are Linear Regulators (LDO's) and Switch Mode Regulators (Buck/Boost converters)
  • We use large regions of copper to efficiently route power rails

Coming up next

In the next part of the course we will be taking a look at the simplest kind of output we can hook up to our microcontroller or FPGA.