Mixed-Signal Hardware Design with KiCad

In this course, you'll learn how to design a complete, embedded, mixed-signal product from scratch - all the way from concept to prototype manufacturing.

This includes system-level design, component selection, analogue (op-amps, filters, ADC/DAC interfaces) and digital (microcontrollers, USB, switching converters) circuit design, simulation, and schematic capture, as well as PCB design, layout, and routing of a four-layer board in KiCad 6.

This course is perfect for graduate engineers, advanced hobbyists, and anyone interested in the complete hardware design life cycle.

Course length: 5 hr 20 min (approx.)

Purchase via Fedevel Education

Visit https://phils-lab-shop.fedevel.education to sign up for this course - starting from 99 USD (excl. tax).

Course Content

Lesson 1: Introduction

Welcome to this course on mixed-signal hardware design!

In this lesson, I'll tell you more about this course, the pre-requisites, what you will learn in this course, and how the course is structured.

Lesson length: 00:05:23

Lesson 2: System Requirements

Starting from a very basic system description, we will go through - step-by-step - and define our system requirements. Initially, we'll start with a broad overview of what our product needs to be capable of, then gradually 'hone' in on far more detailed system requirements.

Lesson Sections:

  • Basic System Description
    We'll get given a very basic product brief, defining what our system should be capable of.
  • Defining Basic System Requirements
    Given the product brief, we will define a number of basic system requirements.
  • Refining System Requirements
    Once we have basic system requirements in place, we can hone in and refine our system requirements adding more and more detail along the way. Following that, we'll look at individual, sub-system requirements.
  • USB Requirements
    Power, data rates, connector type, version/protocol, 'Host, Device, or OTG'.
  • Processor Requirements
    Storage capabilities (flash/RAM), programming tools, peripherals, processing power, packaging, brand?
  • Power Supply Requirements
    Linear or Switching, current-/power-handling requirements, filtering, input and output voltages, USB capabilities.
  • Data Converter Requirements
    ADCs and DACs, number of channels, number of bits, sampling rate, additional features, interface (SPI, parallel, ...).
  • Analogue
    Anti-aliasing/reconstruction filters, buffers, impedances, single-ended/differential.
  • Miscellaneous
    Mechanical constraints, connectors, peripherals, ESD protection, EMC, biasing, timing.
  • System Block Diagram
    Given our more detailed system requirements and system description, we can create an initial block diagram.


Lesson length: 00:20:38

Lesson 3: Part Selection

How to choose suitable parts (ICs, passives, ...) for our specific design, given our derived system requirements.

Lesson Sections:

  • Part Selection Basics
    Which parts to choose first, calculating power requirements, choosing additional components (passives), choosing connectors.
  • Finding Suitable Parts
    How to find suitable parts (stock, PCB assembler, familiarity with parts, distributor part search).
  • Distributor Part Search
    Example demonstration of Mouser's part search to find a suitable microcontroller.
  • Microcontroller Selection
    Important microcontroller (MCU) parameters: speeds, flash and RAM sizes, peripherals, brands, packages, ....
  • ADC and DAC Selection
    Important data converter parameters, part choices given our requirements.
  • DC/DC Converter Selection
    Supply requirements leading to converter selection, LDO for analogue, switching (buck) for digital, specific part choices and reasons for choosing them, preview of required surrounding circuitry.
  • Analogue Component Selection
    Low-noise design principles (resistor Johnson noise), op-amp selection (input type, rail-to-rail, bandwidth, etc.), ADC and DAC interfaces, filters.
  • Additional Component Selection
    Voltage/current/power ratings, material/process types, temperature coefficients and tolerances, package sizes, ESD protection and EMI filters.
  • Final Points
    BOM consolidation, standard value compoennts, easy-to-assemble/debug packages.


Lesson length: 00:24:20

Lesson 4: How To Read A Datasheet and Circuit Design Introduction

How to read a datasheet (typical and useful sections) and introduction to the next part of the course: circuit design.

