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?
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"...
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.
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
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
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.
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.