Hey all,
I have 2 DC Motors connected to DVR8835.
I am using PHASE/ENABLE Mode, so MODE pin is HIGH.
The motors will always run at common speed, so the port from arduino that produces the PWM is common to both Aenable and Benable.
The phase (direction) of motors is controlled from Aphase pins and Bphase pins from arduino.
PWM seems to be working good. I have tried different output compare values (that alter pwm speed etc) and the speed changes accordingly.
However here is the strange fact:
Say for example I want to run my vehicle forwards at a certain speed with this pseudocode:
aphase_pin = 1
bphase_pin = 1
PWM = X //connected to Aenable and Benable
The vehicle at this point will continue to move accordingly, however if I want to change it’s direction
aphase_pin=0
bphase_pin=0
Then only one motor will obey.
The strange fact is that if I run FROM THE BEGINNING this:
aphase_pin =0
bphase_pin =0
PWM = x
The motors will behave good but then again if I want to change the direction
aphase_pin =1
bphase_pin =1
They won’t behave accordingly.
So to sum up, If I “initialize” the phase pins at a certain direction, then the motors will obey and will move to that particular direction, however if I want to change the direction then they won’t obey!
Any thoughts?