Hi,
I'm new on the forum, and i didn't see anybody with this problem, so let's see if someone can help! thanks! (sorry for my grammar, english isn't my mother language as you will see :-[ )
I am trying to controll a DC motor (a window regulator motor) with an Arduino Uno and the arduino motor shield. I am using an external power supply of 12V and in order to get more intensity i am using both motor chanels in parallel to get 4A.
The program works at the begining, but after few seconds it start's doing "strange" things. It apears that it hasn't enough energy and it stops.
In addition, if i use, for example 128 for the pwm value, instead of 255, the motor make an anoying sound and both leds of each channell of the shield are on.
I record some videos to show the problem. I am using the serial port to send the commands as "go left" and "go right".
This is using value PWM=255
This two using 128
This are parts of my code:
void goLeft(int v) {
digitalWrite(12, LOW); // A dir to left
digitalWrite(13, LOW); // B dir to left
digitalWrite(9, LOW); // A brake realease
digitalWrite(8, LOW); // B brake release
analogWrite(3, v); // PWM A
analogWrite(11, v); // PWM B
}
void goRight(int v) {
digitalWrite(12, HIGH); // A dir to right
digitalWrite(13, HIGH); // B dir to right
digitalWrite(9, LOW); // A brake release
digitalWrite(8, LOW); // B brake release
analogWrite(3, v); // PWM A
analogWrite(11, v); // PWM B
}
void stopMotors() {
digitalWrite(9, HIGH); // A brake
digitalWrite(8, HIGH); // B brake
analogWrite(3, 0);
analogWrite(11, 0);
}
I would be very grateful for any help you could give me!
Thanks!!