Lesson Sections:

  • Datasheet Overview and Table of Contents
    Standard layout of a datasheet, and typically most useful sections,
  • Pin Configuration and Functions Section
    Pinout of specific device, useful for schematic symbol creation.
  • Ratings and Operating Conditions Section
    Absolute maximum ratings, recommended operating conditions, incorporated ESD protection.
  • Application and Implementation Section
    Example schematic, component values and sizing for required external circuitry
  • Layout Guidelines Section
    Important information for laying out and routing the specific part.
  • Package and Footprint Section
    Package/footprint information to aid the design of a suitable component footprint in our ECAD software.
  • Circuit Design Introduction
    Moving to KiCad to examine schematic in next lesson, looking at following sections: power supplies, microcontroller and USB, ADC and analogue circuitry, DAC and analogue circuitry.


Lesson length: 00:05:43

Lesson 5: Schematic Design - Power Supply

Starting with circuit design and analysis, we'll move over to KiCad and examine the schematic in sections of our mixed-signal demo hardware. In this first schematic lesson, we'll look at some basic schematic tips for readability and sectioning, as well as the entire power supply circuitry for our prototype product.

Lesson Sections:

  • Schematic Overview and Tips
    How to section a schematic, tips and tricks for readability, and a brief overview of our entire schematic in KiCad.
  • Power Supply Overview
    Input filter, analogue supply, digital supply, and op-amp bias generator.
  • Input Filter and RLC Filters
    Filtering noisy USB power rails, RLC filter theory, choosing suitable component values, RLC filter design using online tools.
  • Analogue Supply
    Linear, low drop-out (LDO) regulators and surrounding circuitry.
  • RC Filters
    RC filter theory and design, analogue supply filtering, power dissipation in resistors.
  • Labelling Nets
    Incredibly important design step: label ALL nets.
  • Digital Supply
    Switching, buck converter for digital circuitry supply rail. Buck convert component selection and sizing (inductor, capacitors, feedback network).
  • LEDs and Current-Limiting Resistors
    Extracting relevant information from LED datasheet, typical current requirements and forward voltages, calculating suitable current-limiting resistor values to adjust LED brightness.
  • Bias Generator
    Configuring an op-amp as a voltage follower to generate a stable bias voltage for op-amps in the analogue front-ends. Supply filtering and reference generation.
  • Decoupling/Bypass Capacitors
    Decoupling capacitor theory, reasons for requiring decoupling capacitors, rough sizing and placement guidelines.


Lesson length: 00:31:36

Lesson 6: Schematic Design - Microcontroller, USB, SWD, and ESD Protection

Moving on to the next schematic page, containing the microcontroller (STM32), programming interface (SWD), and USB circuitry. We'll also examine circuit protection features, such as current-limiting resistors and ESD protection.

Lesson Sections:

  • Overview
    Overview and sectioning of schematic page into logical groups.
  • Microcontroller Circuitry
    Decoupling capacitors, VDDA filtering, configuration pins, crystal oscillator connections.
  • Crystal Oscillator Circuitry
    Crystal oscillator component selection and sizing, load capacitors and feed resistor calculations.
  • Pin-Out Planning
    Initial pin-out, including peripheral selection (SPI, USB, SWD, Timers, ...) for STM32 microcontroller using STM32CubeIDE.
  • Pull-Up Resistors
    Required pull-up resistors on certain datalines, app notes that detail requirements.
  • RGB LED
    Current-limiting resistors for RGB LED, decoupling, connection to timer channels for PWM duty-cycle-based control via MCU.
  • USB
    Type C connector specifics, CC resistors for power delivery, ESD protection, and filtering using common-mode chokes.
  • Serial Wire Debug
    SWD header pinout, protection circuitry with current-limiting resistors and ESD protection, adding capacitance to NRST line.
  • TVS Diodes
    How to quickly choose the right TVS diode for ESD protection, depending on voltage requirements and bus speeds.


Lesson length: 00:31:39

Lesson 7: Schematic Design - ADC, DAC, and Analogue Circuitry

In this lesson, we'll examine the final two schematic pages - those of the ADC and DAC, as well as all corresponding analogue circuitry ('front-ends').

