Balancing Robot: Design, Control, and Programming with STM32

 

Build a self-balancing robot from scratch, mastering STM32 microcontroller programming and robotics topics like PID, LQR, and DC motor control. Get comprehensive guidance on embedded programming, hardware design, and control algorithms. Includes a 1-hour 1:1 session to help with hardware setup or troubleshooting, so you won’t get stuck along the way.

Highly Practical

What you'll learn

 ✔Managing complex projects 

 ✔ Learning STM32 Debugging tools

 ✔ Mastering Embedded STM32 Microcontrollers programming (SPI, Timers, PWM, Interrupts, etc.)

✔DC Motor Control: Theory and Implementation

✔ PID Controller: Theory and Implementation

✔ Working with incremental encoders for position/velocity estimation

✔ Using an IMU sensor (gyroscope, accelerometer, and magnetometer) to compute Euler angles

✔ Linear Quadratic Regulator: Theory and Implementation

✔ RC Joystick Integration

Video Poster Image

Course Content

  1. CH0 - Balancing Robot Course Introduction

    6 lessons
    1. 1 - Welcome to the course!
    2. 2 - Slides used in this Course
    3. 3 - Prerequisites
    4. 4 - Hardware of the course
    5. 5 - How to ask questions and other important remarks
    6. 5 - Source Code
  2. CH1 - DC Motor Control

    8 lessons
    1. 1 - Motor Control Fundamentals: Part 1
    2. 2 - Motor Control Fundamentals: Part 2
    3. 3 - Unveiling the STSPIN240 Motor Driver
    4. 4 - PWM Signal generation using the Timer of the STM32 MCU
    5. 5 - PWM Testing
    6. 6 - STSPIN840 Motor Driver and Custom Hardware
    7. 7 - Motor Driver Library Integration
    8. Rate & review this course
  3. CH2 - STM32 Timer Encoder Mode

    8 lessons
    1. 1 - Incremental encoders theory
    2. 2 - STM32 Timer Encoder CubeMx Configuration
    3. 3 - Timer Encoder Mode Test
    4. 4 - STM32 SWV Configuration
    5. 5 - Timer Update Interrupt
    6. 6 - Timer Overflow demo
    7. 7 - Timer Encoder Library Integration
    8. 8 - Timer Encoder Library Test
  4. CH3 - Proportional-Integral-Derivative (PID) Controller

    5 lessons
    1. 1 - Why do we need PID?
    2. 2 - PID Explanation
    3. 3 - PID Library Integration
    4. 4 - Main File edition for PID Testing
    5. 5 - Tuning a PID Controller
  5. Ch4 - Moving Average Filter

    4 lessons
    1. 1 - Moving Average Filter Introduction
    2. 2 - Library Integration
    3. 3 - Testing the library
    4. 4 - Updating the encoder library
  6. 5 - RC Joystick Integration

    6 lessons
    1. 1 - Introduction to the RC Joystick
    2. 2 - Timers Configuration for capturing input PWM signals
    3. 3 - Adding the callback function to capture interrupts
    4. 4 - Testing the RC Joystick
    5. 5 - Motor Control using the RC Joystick
    6. Rate & review this course
  7. 6 - Tilt Angle estimation

    37 lesson
    1. Introduction to the Attitude estimation
    1. Attitude Estimation Course Excerpt CH1

      1. 2 - STM32 CubeIde Project creation
      2. 3 - Using SWV for printf function
      3. 4 - Using SWV to plot variables
      4. 5 - SPI theory
      5. 6 - SPI Configuration using STM32CubeMx
      6. 7 - SPI wirings
      7. 8 - Reading ‘Who am I’ register
      8. 9 - Sending data through SPI
    2. Attitude Estimation Course Excerpt CH2

      1. 1 - First version of the library
      2. 2 - Testing the library
      3. 3 - How to read the magnetometer?
      4. 4 - Magnetometer update 1
      5. 5 - Magnetometer update 2
      6. 6 - Testing a new version of the library
      7. 7 - DMA Theory
      8. 8 - DMA configuration
    3. Attitude Estimation Course Excerpt CH3

      1. 1 - Removing gyroscope biases
      2. 2 - Magnetometer bias explanation
      3. 3 - Timer Update Interrupts
      4. 4 - Magnetometer bias removal
      5. 5 - Normalization and scaling of IMU data
      6. 6 - ARM MATH Library Installation
      7. 7 - Library Integration
      8. 8 - A notion of frame
      9. 9 - Testing the library
    4. Attitude Estimation Course Excerpt CH4

      1. 1 - Attitude estimation, slides
      2. 2 - A notion of frame in detail
      3. 3 - 2D rotation
      4. 4 - Euler angles and Rotation Matrix
      5. 5 - Using the accelerometer to obtain pitch and Roll angles
      6. 6 - Using the magnetometer to obtain the Yaw angle
      7. 7 - Using the gyroscope to obtain the Euler angles
      8. 8 - Library Integration
      9. 9 - Complementary Filter
      10. 10 - Testing the libraries
    5. Attitude Estimation, final library integration

      1. 2 - Tilt angle estimation: Final library integration
  8. 7 - Linear Quadratic Regulator

    7 lessons
    1. 1 - State-Space Design
    2. 2 - Technical Article Introduction
    3. 3 - Matlab Script
    4. 4 - Library Integration and LQR Implementation
    5. 5 - Testing
    6. 6 - Sign Explanation
    7. 7 - Rotation Problem
  9. 8 - Rotational Drift and Final Joystick Integration

    2 lessons
    1. 1 - The rotational drift and how to eliminate it
    2. 2 - Controlling the robot by joystick

Reviews

Join Today and Save 50% – Time Left

00

DAYS

00

HOURS

00

MINS

00

SECS

Lifetime

$40

 $80

✔Flexible payment plans

✔Source Code available 

✔Lifetime access

✔ 81 lessons

✔ 10 hours of video content

✔ PDF Materials

ENROLL NOW

Flexible Payment Plans

Choose to pay once for lifetime access or spread the cost over several easy monthly payments — all shown at checkout.

 

Cancelling & 14-day Money-back guarantee

 I'm sure you'll enjoy this course! But if it doesn't meet your expectations, no problem—you can get a full refund within 14 days and cancel anytime, no questions asked.

Ask Questions Anytime

Whenever you're stuck, ask in the comments tab — I personally reply within 12 hours to guide you forward, like a mentor throughout your STM32 journey.

Target audience

Built For Engineers Like You

➜ Who wants to understand how robots are generally made

➜ Who wants to implement control systems algorithms in the real world

➜ Embedded developers ready to dive deep into flight controller firmware using STM32.  

➜ Robotics enthusiasts who love experimenting with sensors, PID control, and motor drivers. 

➜ Makers who want to build a robot that works *because of their own code*, not prebuilt libraries.  

➜ Researchers or educators exploring control systems and UAV dynamics in practice.

 

Requirments

WHAT you'll need

 ✔ Hardware for the balancing robot: frame, motors, wheels, etc. (we will discuss in the course)

✔ STM32 MCU

✔ Basic knowledge of programming STM32 MCUs

✔ Motivation

More Details

Frequently-asked questions