Hello!!!
I have a big problem with a motor and a motor driver.
See the dual motor driver(and details) I have, here:
Dual Motor
See the motor(and details) I have, here:
Motor
I use an arduino uno to control motor direction and speed of motor.
I also have a voltage transformer (220V -> 24V) and connect these 2 wires to POWER and GND of driver
I connect the +5V and GND to arduino 5V and GND, pin PWM2 of driver to pin 9 of arduino and pin DIR2 to pin 10 of arduino.
Then, I connect pin MOTOR2 to red wire of motor and the other pin MOTOR2 of driver to black wire of motor.
CODE:
int DIR = 10;
int PWM = 9;
void setup()
{
pinMode(DIR, OUTPUT);
pinMode(PWM, OUTPUT);
}
void loop()
{
for (int i = 0; i <= 255; i++) // increase speed
{
digitalWrite(PWM, i);
digitalWrite(DIR, 0);
delay(30);
if (i == 255) //if max_speed
{
for (int i = 255; i >= 0; i--) // decrease speed
{
digitalWrite(PWM, i);
digitalWrite(DIR, 0);
delay(30);
}
}
}
}
So,the problem I have is:
For some reason, speed is not increasing/decreasing ,but is stable
Then when I change DIR2 from 0 to 1 ,the motor rotates otherwise, BUT the motor driver board starts to get very hot .
Do you have any link about this motor driver(how it works)??
I have found some videos ,but doesn't refer descriptions(or code).
I need a big help here.
There are descriptions for motor and motor driver in links.
I think this project will be my thesis in the future
If I solve this important and basic problem ,I will be able to continue the project.
Your help is very important !!!
Thanks a lot...