Lesson Sections:

  • ADC Datasheet
    Overview of ADC, including features, and pin-out.
  • Symbol Creation
    How to create a custom symbol in KiCad 6 using the datasheet as a reference, including proper sectioning of symobls (digital, analog, ground, and power).
  • ADC Surrounding Circuitry
    Using the datasheet to add the required external circuitry to the ADC, such as decoupling capacitors.
  • Voltage Reference
    Using an additional IC voltage reference to feed the ADC, voltage reference filtering and bypassing.
  • Analogue Front-End
    BNC input connector, ESD protection, RF filter, AC coupling, biasing, op-amp buffer with defined input impedance, analogue anti-aliasing filter design (3rd order Butterworth, Sallen-Key), single-ended to 'pseudo'differential/balanced conversion.
  • DAC and Analogue 'Rear-End'
    Required surrounding circuitry for DAC, analogue reconstruction filter, output buffer, ESD protection, and BNC connector.


Lesson length: 00:23:23

Lesson 8: Final Schematic Tips, Footprint Selection, and Footprint Creation

Final steps when creating the schematic, as well as selecting and creating custom footprints in KiCad.

Lesson Sections:

  • Annotation
    How to logically annotate multi-page schematics.
  • Electrical Rules Check
    Performing an ERC to catch any schematic capture mistakes.
  • Footprint Selection
    Guidelines to help choose suitable footprints, for example, passive sizes depending on requirements.
  • Footprint Creation
    Using the ADC datasheet to create a custom footprint in KiCad.
  • 3D Models
    Retrieving a 3D model, and adding it to our footprint.


Lesson length: 00:08:56

Lesson 9: Circuit Simulation with LTSpice

After creating our initial schematics, we can simulate parts of our circuitry using free tools. We will use LTSpice to simulate a simple op-amp bias generator, both with a DC operating point and AC frequency response analysis.

Lesson Sections:

  • LTSpice Overview
    Placing components, voltage sources, net names, and navigating around the LTSpice GUI.
  • DC Operating Point Anaylsis
    Steady-state, DC analysis of an op-amp bias generator to check DC node voltages and currents.
  • AC Frequency Response Analysis
    Simulating and analysing the frequency response of an RC, low-pass filter across a defined frequency band.


Lesson length: 00:09:35

Lesson 10: PCB Design - Introduction

Once we have our schematic and footprints in place, we can move over to PCB design. We'll start off our design with a discussion about some PCB design basics and guidelines.

Lesson Sections:

  • Checking Your Work
    Before continuing, make sure to thoroughly check schematics, symbols, datasheets, footprints, and simulations.
  • Recommended Resources
    Several recommended (free) videos to cover PCB design basics.
  • PCB Stack-Up
    Looking at general PCB stack-ups, comparing two four-layer PCB stackups, and benefits and drawbacks of each.
  • The Signal Path
    Discussing how electrical signals flow through a PCB and how this influences our decision of which stack-up to use.
  • Traces
    Guidelines for trace thickness, width, spacing, depending on power or signalling requirements, example current-handling capability calculations in KiCad.
  • Controlled Impedance Traces
    Brief overview of controlled impedance traces, why they are necessary, and using various methods to calculate required trace widths - depending on stack-up - to control impedance.
  • Vias and Through-Holes
    Determining via properties, pad width, drill sizes, and annular rings, recommended sizing, and guidelines.


Lesson length: 00:21:15

Lesson 11: PCB - Design Rules and Set-Up

Before we can begin with our rough board layout and component placement, we need to set up our PCB in KiCad, as well as to import design rules from our chosen PCB manufacturer.

Lesson Sections:

  • Board Set-Up
    Defining board in KiCad, layer count, stack-up, signal and power layers, and surface treatment.
  • Design Rules
    Walking through design rules available in KiCad, looking at typical PCB manufacturer capabilities, figuring out design rules from capabilities, importing design rules into KiCad.
  • Track and Via Dimensions
    Adding standard track and via dimensions to our predefined settings in KiCad, importing controlled impedance calculations.
  • Miscellaneous Set-Up
    Brief look at KiCad's default custom net class editor, custom rules editor, and violation severity settings.


Lesson length: 00:08:02

Lesson 12: PCB - Layout

