Go Down

Topic: PWM on 4 motors with L293d (Read 1 time) previous topic - next topic

SimpleThings

Hello,

arduino uno has 6 PWM pins and I want to control 4x DC motors with 2x L293ds.

So there are 8 pins that go to the input of the L293D from the arduino , 2 for each motor,
that leaves 2 pins not inserted into PWM pins , one might say that I could put those other two into digital pins and making PWM via those 2 pins , but is there any solution for this since I want to change directions  and making vehicle turn left and right by changing polarity of the voltage to the motors.

MarkT

4 pwm pins to the enables, 8 pins to control direction/on/off
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SimpleThings

4 pwm pins to the enables, 8 pins to control direction/on/off
Sorry but could you be more specific I didn't understand you.
Yes I need 8 pins since there are 4 enable pins on the every L293d but if I put only one PWM pin to each enable pin for every single motor I can PWM only one direction of the vehicle since left enable pins are connected to the digital pins.

MarkT

#3
Aug 10, 2016, 08:36 pm Last Edit: Aug 10, 2016, 08:36 pm by MarkT
PWM to the enable pins, there is one enable pin per H-bridge.  This is how most everyone does it,
enable enables everything so it works whatever direction.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

SimpleThings

L293D has 2 enable pins per H-bridge so If I set one PWM pin to LOW to change the direction of the motor how am I supposed to give PWM signal to the chip when PWM pin is set to LOW , or am I totally wrong?

outsider

#5
Aug 11, 2016, 03:49 pm Last Edit: Aug 11, 2016, 04:01 pm by outsider
The PWM (speed) signal is fed to the EN pin, the 2 other pins are for direction and stop mode. 3 pins per motor.
http://www.ti.com/lit/ds/symlink/l293d.pdf
Note: Each EN pin serves 2 HALF bridges.

Go Up