Completed Schematic with USB-C PD, Motor Driver, and an SSD1306 OLED Display
Overview:
This project uses an ESP32 Microcontroller to control the
vibrational speed of a brushed motor. It supports a SSD1306 OLED
screen to display the one of the 3 set speeds, and a button to change
between said speeds.
Features:
ESP32-S3-WROOM-1 microcontroller
USB-C Power Delivery controlled by microcontroller (5V)
Decoupling capacitors for high voltage, overcurrent, and reverse polarity protection
I2C protocol for an SSD1306 OLED screen support
A push switch/button to regulate motor speed
Motor Driver to translate the PWM given by the ESP32
Completed PCB Layout
3D View
Top View
Bottom View
BOM
Assembled PCB
Project Flow:
Send 5V through USB-C, which is dropped to 3.3V in LDO
LDO connects to ESP32, which sends PWM into motor driver
Driver is connected to the brushed motor, with 5V powering it
Adjust speeds with a switch, sending speed data onto the display (Programmed via ESP32)
Key Takeaways + What We Learned:
Need to keep thermals in mind when routing the PCB
Use surface-mount passives instead of through-hole to save space
Improve proximity of buttons to other parts (accidentally melted some buttons while soldering nearby parts)
Label everything to keep everything organized
Ensure part compatibility