I wonder, if I can control the speed a motor by applying PWM on VCC pin at H bridge, not at control pins. I try to do this with an Arduino microcontroller but the output will always be 5 volts!
closed as unclear what you're asking by Olin Lathrop, Joe Hass, Leon Heller, Matt Young, PeterJ Jan 11 '14 at 0:25
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
H-bridge usually has 3 pins for every motor. 2 pins are used for control, the third is normally labeled "E" which stands for Enable.
If you want to control the direction of rotation all you have to do is change the logical inputs to the 2 control pins. While on the other hand to control the speed of rotation you have to connect the Enable pin to one of the (PWM) pis on the arduino.
The Top left and bottom right switches are connected together for 1 control pin. While the top right and bottom left switches are connected together for the second control pin.
As to control the speed, look at the following table:
Now If you want to control the speed, all you have to do is connect your Enable pin to one of the (PWM) pins on the arduino.
In the arduino IDE write the following:
Subs "PINNUM" by the pin number by which you've connected your Enable pin.
As for "***" write a number between 0-255
Note 255 is equivalent to applying 5v directly which will result in the max speed. Note: 0 is equivalent to applying 0v directly which will result as stated earlier in switching the motor off.
Any value in between will change the speed.