Can I controll DRV8833PWP over PCA9685PW?

have put together schematics for a flight / marine computer controlled via ESP32, but due to GPIO pin shortage, I came up with the idea of using PCA9685PW for extending GPIO pins.

My question is: Can I still control the DDRV8833PWP pins - BIN1 BIN2, AIN1 and AIN2 via those(on the picture) pins from PCA9685W?

Yes, sounds like a good solution.

What I can't figure out is what the object on the right side of your schematic is supposed to be. It's not labelled and from your description I think you are saying that is the DDRV8833PW. But that chip has no pins called "STEP" or "DIR"...

1 Like

Hi, thank you for your reply. Yes, that's correct, I have also used two TMC2208 - this explains the STEP and DIR pins.

PINS: DIR_1, STEP_1 - 1st TMC2208
PINS: S1,S2,S3,S4 - Servo Signal Pins
PINS: BIN1,BIN2,AIN1,AIN2 - 1 DRV8833PWP
PINS: DIR_2, STEP_2 - 2nd TMC2208

Best regards

I foresee a problem.

Servo motors need a signal with a frequency of around 50Hz.

For PWM control of dc motors, you want a much higher frequency, ideally 15KHz+, above human hearing range, otherwise they will make some loud and annoying noises.

PCA9685P can be used for either purpose because it's internal oscillator can be adjusted in software to give the appropriate frequency.

Problem is, all 16 ports have to use the same frequency, so you can't mix servos and PWM controlled DC motors on the same chip/board.

Fortunately you can use separate chips/boards! PCA9685P boards can have one of several different i²c addresses configured by connecting jumper pads, so you can attach 2 or more to the same Arduino, one for servos and another for PWM motor control.

1 Like

Thank you very much for this valuable foreseen <3

Some more clarification on the PCB:

DRV8833 control 2 small dc motors on/off and the direction left or right therefore I will need 1's and 0's instead of PWM.

The plan now is to put extra PCA9685P for the 4 servos and one for the DRV8833 - 2 DC motors and 2 TMC2208 2 stepper.

Does this sound plausible?

So far: Added the second PCA9685P and the current pinout is looking like this:


DIR1-STP1 - DIR2 & STP2 - controlled via ESP32 pins
S1, S2, S3 & S4 are controlled via U7 PCA9685P
BIN1, BIN2, AIN2 & AIN1 are controlled via U9 second PCA9685P.

Oh, I didn't expect that. I assumed you wanted to control the DRV8833 with a PWM chip because you needed PWM!

If all you want is a simple digital signal, the PCA9685P can do that by setting a pin's duty cycle to 0 for LOW and 4095 or whatever for HIGH. In that case, the PWM frequency is irrelevant, and you can use the same PCA9685P for the servos and the DC motor drivers. The problem I foresaw doesn't exist after all!

But another problem might come if you try to use PCA9685P to control the stepper motors. I²c is quite slow, and may limit the maximum speed you can achieve with the stepper motor.

Designing PCBs can be fun, but you should not order any boards from your design until you have prototyped and tested the circuit thoroughly. This normally involves building your prototype circuit on breadboard, stripboard or similar.

Well, I have added it already and by this, I think I maid have added the future of speed controlling my DC motors :smiley:

The Stepper motors are for precision manoeuvring (wing flaps, tail flaps) no need for a high-speed rotation just precision.

Regarding the PCB prototyping, I have learned my lesson the hard way multiple times, ordering 5PCB at the time only to realise something is not right :smiley:

I always do my breadboard prototyping and really love it but the problem is I keep changing stuff on the way of designing the PCB, like changing the microcontroller (major changes)

That is exactly what prototyping is for. By the time you are ready to design a PCB, the choice of components should be finalized. Sounds as though you have been rushing the prototype stage and designing PCBs before you have made your final decisions.

That sounds about the right, due to lack of knowledge it affects my pocket :frowning:
But hey we learn our lesson sometime :slight_smile:

Hi,
Sorry but can you draw a connected schematic, rather than a net schematic which is intended for PCB layout.

A connected schematic shows all wires so trouble shooting is simplified.

With a net schematic, you have to do a search a word to look for all connections to one component, with a wired/connected schematic all the wires are drawn to show all connections to one component.
A connected circuit diag is easier for someone who has not seen your project, to follow the connections and troubleshoot.

Supply and gnd connections can be net names but signal wires are drawn.
Please include ALL hardware, no just connectors.

In your original post all I can see is the controller and no other components and how they are connected to each other, like the two DRV's.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

1 Like

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