Go Down

Topic: Diff. B/w PWM and DIR of motor shield board (Read 816 times) previous topic - next topic

MohitJindal

Hi,
I want to know the difference between pwm and direction pin of motor driver board. I want to connect 10amp motor driver board with atmega 8a 32pin. Atmega 8a has 3 pins for PWM.

dxw00d

PWM sets the speed. The direction pin sets the polarity of the motor output and is usually connected to a digital output.

MohitJindal

Thanks. But there is only 1 direction pin in motor driver board. Motor can rotate in 2 directions. How only 1 pin manage this ?

dxw00d

Don't you have any documentation for the motor driver board? Generally, you set the direction pin low for one direction and high for the other.

MohitJindal

Yes I have the datasheet. It says:-

GND - connect to GND on controlling board
DIR - Pulled down to GND Forward by default and Backward when 5V (logic high)
PWM - Pulse Widht Modulation input to control speed of motor (recommended freq 20Hz to
400Hz)
BRK - breaking input to halt the motor in operations when 5V (logic high)
5V - regulated 5V output from motor driver board (maximum 50mA supply)

MohitJindal

How I can set the Direction of motor with Values HIGH and LOW in C programming ? :(

dxw00d

http://arduino.cc/en/Reference/DigitalWrite

Try working through some examples on the tutorial pages.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy