How to program motors on esp32s3 using DRV8833 motor driver board?

Hi all, I am here today to request help on how to program motors for movement, of any kind, on an esp32s3. I am planning to make a compact microdrone from scratch, and I can't figure out how to get the motors working. I am utilizing a DRV8833 Motor driver board and mini 3V DCmotors, both images are uploaded below. I connected the GPIO of the esp32s3 to the corresponding IN ports of the motor driver board (i.e. GPIO 1 to IN1). All I want to do is get the motors to rotate in any direction, I just want them to move. Any help?

The motors are connected to OUT1, OUT2, OUT3, and OUT4

The DRV8833 is a dual H-Bridge-Driver-Board. This means usually you connect only two motors to a dual-H-Bridge.

Like shown in this schematic from the DRV8833 Datasheet.

A H-Bridge enables to run a motor clockwise and counterclockwise.
In a quadrocopter the motors ussually run in one direction.
So It might be possible to connect two motors between output and Vcc
and two motors between Out and ground.

by the way
If this is your first electronics and programming project you have chosen a quite challenging project.

It is non trivial to balance a flying drone using accelormeters and gyroscopes.

best regards Stefan

Thank you for the response. As per your advice, I purchased an MPU-6050 as my accelerometer and gyroscope. For this specific question, I was more requesting how to code the motors in the first place. Not getting it to fly yet, but just moving the motors in general. For my motor driver, I connected my esp32s3 through the IN1, IN2, IN3, and IN4 ports connecting to the GPIO, and connected the motors through the OUT1, OUT2, OUT3, and OUT4 parts. I don't know quite what pins to put to use the digital write function. After I get this working, ill figure out how to modulate said movement to increase and decrease speed.

What advice? In this thread nobody advised using a MPU6050.

So to which IO-pins-numbers did you

????

best regards Stefan

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.