I use Arduino Micro and genuine Motor shield board to run a small DC motor.
Micro is supplied via USB and motor shield uses its own external 12V power supply.
Only one DC motor is connected to Motor shield board -> Channel B
If I want to change the direction of the motor rotation I need to change levels of both DIR inputs, DIR A and DIR B, which seems wrong. I expected that each motor output channel only uses its dedicated DIR input - which can be either LOW (eg. FWD) or HIGH (e.g. REV).
Instead, I need to change both at the same time in order that I change rotation of the motor:
DIR A and DIR B -> [HIGH,LOW] or [LOW,HIGH]
Before I write and append more info and details, is anyone familiar with this problem?
I would expect that since there are two motor channels, each motor uses only one DIR pin.
Otherwise, if two motors are connected and controled, how would I be able to change directions of both motors independently...
I would expect that since there are two motor channels, each motor uses only one DIR pin.
Otherwise, if two motors are connected and controled, how would I be able to change directions of both motors independently...
I don't understand the question. There are two direction pins. Each pin is independent of the other. Why are you not able to make one pin high and one pin low?
Paul
Yes, there are two dir pins, each for its dedicated motor channel: DIR A and DIR B
E.g.: If I connect only motor to channel B and I use only DIR B input I cannot control direction of the motor.
So if I set pin DIR B to LOW it does not have any effect. Only if I use DIR B -> HIGH, motor rotates. If I would use DIR B -> LOW it should also rotate motor, just in another direction.
From my understanding of the schematic, only dedicated channel DIR pin is need to control a direction of said channel motor. You should not need two in combination.
nacman:
Yes, there are two dir pins, each for its dedicated motor channel: DIR A and DIR B
E.g.: If I connect only motor to channel B and I use only DIR B input I cannot control direction of the motor.
So if I set pin DIR B to LOW it does not have any effect. Only if I use DIR B -> HIGH, motor rotates. If I would use DIR B -> LOW it should also rotate motor, just in another direction.
From my understanding of the schematic, only dedicated channel DIR pin is need to control a direction of said channel motor. You should not need two in combination.
The design uses an exclusive OR chip and what you are see happening is the correct conclusion. Apparently the old design was to control two motors driving wheels on two sides of a model vehicle. One motor turning one way the the opposite motor turning the other way.
An old Arduino thread also addresses the problem.
How you you wanting to use the motors?
Paul.
Meaning, since DIR_B and DIR_B# are used as direction control inputs of the B motor channel (inputs IN3 and IN4 of the L298), and if BRAKE_B signal is always low, this means that I should be able to change direction of the motors using only DIRB input of the shield.
I really believe this would make sense. With each channels DIR input you could control the direction of the motor rotation independently and separately....just like you do with the PWMA or PWMB input which control the PWM duty cycle of the each channel.