Motor Control with PWM in C | Embedded System Project Series #21
Artful Bytes Artful Bytes
10.9K subscribers
3,875 views
96

 Published On Apr 18, 2023

I write C code to control four brushed DC motors using two motor drivers (TB6612FNG) and a microcontroller (MSP430). Each motor driver requires two control inputs and one pulse-width modulation (PWM) input. I create three abstraction layers: a PWM driver at the bottom, a motor driver in the middle, and a simplified drive interface at the top. 21 videos in and something is finally moving.

0:00 What
2:19 Motor circuit
2:45 PWM driver
26:00 Multimeter/Oscilloscope (DEMO)
27:48 Commit 1
29:15 Motor driver
36:30 Motor spinning (DEMO)
37:30 Commit 2
39:30 Drive interface
50:27 Remote control (DEMO)
51:30 Commit 3
52:00 Assert stop motors
55:42 Assert triggers! (DEMO)
55:56 Commit 4
56:38 Last words

#embeddedsystems #cprogramming #microcontroller

🌍 Related links
https://github.com/artfulbytes/nsumo_...

🌍 Find me here
GitHub - https://github.com/artfulbytes
Website - https://www.artfulbytes.com

πŸ‘¨β€πŸ’» About me
Hi and welcome. I'm Niklas, an embedded systems engineer from Sweden. On this channel, I make practical videos about embedded systems or, in general terms, about building and programming hardware.

show more

Share/Embed