We are now ready to begin with the layout of our PCB. Beginning with a very rough placement of the circuitry, we'll hone into the final layout, section-by-section and step-by-step. Throughout, we'll be discussing tips and tricks for properly laying out mixed-signal PCBs that'll make our routing life easier afterwards.

Lesson Sections:

  • Importing Footprints
    Importing the data from our schematics and placing footprints on the blank PCB.
  • Adding Missing 3D Models
    Sometimes links are broken between footprints and their 3D models. Here's how to fix that!
  • Microcontroller
    Laying out the microcontroller, decoupling capacitors and their best placement, surrounding circuitry.
  • Crystal
    Recommended distance and placement to MCU, correct load capacitor and feed resistor placement.
  • Pull-Up Resistors
    Determining priority of components, placing components in the signal path to avoid stubs.
  • Serial Wire Debug
    Determining best placement of connector, ESD protection, and current-limiting resistors w.r.t. the microcontroller.
  • USB
    Connector, ESD protection, filtering and pull-up resistor placement. Which signal order to place components in, preparing for differential routing later on.
  • ADC, DAC, and Analogue Circuitry
    Creating a boundary between digital and analogue sections, sectioning circuitry, component placement for lowest cross-talk, coupling, and noise, filter placement, and analogue circuitry layout.
  • Power Supplies
    LDO regulator layout with bypass capacitor and filtering resistor, switching regulator layout with best practices, proper placement of analogue and digital supplies.
  • Fine-Tuning Layout and Improving Placement
    Starting with 'islands' of components and component groupings, improving the layout step-by-step, and adjusting connector positions.
  • Mechanical
    Determining a board layout after initial component placement, rounding PCB corners, adding standardises mounting holes to the design.


Lesson length: 01:03:40

Lesson 13: PCB - Routing

Having created an initial layout, we are ready to route our PCB. In this lesson, you'll learn best practices and guidelines for mixed-signal PCB routing, as we route all sections of this board together.

Lesson Sections:

  • Layer Designation
    Routing layers, ground plane layers, adding ground planes, hiding/showing layers in KiCad.
  • Routing Guidelines
    Controlled impedance routing, spacing, trace width, via placement, grounding, decoupling capacitors, etc. - all to minimise noise, cross-talk, EMI.
  • Tips and Tricks
    Power puddles and how to best link several, adjacent pads of the same net, ground return path vias for field control, improving routing by changing microcontroller pin-out.
  • Digital
    Controlled impedance, differential USB routing, SPI, crystal.
  • Analogue
    Routing to minimise interference from digital section, analogue routing guidelines.
  • Power Supplies
    Best practices for routing LDO regulators and switching converters. Routing of power traces on signal layers.


Lesson length: 00:49:09

Lesson 14: PCB - Finishing Touches

We need to add some finishing touches to our PCB, including stitching vias and silkscreen.

Lesson Sections:

  • Via Stitching
    Reasons for stitching vias, how to place stitching vias.
  • Silkscreen
    Labelling connectors and pins, indicating component orientations, adding a custom logo.


Lesson length: 00:04:46

Lesson 15: Getting The Product Manufactured

Once we've cleaned up our PCB and added finishing touches, we can prepare the necessary files to order our boards at a PCB manufacturer with assembly.

Lesson Sections:

  • Preparation
    Checking design files, minimum production files required.
  • Production Files
    How to export Gerber and drill files, and how to use KiCad's Gerber viewer to check them.
  • Assembly Files
    How to export the footprint position file (CPL), and bill of materials file (BOM), including how to edit the export scripts in KiCad, and add manufacturer names, and manufacturer part numbers.
  • Example PCB Manufacturers
    Brief look at two PCB manufacturers that offer PCB assembly, checking out the rough ordering process, and how to provide the files.


Lesson length: 00:09:51

Lesson 16: Outro

Congratulations on reaching the end of this mixed-signal hardware design course!

In this final video, I'll show you how to contact me regarding course questions, as well as links to the Phil's Lab YouTube channel and website for more educational engineering content.

Lesson length: 00:01:51

Logo

Phil's Lab © Copyright 2022. All rights reserved.