PWM Motor Control with ESP

0:31

Below is a summary of the recommended schematic changes for driving two motors with your two Q1 transistors and protecting the circuit:

For Each Motor Drive (using Q1 and Q2):
  1. Gate Resistors:
    • Add a series resistor (around 100Ω220Ω) between a PWM-capable pin of the U1 and the gate of each transistor ([Q1] for Motor 1 and [Q2] for Motor 2).
    • These resistors help limit the gate charging current and prevent oscillations.
  2. Motor Components:
    • Include a generic DC motor symbol for each motor (e.g., DC Motor) – label them as [M1] and [M2].
    • Connect the positive terminal of each motor to your motor supply voltage and the other terminal to the drain of the corresponding transistor.
  3. Flyback Diodes:
    • Add a flyback diode across each motor to protect the transistor from voltage spikes when the motor is switched off.
    • Use a diode such as 1N4007 and connect it such that the cathode is tied to the motor supply (positive side) and the anode is tied to the transistor’s drain (motor side).
    • Label these diodes as [D1] for Motor 1 and [D2] for Motor 2.
  4. Common Ground:
    • Ensure that the sources of both transistors and the ESP32’s ground are connected to a common Ground.

Would you like to apply these schematic update suggestions to your project?
Apply schematic update
Update with protections
Implement motor protections
Proceed with changes
389 days

To get started, talk to Flux or create a New Document.

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    No assets added.

    Single Violet Dejarik

    Single Violet Dejarik thumbnail
    Welcome to your new project. Imagine what you can build here.

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Arrow

    $0.79–$1.75

    Digi-Key

    $2.00–$3.46

    LCSC

    $0.49–$1.37

    Mouser

    $2.90

    Verical

    $0.45–$1.89

    Controls