ESP32 LED & Motor Driver

An ESP32 based controller that can drive any kind of LED strip, or motor. Includes microSD, USB-UART, and large voltage range input.

Public Chat
Similar projects worth following
This project started as a Wifi and bluetooth controller that could drive any type of LED strip. LED strip controllers are everywhere, but I wanted a controller that I could customize without using a breadboard. As the project progressed, I wanted this board to be able to drive motors as well. I added a microSD card for file storage, and a USB-UART for debug. Here are the main features:

ESP32 based using MicroPython
Drives Any type of LED strip - RGB, RGBW, WS2812, APA102, Neopixel, etc
Wide input power range: 4.5V to 30V DC.
Input power via Barrel Jack 2.10mm ID (0.083"), 5.50mm OD or Terminal Block.
Reverse polarity input power protection.
Drives 1 stepper motor in full H-bridge configuration.
Drives 2 bipolar DC motors in half H-bridge configuration.
Drives 4 Unipolar DC Motors.
Additional outputs for servo motors available.
Current sense for motor/LED drivers.
8A - 12A per output.
Outputs on terminal blocks

Power: 4.5V-30V DC power can be applied either through the barrel jack or the terminal block (not both). An on-board regulator is used to create the 3.3V necessary for the ESP32, MicroUSB, and USB-UART.  The power input on J6 and J5 is equal to the power output on J7.  Use a power supply that is designed to drive what is connected on the output.  For example, if driving a 12V RGB LED strip, use a 12V power supply.  

To use the board, connect whatever you're controlling (LED, motor, etc) to the terminal blocks (J3, J4, J7), then apply power to J5 or J6.  The 'connection notes' section provides more in depth instruction by device.


J6 Barrel Jack Input Power

  • Pin:  +Vin 4.5V to 30V
  • Shield:  Ground

J5 Input Power Terminal Block

  • 1:  +Vin
  • 2:  +Vin
  • 3:  Ground
  • 4:  Ground

J7 Output Power Terminal Block

  • 1:  +Vout
  • 2:  +Vout
  • 3:  Ground
  • 4:  Ground

J3 High Current Motor and RGB, RGBW LED Drive Terminal Block

  • 1:  Drive1Out1
  • 2:  Drive1Out2
  • 3:  Drive2Out1
  • 4:  Drive2Out2

J4 SPI, and PWM Drive Signals for Servo Motor, individually addressable LED's Terminal Block

  • 1:  GPIO_2 (ESP32 IO2)
  • 2:  GPIO_3 (ESP32 IO5) 
  • 3:  LED_DATA (ESP IO19)
  • 4:  LED_CLK (ESP IO18)

Test Point Header Pins

  • TP1:  TDI_SD_MISO - Primarily used to SD card, but can be used for JTAG
  • TP2:  TDO_SD_CD - Primarily used to SD card, but can be used for JTAG
  • TP3:  TMS_SD_CLK - Primarily used to SD card, but can be used for JTAG
  • TP4:  TCK_SD_MOSI - Primarily used to SD card, but can be used for JTAG
  • TP5:  ESP32 Enable.  Short to GND for ESP32 reset
  • TP6:  GND
  • TP7:  IO17
  • TP8:  GPIO_0 - ESP32 IO0
  • TP9:  ESP32 IO35
  • TP10:  ESP32 SENSOR_VP
  • TP11:  ESP32 SENSOR_VN
  • TP12:  +Vout
  • TP13:  +Vout
  • TP14:  +Vout
  • TP17:  GND
  • TP18:  GND
  • TP19:  GND
  • USBPWR_TP:  USB Power 

Note:  TP2, TP7, TP8 are arranged on the PCB with TP12-TP14, and TP17-TP19 to be compatible with servo motor connections.


Connection Notes:  Overview of connections for various devices

Individually addressable LED's - WS2812, NeoPixel, etc.

  • J7-1:  LED Power
  • J7-4:  LED Ground
  • J4-3:  LED Data

Individually Addressable LED's - APA102, SK9822, DotStar, etc.

  • J7-1:  LED Power
  • J7-4:  LED Ground
  • J4-3:  LED Data
  • J4-4:  LED Clock

J4-3, and J4-4 are connected to the ESP32 SPI bus.  This provides the highest speed possible.  Additional LED strips can be connected using lower speed GPIO pins.  

Low speed GPIO connection example:

  • J7-2:  LED Power
  • J7-3:  LED Ground
  • J4-1:  LED Data
  • J4-2:  LED Clock

RGB Strips

  • J7-1:  LED Power
  • J3-1:  R
  • J3-2: G
  • J3-3: B

RGBW Strips

  • J7-1:  LED Power
  • J3-1:  R
  • J3-2: G
  • J3-3: B
  • J3-4: W

Bipolar DC Stepper Motor

  • J3-1:  Coil1+
  • J3-2:  Coil1-
  • J3-3:  Coil2+
  • J3-4:  Coil2-

Unipolar DC Stepper Motor 5 Wire

  • J3-1:  Coil 1
  • J3-2:  Coil 2
  • J3-3:  Coil 3
  • J3-4:  Coil 4
  • J7-3:  Ground

Unipolar DC Stepper Motor 6 Wire

  • J3-1:  Coil 1
  • J3-2:  Coil 2
  • J3-3:  Coil 3
  • J3-4:  Coil 4
  • J7-3:  Ground
  • J7-4:  Ground

DC Motor Unidirectional  :  Connect up to 4

  • Use J3-1 through J3-4 for (+) wire
  • Use J7-3 and J7-4 for (-) wire

DC Bidirectional Motor  :  Connect up to 2

  • J3-1: Motor 1 (+) 
  • J3-2: Motor 1 (-)
  • J3-3: Motor 2 (+) 
  • J3-4: Motor 2 (-)

Servo Motors

  • J7-1 Servo 1 Power +
  • J7-3 Servo 1 Power -
  • J4-1 Servo 1 Control
  • J7-2 Servo 2 Power +
  • J7-4 Servo 2 Power -
  • J4-12 Servo 2 Control

Additional Servos can be connected on the header pins.  Using servos with analog feedback will be tested during the course of project development.


Driving LEDs and a 12V motor

quicktime - 10.52 MB - 05/03/2019 at 00:01


Adobe Portable Document Format - 363.11 kB - 03/31/2019 at 23:50


  • Driving RGB strips and a motor simultaneously.

    Bill Eckman05/03/2019 at 00:31 0 comments

  • 5-2-19 Status

    Bill Eckman05/03/2019 at 00:05 0 comments

    So far so good with the debugging. I’ve verified that the board can drive Neopixel dotstars, RGB, RGBW leds and motors. I also verified that the SD can be used in MicroPython.

  • April 23rd Status

    Bill Eckman04/23/2019 at 10:11 0 comments

    The board is assembled.  No major issues.  There are three minor issues that will be fixed in the next revision of the PCB.

    • C17,18,19 are specified as 0805 but have a larger package size.  This should be fixed on the next revision, or larger parts specified on the BOM.
    • R31 Silkscreen is hidden by TP1.  This should be fixed on the next revision.
    • The silkscreen for R35 and R36 is swapped.  This should be fixed on the next revision.

    I powered the board from a 15V power supply.  No issues with power were found.

    I loaded Micropython on the ESP32 over the USB port.  No issues were found.  I successfully setup the ESP to connect to the network over wifi.  I will continue development and testing.

  • March 31 2019 Project Status

    Bill Eckman04/01/2019 at 02:25 0 comments

    All parts and PCB's have been ordered.  I'll be assembling boards soon.  I'd like to develop an open source web based interface for controlling LED strips, and I'm looking for contributors.  The web UI is for non-coders who want a higher level of programmability than is currently available on other controllers.  If you're interested, let me know.  I plan on putting this on Tindie when it's ready.  In addition to the standard color and pattern controls, it would be cool if the web interface had advanced features like:

    • Pattern builder - allows the user to build, play, and save patterns without coding.
    • LED matrix output - build and play images to a LED matrix 
    • Integrated POV (persistence of vision) controller using the hardware to drive motor and LED's simultaneously.
    • Motor driver interface for driving motors from other applications via web sockets.

View all 4 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates