Pages: [1]   Go Down
Author Topic: Diff. B/w PWM and DIR of motor shield board  (Read 719 times)
0 Members and 1 Guest are viewing this topic.
India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

India
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How I can set the Direction of motor with Values HIGH and LOW in C programming ? smiley-sad
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Try working through some examples on the tutorial pages.
Logged

Pages: [1]   Go Up
Jump to: