Uploaded June 2020 | Updated November 2026, 3 hours ago
Mathematical modelling of a real-world, dynamical system (balanced aeropendulum) and actuators. From moment balances, to differential equations, to transfer functions, and more! Includes practical aspects with regards to control system design, such as sensor and DAC models.
If you're enjoying my content, please consider becoming a patron: patreon.com/phils94
This series covers all aspects of control system design, all the way from theory to the final, real-world implementation. This includes: mathematical modelling of dynamic systems, parameter estimation, theoretical controller design with practical considerations, simulation in software (Matlab and custom simulator written in Unity), and implementation in the real world (mechanical, electrical, and software). ID: QIBvbJtYjWuHiTG0uCoK
Mathematical modelling of a real-world, dynamical system (balanced aeropendulum) and actuators. From moment balances, to differential equations, to transfer functions, and more! Includes practical aspects with regards to control system design, such as sensor and DAC models.
If you're enjoying my content, please consider becoming a patron: patreon.com/phils94
This series covers all aspects of control system design, all the way from theory to the final, real-world implementation. This includes: mathematical modelling of dynamic systems, parameter estimation, theoretical controller design with practical considerations, simulation in software (Matlab and custom simulator written in Unity), and implementation in the real world (mechanical, electrical, and software). ID: QIBvbJtYjWuHiTG0uCoK
![How To Write A Driver (Audio CODEC & I2C) - Phils Lab #142
Audio CODEC basics and configuration via I2C in C using an STM32 microcontroller. PCBs by PCBWay https://www.pcbway.com (AD: This video includes a paid promotion for PCBWay.)
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[GIT]
https://www.github.com/pms67
[SOCIAL]
https://www.instagram.com/philslabyt
[LINKS]
STM32 + I2S Video: https://www.youtube.com/watch?v=zlGSxZGwj-E
CS4270 Datasheet: https://statics.cirrus.com/pubs/proDatasheet/CS4270_DS686F2.pdf
Linux CS4270 Driver: https://github.com/torvalds/linux/blob/master/sound/soc/codecs/cs4270.c
DSP Playlist: https://www.youtube.com/watch?v=MrbffdimDts&list=PLXSyc11qLa1ZCn0JCnaaXOWN6Z46rK9jd
[TIMESTAMPS]
00:00 Intro & Hardware Overview
02:46 PCBWay (Ad)
03:17 I2S Signals
05:47 Master/Slave Mode
06:34 Clock Ratios
06:55 CODEC Config Basics
08:56 Hardware Connections
09:24 Typical Config Steps
11:53 Datasheet Walkthrough
16:34 MCU I2S/I2C Config
17:23 Driver Header
19:07 Driver Source (Reset, Register Read/Write)
19:59 Driver Source (Power Settings, Device ID)
24:02 Driver Source (CODEC Config)
29:21 Outro How To Write A Driver (Audio CODEC & I2C) - Phils Lab #142](https://i.ytimg.com/vi/ysORoOeIzHY/mqdefault.jpg)
![ESP32 + PCB Antenna Hardware Design Tutorial - Phils Lab #90
How to design custom hardware using ESP32 MCUs (ESP32-C3, NOT pre-made modules!) and PCB antennas (inverted F, in this case). PCBs by PCBWay https://www.pcbway.com
Showing examples and real, working hardware (WiFi scan test), a full schematic walkthrough, and a PCB design walkthrough. Final test using Arduino IDE & ESP32 expansion.
Many more ESP32 firmware & hardware tutorial videos to come!
(AD: This video includes a paid promotion for PCBWay and Altium).
[SUPPORT]
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
Patreon: https://www.patreon.com/phils94
Mixed-signal hardware design course: https://phils-lab-shop.fedevel.education
Advanced Hardware Design Course Survey
https://forms.gle/X4jwvtZeJ1jTXh7r9
[GIT]
https://github.com/pms67/ESP32-USB-Dongle
[LINKS]
Instagram: https://instagram.com/philslabyt
ESP32 Hardware Design Guidelines: https://www.espressif.com/sites/default/files/documentation/esp32_hardware_design_guidelines_en.pdf
ESP32-C3 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
TI PCB Antenna Application Note: https://www.ti.com/lit/an/swra117d/swra117d.pdf
[TIMESTAMPS]
00:00 Introduction
00:29 Altium Designer Free Trial (Ad)
00:49 PCBWay (Ad)
01:19 ESP32-C3 and Hardware Overview
04:28 ESP32 Hardware Design Guidelines
06:14 Schematic - ESP32-C3 Power Pins
07:26 Schematic - Crystal
08:50 Schematic - Chip Enabled (Reset)
09:16 Schematic - SPI FLASH
10:21 Schematic - USB and Power
12:29 Schematic - UART, Sensor
13:26 Schematic - Bootmode Select
14:10 Schematic - PCB Antenna
17:43 Schematic - RF Matching Network
22:15 PCB - Overview & Stack-Up
23:47 PCB - Controlled Impedance
24:10 PCB - General Guidelines, Decoupling
25:54 PCB - Antenna and Matching Network
29:22 WiFi Test (Arduino IDE)
33:37 Outro ESP32 + PCB Antenna Hardware Design Tutorial - Phils Lab #90](https://i.ytimg.com/vi/yxU_Kw2de08/mqdefault.jpg)
![PID Controller Implementation in Software - Phils Lab #6
Source code available here: https://github.com/pms67/PID
How to implement a PID controller in software using C, discussing theory and practical considerations. Demonstration of PID controller code using a custom flight simulator.
If youre enjoying my content, please consider becoming a patron: https://www.patreon.com/phils94
[NOTE] Something I forgot to mention in the video! Note on derivative-on-measurement: Since the error signal effectively going into the differentiator does not depend on the setpoint: e[n] = 0 - measurement, and therefore (e[n] - e[n - 1]) = (0 - measurement) - (0 - prevMeasurement) = -Kd * (measurement - prevMeasurement). Note the minus sign compared to derivative-on-error!
Ive made the change in the Git repo - before you would have had to use a negative Kd gain to get the same result. Now you can, as normal with derivative-on-error, use a positive Kd gain as usual.
Additional note: The derivative low-pass filter can be controlled by the constant tau, which is the time constant of the filter (-3dB frequency in Hz, fc = 1 / (2*pi*tau)). A larger value of tau means the signal is filtered more heavily. As tau approaches zero, the differentiator approaches a pure differentiator with no filtering.
[TIMESTAMPS]
00:00 Introduction
00:39 Control system basics
02:40 PID representation in continuous domain
04:57 Converting from the continuous to the discrete domain
06:11 PID controller difference equation
07:35 Practical considerations
10:48 Basic software structure
11:53 Implementation in C
18:46 Example: Flight simulator using PID controller code
ID: QIBvbJtYjWuHiTG0uCoK PID Controller Implementation in Software - Phils Lab #6](https://i.ytimg.com/vi/zOByx3Izf5U/mqdefault.jpg)
![PCB Design Rules 101 - Phils Lab #170
Basics of PCB design rules and constraints, examining important rules and translating manufacturing constraints to rules, custom rules (net classes, priorities), and rooms.
Get Your $30 Coupon! Small Size 6-Layer PCBs Starting at $2: https://jlcpcb.com/6-layer-pcb?from=PhilsLab (Ad)
Altium Develop: http://altium.com/yt/philslab (Ad)
[SUPPORT]
Hardware design courses: https://phils-lab-shop.fedevel.education
Course content: https://www.phils-lab.net/courses
Patreon: https://www.patreon.com/phils94
[LINKS]
TinyUSB: https://docs.tinyusb.org/en/latest/index.html
TinyUSB Git: https://github.com/hathach/tinyusb
TinyUSB CDC Video: https://youtu.be/XgsnJdY8LsY
STM32 ADC DMA TIM Video: https://youtu.be/_K3GvQkyarg
USB MIDI Spec:https://www.usb.org/sites/default/files/midi10.pdf
[TIMESTAMPS]
00:00 Intro
04:19 JLCPCB (Ad)
05:34 Altium Develop (Ad)
06:29 Stack-Up and Controlled Impedance
11:03 Design Rule Basics
13:29 Clearance & Width
20:44 Solder Mask Expansion
24:51 Polygon Connect
26:35 More Important Rules
29:59 Custom Rules & Priorities
32:36 Net Class Rules
35:44 Rooms (Area-/Location-Based Rules)
38:43 Design Rules Check (DRC)
40:56 Outro PCB Design Rules 101 - Phils Lab #170](https://i.ytimg.com/vi/zeH3WbMWvdg/mqdefault.jpg)
![(Sponsored) STM32 I2S ADC DMA & Double Buffering - DSP with STM32 #4 - Phils Lab #55
Mixed-signal hardware design course: https://phils-lab-shop.fedevel.education
How to set up firmware for I2S with DMA, ADCs with DMA triggered at a fixed sample rate by timers, basic driver for the audio codec, and how to efficiently process audio data using double buffering. Pre-cursor to previous videos on real-time digital processing (DSP) of audio data using an STM32 microcontroller in C on custom audio-processing hardware.
(AD: This video includes a paid promotion for JLCPCB and Altium.)
[SUPPORT]
Free trial of Altium Designer: https://www.altium.com/yt/philslab (AD)
PCBA from $0 (Free Setup, Free Stencil): https://jlcpcb.com/RHS (AD)
Patreon: https://www.patreon.com/phils94
[LINKS]
DSP Playlist: https://www.youtube.com/playlist?list=PLXSyc11qLa1ZCn0JCnaaXOWN6Z46rK9jd
STM32 Playlist: https://www.youtube.com/playlist?list=PLXSyc11qLa1a4Tqbz228dPZfMrs-KRpzA
First DSP Video: https://youtu.be/VDhmVrbSpqA
GitHub: https://github.com/pms67
Double buffering article: https://www.eetimes.com/fundamentals-of-embedded-audio-part-3/
[TIMESTAMPS]
00:00 Introduction
01:31 Hardware Overview
02:23 JLCPCB (Ad)
02:49 Altium Designer Free Trial (Ad)
03:15 STM32CubeIDE Project, Pinout, and Clock
07:06 I2S and DMA Set-Up
11:35 Double Buffering
12:31 Implementation (I2S + DMA, Double Buffering)
19:47 Codec Set-Up (I2C)
23:51 ADC + DMA + Timer
29:30 Outro
ID: QIBvbJtYjWuHiTG0uCoK (Sponsored) STM32 I2S ADC DMA & Double Buffering - DSP with STM32 #4 - Phils Lab #55](https://i.ytimg.com/vi/zlGSxZGwj-E/mqdefault.jpg)